summaryrefslogtreecommitdiffstats
path: root/kbabel/common
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit0813b39aed2cf4c84157a22c4c9594336d93d412 (patch)
tree0f6157f9c9ecc6ed26cb98f058219a8021d3f4a6 /kbabel/common
parent35dc58791106d7a1864264063df5f3ee3f1f0f15 (diff)
downloadtdesdk-0813b39aed2cf4c84157a22c4c9594336d93d412.tar.gz
tdesdk-0813b39aed2cf4c84157a22c4c9594336d93d412.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/common')
-rw-r--r--kbabel/common/catalog.cpp208
-rw-r--r--kbabel/common/catalogitem.cpp46
-rw-r--r--kbabel/common/catalogsettings.cpp4
-rw-r--r--kbabel/common/diff.h2
-rw-r--r--kbabel/common/editcmd.cpp4
-rw-r--r--kbabel/common/kbmailer.cpp2
-rw-r--r--kbabel/common/msgfmt.cpp6
-rw-r--r--kbabel/common/poinfo.cpp30
-rw-r--r--kbabel/common/regexpextractor.cpp10
-rw-r--r--kbabel/common/regexpextractor.h2
-rw-r--r--kbabel/common/stringdistance.cpp2
-rw-r--r--kbabel/common/stringdistance.h4
12 files changed, 160 insertions, 160 deletions
diff --git a/kbabel/common/catalog.cpp b/kbabel/common/catalog.cpp
index 6ca18cba..3d9de8b2 100644
--- a/kbabel/common/catalog.cpp
+++ b/kbabel/common/catalog.cpp
@@ -165,7 +165,7 @@ int Catalog::indexForMsgid(const TQString& id) const
int i=0;
TQValueVector<CatalogItem>::ConstIterator it = d->_entries.begin();
- while(it != d->_entries.end() && !((*it).msgid(true).tqcontains(id)))
+ while(it != d->_entries.end() && !((*it).msgid(true).contains(id)))
{
++it;
i++;
@@ -290,8 +290,8 @@ bool Catalog::setHeader(CatalogItem newHeader)
{
// normalize the values - ensure every key:value pair is only on a single line
TQString values = newHeader.msgstr().first();
- values.tqreplace ("\n", "");
- values.tqreplace ("\\n", "\\n\n");
+ values.replace ("\n", "");
+ values.replace ("\\n", "\\n\n");
kdDebug () << "Normalized header: " << values << endl;
@@ -343,7 +343,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp+="\\n";
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).tqcontains(TQRegExp("^ *Last-Translator:.*")))
+ if((*it).contains(TQRegExp("^ *Last-Translator:.*")))
{
(*it) = temp;
found=true;
@@ -363,7 +363,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).tqcontains(TQRegExp("^ *PO-Revision-Date:.*")))
+ if((*it).contains(TQRegExp("^ *PO-Revision-Date:.*")))
{
(*it) = temp;
found=true;
@@ -380,11 +380,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found=false;
temp="Project-Id-Version: "+saveOptions.projectString+"\\n";
- temp.tqreplace( "@PACKAGE@", packageName());
+ temp.replace( "@PACKAGE@", packageName());
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).tqcontains(TQRegExp("^ *Project-Id-Version:.*")))
+ if((*it).contains(TQRegExp("^ *Project-Id-Version:.*")))
{
(*it) = temp;
found=true;
@@ -408,7 +408,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp+="\\n";
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).tqcontains(TQRegExp("^ *Language-Team:.*")))
+ if((*it).contains(TQRegExp("^ *Language-Team:.*")))
{
(*it) = temp;
found=true;
@@ -440,7 +440,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
it = headerList.begin();
while( it != headerList.end() )
{
- if( (*it).tqfind( TQRegExp( "^ *Content-Type:.*" ) ) != -1 )
+ if( (*it).find( TQRegExp( "^ *Content-Type:.*" ) ) != -1 )
{
if ( found )
{
@@ -483,7 +483,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).tqcontains(TQRegExp("^ *Content-Transfer-Encoding:.*")))
+ if((*it).contains(TQRegExp("^ *Content-Transfer-Encoding:.*")))
{
(*it) = temp;
found=true;
@@ -502,7 +502,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).tqcontains(TQRegExp("^ *X-Generator:.*")))
+ if((*it).contains(TQRegExp("^ *X-Generator:.*")))
{
(*it) = temp;
found=true;
@@ -519,7 +519,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found=false;
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).tqcontains(TQRegExp("^ *MIME-Version:")))
+ if((*it).contains(TQRegExp("^ *MIME-Version:")))
{
(*it) = temp;
found=true;
@@ -541,7 +541,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
{
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).tqcontains(TQRegExp("^ *Plural-Forms:")))
+ if((*it).contains(TQRegExp("^ *Plural-Forms:")))
{
(*it) = temp;
found=true;
@@ -564,7 +564,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = commentList.begin(); it != commentList.end(); ++it )
{
// U+00A9 is the Copyright sign
- if ( (*it).tqfind( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 )
+ if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 )
{
found=true;
break;
@@ -572,21 +572,21 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
}
if(found)
{
- if ( (*it).tqfind( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 )
+ if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 )
{
//template string
if( saveOptions.FSFCopyright == ProjectSettingsBase::Remove)
(*it).remove(" YEAR Free Software Foundation, Inc");
else
- (*it).tqreplace("YEAR", TQDate::tqcurrentDate().toString("yyyy"));
+ (*it).replace("YEAR", TQDate::tqcurrentDate().toString("yyyy"));
} else
if( saveOptions.FSFCopyright == ProjectSettingsBase::Update )
{
//update years
TQString cy = TQDate::tqcurrentDate().toString("yyyy");
- if( !(*it).tqcontains( TQRegExp(cy)) ) // is the year already included?
+ if( !(*it).contains( TQRegExp(cy)) ) // is the year already included?
{
- int index = (*it).tqfindRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
+ int index = (*it).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
if( index == -1 )
{
KMessageBox::information(0,i18n("Free Software Foundation Copyright does not contain any year. "
@@ -603,14 +603,14 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
&& ( !saveOptions.descriptionString.isEmpty() ) )
{
temp = "# "+saveOptions.descriptionString;
- temp.tqreplace( "@PACKAGE@", packageName());
- temp.tqreplace( "@LANGUAGE@", identityOptions.languageName);
+ temp.replace( "@PACKAGE@", packageName());
+ temp.replace( "@LANGUAGE@", identityOptions.languageName);
temp = temp.stripWhiteSpace();
// The description strings has often buggy variants already in the file, these must be removed
TQString regexpstr = "^#\\s+" + TQRegExp::escape( saveOptions.descriptionString.stripWhiteSpace() ) + "\\s*$";
- regexpstr.tqreplace( "@PACKAGE@", ".*" );
- regexpstr.tqreplace( "@LANGUAGE@", ".*" );
+ regexpstr.replace( "@PACKAGE@", ".*" );
+ regexpstr.replace( "@LANGUAGE@", ".*" );
//kdDebug() << "REGEXPSTR: " << regexpstr << endl;
TQRegExp regexp ( regexpstr );
@@ -683,11 +683,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
while ( it != commentList.end() )
{
bool deleteItem = false;
- if ( (*it).tqfind ( "copyright", 0, false ) != -1 )
+ if ( (*it).find ( "copyright", 0, false ) != -1 )
{
// We have a line with a copyright. It should not be moved.
}
- else if ( (*it).tqfind ( regexpYearAlone ) != -1 )
+ else if ( (*it).find ( regexpYearAlone ) != -1 )
{
// We have found a year number that is preceeded by a comma.
// That is typical of KBabel 1.10 (and earlier?) when there is neither an author name nor an email
@@ -699,9 +699,9 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
// Typical placeholder, remove it.
deleteItem = true;
}
- else if ( (*it).tqfind ( regexpAuthorYear ) != -1 ) // email address followed by year
+ else if ( (*it).find ( regexpAuthorYear ) != -1 ) // email address followed by year
{
- if ( foundAuthors.tqfind( (*it) ) == foundAuthors.end() )
+ if ( foundAuthors.find( (*it) ) == foundAuthors.end() )
{
// The author line is new (and not a duplicate), so add it to the author line list
foundAuthors.append( (*it) );
@@ -726,12 +726,12 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
ait = foundAuthors.end();
for( it = foundAuthors.begin() ; it!=foundAuthors.end(); ++it )
{
- if ( (*it).tqfind( TQRegExp(
+ if ( (*it).find( TQRegExp(
TQRegExp::escape( identityOptions.authorName )+".*"
+ TQRegExp::escape( identityOptions.authorEmail ) ) ) != -1 )
{
foundAuthor = true;
- if( (*it).tqfind( cy ) != -1 )
+ if( (*it).find( cy ) != -1 )
found = true;
else
ait = it;
@@ -744,7 +744,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
else if ( ait != foundAuthors.end() )
{
//update years
- const int index = (*ait).tqfindRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
+ const int index = (*ait).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
if ( index == -1 )
(*ait)+=", "+cy;
else
@@ -760,7 +760,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
it=commentList.end();
do
--it;
- while( ( it != commentList.begin() ) && ( (*it).tqfind( TQRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) );
+ while( ( it != commentList.begin() ) && ( (*it).find( TQRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) );
++it;
for( ait = foundAuthors.begin() ; ait != foundAuthors.end() ; ++ait )
{
@@ -838,7 +838,7 @@ TQString Catalog::packageName() const
TQString package=d->_url.fileName();
- int index=package.tqfind(TQRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$"));
+ int index=package.find(TQRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$"));
if(index>0)
package=package.left(index);
@@ -848,7 +848,7 @@ TQString Catalog::packageName() const
void Catalog::setPackage(const TQString& package )
{
- const int pos = package.tqfindRev( '/' );
+ const int pos = package.findRev( '/' );
if( pos < 0 )
{
d->_packageDir = TQString();
@@ -1095,7 +1095,7 @@ ConversiontqStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, co
Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors)
{
- if( !d->_mimeTypes.tqcontains( "application/x-gettext" ) )
+ if( !d->_mimeTypes.contains( "application/x-gettext" ) )
return Msgfmt::Unsupported;
TQString filename;
@@ -1128,10 +1128,10 @@ Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors)
const TQStringList lines = TQStringList::split("\n",output);
for ( TQStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it )
{
- if( (*it).tqfind(TQRegExp("^.+:\\d+:")) >= 0 )
+ if( (*it).find(TQRegExp("^.+:\\d+:")) >= 0 )
{
- const int begin=(*it).tqfind(":",0)+1;
- const int end=(*it).tqfind(":",begin);
+ const int begin=(*it).find(":",0)+1;
+ const int end=(*it).find(":",begin);
const TQString line=(*it).mid(begin,end-begin);
@@ -1148,7 +1148,7 @@ Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors)
continue;
}
- if( !d->_errorIndex.tqcontains(currentIndex) )
+ if( !d->_errorIndex.contains(currentIndex) )
{
d->_errorIndex.append(currentIndex);
d->_entries[currentIndex].setSyntaxError(true);
@@ -1177,7 +1177,7 @@ void Catalog::clearErrorList()
void Catalog::removeFromErrorList(uint index)
{
- if(d->_errorIndex.tqcontains(index))
+ if(d->_errorIndex.contains(index))
{
d->_errorIndex.remove(index);
d->_entries[index].setSyntaxError(false);
@@ -1241,7 +1241,7 @@ bool Catalog::checkUsingTool(KDataTool* tool, bool clearErrors)
{
if( !tool->run( "validate", (void*)(&(*it)), "CatalogItem", "application/x-kbabel-catalogitem" ))
{
- if( !d->_errorIndex.tqcontains(index) )
+ if( !d->_errorIndex.contains(index) )
{
d->_errorIndex.append(index);
hasErrors=true;
@@ -1461,7 +1461,7 @@ bool Catalog::isUntranslated(uint index) const
bool Catalog::hasError(uint index, DocPosition& pos) const
{
- if( d->_errorIndex.tqcontains(index) )
+ if( d->_errorIndex.contains(index) )
{
pos.item=index;
pos.form=0;
@@ -1541,7 +1541,7 @@ int Catalog::prevError(uint startIndex, DocPosition& pos) const
void Catalog::registerView(CatalogView* view)
{
- if(d->_views.tqcontainsRef(view)==0)
+ if(d->_views.containsRef(view)==0)
{
d->_views.append(view);
}
@@ -1734,7 +1734,7 @@ int Catalog::findNextInList(const TQValueList<uint>& list,uint index) const
int nextIndex=-1;
// find index in List
- it=list.tqfind(index);
+ it=list.find(index);
// if the given index is found in the list and not the last entry
// in the list, return the next listentry
@@ -1765,7 +1765,7 @@ int Catalog::findPrevInList(const TQValueList<uint>& list,uint index) const
int prevIndex=-1;
- it=list.tqfind(index);
+ it=list.find(index);
// if the given index is found in the list and not the last entry
// in the list, return the next listentry
@@ -1831,49 +1831,49 @@ TQString Catalog::dateTime() const
const TQTime time = dt.time();
// the year
- dateTimeString.tqreplace( "%Y", TQString::number( date.year() ) );
- dateTimeString.tqreplace( "%y", TQString::number( date.year() ).right(2) );
+ dateTimeString.replace( "%Y", TQString::number( date.year() ) );
+ dateTimeString.replace( "%y", TQString::number( date.year() ).right(2) );
// the month
if(date.month()<10)
{
- dateTimeString.tqreplace( "%m", "0"+TQString::number( date.month() ) );
+ dateTimeString.replace( "%m", "0"+TQString::number( date.month() ) );
}
else
{
- dateTimeString.tqreplace( "%m", TQString::number( date.month() ) );
+ dateTimeString.replace( "%m", TQString::number( date.month() ) );
}
- dateTimeString.tqreplace( "%f", TQString::number( date.month() ) );
+ dateTimeString.replace( "%f", TQString::number( date.month() ) );
- dateTimeString.tqreplace( "%b", date.longMonthName(date.month()) );
- dateTimeString.tqreplace( "%h", date.longMonthName(date.month()) );
+ dateTimeString.replace( "%b", date.longMonthName(date.month()) );
+ dateTimeString.replace( "%h", date.longMonthName(date.month()) );
// the day
- dateTimeString.tqreplace( "%j", TQString::number( date.dayOfYear() ) );
- dateTimeString.tqreplace( "%e", TQString::number( date.day() ) );
+ dateTimeString.replace( "%j", TQString::number( date.dayOfYear() ) );
+ dateTimeString.replace( "%e", TQString::number( date.day() ) );
if(date.day() < 10)
{
- dateTimeString.tqreplace( "%d", "0"+TQString::number( date.day() ) );
+ dateTimeString.replace( "%d", "0"+TQString::number( date.day() ) );
}
else
{
- dateTimeString.tqreplace( "%d", TQString::number( date.day() ) );
+ dateTimeString.replace( "%d", TQString::number( date.day() ) );
}
- dateTimeString.tqreplace( "%a", date.longDayName( date.dayOfWeek() ) );
+ dateTimeString.replace( "%a", date.longDayName( date.dayOfWeek() ) );
// hour
- dateTimeString.tqreplace( "%k", TQString::number( time.hour() ) );
+ dateTimeString.replace( "%k", TQString::number( time.hour() ) );
if(time.hour() < 10)
{
- dateTimeString.tqreplace( "%H", "0"+TQString::number( time.hour() ) );
+ dateTimeString.replace( "%H", "0"+TQString::number( time.hour() ) );
}
else
{
- dateTimeString.tqreplace( "%H", TQString::number( time.hour() ) );
+ dateTimeString.replace( "%H", TQString::number( time.hour() ) );
}
TQString zone; // AM or PM
@@ -1888,46 +1888,46 @@ TQString Catalog::dateTime() const
zone="AM";
}
- dateTimeString.tqreplace( "%I", TQString::number( hour ) );
+ dateTimeString.replace( "%I", TQString::number( hour ) );
if(hour < 10)
{
- dateTimeString.tqreplace( "%i", "0"+TQString::number( hour ) );
+ dateTimeString.replace( "%i", "0"+TQString::number( hour ) );
}
else
{
- dateTimeString.tqreplace( "%i", TQString::number( hour ) );
+ dateTimeString.replace( "%i", TQString::number( hour ) );
}
- dateTimeString.tqreplace( "%p", zone );
+ dateTimeString.replace( "%p", zone );
// minutes
if(time.minute() < 10)
{
- dateTimeString.tqreplace( "%M", "0"+TQString::number( time.minute() ) );
+ dateTimeString.replace( "%M", "0"+TQString::number( time.minute() ) );
}
else
{
- dateTimeString.tqreplace( "%M", TQString::number( time.minute() ) );
+ dateTimeString.replace( "%M", TQString::number( time.minute() ) );
}
// seconds
if(time.second() < 10)
{
- dateTimeString.tqreplace( "%S", "0"+TQString::number( time.second() ) );
+ dateTimeString.replace( "%S", "0"+TQString::number( time.second() ) );
}
else
{
- dateTimeString.tqreplace( "%S", TQString::number( time.second() ) );
+ dateTimeString.replace( "%S", TQString::number( time.second() ) );
}
// timezone
- dateTimeString.tqreplace( "%Z", d->_project->identitySettings().timeZone );
+ dateTimeString.replace( "%Z", d->_project->identitySettings().timeZone );
TQTime t;
const int offset = KRFCDate::localUTCOffset();
const int correction = offset < 0 ? -60 : 60;
t = t.addSecs( offset * correction );
- dateTimeString.tqreplace( "%z", ( offset < 0 ? "-" : "+" ) + t.toString("hhmm") );
+ dateTimeString.replace( "%z", ( offset < 0 ? "-" : "+" ) + t.toString("hhmm") );
break;
}
}
@@ -2179,72 +2179,72 @@ PoInfo Catalog::headerInfo(const CatalogItem headerItem)
// extract information from the header
for(it=header.begin();it!=header.end();++it)
{
- if((*it).tqcontains(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$")))
+ if((*it).contains(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$")))
{
- info.project=(*it).tqreplace(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*"),"");
+ info.project=(*it).replace(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*"),"");
if(info.project.right(2)=="\\n")
info.project.remove(info.project.length()-2,2);
info.project=info.project.simplifyWhiteSpace();
}
- else if((*it).tqcontains(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$")))
{
- info.creation=(*it).tqreplace(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),"");
+ info.creation=(*it).replace(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),"");
if(info.creation.right(2)=="\\n")
info.creation.remove(info.creation.length()-2,2);
info.creation=info.creation.simplifyWhiteSpace();
}
- else if((*it).tqcontains(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$")))
{
- info.revision=(*it).tqreplace(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),"");
+ info.revision=(*it).replace(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),"");
if(info.revision.right(2)=="\\n")
info.revision.remove(info.revision.length()-2,2);
info.revision=info.revision.simplifyWhiteSpace();
}
- else if((*it).tqcontains(TQRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$")))
{
- info.lastTranslator=(*it).tqreplace(TQRegExp("^\\s*Last-Translator\\s*:\\s*"),"");
+ info.lastTranslator=(*it).replace(TQRegExp("^\\s*Last-Translator\\s*:\\s*"),"");
if(info.lastTranslator.right(2)=="\\n")
info.lastTranslator.remove(info.lastTranslator.length()-2,2);
info.lastTranslator=info.lastTranslator.simplifyWhiteSpace();
}
- else if((*it).tqcontains(TQRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*")))
{
- info.languageTeam=(*it).tqreplace(TQRegExp("^\\s*Language-Team\\s*:\\s*"),"");
+ info.languageTeam=(*it).replace(TQRegExp("^\\s*Language-Team\\s*:\\s*"),"");
if(info.languageTeam.right(2)=="\\n")
info.languageTeam.remove(info.languageTeam.length()-2,2);
info.languageTeam=info.languageTeam.simplifyWhiteSpace();
}
- else if((*it).tqcontains(TQRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*")))
{
- info.mimeVersion=(*it).tqreplace(TQRegExp("^\\s*MIME-Version\\s*:\\s*"),"");
+ info.mimeVersion=(*it).replace(TQRegExp("^\\s*MIME-Version\\s*:\\s*"),"");
if(info.mimeVersion.right(2)=="\\n")
info.mimeVersion.remove(info.mimeVersion.length()-2,2);
info.mimeVersion=info.mimeVersion.simplifyWhiteSpace();
}
- else if((*it).tqcontains(TQRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*")))
{
- info.contentType=(*it).tqreplace(TQRegExp("^\\s*Content-Type\\s*:\\s*"),"");
+ info.contentType=(*it).replace(TQRegExp("^\\s*Content-Type\\s*:\\s*"),"");
if(info.contentType.right(2)=="\\n")
info.contentType.remove(info.contentType.length()-2,2);
info.contentType=info.contentType.simplifyWhiteSpace();
}
- else if((*it).tqcontains(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*")))
{
- info.encoding=(*it).tqreplace(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),"");
+ info.encoding=(*it).replace(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),"");
if(info.encoding.right(2)=="\\n")
info.encoding.remove(info.encoding.length()-2,2);
@@ -2590,9 +2590,9 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
}
if(findOpts->ignoreAccelMarker
- && targetStr.tqcontains(miscOptions.accelMarker))
+ && targetStr.contains(miscOptions.accelMarker))
{
- accelMarkerPos = targetStr.tqfind(miscOptions.accelMarker);
+ accelMarkerPos = targetStr.find(miscOptions.accelMarker);
targetStr.remove(accelMarkerPos,1);
if(docPos.offset > (uint)accelMarkerPos)
@@ -2605,7 +2605,7 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
if(findOpts->wholeWords) {
TQString pre=targetStr.mid(pos-1,1);
TQString post=targetStr.mid(pos+len,1);
- if(!pre.tqcontains(TQRegExp("[a-zA-Z0-9]")) && !post.tqcontains(TQRegExp("[a-zA-Z0-9]")) ){
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2617,13 +2617,13 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
}
}
else {
- if( (pos=targetStr.tqfind(searchStr,docPos.offset,findOpts->caseSensitive)) >= 0 ) {
+ if( (pos=targetStr.find(searchStr,docPos.offset,findOpts->caseSensitive)) >= 0 ) {
len=searchStr.length();
if(findOpts->wholeWords) {
TQString pre=targetStr.mid(pos-1,1);
TQString post=targetStr.mid(pos+len,1);
- if(!pre.tqcontains(TQRegExp("[a-zA-Z0-9]")) && !post.tqcontains(TQRegExp("[a-zA-Z0-9]")) ){
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2839,9 +2839,9 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
if(findOpts->ignoreAccelMarker
- && targetStr.tqcontains(miscOptions.accelMarker))
+ && targetStr.contains(miscOptions.accelMarker))
{
- accelMarkerPos = targetStr.tqfind(miscOptions.accelMarker);
+ accelMarkerPos = targetStr.find(miscOptions.accelMarker);
targetStr.remove(accelMarkerPos,1);
if(docPos.offset > (uint)accelMarkerPos)
@@ -2854,7 +2854,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
else if( findOpts->isRegExp ) {
/*
don't work!?
- if((pos=targetStr.tqfindRev(regexp,docPos.offset)) >= 0 ) {
+ if((pos=targetStr.findRev(regexp,docPos.offset)) >= 0 ) {
regexp.match(targetStr,pos,&len); // to get the length of the string
*/
bool found=false;
@@ -2871,7 +2871,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
if(findOpts->wholeWords) {
TQString pre=targetStr.mid(pos-1,1);
TQString post=targetStr.mid(pos+len,1);
- if(!pre.tqcontains(TQRegExp("[a-zA-Z0-9]")) && !post.tqcontains(TQRegExp("[a-zA-Z0-9]")) ){
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2882,13 +2882,13 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
}
}
- else if( (pos=targetStr.tqfindRev(searchStr,docPos.offset-1,findOpts->caseSensitive)) >= 0
+ else if( (pos=targetStr.findRev(searchStr,docPos.offset-1,findOpts->caseSensitive)) >= 0
&& (uint)pos < docPos.offset) {
len=searchStr.length();
if(findOpts->wholeWords) {
TQString pre=targetStr.mid(pos-1,1);
TQString post=targetStr.mid(pos+len,1);
- if(!pre.tqcontains(TQRegExp("[a-zA-Z0-9]")) && !post.tqcontains(TQRegExp("[a-zA-Z0-9]")) ){
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -3071,8 +3071,8 @@ Catalog::DiffResult Catalog::diff(uint entry, TQString *result)
// then look if the same msgid is contained in the diff file
// FIXME: should care about plural forms in msgid
TQString id = msgid(entry).first();
- id.tqreplace( "\n","");
- if(d->msgidDiffList.tqcontains(id))
+ id.replace( "\n","");
+ if(d->msgidDiffList.contains(id))
{
// FIXME:: should care about plural forms in msgid
*result = msgid(entry).first();
@@ -3091,8 +3091,8 @@ Catalog::DiffResult Catalog::diff(uint entry, TQString *result)
// then look if there are entries with the same translation
kdWarning() << "Diff feature (2) does not work with plural forms" << endl;
TQString str = msgstr(entry).first();
- str.tqreplace("\n","");
- if(d->msgstr2MsgidDiffList.tqcontains(str))
+ str.replace("\n","");
+ if(d->msgstr2MsgidDiffList.contains(str))
{
TQStringList list = d->msgstr2MsgidDiffList[str];
@@ -3193,7 +3193,7 @@ Catalog::DiffResult Catalog::diff(uint entry, TQString *result)
TQString r = wordDiff(idForDiff,id);
//esp for plural forms
- *result = r.tqreplace("\\n<KBABELADD>" + TQString(TQChar(0x00B6)) + "</KBABELADD>", "\\n\n");
+ *result = r.replace("\\n<KBABELADD>" + TQString(TQChar(0x00B6)) + "</KBABELADD>", "\\n\n");
s = new TQString(*result);
if( !d->diffCache.insert(entry,s) )
@@ -3236,14 +3236,14 @@ void Catalog::setDiffList( const TQValueList<DiffEntry>& list)
}
TQString id = (*it).msgid;
- id.tqreplace("\n","");
+ id.replace("\n","");
TQString str = (*it).msgstr;
- str.tqreplace("\n","");
+ str.replace("\n","");
d->msgidDiffList.append(id);
if(!str.isEmpty())
{
- if(d->msgstr2MsgidDiffList.tqcontains(str))
+ if(d->msgstr2MsgidDiffList.contains(str))
{
TQStringList sl = d->msgstr2MsgidDiffList[str];
sl.append(id);
@@ -3506,4 +3506,4 @@ void Catalog::wordCount (uint &total, uint &fuzzy, uint &untranslated) const
#include "catalog.moc"
-// kate: space-indent on; indent-width 4; tqreplace-tabs on;
+// kate: space-indent on; indent-width 4; replace-tabs on;
diff --git a/kbabel/common/catalogitem.cpp b/kbabel/common/catalogitem.cpp
index 14604438..234637d1 100644
--- a/kbabel/common/catalogitem.cpp
+++ b/kbabel/common/catalogitem.cpp
@@ -75,7 +75,7 @@ TQString CatalogItem::msgctxt(const bool noNewlines) const
if( noNewlines )
{
TQString tmp = d->_msgctxt;
- tmp.tqreplace("\n", " "); // ### TODO: " " or "" ?
+ tmp.replace("\n", " "); // ### TODO: " " or "" ?
return tmp;
}
else
@@ -207,29 +207,29 @@ TQStringList CatalogItem::argList( RegExpExtractor& te)
bool CatalogItem::isFuzzy() const
{
- return d->_comment.tqfind( TQRegExp(",\\s*fuzzy") ) != -1;
+ return d->_comment.find( TQRegExp(",\\s*fuzzy") ) != -1;
}
bool CatalogItem::isCformat() const
{
// Allow "possible-c-format" (from xgettext --debug) or "c-format"
// Note the regexp (?: ) is similar to () but it does not capture (so it is faster)
- return d->_comment.tqfind( TQRegExp(",\\s*(?:possible-)c-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*(?:possible-)c-format") ) == -1;
}
bool CatalogItem::isNoCformat() const
{
- return d->_comment.tqfind( TQRegExp(",\\s*no-c-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*no-c-format") ) == -1;
}
bool CatalogItem::isTQtformat() const
{
- return d->_comment.tqfind( TQRegExp(",\\s*qt-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*qt-format") ) == -1;
}
bool CatalogItem::isNoTQtformat() const
{
- return d->_comment.tqfind( TQRegExp(",\\s*no-qt-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*no-qt-format") ) == -1;
}
bool CatalogItem::isUntranslated() const
@@ -252,23 +252,23 @@ int CatalogItem::totalLines() const
int lines=0;
if(!d->_comment.isEmpty())
{
- lines = d->_comment.tqcontains('\n')+1;
+ lines = d->_comment.contains('\n')+1;
}
int msgctxtLines=0;
if(!d->_msgctxt.isEmpty())
{
- msgctxtLines=d->_msgctxt.tqcontains('\n')+1;
+ msgctxtLines=d->_msgctxt.contains('\n')+1;
}
int msgidLines=0;
TQStringList::ConstIterator it;
for(it=d->_msgid.begin(); it != d->_msgid.end(); ++it)
{
- msgidLines += (*it).tqcontains('\n')+1;
+ msgidLines += (*it).contains('\n')+1;
}
int msgstrLines=0;
for(it=d->_msgstr.begin(); it != d->_msgstr.end(); ++it)
{
- msgstrLines += (*it).tqcontains('\n')+1;
+ msgstrLines += (*it).contains('\n')+1;
}
if(msgctxtLines>1)
@@ -286,7 +286,7 @@ int CatalogItem::totalLines() const
void CatalogItem::setSyntaxError(bool on)
{
- if(on && !d->_errors.tqcontains("syntax error"))
+ if(on && !d->_errors.contains("syntax error"))
d->_errors.append("syntax error");
else
d->_errors.remove("syntax error");
@@ -305,7 +305,7 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
TQRegExp fuzzyStr(",\\s*fuzzy");
int offset;
- offset=comment.tqfind(fuzzyStr);
+ offset=comment.find(fuzzyStr);
while(offset>=0)
{
cmd = new DelTextCmd(offset,fuzzyStr.cap(),0);
@@ -314,11 +314,11 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,fuzzyStr.cap().length());
- offset=comment.tqfind(fuzzyStr,offset+1);
+ offset=comment.find(fuzzyStr,offset+1);
}
// remove empty comment lines
- if( comment.tqcontains( TQRegExp("^#\\s*$") ))
+ if( comment.contains( TQRegExp("^#\\s*$") ))
{
cmd = new DelTextCmd(0,comment,0);
cmd->setPart(Comment);
@@ -326,9 +326,9 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment="";
}
- if( comment.tqcontains( TQRegExp("\n#\\s*$") ))
+ if( comment.contains( TQRegExp("\n#\\s*$") ))
{
- offset=comment.tqfind( TQRegExp("\n#\\s*$") );
+ offset=comment.find( TQRegExp("\n#\\s*$") );
while(offset>=0)
{
cmd = new DelTextCmd(offset,comment.mid(offset),0);
@@ -337,15 +337,15 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,comment.length()-offset);
- offset=comment.tqfind( TQRegExp("\n#\\s*$"), offset+1 );
+ offset=comment.find( TQRegExp("\n#\\s*$"), offset+1 );
}
}
- if( comment.tqcontains( TQRegExp("\n#\\s*\n") ))
+ if( comment.contains( TQRegExp("\n#\\s*\n") ))
{
- offset=comment.tqfind( TQRegExp("\n#\\s*\n") )+1;
+ offset=comment.find( TQRegExp("\n#\\s*\n") )+1;
while(offset>=0)
{
- int endIndex=comment.tqfind("\n",offset)+1;
+ int endIndex=comment.find("\n",offset)+1;
cmd = new DelTextCmd(offset,comment.mid(offset,endIndex-offset),0);
cmd->setPart(Comment);
@@ -353,7 +353,7 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,endIndex-offset);
- offset=comment.tqfind( TQRegExp("\n#\\s*\n"), offset+1 );
+ offset=comment.find( TQRegExp("\n#\\s*\n"), offset+1 );
}
}
@@ -499,7 +499,7 @@ void CatalogItem::clearErrors()
void CatalogItem::appendError(const TQString& error )
{
- if( !d->_errors.tqcontains( error ) )
+ if( !d->_errors.contains( error ) )
d->_errors.append(error);
}
@@ -518,4 +518,4 @@ void CatalogItem::setProject( Project::Ptr project )
d->_project = project;
}
-// kate: space-indent on; indent-width 4; tqreplace-tabs on;
+// kate: space-indent on; indent-width 4; replace-tabs on;
diff --git a/kbabel/common/catalogsettings.cpp b/kbabel/common/catalogsettings.cpp
index a25920ba..24d469ec 100644
--- a/kbabel/common/catalogsettings.cpp
+++ b/kbabel/common/catalogsettings.cpp
@@ -59,7 +59,7 @@ TQString KBabel::charsetString(const TQTextCodec *codec)
if ( encodingStr.startsWith("CP " ) )
encodingStr.remove( 2, 1 );
else if ( encodingStr.startsWith("IBM " ) )
- encodingStr.tqreplace( "IBM ", "CP" );
+ encodingStr.replace( "IBM ", "CP" );
return encodingStr;
}
else
@@ -192,7 +192,7 @@ TQString Defaults::Identity::authorEmail()
TQString Defaults::Identity::mailingList()
{
TQString lang=Defaults::Identity::languageCode();
- int temp=lang.tqfind("_");
+ int temp=lang.find("_");
lang=lang.left(temp);
return lang+"@li.org";
}
diff --git a/kbabel/common/diff.h b/kbabel/common/diff.h
index 15454f17..214be97c 100644
--- a/kbabel/common/diff.h
+++ b/kbabel/common/diff.h
@@ -81,7 +81,7 @@ typedef enum
inline TQString LCSprinter::getString()
{
- return resultString.join("").tqreplace(TQChar('\n'), ""); //w/o replace we'd get whole line colored
+ return resultString.join("").replace(TQChar('\n'), ""); //w/o replace we'd get whole line colored
}
#endif // DIFF_H
diff --git a/kbabel/common/editcmd.cpp b/kbabel/common/editcmd.cpp
index b0c8cd09..0ba73c08 100644
--- a/kbabel/common/editcmd.cpp
+++ b/kbabel/common/editcmd.cpp
@@ -68,7 +68,7 @@ bool DelTextCmd::merge( EditCommand* other)
&& o->type() == type() && o->pluralNumber==pluralNumber )
{
DelTextCmd* o = (DelTextCmd*) other;
- if ( offset + int(str.length()) == o->offset && !str.tqcontains(TQRegExp("^\\s$")) )
+ if ( offset + int(str.length()) == o->offset && !str.contains(TQRegExp("^\\s$")) )
{
o->str.prepend( str );
o->offset = offset;
@@ -95,7 +95,7 @@ bool InsTextCmd::merge( EditCommand* other)
if ( o->index()==index() && o->part() == part()
&& o->type() == type() && o->pluralNumber==pluralNumber )
{
- if ( offset == o->offset + int(o->str.length()) && !str.tqcontains(TQRegExp("^\\s$")) )
+ if ( offset == o->offset + int(o->str.length()) && !str.contains(TQRegExp("^\\s$")) )
{
o->str += str;
return true;
diff --git a/kbabel/common/kbmailer.cpp b/kbabel/common/kbmailer.cpp
index 1cb26723..d63940af 100644
--- a/kbabel/common/kbmailer.cpp
+++ b/kbabel/common/kbmailer.cpp
@@ -199,7 +199,7 @@ TQString KBabelMailer::buildArchive(TQStringList fileList, TQString archiveName,
// actually reside in one of its subdirectories. Else they are stored
// without relative path.
TQString poArchFileName = url.path();
- if (_poBaseDir.isEmpty( ) || poArchFileName.tqfind(_poBaseDir) != 0)
+ if (_poBaseDir.isEmpty( ) || poArchFileName.find(_poBaseDir) != 0)
poArchFileName = TQFileInfo( poArchFileName ).fileName();
else
poArchFileName.remove( TQRegExp( "^" + TQRegExp::escape( _poBaseDir ) + "/?" ) );
diff --git a/kbabel/common/msgfmt.cpp b/kbabel/common/msgfmt.cpp
index 86632720..36af8551 100644
--- a/kbabel/common/msgfmt.cpp
+++ b/kbabel/common/msgfmt.cpp
@@ -80,7 +80,7 @@ Msgfmt::tqStatus Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu)
}
else if(proc.normalExit())
{
- if( proc.exitStatus() || _output.tqcontains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
+ if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
stat=SyntaxError;
}
else
@@ -109,7 +109,7 @@ Msgfmt::tqStatus Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString&
_output="";
proc << "IFS='\n'; msgfmt --statistics -o /dev/null "
- "$(tqfind" << KProcess::quote(dir) << "-name" << KProcess::quote(regexp) << ")";
+ "$(find" << KProcess::quote(dir) << "-name" << KProcess::quote(regexp) << ")";
if(!proc.start(KProcess::Block,KProcess::Stderr))
{
@@ -117,7 +117,7 @@ Msgfmt::tqStatus Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString&
}
else if(proc.normalExit())
{
- if( proc.exitStatus() || _output.tqcontains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
+ if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
stat=SyntaxError;
}
else
diff --git a/kbabel/common/poinfo.cpp b/kbabel/common/poinfo.cpp
index 173c369d..63a01d38 100644
--- a/kbabel/common/poinfo.cpp
+++ b/kbabel/common/poinfo.cpp
@@ -209,7 +209,7 @@ bool PoInfo::cacheFind(const TQString url, PoInfo& info)
cacheRead();
}
- poInfoCacheItem *item = _poInfoCache.tqfind( url );
+ poInfoCacheItem *item = _poInfoCache.find( url );
if( item ) {
TQFileInfo fi( url );
@@ -297,7 +297,7 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
{
bool knownKey=false;
// We search for the : character, which is the separator between key and value
- const int res=(*it).tqfind(':');
+ const int res=(*it).find(':');
if (res>=0)
{
knownKey=true; // We know most keys, if not it will be changed to false in the "else" case
@@ -415,7 +415,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList
{
success=OK;
- if( temp.comment().tqcontains("\n#~") ) continue; // skip obsolete
+ if( temp.comment().contains("\n#~") ) continue; // skip obsolete
if( temp.msgid().first().isEmpty()) //header
{
@@ -453,7 +453,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList
{
TQString w = sl.first();
sl.pop_front();
- if( !wordList.tqcontains(w) ) wordList.append( w );
+ if( !wordList.contains(w) ) wordList.append( w );
}
st = temp.msgstr().join(" " ).simplifyWhiteSpace().lower();
sl = TQStringList::split( ' ', st );
@@ -461,7 +461,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList
{
TQString w = sl.first();
sl.pop_front();
- if( !wordList.tqcontains(w) ) wordList.append( w );
+ if( !wordList.contains(w) ) wordList.append( w );
}
st = temp.comment().simplifyWhiteSpace().lower();
sl = TQStringList::split( ' ', st );
@@ -469,7 +469,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList
{
TQString w = sl.first();
sl.pop_front();
- if( !wordList.tqcontains(w) ) wordList.append( w );
+ if( !wordList.contains(w) ) wordList.append( w );
}
}
}
@@ -560,15 +560,15 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.isRegExp )
pos=regexp.search(text, 0 );
else
- pos=text.tqfind(searchStr,0,options.caseSensitive);
+ pos=text.find(searchStr,0,options.caseSensitive);
if( pos >= 0)
{
if( options.wholeWords) {
len = searchStr.length();
TQString pre = text.mid(pos-1,1);
TQString post = text.mid(pos+len,1);
- if( !pre.tqcontains( TQRegExp("[a-zA-Z0-9]")) &&
- !post.tqcontains( TQRegExp("[a-zA-Z0-9]") )
+ if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
+ !post.contains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@@ -601,7 +601,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.ignoreAccelMarker )
{
- pos = text.tqfind( options.accelMarker );
+ pos = text.find( options.accelMarker );
if( pos >= 0 )
text.remove( pos, 1 );
}
@@ -609,7 +609,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.isRegExp )
pos=regexp.search(text, 0 );
else
- pos=text.tqfind(searchStr,0,options.caseSensitive);
+ pos=text.find(searchStr,0,options.caseSensitive);
if( pos >= 0)
{
@@ -617,8 +617,8 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
len = searchStr.length();
TQString pre = text.mid(pos-1,1);
TQString post = text.mid(pos+len,1);
- if( !pre.tqcontains( TQRegExp("[a-zA-Z0-9]")) &&
- !post.tqcontains( TQRegExp("[a-zA-Z0-9]") )
+ if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
+ !post.contains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@@ -758,7 +758,7 @@ ConversiontqStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer,
{
TQStringList msgstrs = item.msgstr();
TQString s = TQString::fromUtf8(lexer->YYText());
- while( lexer->lastToken == T_MSGSTR && s.tqcontains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) )
+ while( lexer->lastToken == T_MSGSTR && s.contains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) )
{
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
it = msgstrs.fromLast();
@@ -778,4 +778,4 @@ ConversiontqStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer,
return OK;
}
-// kate: space-indent on; indent-width 4; tqreplace-tabs on;
+// kate: space-indent on; indent-width 4; replace-tabs on;
diff --git a/kbabel/common/regexpextractor.cpp b/kbabel/common/regexpextractor.cpp
index d07c36ed..6160884c 100644
--- a/kbabel/common/regexpextractor.cpp
+++ b/kbabel/common/regexpextractor.cpp
@@ -140,7 +140,7 @@ TQString RegExpExtractor::plainString(bool keepPos)
{
s+=' ';
}
- tmp.tqreplace(ti->index,len,s);
+ tmp.replace(ti->index,len,s);
}
if(!keepPos)
@@ -151,18 +151,18 @@ TQString RegExpExtractor::plainString(bool keepPos)
return tmp;
}
-TQString RegExpExtractor::matchesReplaced(const TQString& tqreplace)
+TQString RegExpExtractor::matchesReplaced(const TQString& replace)
{
TQString tmp=_string;
int posCorrection=0;
- int replaceLen=tqreplace.length();
+ int replaceLen=replace.length();
MatchedEntryInfo *ti;
for(ti=_matches.first(); ti != 0; ti=_matches.next())
{
uint len=ti->extracted.length();
- tmp.tqreplace(ti->index + posCorrection,len,tqreplace);
+ tmp.replace(ti->index + posCorrection,len,replace);
posCorrection+=(replaceLen-len);
}
@@ -213,7 +213,7 @@ void RegExpExtractor::processString()
{
s+=' ';
}
- tmp.tqreplace(pos,tag.length(),s);
+ tmp.replace(pos,tag.length(),s);
break;
}
diff --git a/kbabel/common/regexpextractor.h b/kbabel/common/regexpextractor.h
index 06de48c0..75b6e0d3 100644
--- a/kbabel/common/regexpextractor.h
+++ b/kbabel/common/regexpextractor.h
@@ -125,7 +125,7 @@ public:
/**
* @return the string, where matches are replaced with the given string
*/
- TQString matchesReplaced(const TQString& tqreplace);
+ TQString matchesReplaced(const TQString& replace);
//Functions that allow user to define his own regexps.
diff --git a/kbabel/common/stringdistance.cpp b/kbabel/common/stringdistance.cpp
index 3ffc4194..ce3fd335 100644
--- a/kbabel/common/stringdistance.cpp
+++ b/kbabel/common/stringdistance.cpp
@@ -41,7 +41,7 @@ const int Distance::editCost_replace_base = 1;
const int HammingDistance::editCost = 1;
-const int LevenshteinDistance::editCost_tqreplace = 1;
+const int LevenshteinDistance::editCost_replace = 1;
const int LevenshteinDistance::editCost_insert = 1;
const int LevenshteinDistance::editCost_delete = 1;
diff --git a/kbabel/common/stringdistance.h b/kbabel/common/stringdistance.h
index 7520c863..022b7fa5 100644
--- a/kbabel/common/stringdistance.h
+++ b/kbabel/common/stringdistance.h
@@ -114,8 +114,8 @@ class LevenshteinDistance : public Distance
{
protected:
virtual double calculate(const TQString& left_string, const TQString& right_string);
- int editCostReplace() { return editCost_tqreplace; }
- static const int editCost_tqreplace;
+ int editCostReplace() { return editCost_replace; }
+ static const int editCost_replace;
static const int editCost_insert;
static const int editCost_delete;
};