summaryrefslogtreecommitdiffstats
path: root/kbabel
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
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')
-rw-r--r--kbabel/addons/preview/pothumbcreator.cpp4
-rw-r--r--kbabel/catalogmanager/catalogmanager.cpp14
-rw-r--r--kbabel/catalogmanager/catalogmanager.h4
-rw-r--r--kbabel/catalogmanager/catalogmanagerview.cpp42
-rw-r--r--kbabel/catalogmanager/catalogmanagerview.h2
-rw-r--r--kbabel/catalogmanager/catmanlistitem.cpp2
-rw-r--r--kbabel/catalogmanager/findinfilesdialog.cpp2
-rw-r--r--kbabel/catalogmanager/libcvs/cvsdialog.cpp2
-rw-r--r--kbabel/catalogmanager/libcvs/cvshandler.cpp12
-rw-r--r--kbabel/catalogmanager/libsvn/svndialog.cpp4
-rw-r--r--kbabel/catalogmanager/libsvn/svnhandler.cpp10
-rw-r--r--kbabel/catalogmanager/validateprogress.cpp6
-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
-rw-r--r--kbabel/commonui/context.cpp18
-rw-r--r--kbabel/commonui/finddialog.cpp6
-rw-r--r--kbabel/commonui/finddialog.h2
-rw-r--r--kbabel/commonui/projectprefwidgets.cpp4
-rw-r--r--kbabel/commonui/projectwizard.cpp4
-rw-r--r--kbabel/commonui/roughtransdlg.cpp44
-rw-r--r--kbabel/commonui/toolaction.cpp4
-rw-r--r--kbabel/commonui/toolselectionwidget.cpp8
-rw-r--r--kbabel/datatools/accelerators/main.cc12
-rw-r--r--kbabel/datatools/arguments/main.cc26
-rw-r--r--kbabel/datatools/context/main.cc4
-rw-r--r--kbabel/datatools/equations/main.cc8
-rw-r--r--kbabel/datatools/length/main.cc6
-rw-r--r--kbabel/datatools/not-translated/main.cc4
-rw-r--r--kbabel/datatools/pluralforms/main.cc4
-rw-r--r--kbabel/datatools/punctuation/main.cc6
-rw-r--r--kbabel/datatools/whitespace/main.cc10
-rw-r--r--kbabel/datatools/xml/main.cc20
-rw-r--r--kbabel/filters/gettext/gettextexport.cpp6
-rw-r--r--kbabel/filters/gettext/gettextimport.cpp50
-rw-r--r--kbabel/filters/linguist/linguistexport.cpp6
-rw-r--r--kbabel/filters/linguist/linguistimport.cpp2
-rw-r--r--kbabel/filters/xliff/xliffimport.cpp2
-rw-r--r--kbabel/kbabel/contextview.cpp12
-rw-r--r--kbabel/kbabel/kbabel.cpp4
-rw-r--r--kbabel/kbabel/kbabelview.cpp84
-rw-r--r--kbabel/kbabel/kbabelview.h8
-rw-r--r--kbabel/kbabel/kbabelview2.cpp22
-rw-r--r--kbabel/kbabel/kbbookmarkhandler.cpp4
-rw-r--r--kbabel/kbabel/kbcataloglistview.cpp2
-rw-r--r--kbabel/kbabel/kbcataloglistviewitem.cpp6
-rw-r--r--kbabel/kbabel/kbhighlighting.cpp14
-rw-r--r--kbabel/kbabel/mymultilineedit.cpp26
-rw-r--r--kbabel/kbabeldict/dictchooser.cpp2
-rw-r--r--kbabel/kbabeldict/dictionarymenu.cpp2
-rw-r--r--kbabel/kbabeldict/dictionarymenu.h2
-rw-r--r--kbabel/kbabeldict/kbabeldictbox.cpp10
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp26
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/database.cpp2
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp2
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui2
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C4
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp12
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp4
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/database.cpp40
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp6
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp2
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui2
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp30
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp2
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp52
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp46
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp2
-rw-r--r--kbabel/kbabeldict/searchengine.cpp6
78 files changed, 559 insertions, 559 deletions
diff --git a/kbabel/addons/preview/pothumbcreator.cpp b/kbabel/addons/preview/pothumbcreator.cpp
index 87eb5dbf..22f6fb5e 100644
--- a/kbabel/addons/preview/pothumbcreator.cpp
+++ b/kbabel/addons/preview/pothumbcreator.cpp
@@ -207,7 +207,7 @@ bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage
if(!poInfo.encoding.isEmpty())
text += poInfo.encoding+'\n';
- int lines = text.tqcontains('\n')+1;
+ int lines = text.contains('\n')+1;
if(lines < numLines)
{
text = poInfo.headerComment+'\n'+text;
@@ -286,7 +286,7 @@ bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage
// physical newline in the file if we don't come from one
if ( !newLine )
{
- int pos = text.tqfind( '\n', i );
+ int pos = text.find( '\n', i );
if ( pos > (int) i )
i = pos +1;
}
diff --git a/kbabel/catalogmanager/catalogmanager.cpp b/kbabel/catalogmanager/catalogmanager.cpp
index d8b5168c..906437c6 100644
--- a/kbabel/catalogmanager/catalogmanager.cpp
+++ b/kbabel/catalogmanager/catalogmanager.cpp
@@ -235,10 +235,10 @@ void CatalogManager::setupActions()
// the edit menu
action = new KAction( i18n("Fi&nd in Files..."), CTRL+Key_F, TQT_TQOBJECT(this),
- TQT_SLOT(tqfind()), actionCollection(), "find_in_files");
+ TQT_SLOT(find()), actionCollection(), "find_in_files");
action->setEnabled(false);
action = new KAction( i18n("Re&place in Files..."), CTRL+Key_R, TQT_TQOBJECT(this),
- TQT_SLOT(tqreplace()), actionCollection(), "replace_in_files");
+ TQT_SLOT(replace()), actionCollection(), "replace_in_files");
action->setEnabled(false);
action = new KAction( i18n("&Stop Searching"), "stop", Key_Escape, TQT_TQOBJECT(this),
TQT_SLOT(stopSearching()), actionCollection(), "stop_search");
@@ -928,7 +928,7 @@ void CatalogManager::slotHelp()
kapp->invokeHelp("CATALOGMANAGER","kbabel");
}
-void CatalogManager::tqfind()
+void CatalogManager::find()
{
if( !_findDialog ) _findDialog = new FindInFilesDialog(false,this);
@@ -950,8 +950,8 @@ void CatalogManager::tqfind()
_findOptions.accelMarker = _project->miscSettings().accelMarker;
_foundFilesList.clear();
- kdDebug(KBABEL_CATMAN) << "Calling catalogmanagerview::tqfind" << endl;
- TQString url = _catalogManager->tqfind(_findOptions, _toBeSearched );
+ kdDebug(KBABEL_CATMAN) << "Calling catalogmanagerview::find" << endl;
+ TQString url = _catalogManager->find(_findOptions, _toBeSearched );
if( _catalogManager->isStopped() ) return;
if( !url.isEmpty() )
@@ -1011,7 +1011,7 @@ void CatalogManager::tqfind()
}
}
-void CatalogManager::tqreplace()
+void CatalogManager::replace()
{
if( !_replaceDialog ) _replaceDialog = new FindInFilesDialog(true,this);
@@ -1036,7 +1036,7 @@ void CatalogManager::tqreplace()
options.accelMarker = _project->miscSettings().accelMarker;
_foundFilesList.clear();
- TQString url = _catalogManager->tqfind(options, _toBeSearched );
+ TQString url = _catalogManager->find(options, _toBeSearched );
if( _catalogManager->isStopped() ) return;
if( !url.isEmpty() )
diff --git a/kbabel/catalogmanager/catalogmanager.h b/kbabel/catalogmanager/catalogmanager.h
index 89fdef13..bb4e2e58 100644
--- a/kbabel/catalogmanager/catalogmanager.h
+++ b/kbabel/catalogmanager/catalogmanager.h
@@ -100,8 +100,8 @@ public slots:
void selectedChanged(uint actionValue);
virtual void slotHelp();
- virtual void tqfind();
- virtual void tqreplace();
+ virtual void find();
+ virtual void replace();
virtual void stopSearching();
virtual void optionsPreferences();
virtual void optionsShowStatusbar(bool on);
diff --git a/kbabel/catalogmanager/catalogmanagerview.cpp b/kbabel/catalogmanager/catalogmanagerview.cpp
index 54d177b4..63f2a077 100644
--- a/kbabel/catalogmanager/catalogmanagerview.cpp
+++ b/kbabel/catalogmanager/catalogmanagerview.cpp
@@ -1270,7 +1270,7 @@ void CatalogManagerView::showLog()
_logWindow->show();
}
-TQString CatalogManagerView::tqfind( FindOptions &options, TQStringList &rest )
+TQString CatalogManagerView::find( FindOptions &options, TQStringList &rest )
{
CatManListItem* i=(CatManListItem*) currentItem();
@@ -1391,8 +1391,8 @@ bool CatalogManagerView::hasMatchingWords( TQStringList &itemWords, TQStringList
for( TQStringList::const_iterator it1 = searchWords.constBegin() ; it1 != searchWords.constEnd() ; ++it1 )
for( TQStringList::const_iterator it2 = itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 )
if( *it1 == *it2
- || (*it1).tqcontains(*it2)
- || (*it2).tqcontains(*it1) ) return true;
+ || (*it1).contains(*it2)
+ || (*it2).contains(*it1) ) return true;
return false;
}
@@ -1609,11 +1609,11 @@ void CatalogManagerView::slotDirCommand(int index)
if(index>=0 && item && item->isDir())
{
TQString cmd=*(_settings.dirCommands).at(index);
- cmd.tqreplace("@PACKAGE@",item->name());
- cmd.tqreplace("@PODIR@",item->poFile());
- cmd.tqreplace("@POTDIR@",item->potFile());
- cmd.tqreplace("@POFILES@",current().join(" "));
- cmd.tqreplace("@MARKEDPOFILES@",marked().join(" "));
+ cmd.replace("@PACKAGE@",item->name());
+ cmd.replace("@PODIR@",item->poFile());
+ cmd.replace("@POTDIR@",item->potFile());
+ cmd.replace("@POFILES@",current().join(" "));
+ cmd.replace("@MARKEDPOFILES@",marked().join(" "));
kdDebug(KBABEL_CATMAN) << cmd << endl;
@@ -1641,12 +1641,12 @@ void CatalogManagerView::slotFileCommand(int index)
CatManListItem* tqparent = (CatManListItem*)item->tqparent();
TQString cmd=*(_settings.fileCommands).at(index);
- cmd.tqreplace("@PACKAGE@",item->name());
- cmd.tqreplace("@POFILE@",item->poFile());
- cmd.tqreplace("@POTFILE@",item->potFile());
- cmd.tqreplace("@PODIR@",tqparent->poFile());
- cmd.tqreplace("@POTDIR@",tqparent->potFile());
- cmd.tqreplace("@POEMAIL@",item->text(COL_TRANSLATOR));
+ cmd.replace("@PACKAGE@",item->name());
+ cmd.replace("@POFILE@",item->poFile());
+ cmd.replace("@POTFILE@",item->potFile());
+ cmd.replace("@PODIR@",tqparent->poFile());
+ cmd.replace("@POTDIR@",tqparent->potFile());
+ cmd.replace("@POEMAIL@",item->text(COL_TRANSLATOR));
kdDebug(KBABEL_CATMAN) << cmd << endl;
@@ -1929,7 +1929,7 @@ bool CatalogManagerView::buildDir(const TQString& baseDir,const TQString& relDir
_fileList.insert(file,item);
_readInfoFileList.prepend(file);
- if(_markerList.tqcontains(file))
+ if(_markerList.contains(file))
{
item->setMarked(true);
}
@@ -2027,7 +2027,7 @@ void CatalogManagerView::updateDir(TQString relDir)
item = new CatManListItem(this, thisItem,poBaseDir+file+".po",potBaseDir+file+".pot",file);
_fileList.insert(file,item);
- if(_markerList.tqcontains(file))
+ if(_markerList.contains(file))
{
item->setMarked(true);
}
@@ -2109,7 +2109,7 @@ void CatalogManagerView::updateDir(TQString relDir)
item = new CatManListItem(this, thisItem,poBaseDir+file+".po",potBaseDir+file+".pot",file);
_fileList.insert(file,item);
- if(_markerList.tqcontains(file))
+ if(_markerList.contains(file))
{
item->setMarked(true);
}
@@ -2207,7 +2207,7 @@ void CatalogManagerView::updateDir(TQString relDir)
// if this directory has to be removed, check, if
// the tqparent directory has to be removed too
- const int index=relDir.tqfindRev("/",relDir.length()-2);
+ const int index=relDir.findRev("/",relDir.length()-2);
if(index<0)
{
relDir="/";
@@ -2271,7 +2271,7 @@ void CatalogManagerView::directoryChanged(const TQString& dir)
do
{
prevRelDir=relDir;
- const int index=relDir.tqfindRev("/",relDir.length()-2);
+ const int index=relDir.findRev("/",relDir.length()-2);
if(index<0)
{
relDir="/";
@@ -2417,7 +2417,7 @@ void CatalogManagerView::directoryDeleted(const TQString& dir)
void CatalogManagerView::fileInfoRead( TQString filename )
{
- if( _readInfoFileList.tqfind( filename ) != _readInfoFileList.end() ) {
+ if( _readInfoFileList.find( filename ) != _readInfoFileList.end() ) {
emit progress( ++_readInfoCount);
_readInfoFileList.remove( filename );
}
@@ -3129,4 +3129,4 @@ void CatalogManagerView::toggleColumn( uint column, bool show )
}
#include "catalogmanagerview.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/catalogmanager/catalogmanagerview.h b/kbabel/catalogmanager/catalogmanagerview.h
index 26a05d9f..8a405430 100644
--- a/kbabel/catalogmanager/catalogmanagerview.h
+++ b/kbabel/catalogmanager/catalogmanagerview.h
@@ -185,7 +185,7 @@ public slots:
void svnInfo();
void svnInfoMarked();
- TQString tqfind(KBabel::FindOptions &options, TQStringList &rest);
+ TQString find(KBabel::FindOptions &options, TQStringList &rest);
void showLog();
diff --git a/kbabel/catalogmanager/catmanlistitem.cpp b/kbabel/catalogmanager/catmanlistitem.cpp
index 8d1496d4..aa52237f 100644
--- a/kbabel/catalogmanager/catmanlistitem.cpp
+++ b/kbabel/catalogmanager/catmanlistitem.cpp
@@ -804,7 +804,7 @@ TQString CatManListItem::packageDir( ) const
TQString CatManListItem::name() const
{
- int index = _package.tqfindRev("/");
+ int index = _package.findRev("/");
return _package.right(_package.length()-index-1);
}
diff --git a/kbabel/catalogmanager/findinfilesdialog.cpp b/kbabel/catalogmanager/findinfilesdialog.cpp
index 587d7f75..5f10678b 100644
--- a/kbabel/catalogmanager/findinfilesdialog.cpp
+++ b/kbabel/catalogmanager/findinfilesdialog.cpp
@@ -57,7 +57,7 @@ FindInFilesDialog::FindInFilesDialog(bool forReplace, TQWidget* tqparent)
_askForSave = new TQCheckBox(i18n("Save &without asking"),box);
TQWhatsThis::add(box,i18n("<qt><p><b>File Options</b></p>"
- "<p>Here you can finetune where to tqfind:"
+ "<p>Here you can finetune where to find:"
"<ul><li><b>In all files</b>: search in all files, otherwise searched "
"is the selected file or files in the selected folder</li>"
"<li><b>Ask before next file</b>: show a dialog asking to proceed to the next file</li>"
diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.cpp b/kbabel/catalogmanager/libcvs/cvsdialog.cpp
index 1a71cf94..afc299b9 100644
--- a/kbabel/catalogmanager/libcvs/cvsdialog.cpp
+++ b/kbabel/catalogmanager/libcvs/cvsdialog.cpp
@@ -282,7 +282,7 @@ void CVSDialog::slotExecuteCommand( )
}
// Change the command line to have the real name of the temporary file
- _commandLine.tqreplace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) );
+ _commandLine.replace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) );
// Update the list of log messages
if ( !msg.isEmpty() ) {
diff --git a/kbabel/catalogmanager/libcvs/cvshandler.cpp b/kbabel/catalogmanager/libcvs/cvshandler.cpp
index af58ead9..6ab70423 100644
--- a/kbabel/catalogmanager/libcvs/cvshandler.cpp
+++ b/kbabel/catalogmanager/libcvs/cvshandler.cpp
@@ -138,7 +138,7 @@ CVSHandler::FiletqStatus CVSHandler::fstatus( const TQString& filename ) const
bool isInRepository = false;
while ( !stream.atEnd() ) {
temp = stream.readLine( );
- if ( temp.tqfind( rx ) == 0 ) {
+ if ( temp.find( rx ) == 0 ) {
isInRepository = true;
break;
}
@@ -162,7 +162,7 @@ CVSHandler::FiletqStatus CVSHandler::fstatus( const TQString& filename ) const
return LOCALLY_REMOVED;
// check for conflicts
- if ( timestamp.tqfind( '+' ) >= 0 )
+ if ( timestamp.find( '+' ) >= 0 )
return CONFLICT;
// calculate the UTC time from the file's last modified date
@@ -314,7 +314,7 @@ void CVSHandler::checkToAdd( const TQStringList& files )
temp = TQFileInfo( *it ).dirPath( true );
}
// check recursivlely if tqparent dirs have to be added as well
- while ( fstatus( temp ) == NOT_IN_CVS && toBeAdded.tqfindIndex( temp ) == -1 ) {
+ while ( fstatus( temp ) == NOT_IN_CVS && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
temp = TQFileInfo( temp ).dirPath( true );
}
@@ -357,7 +357,7 @@ void CVSHandler::processStatusOutput( const TQString& status )
TQString entr = *it;
// translate the filename from repository to local
TQRegExp rx( basedir + ".*,v" );
- int pos = entr.tqfind( rx );
+ int pos = entr.find( rx );
TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
@@ -365,14 +365,14 @@ void CVSHandler::processStatusOutput( const TQString& status )
// TODO: do some markup
- map.tqreplace( file, entr );
+ map.replace( file, entr );
}
}
void CVSHandler::processDiff( TQString output )
{
output.remove( TQRegExp( "\\[ .* \\]$" ));
- output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).tqreplace("[","\\[").tqreplace("]","\\]")));
+ output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;
diff --git a/kbabel/catalogmanager/libsvn/svndialog.cpp b/kbabel/catalogmanager/libsvn/svndialog.cpp
index e6cb76e5..01a4bccd 100644
--- a/kbabel/catalogmanager/libsvn/svndialog.cpp
+++ b/kbabel/catalogmanager/libsvn/svndialog.cpp
@@ -261,7 +261,7 @@ void SVNDialog::slotExecuteCommand( )
}
// Change the command line to have the real name of the temporary file
- _commandLine.tqreplace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) );
+ _commandLine.replace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) );
// Update the list of log messages
if ( !msg.isEmpty() ) {
@@ -397,4 +397,4 @@ void SVNDialog::saveSettings( )
#include "svndialog.moc"
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kbabel/catalogmanager/libsvn/svnhandler.cpp b/kbabel/catalogmanager/libsvn/svnhandler.cpp
index 6bd00ad3..71907fb8 100644
--- a/kbabel/catalogmanager/libsvn/svnhandler.cpp
+++ b/kbabel/catalogmanager/libsvn/svnhandler.cpp
@@ -416,7 +416,7 @@ void SVNHandler::checkToAdd( const TQStringList& files )
// ### TODO: does SVN really needs this or does it do it automatically?
// check recursivlely if tqparent dirs have to be added as well
- while ( ! isInSvn( temp ) && toBeAdded.tqfindIndex( temp ) == -1 ) {
+ while ( ! isInSvn( temp ) && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
temp = TQFileInfo( temp ).dirPath( true );
}
@@ -464,7 +464,7 @@ void SVNHandler::processStatusOutput( const TQString& status )
TQString entr = *it;
// translate the filename from repository to local
TQRegExp rx( basedir + ".*,v" );
- int pos = entr.tqfind( rx );
+ int pos = entr.find( rx );
TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
@@ -472,7 +472,7 @@ void SVNHandler::processStatusOutput( const TQString& status )
// TODO: do some markup
- map.tqreplace( file, entr );
+ map.replace( file, entr );
}
#endif
}
@@ -480,7 +480,7 @@ void SVNHandler::processStatusOutput( const TQString& status )
void SVNHandler::processDiff( TQString output )
{
output.remove( TQRegExp( "\\[ .* \\]$" ));
- output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).tqreplace("[","\\[").tqreplace("]","\\]")));
+ output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;
@@ -541,4 +541,4 @@ void SVNOutputCollector::slotGatherStdout( KProcess*, char* data, int len )
#include "svnhandler.moc"
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kbabel/catalogmanager/validateprogress.cpp b/kbabel/catalogmanager/validateprogress.cpp
index acfc36da..a5440a6f 100644
--- a/kbabel/catalogmanager/validateprogress.cpp
+++ b/kbabel/catalogmanager/validateprogress.cpp
@@ -168,7 +168,7 @@ void ValidateProgressDialog::validate_internal()
}
TQString errortext=TQString::number(item.index+1)+": " + item.msgid.first().left(50);
- errortext.tqreplace("\n"," ");
+ errortext.replace("\n"," ");
if( item.msgid.first().length() > 50 ) errortext+="...";
_mainWidget->_errorList->insertItem( errortext);
@@ -205,7 +205,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(TQListBoxItem * item)
TQString it = item->text();
bool ok =false;
- int offset = it.tqfind(":");
+ int offset = it.find(":");
int num;
if( offset < -1 ) num = 0;
@@ -239,7 +239,7 @@ void ValidateProgressDialog::showContextMenu(TQListBoxItem * item, const TQPoint
errorItemDoubleClicked( item );
break;
case ID_ERROR_IGNORE:
- IgnoreItem it = _errors.tqfind(item->text()).data();
+ IgnoreItem it = _errors.find(item->text()).data();
// if there is no pixmap, it's the whole file
if( !item->pixmap() )
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;
};
diff --git a/kbabel/commonui/context.cpp b/kbabel/commonui/context.cpp
index 4c91d1ad..0700b895 100644
--- a/kbabel/commonui/context.cpp
+++ b/kbabel/commonui/context.cpp
@@ -160,14 +160,14 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
if ( !poDir.isEmpty() )
{
- pref.tqreplace( "@POFILEDIR@", poDir );
+ pref.replace( "@POFILEDIR@", poDir );
}
- else if ( pref.tqfind( "@POFILEDIR@ " ) != -1 )
+ else if ( pref.find( "@POFILEDIR@ " ) != -1 )
continue; // No need to keep this path pattern, as we have no PO file dir
- pref.tqreplace( "@PACKAGEDIR@", packageDir);
- pref.tqreplace( "@PACKAGE@", packageName);
- pref.tqreplace( "@CODEROOT@", _project->settings()->codeRoot());
+ pref.replace( "@PACKAGEDIR@", packageDir);
+ pref.replace( "@PACKAGE@", packageName);
+ pref.replace( "@CODEROOT@", _project->settings()->codeRoot());
prefixes.append(pref);
}
@@ -191,7 +191,7 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
ref.line = re.cap(2).toInt();
ref.path = re.cap(1);
// ### TODO KDE4: perhaps we should not do the replace if compiled for Windows
- ref.path.tqreplace( TQChar( '\\' ), TQChar( '/' ) );
+ ref.path.replace( TQChar( '\\' ), TQChar( '/' ) );
rawRefList.append( ref );
}
}
@@ -223,7 +223,7 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
ref.line = res.cap(2).toInt();
ref.path = res.cap(1);
// ### TODO KDE4: perhaps we should not do the replace if compiled for Windows
- ref.path.tqreplace( TQChar( '\\' ), TQChar( '/' ) );
+ ref.path.replace( TQChar( '\\' ), TQChar( '/' ) );
rawRefList.append( ref );
}
}
@@ -240,7 +240,7 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
for ( TQStringList::const_iterator it1 = prefixes.constBegin(); it1 != prefixes.constEnd(); ++it1 )
{
TQString path = (*it1);
- path.tqreplace( "@COMMENTPATH@", fileName);
+ path.replace( "@COMMENTPATH@", fileName);
//kdDebug() << "CONTEXT PATH: " << path << endl; // DEBUG
TQFileInfo pathInfo( path );
@@ -302,4 +302,4 @@ void SourceContext::setProject( KBabel::Project::Ptr project )
#include "context.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/commonui/finddialog.cpp b/kbabel/commonui/finddialog.cpp
index 18dcd721..cd752396 100644
--- a/kbabel/commonui/finddialog.cpp
+++ b/kbabel/commonui/finddialog.cpp
@@ -99,7 +99,7 @@ FindDialog::FindDialog(bool forReplace, TQWidget* tqparent)
}
else {
setCaption(i18n("Find"));
- setButtonOK(KGuiItem(i18n("&Find"),"tqfind"));
+ setButtonOK(KGuiItem(i18n("&Find"),"find"));
_replaceLabel=0;
_replaceCombo=0;
@@ -502,7 +502,7 @@ void FindDialog::saveSettings()
void FindDialog::inButtonsClicked(int id)
{
// check if at least one button is checked
- if(! _buttonGrp->tqfind(id)->isOn() ) {
+ if(! _buttonGrp->find(id)->isOn() ) {
if(!_inMsgstr->isOn() && !_inComment->isOn() ) {
if(_inMsgid->isEnabled()) {
if( !_inMsgid->isOn() ) {
@@ -541,7 +541,7 @@ ReplaceDialog::ReplaceDialog(TQWidget* tqparent)
TQLabel *label = new TQLabel(i18n("Replace this string?"),page);
tqlayout->addWidget(label);
- connect(this,TQT_SIGNAL(user1Clicked()),this,TQT_SIGNAL(tqreplace()));
+ connect(this,TQT_SIGNAL(user1Clicked()),this,TQT_SIGNAL(replace()));
connect(this,TQT_SIGNAL(user2Clicked()),this,TQT_SIGNAL(next()));
connect(this,TQT_SIGNAL(user3Clicked()),this,TQT_SIGNAL(replaceAll()));
}
diff --git a/kbabel/commonui/finddialog.h b/kbabel/commonui/finddialog.h
index 174d8b81..83badefa 100644
--- a/kbabel/commonui/finddialog.h
+++ b/kbabel/commonui/finddialog.h
@@ -129,7 +129,7 @@ public:
~ReplaceDialog();
signals:
- void tqreplace();
+ void replace();
void replaceAll();
void next();
diff --git a/kbabel/commonui/projectprefwidgets.cpp b/kbabel/commonui/projectprefwidgets.cpp
index 7ec3381a..2fe24188 100644
--- a/kbabel/commonui/projectprefwidgets.cpp
+++ b/kbabel/commonui/projectprefwidgets.cpp
@@ -770,7 +770,7 @@ TQString MiscPreferences::contextInfo() const
void MiscPreferences::setContextInfo(TQString reg)
{
- reg.tqreplace("\n","\\n");
+ reg.replace("\n","\\n");
contextInfoEdit->setText(reg);
}
@@ -939,7 +939,7 @@ CatmanPreferences::CatmanPreferences(TQWidget* tqparent)
_indexButton = new TQCheckBox( i18n("Create inde&x for file contents"), box, "kcfg_IndexWords" );
TQWhatsThis::add( _indexButton , i18n("<qt><p><b>Create index for file contents</b></p>\n"
-"<p>If you check this, KBabel will create an index for each PO file to speed up the tqfind/replace functions.</p>\n"
+"<p>If you check this, KBabel will create an index for each PO file to speed up the find/replace functions.</p>\n"
"<p>NOTE: This will slow down updating the file information considerably.</p></qt>") );
m_msgfmtButton = new TQCheckBox( i18n("Run &msgfmt before processing a file"), box, "kcfg_msgfmt" );
diff --git a/kbabel/commonui/projectwizard.cpp b/kbabel/commonui/projectwizard.cpp
index 5858195b..dc147c32 100644
--- a/kbabel/commonui/projectwizard.cpp
+++ b/kbabel/commonui/projectwizard.cpp
@@ -60,8 +60,8 @@ ProjectWizard::ProjectWizard(TQWidget *tqparent,const char *name)
{
// we need untranslated entries here, because of Translation Robot!
TQString entry = (*it);
- const int i = entry.tqfind('_');
- entry.tqreplace(0, i, entry.left(i).lower());
+ const int i = entry.find('_');
+ entry.replace(0, i, entry.left(i).lower());
all_languages.setGroup(entry);
entry = all_languages.readEntryUntranslated("Name");
if( ! entry.isEmpty() )
diff --git a/kbabel/commonui/roughtransdlg.cpp b/kbabel/commonui/roughtransdlg.cpp
index 046ad2de..135b2794 100644
--- a/kbabel/commonui/roughtransdlg.cpp
+++ b/kbabel/commonui/roughtransdlg.cpp
@@ -292,7 +292,7 @@ void RoughTransDlg::translate()
if( catalog->pluralForm(i) == NoPluralForm )
{
TQString origTrans = catalog->msgstr(i).first();
- if(msg.tqfind("_: NAME OF TRANSLATORS\\n")==0)
+ if(msg.find("_: NAME OF TRANSLATORS\\n")==0)
{
TQString authorName;
if( !catalog->identitySettings().authorLocalizedName.isEmpty() )
@@ -302,24 +302,24 @@ void RoughTransDlg::translate()
authorName = catalog->identitySettings().authorName;
else continue; // there is no name to be inserted
- if( !TQStringList::split(',', origTrans).tqcontains(authorName) )
+ if( !TQStringList::split(',', origTrans).contains(authorName) )
{
if(origTrans.isEmpty() ) translation=authorName;
else translation+=origTrans+","+authorName;
}
}
- else if(msg.tqfind("_: EMAIL OF TRANSLATORS\\n")==0)
+ else if(msg.find("_: EMAIL OF TRANSLATORS\\n")==0)
{
// skip, if email is not specified in settings
if( catalog->identitySettings().authorEmail.isEmpty() ) continue;
- if( !TQStringList::split(',', origTrans).tqcontains(catalog->identitySettings().authorEmail) )
+ if( !TQStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) )
{
if(origTrans.isEmpty() ) translation=catalog->identitySettings().authorEmail;
else translation=origTrans+","+catalog->identitySettings().authorEmail;
}
}
- else if (msg.tqfind("ROLES_OF_TRANSLATORS") == 0)
+ else if (msg.find("ROLES_OF_TRANSLATORS") == 0)
{
TQString temp = "<othercredit role=\\\"translator\\\">\n<firstname></firstname>"
"<surname></surname>\n<affiliation><address><email>" +
@@ -327,10 +327,10 @@ void RoughTransDlg::translate()
"</affiliation><contrib></contrib></othercredit>";
if (origTrans.isEmpty( ))
translation = temp;
- else if (origTrans.tqfind(catalog->identitySettings( ).authorEmail) < 0)
+ else if (origTrans.find(catalog->identitySettings( ).authorEmail) < 0)
translation = origTrans + "\n" + temp;
}
- else if (msg.tqfind("CREDIT_FOR_TRANSLATORS") == 0)
+ else if (msg.find("CREDIT_FOR_TRANSLATORS") == 0)
{
TQString authorName;
if (!catalog->identitySettings( ).authorLocalizedName.isEmpty( ))
@@ -341,8 +341,8 @@ void RoughTransDlg::translate()
catalog->identitySettings( ).authorEmail + "</email></para>";
if (origTrans.isEmpty( ))
translation = temp;
- else if (origTrans.tqfind(authorName) < 0 &&
- origTrans.tqfind(catalog->identitySettings( ).authorEmail) < 0)
+ else if (origTrans.find(authorName) < 0 &&
+ origTrans.find(catalog->identitySettings( ).authorEmail) < 0)
translation = origTrans + "\n" + temp;
}
}
@@ -350,8 +350,8 @@ void RoughTransDlg::translate()
else // not kdeSpecific
{
// skip KDE specific texts
- if( msg.tqfind("_: EMAIL OF TRANSLATORS\\n")==0 || msg.tqfind("_: NAME OF TRANSLATORS\\n")==0 ||
- msg.tqfind("ROLES_OF_TRANSLATORS")==0 || msg.tqfind("CREDIT_FOR_TRANSLATORS")==0)
+ if( msg.find("_: EMAIL OF TRANSLATORS\\n")==0 || msg.find("_: NAME OF TRANSLATORS\\n")==0 ||
+ msg.find("ROLES_OF_TRANSLATORS")==0 || msg.find("CREDIT_FOR_TRANSLATORS")==0)
continue;
}
@@ -364,9 +364,9 @@ void RoughTransDlg::translate()
totalTried++;
- if(msg.tqcontains(contextReg))
+ if(msg.contains(contextReg))
{
- msg.tqreplace(contextReg,"");
+ msg.replace(contextReg,"");
}
// try exact translation
@@ -442,7 +442,7 @@ void RoughTransDlg::translate()
TQStringList wordList;
TQChar accel;
TQString endingPunctuation;
- int pos = msg.tqfindRev(endPunctReg);
+ int pos = msg.findRev(endPunctReg);
if(pos >= 0)
{
endingPunctuation = msg.right(msg.length()-pos);
@@ -475,7 +475,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty() )
{
- if(!word.tqcontains(digitReg))
+ if(!word.contains(digitReg))
wordList.append(word);
word=TQString();
@@ -483,7 +483,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty())
{
- if(!word.tqcontains(digitReg))
+ if(!word.contains(digitReg))
wordList.append(word);
word=TQString();
@@ -500,7 +500,7 @@ void RoughTransDlg::translate()
{
if(msg[index+1]=='n' && msg[index+2].isSpace())
{
- if(!word.isEmpty() && !word.tqcontains(digitReg))
+ if(!word.isEmpty() && !word.contains(digitReg))
wordList.append(word);
word=TQString();
@@ -510,7 +510,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty() )
{
- if(!word.tqcontains(digitReg))
+ if(!word.contains(digitReg))
wordList.append(word);
word=TQString();
@@ -518,7 +518,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty())
{
- if(!word.tqcontains(digitReg))
+ if(!word.contains(digitReg))
wordList.append(word);
word=TQString();
@@ -526,7 +526,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty())
{
- if(!word.tqcontains(digitReg)) {
+ if(!word.contains(digitReg)) {
wordList.append(word);
}
@@ -582,7 +582,7 @@ void RoughTransDlg::translate()
// try to set the correct keyboard accelerator
if(!accel.isNull())
{
- int index = translation.tqfind(accel,0,false);
+ int index = translation.find(accel,0,false);
if(index >= 0)
{
translation.insert(index,accelMarker);
@@ -717,7 +717,7 @@ void RoughTransDlg::msgButtonClicked(int id)
if(!transButton->isChecked() && !untransButton->isChecked()
&& !fuzzyButton->isChecked())
{
- TQButton *button = whatBox->tqfind(id);
+ TQButton *button = whatBox->find(id);
if(button == transButton)
{
transButton->setChecked(true);
diff --git a/kbabel/commonui/toolaction.cpp b/kbabel/commonui/toolaction.cpp
index ebb52bb4..9be27a69 100644
--- a/kbabel/commonui/toolaction.cpp
+++ b/kbabel/commonui/toolaction.cpp
@@ -69,7 +69,7 @@ TQPtrList<KAction> ToolAction::dataToolActionList( const TQValueList<KDataToolIn
TQStringList::ConstIterator sit = shortcuts.begin();
for (; uit != userCommands.end() && cit != commands.end(); ++uit, ++cit)
{
- if( !excludeCommand == command.tqcontains(*cit) )
+ if( !excludeCommand == command.contains(*cit) )
{
TQString sc=*sit;
@@ -96,7 +96,7 @@ TQValueList<KDataToolInfo> ToolAction::validationTools()
for( TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry )
{
- if( (*entry).commands().tqcontains("validate") )
+ if( (*entry).commands().contains("validate") )
{
result.append( *entry );
}
diff --git a/kbabel/commonui/toolselectionwidget.cpp b/kbabel/commonui/toolselectionwidget.cpp
index 78a3c0a4..3b10f09d 100644
--- a/kbabel/commonui/toolselectionwidget.cpp
+++ b/kbabel/commonui/toolselectionwidget.cpp
@@ -63,7 +63,7 @@ void ToolSelectionWidget::loadTools( const TQStringList &commands,
TQStringList::ConstIterator cit = toolCommands.begin();
for (; uit != userCommands.end() && cit != toolCommands.end(); ++uit, ++cit )
{
- if( commands.tqcontains(*cit) )
+ if( commands.contains(*cit) )
{
availableListBox()->insertItem( *uit );
}
@@ -78,8 +78,8 @@ void ToolSelectionWidget::setSelectedTools( const TQStringList& tools )
TQValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
for( ; entry != _allTools.end(); ++entry )
{
- TQString uic=*(*entry).userCommands().at((*entry).commands().tqfindIndex("validate"));
- if( tools.tqcontains((*entry).service()->library()) )
+ TQString uic=*(*entry).userCommands().at((*entry).commands().findIndex("validate"));
+ if( tools.contains((*entry).service()->library()) )
selectedListBox()->insertItem( uic );
else
availableListBox()->insertItem( uic );
@@ -96,7 +96,7 @@ TQStringList ToolSelectionWidget::selectedTools()
TQValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
for( ; entry != _allTools.end(); ++entry )
{
- if( usedNames.tqcontains(*((*entry).userCommands().at((*entry).commands().tqfindIndex("validate")))) )
+ if( usedNames.contains(*((*entry).userCommands().at((*entry).commands().findIndex("validate")))) )
result += (*entry).service()->library();
}
return result;
diff --git a/kbabel/datatools/accelerators/main.cc b/kbabel/datatools/accelerators/main.cc
index b082c635..3b13b2bf 100644
--- a/kbabel/datatools/accelerators/main.cc
+++ b/kbabel/datatools/accelerators/main.cc
@@ -97,8 +97,8 @@ bool AcceleratorTool::run( const TQString& command, void* data, const TQString&
{
// FIXME: this should care about plural forms in msgid
TQString lineid=item->msgid().first();
- lineid.tqreplace( _context, "");
- lineid.tqreplace(TQRegExp("\\n"),"");
+ lineid.replace( _context, "");
+ lineid.replace(TQRegExp("\\n"),"");
lineid.simplifyWhiteSpace();
TQString regStr(_marker);
regStr+="[^\\s]";
@@ -110,12 +110,12 @@ bool AcceleratorTool::run( const TQString& command, void* data, const TQString&
TQString linestr=(*form);
linestr.simplifyWhiteSpace();
- int n = lineid.tqcontains(reg);
+ int n = lineid.contains(reg);
if( _marker == '&' )
- n = n - lineid.tqcontains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
- int m = linestr.tqcontains(reg);
+ n = n - lineid.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
+ int m = linestr.contains(reg);
if( _marker == '&' )
- m = m - linestr.tqcontains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
+ m = m - linestr.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
hasError = hasError || ( n<=1 && m != n);
}
}
diff --git a/kbabel/datatools/arguments/main.cc b/kbabel/datatools/arguments/main.cc
index 4b533061..43ae38b4 100644
--- a/kbabel/datatools/arguments/main.cc
+++ b/kbabel/datatools/arguments/main.cc
@@ -110,46 +110,46 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( line.startsWith("_n:" ))
{
// truncate text after first \n to get args only once
- line = line.mid(0,line.tqfind("\\n"));
+ line = line.mid(0,line.find("\\n"));
}
}
- line.tqreplace(_context, "");
- line.tqreplace(TQRegExp("\\n"),"");
+ line.replace(_context, "");
+ line.replace(TQRegExp("\\n"),"");
line.simplifyWhiteSpace();
// flag, for GNU only we can allow reordering
bool non_gnu = (item->pluralForm() == KDESpecific);
- int index=line.tqfind(TQRegExp("%."));
+ int index=line.find(TQRegExp("%."));
while(index>=0)
{
- int endIndex=line.tqfind(TQRegExp("[^\\d]"),index+1);
+ int endIndex=line.find(TQRegExp("[^\\d]"),index+1);
if(endIndex<0)
{
endIndex=line.length();
}
- else if( formatChars.tqcontains(line[endIndex]) )
+ else if( formatChars.contains(line[endIndex]) )
{
endIndex++;
}
if(endIndex - index > 1 ) {
TQString arg = line.mid(index,endIndex-index);
- if( arg.tqcontains( TQRegExp("\\d") ) ) {
+ if( arg.contains( TQRegExp("\\d") ) ) {
non_gnu = true;
}
argList.append(arg);
}
- index=line.tqfind(TQRegExp("%."),endIndex);
+ index=line.find(TQRegExp("%."),endIndex);
}
if( item->pluralForm()==KDESpecific)
{
// FIXME: this is KDE specific
- if( _checkPlurals && line.startsWith("_n:" ) && !argList.tqcontains("%n") )
+ if( _checkPlurals && line.startsWith("_n:" ) && !argList.contains("%n") )
{
argList.append("%n");
}
@@ -180,7 +180,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
line=(*i);
- line.tqreplace(TQRegExp("\\n"),"");
+ line.replace(TQRegExp("\\n"),"");
TQRegExp argdesc(
"%((["+formatChars+"])"
@@ -196,7 +196,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( index == -1 ) break;
// do not add a redundant argument, if it is non GNU
- if( !non_gnu || !foundArgs.tqcontains( argdesc.cap(0) ) )
+ if( !non_gnu || !foundArgs.contains( argdesc.cap(0) ) )
foundArgs.append( argdesc.cap( 0 ) );
} while( true );
@@ -205,7 +205,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( non_gnu ) {
for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
- if( argList.tqfind( *it ) == argList.end() ) {
+ if( argList.find( *it ) == argList.end() ) {
hasError = true;
break;
} else {
@@ -227,7 +227,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
*oit = TQString();
} else {
// try to strip replacement
- int index = (*it).tqfind( '$' );
+ int index = (*it).find( '$' );
if( index == -1 ) {
// there is no replacement, this is wrong
hasError = true;
diff --git a/kbabel/datatools/context/main.cc b/kbabel/datatools/context/main.cc
index ed89f125..5a17e8c3 100644
--- a/kbabel/datatools/context/main.cc
+++ b/kbabel/datatools/context/main.cc
@@ -92,8 +92,8 @@ bool ContextTool::run( const TQString& command, void* data, const TQString& data
bool hasError = false;
- if(!item->isUntranslated() && item->msgid().first().tqcontains(_context)
- && item->msgstr().first().tqcontains(_context) )
+ if(!item->isUntranslated() && item->msgid().first().contains(_context)
+ && item->msgstr().first().contains(_context) )
{
hasError = true;
}
diff --git a/kbabel/datatools/equations/main.cc b/kbabel/datatools/equations/main.cc
index 96cb3057..cb1e1f7b 100644
--- a/kbabel/datatools/equations/main.cc
+++ b/kbabel/datatools/equations/main.cc
@@ -86,12 +86,12 @@ bool EquationsTool::run( const TQString& command, void* data, const TQString& da
bool hasError = false;
- if(!item->isUntranslated() && !item->msgid().first().tqcontains('\n')
- && item->msgid().first().tqcontains(_equation))
+ if(!item->isUntranslated() && !item->msgid().first().contains('\n')
+ && item->msgid().first().contains(_equation))
{
- int index = item->msgid().first().tqfind('=');
+ int index = item->msgid().first().find('=');
TQString left = item->msgid().first().left(index);
- index = item->msgstr().first().tqfind('=');
+ index = item->msgstr().first().find('=');
if(left != item->msgstr().first().left(index))
hasError = true;
}
diff --git a/kbabel/datatools/length/main.cc b/kbabel/datatools/length/main.cc
index 2851429e..706cf10c 100644
--- a/kbabel/datatools/length/main.cc
+++ b/kbabel/datatools/length/main.cc
@@ -104,7 +104,7 @@ bool LengthTool::run( const TQString& command, void* data, const TQString& datat
if( item->pluralForm() == KDESpecific ) {
str = TQStringList::split( "\\n", item->msgstr().first(), true );
id = TQStringList::split( "\\n",
- item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true );
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
@@ -113,12 +113,12 @@ bool LengthTool::run( const TQString& command, void* data, const TQString& datat
//Check for translations that are too short or too long
//This may not be totally correct but we check both
//the singular and plural forms against each translated plural.
- //FIXME: tqreplace 10% check with configurable setting or a statistical
+ //FIXME: replace 10% check with configurable setting or a statistical
//based expected length relationship
int idlen, strlen;
for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
TQString iditem = (*i);
- idlen = iditem.tqreplace( TQRegExp(_context),"").length();
+ idlen = iditem.replace( TQRegExp(_context),"").length();
for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
TQString stritem = (*j);
strlen = stritem.length();
diff --git a/kbabel/datatools/not-translated/main.cc b/kbabel/datatools/not-translated/main.cc
index 3082c552..9159c011 100644
--- a/kbabel/datatools/not-translated/main.cc
+++ b/kbabel/datatools/not-translated/main.cc
@@ -101,13 +101,13 @@ bool NotTranslatedTool::run( const TQString& command, void* data, const TQString
if( item->pluralForm() == KDESpecific ) {
str = TQStringList::split( "\\n", item->msgstr().first(), true );
id = TQStringList::split( "\\n",
- item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true );
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
}
for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
- TQString id_str = (*i).tqreplace( TQRegExp(_context), "");
+ TQString id_str = (*i).replace( TQRegExp(_context), "");
for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
TQString str_str = (*j);
hasError = hasError || ( id_str == str_str );
diff --git a/kbabel/datatools/pluralforms/main.cc b/kbabel/datatools/pluralforms/main.cc
index 9005b4ce..5bc9e904 100644
--- a/kbabel/datatools/pluralforms/main.cc
+++ b/kbabel/datatools/pluralforms/main.cc
@@ -102,11 +102,11 @@ bool PluralsTool::run( const TQString& command, void* data, const TQString& data
if(!item->isUntranslated() && item->pluralForm() == KDESpecific )
{
- if(_neededForms <= 0 || item->msgstr().first().tqcontains(_plurals))
+ if(_neededForms <= 0 || item->msgstr().first().contains(_plurals))
{
hasError = true;
}
- else if( item->msgstr().first().tqcontains(TQString("\\n"))+1 != _neededForms )
+ else if( item->msgstr().first().contains(TQString("\\n"))+1 != _neededForms )
{
hasError = true;
}
diff --git a/kbabel/datatools/punctuation/main.cc b/kbabel/datatools/punctuation/main.cc
index 42b2f2eb..3b2bc35e 100644
--- a/kbabel/datatools/punctuation/main.cc
+++ b/kbabel/datatools/punctuation/main.cc
@@ -92,7 +92,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString&
// lookup punctuation in original text
TQRegExp punc("[\\.!\\?:]+$");
- int i = lineid.tqfind(punc);
+ int i = lineid.find(punc);
TQString t("");
@@ -102,7 +102,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString&
{
// check, that both plural forms contain the same punctuation
TQString pl = *(item->msgid().at(1));
- int j = pl.tqfind(punc);
+ int j = pl.find(punc);
TQString tp("");
if( j != -1 ) tp = pl.right(pl.length()-j);
@@ -122,7 +122,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString&
{
TQString linestr=(*form);
- int j = linestr.tqfind(punc);
+ int j = linestr.find(punc);
// there is no punctuation in original, but one in the translation
if( i == -1 && j != i )
diff --git a/kbabel/datatools/whitespace/main.cc b/kbabel/datatools/whitespace/main.cc
index 3fdd0f47..68548501 100644
--- a/kbabel/datatools/whitespace/main.cc
+++ b/kbabel/datatools/whitespace/main.cc
@@ -104,27 +104,27 @@ bool WhitespaceTool::run( const TQString& command, void* data, const TQString& d
if( item->pluralForm() == KDESpecific ) {
str = TQStringList::split( "\\n", item->msgstr().first(), true );
id = TQStringList::split( "\\n",
- item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true );
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
}
//Strip equations
- id.first().tqreplace( TQRegExp(_equation), "");
- str.first().tqreplace( TQRegExp(_equation), "");
+ id.first().replace( TQRegExp(_equation), "");
+ str.first().replace( TQRegExp(_equation), "");
//Ignore Messages with blank msgid components
for( TQStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) {
TQString resultstring = (*it);
- hasIdError = hasIdError || resultstring.tqcontains(_whitespace);
+ hasIdError = hasIdError || resultstring.contains(_whitespace);
}
if( hasIdError ) return true;
//Check each TQString in the List is not whitespace
for( TQStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) {
TQString resultstring = (*it);
- hasStrError = hasStrError || resultstring.tqcontains(_whitespace);
+ hasStrError = hasStrError || resultstring.contains(_whitespace);
}
}
diff --git a/kbabel/datatools/xml/main.cc b/kbabel/datatools/xml/main.cc
index 57a6f785..229ce734 100644
--- a/kbabel/datatools/xml/main.cc
+++ b/kbabel/datatools/xml/main.cc
@@ -94,12 +94,12 @@ bool XMLTool::run( const TQString& command, void* data, const TQString& datatype
uint correctnessLevel = 0;
TQString msgid = item->msgid().first();
- msgid.tqreplace( "\\\"", "\"" ); // Change '\"' to '"'
- msgid.tqreplace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
- msgid.tqreplace( _context, "" );
- msgid.tqreplace("\n",""); // delete newlines
+ msgid.replace( "\\\"", "\"" ); // Change '\"' to '"'
+ msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
+ msgid.replace( _context, "" );
+ msgid.replace("\n",""); // delete newlines
- if( _levelCache.tqcontains(msgid) )
+ if( _levelCache.contains(msgid) )
{
correctnessLevel = _levelCache[msgid];
}
@@ -134,8 +134,8 @@ bool XMLTool::run( const TQString& command, void* data, const TQString& datatype
for( TQStringList::Iterator form = str.begin() ; form != str.end() ; form++ )
{
TQString text=(*form);
- text.tqreplace( "\\\"", "\"" ); // Change '\"' to '"'
- text.tqreplace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
+ text.replace( "\\\"", "\"" ); // Change '\"' to '"'
+ text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
// isNonCaseWithoutCommonCompliant can fail
// even though higher level checks works
@@ -189,16 +189,16 @@ bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text)
TQDomDocument doc;
TQString test = text.lower();
TQRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" );
- test.tqreplace( rx, "" );
+ test.replace( rx, "" );
TQString a;
do
{
a = test;
- test.tqreplace( TQRegExp("<[^_:A-Za-z/]"), "" );
+ test.replace( TQRegExp("<[^_:A-Za-z/]"), "" );
} while( a!=test);
- test.tqreplace( TQRegExp("<$"), "" );
+ test.replace( TQRegExp("<$"), "" );
return doc.setContent("<para>" + test + "</para>" );
}
diff --git a/kbabel/filters/gettext/gettextexport.cpp b/kbabel/filters/gettext/gettextexport.cpp
index 40911c59..cb7a3b24 100644
--- a/kbabel/filters/gettext/gettextexport.cpp
+++ b/kbabel/filters/gettext/gettextexport.cpp
@@ -211,7 +211,7 @@ void GettextExportPlugin::writeComment( TQTextStream& stream, const TQString& co
int pos = 0;
for(;;)
{
- const int newpos = comment.tqfind( '\n', pos, false );
+ const int newpos = comment.find( '\n', pos, false );
if ( newpos == pos )
{
++pos;
@@ -305,7 +305,7 @@ void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& ke
realText.remove( '\n' );
bool needFirstEmptyLine = false;
- if ( realText.tqfind( "\\n" ) != -1 )
+ if ( realText.find( "\\n" ) != -1 )
{
// We have more than one (logical) line, so write the extra empty line
needFirstEmptyLine = true;
@@ -340,7 +340,7 @@ void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& ke
// Be sure that at least two useful characters are written, even if the wrap width is too small
availableWidth = 2;
}
- const int newlinePos = realText.tqfind ( "\\n", pos );
+ const int newlinePos = realText.find ( "\\n", pos );
if ( ( newlinePos >= 0 ) && ( newlinePos - pos + 2 < availableWidth ) )
{
// The newline is near than the maximum available numbers of characters
diff --git a/kbabel/filters/gettext/gettextimport.cpp b/kbabel/filters/gettext/gettextimport.cpp
index ce1680d4..f66516cc 100644
--- a/kbabel/filters/gettext/gettextimport.cpp
+++ b/kbabel/filters/gettext/gettextimport.cpp
@@ -1,4 +1,4 @@
-// kate: space-indent on; indent-width 3; tqreplace-tabs on;
+// kate: space-indent on; indent-width 3; replace-tabs on;
/* ****************************************************************************
This file is part of KBabel
@@ -163,7 +163,7 @@ ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQS
}
// check if header seems to indicate docbook content generated by xml2pot
- const bool docbookContent = (tempHeader.msgstr().tqfind("application/x-xml2pot") != tempHeader.msgstr().end());
+ const bool docbookContent = (tempHeader.msgstr().find("application/x-xml2pot") != tempHeader.msgstr().end());
// now parse the rest of the file
uint counter=0;
@@ -200,7 +200,7 @@ ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQS
appendCatalogItem(tempCatItem);
// check if first comment seems to indicate a docbook source file
if(counter==0)
- docbookFile = ( tempCatItem.comment().tqfind(".docbook") != -1 );
+ docbookFile = ( tempCatItem.comment().find(".docbook") != -1 );
}
}
else if(success==RECOVERED_PARSE_ERROR)
@@ -439,7 +439,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
part=Comment;
_comment=line;
}
- else if(line.tqfind(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
{
part=Msgctxt;
@@ -449,7 +449,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
_msgctxt=line;
seenMsgctxt=true;
}
- else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
@@ -460,7 +460,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
@@ -494,7 +494,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
_comment+=("\n"+line);
}
- else if(line.tqfind(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
{
part=Msgctxt;
@@ -504,7 +504,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
_msgctxt=line;
seenMsgctxt=true;
}
- else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
@@ -515,7 +515,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
@@ -539,7 +539,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
if(line.isEmpty())
continue;
- else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^\""));
@@ -551,7 +551,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
else
_msgctxt+=("\n"+line);
}
- else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
@@ -562,7 +562,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
@@ -586,7 +586,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
if(line.isEmpty())
continue;
- else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^\""));
@@ -604,7 +604,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
else
(*it)+=("\n"+line);
}
- else if(line.tqfind(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1)
{
part=Msgid;
_gettextPluralForm = true;
@@ -616,7 +616,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
_msgid.append(line);
}
// one of the quotation marks is missing
- else if(line.tqfind(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
_gettextPluralForm = true;
@@ -631,7 +631,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
recoverableError=true;
}
else if(!_gettextPluralForm
- && (line.tqfind(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1))
{
part=Msgstr;
@@ -642,7 +642,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*msgstrIt)=line;
}
else if(!_gettextPluralForm
- && line.tqfind(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1)
+ && line.find(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1)
{
part=Msgstr;
@@ -656,7 +656,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
recoverableError=true;
}
else if( _gettextPluralForm
- && (line.tqfind(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1))
{
part=Msgstr;
@@ -667,7 +667,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*msgstrIt)=line;
}
else if( _gettextPluralForm
- && (line.tqfind(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1))
{
part=Msgstr;
@@ -694,7 +694,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
break;
}
// a line of the msgid with a missing quotation mark
- else if(line.tqfind(TQRegExp("^\"?.+\\n?\"?$")) != -1)
+ else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1)
{
recoverableError=true;
@@ -726,7 +726,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
if(line.isEmpty())
continue;
// another line of the msgstr
- else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^\""));
@@ -738,7 +738,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*msgstrIt)+=("\n"+line);
}
else if( _gettextPluralForm
- && (line.tqfind(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1))
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\"?"));
@@ -747,7 +747,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
msgstrIt=_msgstr.append(line);
}
else if( _gettextPluralForm
- && (line.tqfind(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1))
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?"));
@@ -758,7 +758,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
if(!line.isEmpty())
recoverableError=true;
}
- else if((line.tqfind(TQRegExp("^\\s*msgid")) != -1) || (line.tqfind(TQRegExp("^\\s*#")) != -1))
+ else if((line.find(TQRegExp("^\\s*msgid")) != -1) || (line.find(TQRegExp("^\\s*#")) != -1))
{
// We have read successfully one entry, so end loop.
stream.tqdevice()->at(pos);// reset position in stream to beginning of this line
@@ -771,7 +771,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
break;
}
// another line of the msgstr with a missing quotation mark
- else if(line.tqfind(TQRegExp("^\"?.+\\n?\"?$")) != -1)
+ else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1)
{
recoverableError=true;
diff --git a/kbabel/filters/linguist/linguistexport.cpp b/kbabel/filters/linguist/linguistexport.cpp
index 3b5bc5fc..072ecde8 100644
--- a/kbabel/filters/linguist/linguistexport.cpp
+++ b/kbabel/filters/linguist/linguistexport.cpp
@@ -123,17 +123,17 @@ const TQString LinguistExportPlugin::extractComment( TQDomDocument& doc, const T
* writing the comment for Linguist
*/
- int pos = comment.tqfind("#, fuzzy");
+ int pos = comment.find("#, fuzzy");
if ( pos >= 0) {
fuzzy = true;
comment.remove("#, fuzzy");
}
TQString newContext;
- pos = comment.tqfind( '\n' );
+ pos = comment.find( '\n' );
if ( pos >= 0 ) {
newContext = comment.left( pos );
- comment.tqreplace( 0, pos + 1, "" ); // ### TODO: use TQString::remove
+ comment.replace( 0, pos + 1, "" ); // ### TODO: use TQString::remove
} else {
newContext = comment;
comment = ""; // ### TODO: use TQString() instead of ""
diff --git a/kbabel/filters/linguist/linguistimport.cpp b/kbabel/filters/linguist/linguistimport.cpp
index 82dd6ad4..f4e1102f 100644
--- a/kbabel/filters/linguist/linguistimport.cpp
+++ b/kbabel/filters/linguist/linguistimport.cpp
@@ -1,4 +1,4 @@
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
/* ****************************************************************************
This file is part of KBabel
diff --git a/kbabel/filters/xliff/xliffimport.cpp b/kbabel/filters/xliff/xliffimport.cpp
index 01c39092..3bf16e19 100644
--- a/kbabel/filters/xliff/xliffimport.cpp
+++ b/kbabel/filters/xliff/xliffimport.cpp
@@ -1,4 +1,4 @@
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
/* ****************************************************************************
This file is part of KBabel
diff --git a/kbabel/kbabel/contextview.cpp b/kbabel/kbabel/contextview.cpp
index 72303fef..94bbf000 100644
--- a/kbabel/kbabel/contextview.cpp
+++ b/kbabel/kbabel/contextview.cpp
@@ -106,15 +106,15 @@ void ContextView::updateView()
if(!temp.isEmpty())
{
temp = TQStyleSheet::convertFromPlainText(temp);
- temp.tqreplace(TQRegExp("^<p>"),"");
- temp.tqreplace(TQRegExp("</p>$"),"");
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += "<i>"+temp+"</i><br/>";
}
// FIXME: should care about plural forms
temp = TQStyleSheet::convertFromPlainText(_catalog->msgid(i).first());
- temp.tqreplace(TQRegExp("^<p>"),"");
- temp.tqreplace(TQRegExp("</p>$"),"");
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += temp + "<br/>---<br/>";
TQStringList tempList = _catalog->msgstr(i);
@@ -141,8 +141,8 @@ void ContextView::updateView()
}
}
temp = TQStyleSheet::convertFromPlainText(temp);
- temp.tqreplace(TQRegExp("^<p>"),"");
- temp.tqreplace(TQRegExp("</p>$"),"");
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += temp+"<br/>";
}
diff --git a/kbabel/kbabel/kbabel.cpp b/kbabel/kbabel/kbabel.cpp
index d3aafed8..64733fa1 100644
--- a/kbabel/kbabel/kbabel.cpp
+++ b/kbabel/kbabel/kbabel.cpp
@@ -437,10 +437,10 @@ void KBabelMW::setupActions()
action = KStdAction::copy(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalCopy()), actionCollection());
action = KStdAction::paste(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalPaste()), actionCollection());
action = KStdAction::selectAll(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalSelectAll()), actionCollection());
- action = KStdAction::find(TQT_TQOBJECT(m_view), TQT_SLOT(tqfind()), actionCollection());
+ action = KStdAction::find(TQT_TQOBJECT(m_view), TQT_SLOT(find()), actionCollection());
action = KStdAction::findNext(TQT_TQOBJECT(m_view), TQT_SLOT(findNext()), actionCollection());
action = KStdAction::findPrev(TQT_TQOBJECT(m_view), TQT_SLOT(findPrev()), actionCollection());
- action = KStdAction::replace(TQT_TQOBJECT(m_view), TQT_SLOT(tqreplace()), actionCollection());
+ action = KStdAction::replace(TQT_TQOBJECT(m_view), TQT_SLOT(replace()), actionCollection());
action = KStdAction::clear( TQT_TQOBJECT(m_view), TQT_SLOT(clear()), actionCollection(), "clear" );
diff --git a/kbabel/kbabel/kbabelview.cpp b/kbabel/kbabel/kbabelview.cpp
index 9d7f4df2..1f9aab72 100644
--- a/kbabel/kbabel/kbabelview.cpp
+++ b/kbabel/kbabel/kbabelview.cpp
@@ -931,7 +931,7 @@ void KBabelView::setupAutoCheckTools()
TQValueList<KDataToolInfo>::Iterator it;
for( it=tools.begin(); it!=tools.end() ; ++it )
{
- if(KBabelSettings::autoCheckTools().tqcontains((*it).service()->library()) )
+ if(KBabelSettings::autoCheckTools().contains((*it).service()->library()) )
{
// maybe we can reuse the tools
KDataTool* t = (*it).createTool();
@@ -2331,7 +2331,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
}
-void KBabelView::tqfind()
+void KBabelView::find()
{
Part hadFocus;
if(msgidLabel->hasFocus())
@@ -2425,7 +2425,7 @@ void KBabelView::tqfind()
}
}
-void KBabelView::tqreplace()
+void KBabelView::replace()
{
_replacesTotal=0;
_replaceLen=0;
@@ -2518,7 +2518,7 @@ void KBabelView::tqreplace()
if(success) {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
- connect(_replaceAskDialog,TQT_SIGNAL(tqreplace()),this,TQT_SLOT(replaceNext()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
@@ -2749,7 +2749,7 @@ void KBabelView::replaceInFile(TQCString fileSource, KBabel::ReplaceOptions opti
else {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
- connect(_replaceAskDialog,TQT_SIGNAL(tqreplace()),this,TQT_SLOT(replaceNext()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
@@ -2803,37 +2803,37 @@ void KBabelView::msgid2msgstr()
TQString text = _catalog->msgid(_currentIndex).first();
// this is KDE specific:
- if(text.tqfind("_: NAME OF TRANSLATORS\\n")==0)
+ if(text.find("_: NAME OF TRANSLATORS\\n")==0)
{
text=_catalog->identitySettings().authorLocalizedName;
}
- else if(text.tqfind("_: EMAIL OF TRANSLATORS\\n")==0)
+ else if(text.find("_: EMAIL OF TRANSLATORS\\n")==0)
{
text=_catalog->identitySettings().authorEmail;
}
- else if(_catalog->isGeneratedFromDocbook() && text.tqfind("ROLES_OF_TRANSLATORS")==0)
+ else if(_catalog->isGeneratedFromDocbook() && text.find("ROLES_OF_TRANSLATORS")==0)
{
text="<othercredit role=\\\"translator\\\">\n"
"<firstname></firstname><surname></surname>\n"
"<affiliation><address><email>"+_catalog->identitySettings().authorEmail+"</email></address>\n"
"</affiliation><contrib></contrib></othercredit>";
}
- else if(_catalog->isGeneratedFromDocbook() && text.tqfind("CREDIT_FOR_TRANSLATORS")==0)
+ else if(_catalog->isGeneratedFromDocbook() && text.find("CREDIT_FOR_TRANSLATORS")==0)
{
text="<para>"+_catalog->identitySettings().authorLocalizedName+"\n"+
"<email>"+_catalog->identitySettings().authorEmail+"</email></para>";
}
- else if(text.tqcontains(_catalog->miscSettings().singularPlural))
+ else if(text.contains(_catalog->miscSettings().singularPlural))
{
- text.tqreplace(_catalog->miscSettings().singularPlural,"");
+ text.replace(_catalog->miscSettings().singularPlural,"");
}
// end of KDE specific part
TQRegExp reg=_catalog->miscSettings().contextInfo;
- if(text.tqcontains(reg))
+ if(text.contains(reg))
{
- text.tqreplace(reg,"");
+ text.replace(reg,"");
}
modifyMsgstrText(0,text,true);
@@ -3204,9 +3204,9 @@ void KBabelView::startSearch(bool delay)
{
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
- if(msg.tqcontains(reg))
+ if(msg.contains(reg))
{
- msg.tqreplace(reg,"");
+ msg.replace(reg,"");
}
dictBox->setActiveModule(KBabelSettings::defaultModule());
@@ -3225,9 +3225,9 @@ void KBabelView::startSearch(const TQString module)
// FIXME: should care about plural forms
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
- if(msg.tqcontains(reg))
+ if(msg.contains(reg))
{
- msg.tqreplace(reg,"");
+ msg.replace(reg,"");
}
dictBox->setActiveModule(module);
@@ -3258,9 +3258,9 @@ void KBabelView::startSelectionSearch(const TQString module)
// should care about plural forms
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
- if(msg.tqcontains(reg))
+ if(msg.contains(reg))
{
- msg.tqreplace(reg,"");
+ msg.replace(reg,"");
}
dictBox->startSearch(msg);
@@ -3302,7 +3302,7 @@ void KBabelView::emitEntryState()
TQPalette palette=msgstrEdit->palette();
palette.setColor( TQColorGroup::Text, red );
- if( _catalog->itemtqStatus(_currentIndex).tqcontains("syntax error"))
+ if( _catalog->itemtqStatus(_currentIndex).contains("syntax error"))
{
msgstrEdit->setCurrentColor( MsgMultiLineEdit::ErrorColor );
}
@@ -3732,7 +3732,7 @@ void KBabelView::addSpellcheckWords( uint pos, TQString text, uint index, uint f
}
else if( c == '\\')
{
- if(pos+1 < textLength && spclChars.tqcontains(text[pos+1]) )
+ if(pos+1 < textLength && spclChars.contains(text[pos+1]) )
{
pos+=2;
}
@@ -3981,9 +3981,9 @@ void KBabelView::spellStart(KSpell *)
if(_spellcheckSettings.rememberIgnored)
{
TQString urlString = _spellcheckSettings.ignoreURL;
- if(urlString.tqcontains("@PACKAGE@"))
+ if(urlString.contains("@PACKAGE@"))
{
- urlString.tqreplace("@PACKAGE@",_catalog->packageName());
+ urlString.replace("@PACKAGE@",_catalog->packageName());
}
// ### TODO: correctly set the URL; support for MostLocalURL
KURL url(urlString);
@@ -4085,13 +4085,13 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
text=text.mid(begin,end-begin);
TQChar accelMarker=_catalog->miscSettings().accelMarker;
- if(text.tqcontains(accelMarker))
+ if(text.contains(accelMarker))
{
- text.tqreplace(accelMarker,"");
+ text.replace(accelMarker,"");
}
- if(text.tqcontains('\n'))
+ if(text.contains('\n'))
{
- text.tqreplace("\n","");
+ text.replace("\n","");
}
bool textOk=true;
@@ -4099,8 +4099,8 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
{
// if text and orig are not the same,
// maybe it was a word with hyphens
- int n=text.tqcontains('-');
- n+=text.tqcontains('\'');
+ int n=text.contains('-');
+ n+=text.contains('\'');
if( n > 0 )
{
// re-get the original text since we replace some things above
@@ -4113,8 +4113,8 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
while(!textFound && i <= n)
{
int lastPos=e+1;
- e = text.tqfind('-',lastPos);
- int tmp = text.tqfind('\'',lastPos);
+ e = text.find('-',lastPos);
+ int tmp = text.find('\'',lastPos);
if(e < 0 && tmp > 0)
{
e=tmp;
@@ -4127,13 +4127,13 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
if(e<0) e=text.length();
TQString w=text.mid(lastPos,e-lastPos);
- if(w.tqcontains(accelMarker))
+ if(w.contains(accelMarker))
{
- w.tqreplace(accelMarker,"");
+ w.replace(accelMarker,"");
}
- if(text.tqcontains('\n'))
+ if(text.contains('\n'))
{
- text.tqreplace("\n","");
+ text.replace("\n","");
}
if( w == orig)
{
@@ -4225,15 +4225,15 @@ void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsi
TQString marked=msgstrEdit->selectedText();
spell.origWords.append(marked);
- if(marked.tqcontains("\n") && !newWord.tqcontains('\n'))
+ if(marked.contains("\n") && !newWord.contains('\n'))
{
TQString s1=newWord;
- s1.tqreplace(" ","\n");
+ s1.replace(" ","\n");
// if only a newline has been replaced with a white space
if(s1==marked)
{
- newWord.tqreplace(" "," \n");
+ newWord.replace(" "," \n");
}
}
@@ -4241,11 +4241,11 @@ void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsi
// word has no accelerator, try to add the accelerator for
// the same char else add in at the same position
TQChar accelMarker=_catalog->miscSettings().accelMarker;
- if(marked.tqcontains(accelMarker) && !newWord.tqcontains(accelMarker))
+ if(marked.contains(accelMarker) && !newWord.contains(accelMarker))
{
- int b=marked.tqfind(accelMarker);
+ int b=marked.find(accelMarker);
TQChar accel=marked[b+1];
- int nb=newWord.tqfind(accel,0,false);
+ int nb=newWord.find(accel,0,false);
if(nb>=0)
{
newWord.insert(nb,accelMarker);
@@ -4422,7 +4422,7 @@ void KBabelView::cancelSpellcheck()
void KBabelView::spellAddIgnore(const TQString &word)
{
- if(!spell.ignoreList.tqcontains(word))
+ if(!spell.ignoreList.contains(word))
{
spell.newIgnoreList.append(word);
}
diff --git a/kbabel/kbabel/kbabelview.h b/kbabel/kbabel/kbabelview.h
index 8fecb9f0..a6b8e252 100644
--- a/kbabel/kbabel/kbabelview.h
+++ b/kbabel/kbabel/kbabelview.h
@@ -217,10 +217,10 @@ public slots:
void textPaste();
bool findNext();
bool findPrev();
- void tqfind();
+ void find();
void findInFile(TQCString fileSource, KBabel::FindOptions options);
void replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options);
- void tqreplace();
+ void replace();
void selectAll();
void deselectAll();
void clear();
@@ -470,13 +470,13 @@ private slots:
*/
void replaceNext();
/**
- * called from a signal from ReplaceDialog to tqreplace
+ * called from a signal from ReplaceDialog to replace
* all without asking anymore.
*/
void replaceAll();
/**
* called from a signal from ReplaceDialog to go to next
- * string to tqreplace
+ * string to replace
*/
void findNextReplace();
diff --git a/kbabel/kbabel/kbabelview2.cpp b/kbabel/kbabel/kbabelview2.cpp
index daf0819e..c70b42e7 100644
--- a/kbabel/kbabel/kbabelview2.cpp
+++ b/kbabel/kbabel/kbabelview2.cpp
@@ -203,7 +203,7 @@ void KBabelView::updateTags()
{
TQString s = *it;
if( s.startsWith("&") ) s = "&"+s;
- if(!tList.tqcontains(s))
+ if(!tList.contains(s))
{
_tagsMenu->insertItem(s,counter);
tList.append(s);
@@ -297,7 +297,7 @@ void KBabelView::modifyMsgstrText(const uint offset, const TQString& text, bool
void KBabelView::insertTag(int n)
{
TQString tag = _tagsMenu->text(n);
- if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // tqreplace && -> &. && is used for correct menu display
+ if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // replace && -> &. && is used for correct menu display
modifyMsgstrText( msgstrEdit->currentIndex(), tag );
}
@@ -331,10 +331,10 @@ void KBabelView::insertNextTagMsgid()
if( _catalog->pluralForm( _currentIndex ) == KDESpecific )
{
int pos = msgstrEdit->currentIndex();
- int currentFormBegin=s.tqfindRev("\\n",pos);
+ int currentFormBegin=s.findRev("\\n",pos);
if( currentFormBegin == -1 ) currentFormBegin=0;
else currentFormBegin+=3; // skip the newline
- int currentFormEnd=s.tqfind("\\n",pos);
+ int currentFormEnd=s.find("\\n",pos);
if( currentFormEnd == -1 ) currentFormEnd=s.length();
s=s.mid(currentFormBegin,currentFormEnd-currentFormBegin);
@@ -382,7 +382,7 @@ void KBabelView::updateArgs()
for(it=_args.begin(); it!=_args.end(); ++it)
{
TQString s = *it;
- if(!tList.tqcontains(s))
+ if(!tList.contains(s))
{
_argsMenu->insertItem(s,counter);
tList.append(s);
@@ -427,10 +427,10 @@ void KBabelView::insertNextArg()
if( _catalog->pluralForm( _currentIndex ) == KDESpecific )
{
int pos = msgstrEdit->currentIndex();
- int currentFormBegin=s.tqfindRev("\\n",pos);
+ int currentFormBegin=s.findRev("\\n",pos);
if( currentFormBegin == -1 ) currentFormBegin=0;
else currentFormBegin+=3; // skip the newline
- int currentFormEnd=s.tqfind("\\n",pos);
+ int currentFormEnd=s.find("\\n",pos);
if( currentFormEnd == -1 ) currentFormEnd=s.length();
s=s.mid(currentFormBegin,currentFormEnd-currentFormBegin);
@@ -807,7 +807,7 @@ void KBabelView::showTryLaterMessageBox()
lay->add( label2 );
lay->addStretch(1);
- TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this tqfind/replace session again"), topcontents);
+ TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this find/replace session again"), topcontents);
dialog->setMainWidget(topcontents);
dialog->enableButtonSeparator(false);
@@ -904,10 +904,10 @@ void KBabelView::plural2msgstr()
case KDESpecific:
{
pos = msgstrEdit->currentIndex();
- currentFormBegin=text.tqfindRev("\\n",pos);
+ currentFormBegin=text.findRev("\\n",pos);
if( currentFormBegin == -1 ) currentFormBegin=0;
else currentFormBegin+=3; // skip the newline
- currentFormEnd=text.tqfind("\\n",pos);
+ currentFormEnd=text.find("\\n",pos);
if( currentFormEnd == -1 ) currentFormEnd=text.length();
text=text.mid(currentFormBegin,currentFormEnd-currentFormBegin);
@@ -940,7 +940,7 @@ bool KBabelView::validateUsingTool( const KDataToolInfo & info, const TQString &
bool result=_catalog->checkUsingTool(tool);
emitEntryState();
- TQString checkName = *(info.userCommands().at( info.commands().tqfindIndex(command) ));
+ TQString checkName = *(info.userCommands().at( info.commands().findIndex(command) ));
if(result)
{
diff --git a/kbabel/kbabel/kbbookmarkhandler.cpp b/kbabel/kbabel/kbbookmarkhandler.cpp
index 4d3f0a37..3f9b70b8 100644
--- a/kbabel/kbabel/kbbookmarkhandler.cpp
+++ b/kbabel/kbabel/kbbookmarkhandler.cpp
@@ -50,10 +50,10 @@ KBabelBookmark::KBabelBookmark(int msgindex, TQString msgtext)
// insert one '&' before every consecutive group of ampersands to keep the
// first of these from acting either as accelerator or tqmask in the menu
TQRegExp rx("&+");
- int pos = msgtext.tqfind(rx);
+ int pos = msgtext.find(rx);
while (pos >= 0) {
msgtext.insert(pos, '&');
- pos = msgtext.tqfind(rx, pos + rx.matchedLength() + 1);
+ pos = msgtext.find(rx, pos + rx.matchedLength() + 1);
}
_msgtext = msgtext;
diff --git a/kbabel/kbabel/kbcataloglistview.cpp b/kbabel/kbabel/kbcataloglistview.cpp
index 40fb29e8..25cff704 100644
--- a/kbabel/kbabel/kbcataloglistview.cpp
+++ b/kbabel/kbabel/kbcataloglistview.cpp
@@ -63,7 +63,7 @@ KBCatalogListView::~KBCatalogListView()
void KBCatalogListView::selectionChanged ( TQListViewItem * item)
{
DocPosition pos;
- int number = m_items->tqfind(reinterpret_cast<KBCatalogListViewItem*>(item));
+ int number = m_items->find(reinterpret_cast<KBCatalogListViewItem*>(item));
if(number<0) number = 0;
pos.item=number;
diff --git a/kbabel/kbabel/kbcataloglistviewitem.cpp b/kbabel/kbabel/kbcataloglistviewitem.cpp
index 1889e518..45be428e 100644
--- a/kbabel/kbabel/kbcataloglistviewitem.cpp
+++ b/kbabel/kbabel/kbcataloglistviewitem.cpp
@@ -205,9 +205,9 @@ TQString KBCatalogListViewItem::formatMsg(const TQString str)
{
// TODO: Use KBHighlighting for this
TQString tmp_msgid = str;
- tmp_msgid = tmp_msgid.tqreplace( "\\n", "<br>" );
- tmp_msgid = tmp_msgid.tqreplace( "<", "&lt;" );
- tmp_msgid = tmp_msgid.tqreplace( ">", "&gt;" );
+ tmp_msgid = tmp_msgid.replace( "\\n", "<br>" );
+ tmp_msgid = tmp_msgid.replace( "<", "&lt;" );
+ tmp_msgid = tmp_msgid.replace( ">", "&gt;" );
return tmp_msgid;
}
diff --git a/kbabel/kbabel/kbhighlighting.cpp b/kbabel/kbabel/kbhighlighting.cpp
index 05aada8f..c67d56a7 100644
--- a/kbabel/kbabel/kbhighlighting.cpp
+++ b/kbabel/kbabel/kbhighlighting.cpp
@@ -98,7 +98,7 @@ void KBabelHighlighter::highlight( )
// create a single line out of the text: remove "\n", so that we only
// have to deal with one single line of text.
TQString text = _edit->text( );
- text.tqreplace( "\n", "" );
+ text.replace( "\n", "" );
TQRegExp rx;
int pos;
@@ -107,10 +107,10 @@ void KBabelHighlighter::highlight( )
{
for ( uint i = 0; i < regexps.count( ); ++i ) {
rx.setPattern( regexps[i] );
- pos = text.tqfind( rx );
+ pos = text.find( rx );
while ( pos >= 0 ) {
doHighlighting( (HighlightType)(i+1), pos, rx.matchedLength( ) );
- pos = text.tqfind( rx, pos + rx.matchedLength( ) );
+ pos = text.find( rx, pos + rx.matchedLength( ) );
}
}
}
@@ -223,7 +223,7 @@ void KBabelHighlighter::flushCurrentWord()
currentPos += tags.matchedLength();
}
- currentWord.tqreplace ( tags, "" );
+ currentWord.replace ( tags, "" );
if (!currentWord.isEmpty()) {
bool isPlainWord = true;
@@ -251,7 +251,7 @@ bool KBabelHighlighter::isMisspelled(const TQString& wordRaw)
// word first.
TQString word = wordRaw;
kdDebug(KBABEL) << "isampersand: checking (raw):" << word << endl;
- word.tqreplace("&", "" );
+ word.replace("&", "" );
kdDebug(KBABEL) << "isMisspelled: checking: " << word << endl;
// Normally isMisspelled would look up a dictionary and return
@@ -266,7 +266,7 @@ bool KBabelHighlighter::isMisspelled(const TQString& wordRaw)
// there is no 'spelt correctly' signal so default to Okay
kdDebug(KBABEL) << "Adding word " << word << endl;
- dict.tqreplace(word, Okay);
+ dict.replace(word, Okay);
mSpell->checkWord(word, false);
return false;
}
@@ -275,7 +275,7 @@ void KBabelHighlighter::slotMisspelling(const TQString & originalword,
const TQStringList & suggestions, unsigned int)
{
kdDebug(KBABEL) << "Misspelled " << originalword << ", " << suggestions << endl;
- dict.tqreplace( originalword, NotOkay );
+ dict.replace( originalword, NotOkay );
// this is slow but since kspell is async this will have to do for now
highlight();
diff --git a/kbabel/kbabel/mymultilineedit.cpp b/kbabel/kbabel/mymultilineedit.cpp
index af58cd0a..a3251a6b 100644
--- a/kbabel/kbabel/mymultilineedit.cpp
+++ b/kbabel/kbabel/mymultilineedit.cpp
@@ -141,7 +141,7 @@ void MyMultiLineEdit::processCommand(EditCommand* cmd, bool undo)
setCursorPosition( row, col );
_firstChangedLine=row;
- if(delcmd->str.tqfind("\n")>0 )_lastChangedLine=row+delcmd->str.tqcontains("\n");
+ if(delcmd->str.find("\n")>0 )_lastChangedLine=row+delcmd->str.contains("\n");
else _lastChangedLine=row;
KTextEdit::insert( delcmd->str );
@@ -355,7 +355,7 @@ void MyMultiLineEdit::insert( const TQString & text, bool indent, bool checkNewL
emit signalUndoCmd( new EndCommand(-1,UndefPart));
}
- int n=text.tqfind("\n");
+ int n=text.find("\n");
if( n > 0 ) _lastChangedLine+=n;
// setup palettes
@@ -661,7 +661,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
if(_showDiff)
{
diffPos.clear();
- int lines = s.tqcontains('\n');
+ int lines = s.contains('\n');
diffPos.resize(lines+1);
TQStringList lineList = TQStringList::split('\n',s,true);
@@ -689,7 +689,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
}
else
{
- addPos = (*it).tqfind("<KBABELADD>",lastPos);
+ addPos = (*it).find("<KBABELADD>",lastPos);
}
if(haveDel && multiline)
@@ -698,7 +698,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
}
else
{
- delPos = (*it).tqfind("<KBABELDEL>",lastPos);
+ delPos = (*it).find("<KBABELDEL>",lastPos);
}
if(delPos >= 0 && addPos >= 0)
@@ -741,7 +741,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
(*it).remove(addPos,11);
}
- int endPos = (*it).tqfind("</KBABELADD>",addPos);
+ int endPos = (*it).find("</KBABELADD>",addPos);
if(endPos < 0)
{
endPos = (*it).length();
@@ -768,7 +768,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
(*it).remove(delPos,11);
}
- int endPos = (*it).tqfind("</KBABELDEL>",delPos);
+ int endPos = (*it).find("</KBABELDEL>",delPos);
if(endPos < 0)
{
endPos = (*it).length();
@@ -805,9 +805,9 @@ void MsgMultiLineEdit::setText(const TQString& s)
}
TQRegExp reg("</?KBABELADD>");
- str.tqreplace(reg,"");
+ str.replace(reg,"");
reg.setPattern("</?KBABELDEL>");
- str.tqreplace(reg,"");
+ str.replace(reg,"");
}
MyMultiLineEdit::setText(str);
@@ -989,7 +989,7 @@ void MsgMultiLineEdit::paintSpacePoints()
if ( paragraphRect( curpara ).top() > contentsY()+visibleHeight()) break;
const TQString& s = text(curpara);
- int i = s.tqfind( " " );
+ int i = s.find( " " );
while( (i >= 0) && (i < (int)s.length()-1) ) // -1 because text will end by EOLN
{
TQPixmap* pm = ( s.tqat(i).tqunicode() == 0x00A0U ) ? wsnb : ws;
@@ -997,7 +997,7 @@ void MsgMultiLineEdit::paintSpacePoints()
r.moveBy( r.width()/2, (r.height() - fm.descent())/2 );
r.moveBy( -pm->rect().width()/2, -pm->rect().height()/2-1 );
bitBlt(viewport(), r.topLeft(), pm, pm->rect(), TQt::CopyROP);
- i = s.tqfind( " ", i+1 );
+ i = s.find( " ", i+1 );
}
++curpara;
}
@@ -1522,7 +1522,7 @@ void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e)
{
TQString spclChars="abfnrtv'\"?\\";
if(col < (int)str.length()-1
- && spclChars.tqcontains(str.at(col+1)))
+ && spclChars.contains(str.at(col+1)))
{
del();
}
@@ -1548,7 +1548,7 @@ void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e)
TQString str=text(row);
TQString spclChars="abfnrtv'\"?\\";
- if(!str.isEmpty() && col > 0 && spclChars.tqcontains(str.at(col-1)))
+ if(!str.isEmpty() && col > 0 && spclChars.contains(str.at(col-1)))
{
if(col > 1 && str.at(col-2)=='\\' && !isMasked(&str,col-2))
{
diff --git a/kbabel/kbabeldict/dictchooser.cpp b/kbabel/kbabeldict/dictchooser.cpp
index ec7ba712..e0ccbaf5 100644
--- a/kbabel/kbabeldict/dictchooser.cpp
+++ b/kbabel/kbabeldict/dictchooser.cpp
@@ -109,7 +109,7 @@ DictChooser::DictChooser(KBabelDictBox*b, TQStringList selected
for(mi = dictList.first(); mi != 0; mi = dictList.next())
{
- if(!selected.tqcontains(mi->id))
+ if(!selected.contains(mi->id))
{
unselectedBox->insertItem(mi->name);
}
diff --git a/kbabel/kbabeldict/dictionarymenu.cpp b/kbabel/kbabeldict/dictionarymenu.cpp
index 925c96eb..ff23e972 100644
--- a/kbabel/kbabeldict/dictionarymenu.cpp
+++ b/kbabel/kbabeldict/dictionarymenu.cpp
@@ -110,7 +110,7 @@ void DictionaryMenu::add(const TQString& n, const TQString& moduleId
TQString name=n;
TQString keyString=key;
- if(keyString.tqcontains("%1"))
+ if(keyString.contains("%1"))
{
keyString=key.tqarg(accel2id.count()+1);
}
diff --git a/kbabel/kbabeldict/dictionarymenu.h b/kbabel/kbabeldict/dictionarymenu.h
index e32a7b09..5cbc151c 100644
--- a/kbabel/kbabeldict/dictionarymenu.h
+++ b/kbabel/kbabeldict/dictionarymenu.h
@@ -56,7 +56,7 @@ public:
/**
* Adds an item to this menu and to the keyboard accelerator.
- * If key tqcontains %1 it is replaced with a number 1-9
+ * If key contains %1 it is replaced with a number 1-9
*/
void add(const TQString& name,const TQString& id, const TQString& key);
diff --git a/kbabel/kbabeldict/kbabeldictbox.cpp b/kbabel/kbabeldict/kbabeldictbox.cpp
index bd2fbbcd..21bd9154 100644
--- a/kbabel/kbabeldict/kbabeldictbox.cpp
+++ b/kbabel/kbabeldict/kbabeldictbox.cpp
@@ -109,7 +109,7 @@ ResultListItem::ResultListItem(TQListView *tqparent, const SearchResult& result
tmp=result.found.first();
bool cutted=false;
- int index=tmp.tqfind('\n');
+ int index=tmp.find('\n');
if(index > 0)
{
tmp=tmp.left(index);
@@ -132,7 +132,7 @@ ResultListItem::ResultListItem(TQListView *tqparent, const SearchResult& result
tmp=result.translation;
cutted=false;
- index=tmp.tqfind('\n');
+ index=tmp.find('\n');
if(index > 0)
{
tmp=tmp.left(index);
@@ -347,7 +347,7 @@ KBabelDictBox::KBabelDictBox( TQWidget* tqparent, const char* name, WFlags fl )
for ( TQStringList::Iterator fit = list.begin(); fit != list.end()
; ++fit )
{
- if(!fileList.tqcontains((*fit)))
+ if(!fileList.contains((*fit)))
{
fileList.append((*fit));
}
@@ -373,7 +373,7 @@ KBabelDictBox::KBabelDictBox( TQWidget* tqparent, const char* name, WFlags fl )
TQStringList appList = rcConfig.readListEntry("Applications");
KInstance *inst = KGlobal::instance();
- if(inst && !appList.isEmpty() && !appList.tqcontains(inst->instanceName()))
+ if(inst && !appList.isEmpty() && !appList.contains(inst->instanceName()))
{
continue;
}
@@ -1679,7 +1679,7 @@ void KBabelDictBox::editFile()
DCOPClient *dcop = kapp->dcopClient();
QCStringList list = dcop->registeredApplications();
- int index = list.tqfindIndex("kbabel");
+ int index = list.findIndex("kbabel");
if(index < 0)
// if(!dcop->isApplicationRegistered("kbabel"));
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
index 3292ccc9..fe312253 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
@@ -607,7 +607,7 @@ KDBSearchEngine::repeat ()
if (tot >= min && !inlibs)
{
id = item.key;
- id = id.tqreplace ("\n", "\"\n\"");
+ id = id.replace ("\n", "\"\n\"");
mle->append (txt.arg (tot).arg (ntra).arg (id));
}
@@ -667,7 +667,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
bool allkey = (searchmode == MD_ALL_GOOD_KEYS);
- bool equal, tqcontains, contained, regexp, intra;
+ bool equal, contains, contained, regexp, intra;
intra = searchmode & MD_IN_TRANSLATION;
@@ -700,12 +700,12 @@ KDBSearchEngine::startSearchNow (int searchmode)
int pos;
for (i = 0; i < len; i++)
{
- while ((pos = idMod->tqfind (remchar.at (i))) != -1)
+ while ((pos = idMod->find (remchar.at (i))) != -1)
idMod->remove (pos, 1);
}
if (comm)
- idMod->tqreplace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
+ idMod->replace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
if (norm)
@@ -802,12 +802,12 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove character in list of character to be ignored
for (i = 0; i < len; i++)
- while ((pos = msgId.tqfind (remchar.at (i))) != -1)
+ while ((pos = msgId.find (remchar.at (i))) != -1)
msgId.remove (pos, 1);
//Remove context information from id found
if (comm)
- msgId.tqreplace (TQRegExp ("\\_\\:.*\\\\n"), "");
+ msgId.replace (TQRegExp ("\\_\\:.*\\\\n"), "");
if (norm)
@@ -838,14 +838,14 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove character in list of character to be ignored
for (i = 0; i < len; i++)
while ((pos =
- msgId.tqfind (remchar.at (i))) !=
+ msgId.find (remchar.at (i))) !=
-1)
msgId.remove (pos, 1);
//Remove context information from id found
if (comm)
msgId.
- tqreplace (TQRegExp ("\\_\\:.*\\\\n"),
+ replace (TQRegExp ("\\_\\:.*\\\\n"),
"");
@@ -867,12 +867,12 @@ KDBSearchEngine::startSearchNow (int searchmode)
equal = false;
if (rules & Contains)
- tqcontains = idMod->tqcontains (msgId);
+ contains = idMod->contains (msgId);
else
- tqcontains = false;
+ contains = false;
if (rules & Contained)
- contained = msgId.tqcontains (*idMod);
+ contained = msgId.contains (*idMod);
else
contained = false;
@@ -887,7 +887,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
}
while (intra && nn < item.numTra);
- if (equal || tqcontains || contained || regexp || allkey)
+ if (equal || contains || contained || regexp || allkey)
{
if (equal)
@@ -1034,7 +1034,7 @@ KDBSearchEngine::startSingleSearch (TQString searchString,
in = reg.search (searchString, in + len);
len = reg.matchedLength ();
TQString regToAdd = searchString;
- regToAdd.tqreplace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*");
+ regToAdd.replace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*");
regToAdd.append ("$");
regToAdd.prepend ("^");
// fprintf(stderr,"%s",(const char *)regToAdd.local8Bit());
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
index 1d1cb9ae..6fa383df 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
@@ -1446,7 +1446,7 @@ DataBaseManager::putNewTranslation (TQString key, TQString tran, int catalog,
isThisOne = (*ittr).translation == msgstr;
// is there the catnum we are looking for?
- if ((*ittr).infoRef.tqfind (catnum) != (*ittr).infoRef.end ())
+ if ((*ittr).infoRef.find (catnum) != (*ittr).infoRef.end ())
{
found_catalog_info = true;
if (ow && !isThisOne)
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
index 3d86ebb1..5a4d5a6e 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
@@ -120,7 +120,7 @@ InfoItem cinfo;
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
-TQString location=fileName.right(fileName.length()-fileName.tqfindRev("/")-1);
+TQString location=fileName.right(fileName.length()-fileName.findRev("/")-1);
connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
emit fileProgress(0);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui b/kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui
index 3e694330..b457bf74 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui
@@ -285,7 +285,7 @@ It also substitutes groups of more than one space character with only one space
<cstring>containsCB</cstring>
</property>
<property name="text">
- <string>Query tqcontains</string>
+ <string>Query contains</string>
</property>
<property name="whatsThis" stdset="0">
<string>Match if query contains the database string</string>
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C b/kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C
index 74a09037..a83d947b 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C
+++ b/kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C
@@ -116,9 +116,9 @@ nmax++;
normalizestr(a);
// printf("#%s#\n",a);
-// while (st.tqfind("#~")==0)
+// while (st.find("#~")==0)
// st = st.right(st.length()-2);
-// while (st.tqfind(" ")==0)
+// while (st.find(" ")==0)
// st = st.right(st.length()-1);
if(isAMsgId) nextIsFuzzy=false;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
index 36f66fc1..077565d4 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
@@ -250,7 +250,7 @@ void KDBSearchEngine2::stringChanged( TQString orig, TQString translated
if(!init()) return;
//if(translated.isEmpty()) return;
InputInfo ii;
- if(description.tqfind("fuzzy",false)==-1)
+ if(description.find("fuzzy",false)==-1)
di->addEntry(orig,translated,&ii);
}
@@ -499,7 +499,7 @@ void KDBSearchEngine2::scanNowPressed()
TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(!init()) return;
- if(sources.tqcontains(sourceName))
+ if(sources.contains(sourceName))
{
TQValueList<KURL> urls=sources[sourceName].urls();
PoScanner ps(di);
@@ -538,7 +538,7 @@ void KDBSearchEngine2::editSource()
TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
- if(sources.tqcontains(sourceName))
+ if(sources.contains(sourceName))
{
bool nameIsNew;
TQString newName;
@@ -554,7 +554,7 @@ void KDBSearchEngine2::editSource()
{
return;
}
- nameIsNew=sources.tqcontains(newName);
+ nameIsNew=sources.contains(newName);
if(newName!=sourceName && !nameIsNew)
{
@@ -602,13 +602,13 @@ void KDBSearchEngine2::addSource()
if(sd.exec()==TQDialog::Accepted)
{
newName= sd.sourceName->text();
- nameIsNew=!sources.tqcontains(newName);
+ nameIsNew=!sources.contains(newName);
}
else
{
return;
}
- // nameIsNew=sources.tqcontains(newName);
+ // nameIsNew=sources.contains(newName);
if(!nameIsNew)
{
KMessageBox::error(0,i18n("The name you chose is already used.\nPlease change the source name."),
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
index ab3d14b1..466b68e5 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
@@ -145,7 +145,7 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const TQString
for(ResultList::iterator it1=r.begin();it1!=r.end() &&!di->stopNow(); ++it1)
{
TQString chunkTranslation= (*it1).result();
- if(!translationUsed.tqcontains(chunkTranslation))
+ if(!translationUsed.contains(chunkTranslation))
{
translationUsed[chunkTranslation]=true;
kdDebug(0) << "a translation is: " << chunkTranslation << endl;
@@ -330,7 +330,7 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const TQString &
TQString re=di->format(di->simple(*it,true),query);
QueryResult r(re,ori,score);
for(TQPtrListIterator<AbstractChunk> it(querychunks); it.current() && di->stopNow() ; ++it){
- ori=ori.tqreplace(TQRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
+ ori=ori.replace(TQRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
}
r.setRichOriginal(ori);
if(!di->stopNow())
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
index e5250274..1fe02198 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
@@ -282,7 +282,7 @@ bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo
TQStringList wt=words(*otIt);
for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
- if(correlationDiff.tqcontains(*it))
+ if(correlationDiff.contains(*it))
correlationDiff[*it]--;
else
correlationDiff[*it]=-1;
@@ -299,7 +299,7 @@ bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo
TQStringList wt=words(*otIt);
for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
- if(correlationDiff.tqcontains(*it))
+ if(correlationDiff.contains(*it))
correlationDiff[*it]++;
else
correlationDiff[*it]=1;
@@ -408,7 +408,7 @@ TQMap<TQString,float> DataBaseInterface::correlation(TQString word,SearchFilter
MainEntry e=get(k->getString(),filter);
TQStringList trad=e.second.getTranslations();
- nocck=words(k->getString()).tqcontains(sword);
+ nocck=words(k->getString()).contains(sword);
for( TQStringList::iterator it2=trad.begin();it2!=trad.end();++it2)
{
@@ -465,7 +465,7 @@ TQStringList DataBaseInterface::words(TQString s)
int pos;
do {
- pos=str.tqfind(TQRegExp("\\s"));
+ pos=str.find(TQRegExp("\\s"));
// if(!simple(str.left(pos)).isEmpty())
// list.append(simple(str.left(pos)));
if(!str.left(pos).isEmpty())
@@ -484,13 +484,13 @@ TQString DataBaseInterface::simple(TQString str,bool ck)
else
res=str.lower(); //lowercase
//FIXME: uncoment the foll. line (check speed)
- res=res.tqreplace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
+ res=res.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
//Try to get rid of regexps.
- // res=res.tqreplace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
- // res=res.tqreplace(TQRegExp("(('|-|_)+)")," "); //strip non-word char
- // res=res.tqreplace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char
+ // res=res.replace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
+ // res=res.replace(TQRegExp("(('|-|_)+)")," "); //strip non-word char
+ // res=res.replace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char
TQString r;
TQChar c;
@@ -607,16 +607,16 @@ TQString DataBaseInterface::format(TQString _s,TQString t)
//FIXME use regexp
TQString s=_s;
- TQString noTagT=t.tqreplace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
- TQChar first=noTagT[noTagT.tqfind(TQRegExp("\\w"))];
+ TQString noTagT=t.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
+ TQChar first=noTagT[noTagT.find(TQRegExp("\\w"))];
bool firstCapital=isUpper(first);
/*
-bool dotsAtEnd=(t.tqfind("...")+3==t.length());
-bool gtgtAtEnd=(t.tqfind(">>")+2==t.length());
-bool ltltAtEnd=(t.tqfind("<<")==t.length()-2);
+bool dotsAtEnd=(t.find("...")+3==t.length());
+bool gtgtAtEnd=(t.find(">>")+2==t.length());
+bool ltltAtEnd=(t.find("<<")==t.length()-2);
-bool columnAtEnd=(t.tqfind(":")+1==t.length());
+bool columnAtEnd=(t.find(":")+1==t.length());
*/
bool allupper=(t.upper()==t);
@@ -643,13 +643,13 @@ if(columnAtEnd)
if(allupper)
s=s.upper();
- int pos=t.tqfind(TQRegExp("&"));
+ int pos=t.find(TQRegExp("&"));
if(pos>=0) {
- TQChar accel=t[t.tqfind(TQRegExp("&"))+1];
+ TQChar accel=t[t.find(TQRegExp("&"))+1];
if(accel!='&')
{
- pos=s.tqfind(accel,false);
+ pos=s.find(accel,false);
if(pos<0)
pos=0;
s.insert(pos,"&");
@@ -685,8 +685,8 @@ TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,T
//kdDebug(0) << "phRegExp: " << phRegExp << endl;
//kdDebug(0) << "cap[" << i << "]: "<< *capit<< endl;
- stringReplace = stringReplace.tqreplace(TQRegExp(phRegExp),*capit);
- stringSearch = stringSearch.tqreplace(TQRegExp(phRegExp),*capit);
+ stringReplace = stringReplace.replace(TQRegExp(phRegExp),*capit);
+ stringSearch = stringSearch.replace(TQRegExp(phRegExp),*capit);
i++;
}
@@ -694,7 +694,7 @@ TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,T
// kdDebug(0) << "stringReplace " << stringReplace << endl;
TQRegExp stringSearchRegExp = TQRegExp(stringSearch);
// kdDebug(0) << "before: "<<s<<endl;
- s = s.tqreplace(stringSearchRegExp,stringReplace);
+ s = s.replace(stringSearchRegExp,stringReplace);
// kdDebug(0) << "after: "<<s<<endl;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
index 0958b801..2b4d7360 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
@@ -77,7 +77,7 @@ void DBItemMainData::write(TQDataStream *s)
void DBItemMainData::addTranslation(TQString str, unsigned int ref)
{
//get();
- if(translations[str].tqfind(ref)==translations[str].end()) // If it do not exists
+ if(translations[str].find(ref)==translations[str].end()) // If it do not exists
translations[str].append(ref); //add a new reference.
else
{
@@ -106,7 +106,7 @@ TQMapIterator<TQString,TQValueList<unsigned int> > it2;
{ //Dirty hack
it2=it;
it++;
- if(it2.data().tqfind(ref)!=it2.data().end())
+ if(it2.data().find(ref)!=it2.data().end())
removeTranslation(it2.key(),ref);
}
@@ -142,7 +142,7 @@ list.clear();
void DBItemMultiIndex::addEntry(unsigned int index)
{
// get();
- if(list.tqfind(index)==list.end())
+ if(list.find(index)==list.end())
{
list.append(index);
qHeapSort(list);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
index b7e64c2b..96239ba9 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
@@ -203,7 +203,7 @@ emit fileStarted();
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
TQString pretty=u.prettyURL();
-TQString location=pretty.right(pretty.length()-pretty.tqfindRev("/")-1);
+TQString location=pretty.right(pretty.length()-pretty.findRev("/")-1);
connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui b/kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui
index fe3b1f6f..64a74b8a 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui
@@ -288,7 +288,7 @@ It also substitutes groups of more than one space character with only one space
<cstring>containsCB</cstring>
</property>
<property name="text">
- <string>Query tqcontains</string>
+ <string>Query contains</string>
</property>
<property name="whatsThis" stdset="0">
<string>Match if query contains the database string</string>
diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
index fae9fb0e..ce4b7800 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
@@ -184,7 +184,7 @@ bool PoAuxiliary::startSearch(const TQString& t, uint pluralForm, const SearchFi
kapp->tqprocessEvents(100);
- text.tqreplace("\n","");
+ text.replace("\n","");
Entry *entry = msgidDict[text];
if(entry)
@@ -358,27 +358,27 @@ void PoAuxiliary::loadAuxiliary()
TQString path=url;
- if(path.tqcontains("@LANG@"))
+ if(path.contains("@LANG@"))
{
- path.tqreplace("@LANG@",langCode);
+ path.replace("@LANG@",langCode);
}
- if(path.tqcontains("@PACKAGE@"))
+ if(path.contains("@PACKAGE@"))
{
- int pos=package.tqfindRev("/");
+ int pos=package.findRev("/");
if( pos<0 ) pos=0;
- path.tqreplace("@PACKAGE@",package.mid(pos));
+ path.replace("@PACKAGE@",package.mid(pos));
}
- if(path.tqcontains("@PACKAGEDIR@"))
+ if(path.contains("@PACKAGEDIR@"))
{
TQString packagedir;
- int pos=package.tqfindRev("/");
+ int pos=package.findRev("/");
if( pos > 0 ) packagedir=package.left(pos);
else packagedir="";
- path.tqreplace("@PACKAGEDIR@",packagedir);
+ path.replace("@PACKAGEDIR@",packagedir);
kdDebug(KBABEL_SEARCH) << "Packagedir found " << packagedir << endl;
}
TQRegExp reg("@DIR[0-9]+@");
- if(path.tqcontains(reg))
+ if(path.contains(reg))
{
int pos=reg.search(path);
int len = reg.matchedLength();
@@ -393,7 +393,7 @@ void PoAuxiliary::loadAuxiliary()
{
TQString dir=directory(editedFile,number);
TQString s("@DIR%1@");
- path.tqreplace(s.tqarg(number),dir);
+ path.replace(s.tqarg(number),dir);
pos+=dir.length();
}
@@ -461,7 +461,7 @@ void PoAuxiliary::loadAuxiliary()
Entry *e = new Entry;
// FIXME: should care about plural forms
e->orig = catalog->msgid(i).first();
- e->orig.tqreplace("\n","");
+ e->orig.replace("\n","");
kdWarning() << "PoAuxialiary does not support plural forms" << endl;
e->translation = catalog->msgstr(i).first();
e->comment = catalog->comment(i);
@@ -491,7 +491,7 @@ void PoAuxiliary::loadAuxiliary()
void PoAuxiliary::setEditedFile(const TQString& file)
{
- if(initialized && (url.tqcontains("@DIR") || KURL::isRelativeURL(url))
+ if(initialized && (url.contains("@DIR") || KURL::isRelativeURL(url))
&& file!=editedFile && !loadTimer->isActive() )
{
initialized=false;
@@ -503,7 +503,7 @@ void PoAuxiliary::setEditedFile(const TQString& file)
void PoAuxiliary::setEditedPackage(const TQString& pack)
{
- if(initialized && url.tqcontains("@PACKAGE@") && pack!=package
+ if(initialized && url.contains("@PACKAGE@") && pack!=package
&& !loadTimer->isActive() )
{
initialized=false;
@@ -515,7 +515,7 @@ void PoAuxiliary::setEditedPackage(const TQString& pack)
void PoAuxiliary::setLanguageCode(const TQString& lang)
{
- if(initialized && url.tqcontains("@LANG@") && lang!=langCode
+ if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
{
initialized=false;
diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
index edc38dc0..71d79641 100644
--- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
@@ -221,7 +221,7 @@ const TQValueList<int>* CompendiumData::textonlyDict(const TQString text) const
void CompendiumData::registerObject(TQObject *obj)
{
- if(!_registered.tqcontainsRef(obj))
+ if(!_registered.containsRef(obj))
_registered.append(obj);
}
diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
index bc79f082..6e664316 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
@@ -232,7 +232,7 @@ bool PoCompendium::searchCaseInsensitive(const TQString& text, uint pluralForm,
TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
- if(foundIndices.tqcontains(*it))
+ if(foundIndices.contains(*it))
{
continue;
}
@@ -288,7 +288,7 @@ bool PoCompendium::searchTextOnly(const TQString& text, uint pluralForm, TQPtrLi
TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
- if(foundIndices.tqcontains(*it))
+ if(foundIndices.contains(*it))
{
continue;
}
@@ -346,12 +346,12 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr
if(stop)
break;
- if(foundIndices.tqcontains(*it))
+ if(foundIndices.contains(*it))
{
continue;
}
- if(checkedIndices.tqcontains(*it))
+ if(checkedIndices.contains(*it))
{
continue;
}
@@ -397,7 +397,7 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr
s=" "+*wit+" ";
o=" "+origStr+" ";
}
- if(o.tqcontains(s))
+ if(o.contains(s))
{
found=true;
}
@@ -519,7 +519,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr
emit progress( 50+(50*(checkCounter+1))/catalogInfo.total);
}
- if(checkedIndices.tqcontains(i))
+ if(checkedIndices.contains(i))
{
continue;
}
@@ -532,7 +532,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr
continue;
}
- if(foundIndices.tqcontains(i))
+ if(foundIndices.contains(i))
{
continue;
}
@@ -689,7 +689,7 @@ bool PoCompendium::startSearch(const TQString& text, uint pluralForm, const Sear
// search without whitespace
searchTextOnly(searchStr, pluralForm, results, foundIndices, checkedIndices);
- // now, search based on words (tqcontains, is contained, etc)
+ // now, search based on words (contains, is contained, etc)
searchWords(searchStr, pluralForm, results, foundIndices, checkedIndices);
@@ -797,9 +797,9 @@ void PoCompendium::slotLoadCompendium()
TQString path=url;
- if(path.tqcontains("@LANG@"))
+ if(path.contains("@LANG@"))
{
- path.tqreplace("@LANG@",langCode);
+ path.replace("@LANG@",langCode);
}
KURL u=KCmdLineArgs::makeURL(path.local8Bit());
realURL = u.url();
@@ -866,19 +866,19 @@ void PoCompendium::recheckData()
TQString PoCompendium::maskString(TQString s)
{
- s.tqreplace("\\","\\\\");
- s.tqreplace("\?","\\?");
- s.tqreplace("[","\\[");
- s.tqreplace(".","\\.");
- s.tqreplace("*","\\*");
- s.tqreplace("+","\\+");
- s.tqreplace("^","\\^");
- s.tqreplace("$","\\$");
- s.tqreplace("(","\\(");
- s.tqreplace(")","\\)");
- s.tqreplace("{","\\{");
- s.tqreplace("}","\\}");
- s.tqreplace("|","\\|");
+ s.replace("\\","\\\\");
+ s.replace("\?","\\?");
+ s.replace("[","\\[");
+ s.replace(".","\\.");
+ s.replace("*","\\*");
+ s.replace("+","\\+");
+ s.replace("^","\\^");
+ s.replace("$","\\$");
+ s.replace("(","\\(");
+ s.replace(")","\\)");
+ s.replace("{","\\{");
+ s.replace("}","\\}");
+ s.replace("|","\\|");
return s;
}
@@ -917,7 +917,7 @@ void PoCompendium::addResult(SearchResult *result, TQPtrList<SearchResult>& res)
void PoCompendium::setLanguageCode(const TQString& lang)
{
- if(initialized && url.tqcontains("@LANG@") && lang!=langCode
+ if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
{
initialized=false;
@@ -1120,7 +1120,7 @@ TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const ui
return res.first()->translation;
}
- // now, search based on words (tqcontains, is contained, etc)
+ // now, search based on words (contains, is contained, etc)
searchWords(searchStr, pluralForm, res, foundIndices, checkedIndices);
if( matchNGram ||
@@ -1181,7 +1181,7 @@ void PoCompendium::unregisterData()
void PoCompendium::registerData()
{
- data = compendiumDict()->tqfind(realURL);
+ data = compendiumDict()->find(realURL);
if(!data)
{
data = new CompendiumData;
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
index 123935e7..42dfbdee 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
@@ -267,7 +267,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
- if(foundIndices.tqcontains(*it))
+ if(foundIndices.contains(*it))
{
continue;
}
@@ -319,12 +319,12 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
if(stop)
break;
- if(foundIndices.tqcontains(*it))
+ if(foundIndices.contains(*it))
{
continue;
}
- if(checkedIndices.tqcontains(*it))
+ if(checkedIndices.contains(*it))
{
continue;
}
@@ -365,7 +365,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
s=" "+*wit+" ";
o=" "+origStr+" ";
}
- if(o.tqcontains(s))
+ if(o.contains(s))
{
found=true;
}
@@ -471,7 +471,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
i++;
- if(checkedIndices.tqcontains(i))
+ if(checkedIndices.contains(i))
{
continue;
}
@@ -479,7 +479,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
checkedIndices.append(i);
checkCounter++;
- if(foundIndices.tqcontains(i))
+ if(foundIndices.contains(i))
{
continue;
}
@@ -687,9 +687,9 @@ void TmxCompendium::slotLoadCompendium()
TQString path=url;
- if(path.tqcontains("@LANG@"))
+ if(path.contains("@LANG@"))
{
- path.tqreplace("@LANG@",langCode);
+ path.replace("@LANG@",langCode);
}
KURL u=KCmdLineArgs::makeURL(path.local8Bit());
realURL = u.url();
@@ -748,19 +748,19 @@ void TmxCompendium::recheckData()
TQString TmxCompendium::maskString(TQString s) const
{
- s.tqreplace('\\',"\\\\");
- s.tqreplace('?',"\\?");
- s.tqreplace('[',"\\[");
- s.tqreplace('.',"\\.");
- s.tqreplace('*',"\\*");
- s.tqreplace('+',"\\+");
- s.tqreplace('^',"\\^");
- s.tqreplace('$',"\\$");
- s.tqreplace('(',"\\(");
- s.tqreplace(')',"\\)");
- s.tqreplace('{',"\\{");
- s.tqreplace('}',"\\}");
- s.tqreplace('|',"\\|");
+ s.replace('\\',"\\\\");
+ s.replace('?',"\\?");
+ s.replace('[',"\\[");
+ s.replace('.',"\\.");
+ s.replace('*',"\\*");
+ s.replace('+',"\\+");
+ s.replace('^',"\\^");
+ s.replace('$',"\\$");
+ s.replace('(',"\\(");
+ s.replace(')',"\\)");
+ s.replace('{',"\\{");
+ s.replace('}',"\\}");
+ s.replace('|',"\\|");
return s;
}
@@ -797,7 +797,7 @@ void TmxCompendium::addResult(SearchResult *result)
void TmxCompendium::setLanguageCode(const TQString& lang)
{
- if(initialized && url.tqcontains("@LANG@") && lang!=langCode
+ if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
{
initialized=false;
@@ -943,7 +943,7 @@ void TmxCompendium::unregisterData()
void TmxCompendium::registerData()
{
- data = compendiumDict()->tqfind(realURL);
+ data = compendiumDict()->find(realURL);
if(!data)
{
data = new TmxCompendiumData;
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
index 1cd033bc..d4497e29 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
@@ -268,7 +268,7 @@ const TQString TmxCompendiumData::msgstr(const int index) const
void TmxCompendiumData::registerObject(TQObject *obj)
{
- if(!_registered.tqcontainsRef(obj))
+ if(!_registered.containsRef(obj))
_registered.append(obj);
}
diff --git a/kbabel/kbabeldict/searchengine.cpp b/kbabel/kbabeldict/searchengine.cpp
index ac45c8b3..912f4da7 100644
--- a/kbabel/kbabeldict/searchengine.cpp
+++ b/kbabel/kbabeldict/searchengine.cpp
@@ -204,7 +204,7 @@ TQString SearchEngine::directory(const TQString& path, int n)
if(n<0)
return TQString();
- int begin=path.tqfindRev('/');
+ int begin=path.findRev('/');
int end=path.length();
if(begin < 0)
@@ -224,7 +224,7 @@ TQString SearchEngine::directory(const TQString& path, int n)
}
end = begin;
- begin = path.tqfindRev('/', end-1);
+ begin = path.findRev('/', end-1);
if(begin < 0)
{
@@ -266,7 +266,7 @@ uint SearchEngine::ngramMatch (const TQString& text1, const TQString& text2,
uint ngram_cnt = text1.length() - ngram_len + 1;
for (uint i = 0; i < ngram_cnt; i++) {
- if (text2.tqfind(text1.mid(i,ngram_len)) >= 0)
+ if (text2.find(text1.mid(i,ngram_len)) >= 0)
cnt++;
}