diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 330c33ab6f97b279737bf9527c9add7bb1475450 (patch) | |
tree | 85cb998d3077ae295d65944ebb4d0189fc660ead /languages/cpp | |
parent | 093de0db4fea89b3f94a2359c6981f353d035eb7 (diff) | |
download | tdevelop-330c33ab6f97b279737bf9527c9add7bb1475450.tar.gz tdevelop-330c33ab6f97b279737bf9527c9add7bb1475450.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp')
87 files changed, 451 insertions, 451 deletions
diff --git a/languages/cpp/addattributedialog.cpp b/languages/cpp/addattributedialog.cpp index 70dd27b3..84929a22 100644 --- a/languages/cpp/addattributedialog.cpp +++ b/languages/cpp/addattributedialog.cpp @@ -102,7 +102,7 @@ void AddAttributeDialog::accept() TQString access = accessID( *it ); TQPair<int, int> varEndPoint = tqMakePair( varEndLine, varEndColumn ); - if ( !points.tqcontains( access ) || points[ access ] < varEndPoint ) + if ( !points.contains( access ) || points[ access ] < varEndPoint ) { accessList.remove( access ); accessList.push_back( access ); // move 'access' at the end of the list @@ -132,7 +132,7 @@ void AddAttributeDialog::accept() TQString str = variableDeclaration( currentItem ); TQPair<int, int> pt; - if ( points.tqcontains( *it ) ) + if ( points.contains( *it ) ) { pt = points[ *it ]; } @@ -144,7 +144,7 @@ void AddAttributeDialog::accept() } editIface->insertText( pt.first + insertedLine + 1, 0 /*pt.second*/, str ); - insertedLine += str.tqcontains( TQChar( '\n' ) ); + insertedLine += str.contains( TQChar( '\n' ) ); } } @@ -236,7 +236,7 @@ TQStringList AddAttributeDialog::newAccessList( const TQStringList& accessList ) item = item->nextSibling(); TQString access = currentItem->text( 0 ); - if ( !( accessList.tqcontains( access ) || newAccessList.tqcontains( access ) ) ) + if ( !( accessList.contains( access ) || newAccessList.contains( access ) ) ) newAccessList.push_back( access ); } diff --git a/languages/cpp/addmethoddialog.cpp b/languages/cpp/addmethoddialog.cpp index 71f03b5d..80397074 100644 --- a/languages/cpp/addmethoddialog.cpp +++ b/languages/cpp/addmethoddialog.cpp @@ -75,7 +75,7 @@ AddMethodDialog::AddMethodDialog( CppSupportPart* cppSupport, ClassDom klass, while ( it != m.end() ) { TQString ext = TQFileInfo( it.key() ).extension(); - if ( !headers.tqcontains( ext ) ) + if ( !headers.contains( ext ) ) sourceFile->insertItem( it.key() ); ++it; } @@ -168,7 +168,7 @@ void AddMethodDialog::accept() TQString access = accessID( *it ); TQPair<int, int> funEndPoint = tqMakePair( funEndLine, funEndColumn ); - if ( !points.tqcontains( access ) || points[ access ] < funEndPoint ) + if ( !points.contains( access ) || points[ access ] < funEndPoint ) { accessList.remove( access ); accessList.push_back( access ); // move 'access' at the end of the list @@ -199,7 +199,7 @@ void AddMethodDialog::accept() TQString str = isInline ? functionDefinition( currentItem ) : functionDeclaration( currentItem ); TQPair<int, int> pt; - if ( points.tqcontains( *it ) ) + if ( points.contains( *it ) ) { pt = points[ *it ]; } @@ -211,7 +211,7 @@ void AddMethodDialog::accept() } editIface->insertText( pt.first + insertedLine + 1, 0 /*pt.second*/, str ); - insertedLine += str.tqcontains( TQChar( '\n' ) ); + insertedLine += str.contains( TQChar( '\n' ) ); } } @@ -408,7 +408,7 @@ TQStringList AddMethodDialog::newAccessList( const TQStringList& accessList ) co item = item->nextSibling(); TQString access = currentItem->text( 1 ); - if ( !( accessList.tqcontains( access ) || newAccessList.tqcontains( access ) ) ) + if ( !( accessList.contains( access ) || newAccessList.contains( access ) ) ) newAccessList.push_back( access ); } diff --git a/languages/cpp/app_templates/dcopservice/dcopservice.cpp b/languages/cpp/app_templates/dcopservice/dcopservice.cpp index 2f569f3c..32f32c65 100644 --- a/languages/cpp/app_templates/dcopservice/dcopservice.cpp +++ b/languages/cpp/app_templates/dcopservice/dcopservice.cpp @@ -33,7 +33,7 @@ void %{APPNAME}::add(TQString arg) bool %{APPNAME}::remove(TQString arg) { - TQStringList::Iterator it = m_List.tqfind(arg); + TQStringList::Iterator it = m_List.find(arg); if (it != m_List.end()) { m_List.remove(it); diff --git a/languages/cpp/app_templates/gnome2mmapp/main_window.hh b/languages/cpp/app_templates/gnome2mmapp/main_window.hh index 7b356a27..ae93336b 100644 --- a/languages/cpp/app_templates/gnome2mmapp/main_window.hh +++ b/languages/cpp/app_templates/gnome2mmapp/main_window.hh @@ -2,7 +2,7 @@ // newer (non customized) versions of this file go to main_window.hh_new -// you might tqreplace +// you might replace // class foo : public foo_glade { ... }; // by // typedef foo_glade foo; diff --git a/languages/cpp/app_templates/gtk2mmapp/main_window.hh b/languages/cpp/app_templates/gtk2mmapp/main_window.hh index 6f9405d0..640e1461 100644 --- a/languages/cpp/app_templates/gtk2mmapp/main_window.hh +++ b/languages/cpp/app_templates/gtk2mmapp/main_window.hh @@ -2,7 +2,7 @@ // newer (non customized) versions of this file go to main_window.hh_new -// you might tqreplace +// you might replace // class foo : public foo_glade { ... }; // by // typedef foo_glade foo; diff --git a/languages/cpp/app_templates/kapp/src-Makefile.am b/languages/cpp/app_templates/kapp/src-Makefile.am index f118ee10..318e274a 100644 --- a/languages/cpp/app_templates/kapp/src-Makefile.am +++ b/languages/cpp/app_templates/kapp/src-Makefile.am @@ -29,7 +29,7 @@ noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}view.h pref.h METASOURCES = AUTO messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot KDE_ICON = AUTO diff --git a/languages/cpp/app_templates/kateplugin/src-Makefile.am b/languages/cpp/app_templates/kateplugin/src-Makefile.am index 42a3cec8..88ba33a8 100644 --- a/languages/cpp/app_templates/kateplugin/src-Makefile.am +++ b/languages/cpp/app_templates/kateplugin/src-Makefile.am @@ -16,5 +16,5 @@ plugins_DATA = plugin_%{APPNAMELC}.rc kde_services_DATA = %{APPNAMELC}.desktop messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/kateplugin2/src-Makefile.am b/languages/cpp/app_templates/kateplugin2/src-Makefile.am index 14a5dd2a..2dbd9367 100644 --- a/languages/cpp/app_templates/kateplugin2/src-Makefile.am +++ b/languages/cpp/app_templates/kateplugin2/src-Makefile.am @@ -16,6 +16,6 @@ plugins_DATA = plugin_%{APPNAMELC}.rc kde_services_DATA = %{APPNAMELC}.desktop messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/kcmodule/src-Makefile.am b/languages/cpp/app_templates/kcmodule/src-Makefile.am index 6efe685a..e5d30776 100644 --- a/languages/cpp/app_templates/kcmodule/src-Makefile.am +++ b/languages/cpp/app_templates/kcmodule/src-Makefile.am @@ -13,5 +13,5 @@ xdg_apps_DATA = %{APPNAMELC}.desktop messages: rc.cpp - $(EXTRACTRC) `tqfind -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/kcm%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/kconfig35/src-Makefile.am b/languages/cpp/app_templates/kconfig35/src-Makefile.am index 2a04da7e..737b7399 100644 --- a/languages/cpp/app_templates/kconfig35/src-Makefile.am +++ b/languages/cpp/app_templates/kconfig35/src-Makefile.am @@ -27,7 +27,7 @@ kde_kcfg_DATA = %{APPNAMELC}.kcfg noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}view.h prefs.h messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot KDE_ICON = AUTO diff --git a/languages/cpp/app_templates/kdedcop/src-Makefile.am b/languages/cpp/app_templates/kdedcop/src-Makefile.am index 9b32fb8f..69cbe936 100644 --- a/languages/cpp/app_templates/kdedcop/src-Makefile.am +++ b/languages/cpp/app_templates/kdedcop/src-Makefile.am @@ -10,7 +10,7 @@ noinst_HEADERS = %{APPNAMELC}.h METASOURCES = AUTO messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot # this is the program that gets installed. it's name is used for all diff --git a/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp b/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp index e6b82e21..1ca8f046 100644 --- a/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp +++ b/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp @@ -91,7 +91,7 @@ void %{APPNAME}Part::savedFile(const KURL &fileName) { - if (project()->allFiles().tqcontains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) + if (project()->allFiles().contains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) { kdDebug(9014) << "parse file " << fileName.path() << endl; emit addedSourceInfo( fileName.path() ); diff --git a/languages/cpp/app_templates/kfileplugin/src-Makefile.am b/languages/cpp/app_templates/kfileplugin/src-Makefile.am index 4bfee32a..a0395825 100644 --- a/languages/cpp/app_templates/kfileplugin/src-Makefile.am +++ b/languages/cpp/app_templates/kfileplugin/src-Makefile.am @@ -18,5 +18,5 @@ services_DATA = kfile_%{APPNAMELC}.desktop servicesdir = $(kde_servicesdir) messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/kfile_%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/khello/src-Makefile.am b/languages/cpp/app_templates/khello/src-Makefile.am index 820f292a..9537dc00 100644 --- a/languages/cpp/app_templates/khello/src-Makefile.am +++ b/languages/cpp/app_templates/khello/src-Makefile.am @@ -8,7 +8,7 @@ noinst_HEADERS = %{APPNAMELC}.h METASOURCES = AUTO messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot KDE_ICON = AUTO diff --git a/languages/cpp/app_templates/khello2/src-Makefile.am b/languages/cpp/app_templates/khello2/src-Makefile.am index 7f9d7125..748c54e3 100644 --- a/languages/cpp/app_templates/khello2/src-Makefile.am +++ b/languages/cpp/app_templates/khello2/src-Makefile.am @@ -8,7 +8,7 @@ noinst_HEADERS = %{APPNAMELC}.h METASOURCES = AUTO messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot KDE_ICON = AUTO diff --git a/languages/cpp/app_templates/kicker/src-Makefile.am b/languages/cpp/app_templates/kicker/src-Makefile.am index 8a46f24d..424062d1 100644 --- a/languages/cpp/app_templates/kicker/src-Makefile.am +++ b/languages/cpp/app_templates/kicker/src-Makefile.am @@ -11,5 +11,5 @@ kde_module_LTLIBRARIES = %{APPNAMELC}_panelapplet.la %{APPNAMELC}dir = $(kde_datadir)/kicker/applets messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/kioslave/src-Makefile.am b/languages/cpp/app_templates/kioslave/src-Makefile.am index b73354f1..957ec330 100644 --- a/languages/cpp/app_templates/kioslave/src-Makefile.am +++ b/languages/cpp/app_templates/kioslave/src-Makefile.am @@ -10,5 +10,5 @@ protocol_DATA = %{APPNAMELC}.protocol protocoldir = $(kde_servicesdir) messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/kio_%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/kofficepart/src-Makefile.am b/languages/cpp/app_templates/kofficepart/src-Makefile.am index a0f702f6..19d38267 100644 --- a/languages/cpp/app_templates/kofficepart/src-Makefile.am +++ b/languages/cpp/app_templates/kofficepart/src-Makefile.am @@ -37,5 +37,5 @@ rc_DATA = %{APPNAMELC}.rc rcdir = $(kde_datadir)/%{APPNAMELC} messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp %{APPNAMELC}_aboutdata.h -o $(podir)/%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/kpartapp/src-Makefile.am b/languages/cpp/app_templates/kpartapp/src-Makefile.am index 9b1a14b4..cd5ee2b6 100644 --- a/languages/cpp/app_templates/kpartapp/src-Makefile.am +++ b/languages/cpp/app_templates/kpartapp/src-Makefile.am @@ -8,7 +8,7 @@ noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}_part.h METASOURCES = AUTO messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot KDE_ICON = AUTO diff --git a/languages/cpp/app_templates/kpartplugin/src-Makefile.am b/languages/cpp/app_templates/kpartplugin/src-Makefile.am index 81242777..52e29c09 100644 --- a/languages/cpp/app_templates/kpartplugin/src-Makefile.am +++ b/languages/cpp/app_templates/kpartplugin/src-Makefile.am @@ -18,5 +18,5 @@ pluginsdir = $(kde_datadir)/khtml/kpartplugins plugins_DATA = plugin_%{APPNAMELC}.rc messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/kscons_kmdi/SConstruct b/languages/cpp/app_templates/kscons_kmdi/SConstruct index 238a05b8..b82de4e1 100644 --- a/languages/cpp/app_templates/kscons_kmdi/SConstruct +++ b/languages/cpp/app_templates/kscons_kmdi/SConstruct @@ -73,20 +73,20 @@ if 'dist' in COMMAND_LINE_TARGETS: shutil.copytree(startdir, FOLDER) ## remove our object files first - os.popen("tqfind "+FOLDER+" -name \"*cache*\" | xargs rm -rf") - os.popen("tqfind "+FOLDER+" -name \"*.pyc\" | xargs rm -f") + os.popen("find "+FOLDER+" -name \"*cache*\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \"*.pyc\" | xargs rm -f") #os.popen("pushd %s && scons -c " % FOLDER) # TODO ## CVS cleanup - os.popen("tqfind "+FOLDER+" -name \"CVS\" | xargs rm -rf") - os.popen("tqfind "+FOLDER+" -name \".cvsignore\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \"CVS\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \".cvsignore\" | xargs rm -rf") ## Subversion cleanup - os.popen("tqfind %s -name .svn -type d | xargs rm -rf" % FOLDER) + os.popen("find %s -name .svn -type d | xargs rm -rf" % FOLDER) ## GNU Arch cleanup - os.popen("tqfind "+FOLDER+" -name \"{arch}\" | xargs rm -rf") - os.popen("tqfind "+FOLDER+" -name \".arch-i*\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \"{arch}\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \".arch-i*\" | xargs rm -rf") ## Create the tarball (coloured output) print "\033[92m"+"Writing archive "+ARCHIVE+"\033[0m" @@ -105,7 +105,7 @@ if 'distclean' in COMMAND_LINE_TARGETS: import os, shutil if os.path.isdir(env['CACHEDIR']): shutil.rmtree(env['CACHEDIR']) - os.popen("tqfind . -name \"*.pyc\" | xargs rm -rf") + os.popen("find . -name \"*.pyc\" | xargs rm -rf") env.Default(None) env.Exit(0) diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp b/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp index efb41c1d..7cc0f221 100644 --- a/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp +++ b/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp @@ -204,7 +204,7 @@ void %{APPNAMELC}kmdi::currentChanged( KMdiChildView *current ) } // switch to the corresponding document - if ( m_views.tqcontains( (%{APPNAMELC}kmdiView*) current ) ) + if ( m_views.contains( (%{APPNAMELC}kmdiView*) current ) ) { %{APPNAMELC}kmdiView *view = (%{APPNAMELC}kmdiView*) current; //view->updateCaption(); @@ -243,7 +243,7 @@ bool %{APPNAMELC}kmdi::requestClose(KMdiChildView* v) } %{APPNAMELC}kmdiView *view = (%{APPNAMELC}kmdiView*) v; - if ( m_views.tqcontains( view ) ) + if ( m_views.contains( view ) ) { m_views.remove( view ); if ( view->part()->queryClose() ) diff --git a/languages/cpp/app_templates/kscons_kmdi/messages.sh b/languages/cpp/app_templates/kscons_kmdi/messages.sh index 7df00263..a36f5c93 100755 --- a/languages/cpp/app_templates/kscons_kmdi/messages.sh +++ b/languages/cpp/app_templates/kscons_kmdi/messages.sh @@ -34,14 +34,14 @@ fi echo "extracting the strings" # process the .ui and .rc files -$EXTRACTRC `tqfind $SRCDIR -iname *.rc` >> rc.cpp -$EXTRACTRC `tqfind $SRCDIR -iname *.ui` >> rc.cpp +$EXTRACTRC `find $SRCDIR -iname *.rc` >> rc.cpp +$EXTRACTRC `find $SRCDIR -iname *.ui` >> rc.cpp echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > $SRCDIR/_translatorinfo.cpp # process the tips - $SRCDIR is supposed to be where the tips are living pushd $TIPSDIR; preparetips >tips.cpp; popd -$XGETTEXT `tqfind $SRCDIR -name "*.cpp"` -o kdissert.pot +$XGETTEXT `find $SRCDIR -name "*.cpp"` -o kdissert.pot # remove the intermediate files rm -f $TIPSDIR/tips.cpp diff --git a/languages/cpp/app_templates/kscons_kxt/SConstruct b/languages/cpp/app_templates/kscons_kxt/SConstruct index 238a05b8..b82de4e1 100644 --- a/languages/cpp/app_templates/kscons_kxt/SConstruct +++ b/languages/cpp/app_templates/kscons_kxt/SConstruct @@ -73,20 +73,20 @@ if 'dist' in COMMAND_LINE_TARGETS: shutil.copytree(startdir, FOLDER) ## remove our object files first - os.popen("tqfind "+FOLDER+" -name \"*cache*\" | xargs rm -rf") - os.popen("tqfind "+FOLDER+" -name \"*.pyc\" | xargs rm -f") + os.popen("find "+FOLDER+" -name \"*cache*\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \"*.pyc\" | xargs rm -f") #os.popen("pushd %s && scons -c " % FOLDER) # TODO ## CVS cleanup - os.popen("tqfind "+FOLDER+" -name \"CVS\" | xargs rm -rf") - os.popen("tqfind "+FOLDER+" -name \".cvsignore\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \"CVS\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \".cvsignore\" | xargs rm -rf") ## Subversion cleanup - os.popen("tqfind %s -name .svn -type d | xargs rm -rf" % FOLDER) + os.popen("find %s -name .svn -type d | xargs rm -rf" % FOLDER) ## GNU Arch cleanup - os.popen("tqfind "+FOLDER+" -name \"{arch}\" | xargs rm -rf") - os.popen("tqfind "+FOLDER+" -name \".arch-i*\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \"{arch}\" | xargs rm -rf") + os.popen("find "+FOLDER+" -name \".arch-i*\" | xargs rm -rf") ## Create the tarball (coloured output) print "\033[92m"+"Writing archive "+ARCHIVE+"\033[0m" @@ -105,7 +105,7 @@ if 'distclean' in COMMAND_LINE_TARGETS: import os, shutil if os.path.isdir(env['CACHEDIR']): shutil.rmtree(env['CACHEDIR']) - os.popen("tqfind . -name \"*.pyc\" | xargs rm -rf") + os.popen("find . -name \"*.pyc\" | xargs rm -rf") env.Default(None) env.Exit(0) diff --git a/languages/cpp/app_templates/kscons_kxt/messages.sh b/languages/cpp/app_templates/kscons_kxt/messages.sh index 7df00263..a36f5c93 100755 --- a/languages/cpp/app_templates/kscons_kxt/messages.sh +++ b/languages/cpp/app_templates/kscons_kxt/messages.sh @@ -34,14 +34,14 @@ fi echo "extracting the strings" # process the .ui and .rc files -$EXTRACTRC `tqfind $SRCDIR -iname *.rc` >> rc.cpp -$EXTRACTRC `tqfind $SRCDIR -iname *.ui` >> rc.cpp +$EXTRACTRC `find $SRCDIR -iname *.rc` >> rc.cpp +$EXTRACTRC `find $SRCDIR -iname *.ui` >> rc.cpp echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > $SRCDIR/_translatorinfo.cpp # process the tips - $SRCDIR is supposed to be where the tips are living pushd $TIPSDIR; preparetips >tips.cpp; popd -$XGETTEXT `tqfind $SRCDIR -name "*.cpp"` -o kdissert.pot +$XGETTEXT `find $SRCDIR -name "*.cpp"` -o kdissert.pot # remove the intermediate files rm -f $TIPSDIR/tips.cpp diff --git a/languages/cpp/app_templates/kscreensaver/src-Makefile.am b/languages/cpp/app_templates/kscreensaver/src-Makefile.am index e11ec0dc..e19ffb77 100644 --- a/languages/cpp/app_templates/kscreensaver/src-Makefile.am +++ b/languages/cpp/app_templates/kscreensaver/src-Makefile.am @@ -20,5 +20,5 @@ desktopdir = $(kde_appsdir)/System/ScreenSavers EXTRA_DIST = $(desktop_DATA) messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/kxt/src-Makefile.am b/languages/cpp/app_templates/kxt/src-Makefile.am index 2a04da7e..737b7399 100644 --- a/languages/cpp/app_templates/kxt/src-Makefile.am +++ b/languages/cpp/app_templates/kxt/src-Makefile.am @@ -27,7 +27,7 @@ kde_kcfg_DATA = %{APPNAMELC}.kcfg noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}view.h prefs.h messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot KDE_ICON = AUTO diff --git a/languages/cpp/app_templates/noatunui/src-Makefile.am b/languages/cpp/app_templates/noatunui/src-Makefile.am index f7c7b349..95506569 100644 --- a/languages/cpp/app_templates/noatunui/src-Makefile.am +++ b/languages/cpp/app_templates/noatunui/src-Makefile.am @@ -20,5 +20,5 @@ plugins_DATA = %{APPNAMELC}.plugin # kde_services_DATA = %{APPNAMELC}.desktop messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp *.h -o $(podir)/%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/noatunvisual/src-Makefile.am b/languages/cpp/app_templates/noatunvisual/src-Makefile.am index 8f649499..207fd8a8 100644 --- a/languages/cpp/app_templates/noatunvisual/src-Makefile.am +++ b/languages/cpp/app_templates/noatunvisual/src-Makefile.am @@ -15,5 +15,5 @@ plugins_DATA = %{APPNAMELC}.plugin # kde_services_DATA = %{APPNAMELC}.desktop messages: rc.cpp - $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp *.h -o $(podir)/%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/opieapp/app.pro b/languages/cpp/app_templates/opieapp/app.pro index 74323c7c..f4111696 100644 --- a/languages/cpp/app_templates/opieapp/app.pro +++ b/languages/cpp/app_templates/opieapp/app.pro @@ -9,8 +9,8 @@ QMAKE_LIBDIR = $(OPIEDIR)/lib OPIE-SPEC=6 QUICK_SPEC_FOO = $$(OPIE_BUILD_QUICK_APP) -tqcontains( TEMPLATE, quick-template ){ - tqcontains( QUICK_SPEC_FOO, quick-app-lib ){ +contains( TEMPLATE, quick-template ){ + contains( QUICK_SPEC_FOO, quick-app-lib ){ message( "foo" ) system( rm $$TARGET ) system( ln -s $$(OPIEDIR)/bin/quicklauncher $$TARGET) diff --git a/languages/cpp/app_templates/opieapplet/app.pro b/languages/cpp/app_templates/opieapplet/app.pro index 696082d0..e1cc1e3b 100644 --- a/languages/cpp/app_templates/opieapplet/app.pro +++ b/languages/cpp/app_templates/opieapplet/app.pro @@ -6,8 +6,8 @@ TARGET = %{APPNAMELC} QUICK_SPEC_FOO = $$(OPIE_BUILD_QUICK_APP) -tqcontains( TEMPLATE, quick-template ){ - tqcontains( QUICK_SPEC_FOO, quick-app-lib ){ +contains( TEMPLATE, quick-template ){ + contains( QUICK_SPEC_FOO, quick-app-lib ){ message( "foo" ) system( rm $$TARGET ) system( ln -s $$(OPIEDIR)/bin/quicklauncher $$TARGET) diff --git a/languages/cpp/app_templates/opieinput/app.pro b/languages/cpp/app_templates/opieinput/app.pro index 5a3a7a40..1711c78f 100644 --- a/languages/cpp/app_templates/opieinput/app.pro +++ b/languages/cpp/app_templates/opieinput/app.pro @@ -6,8 +6,8 @@ TARGET = %{APPNAMELC} QUICK_SPEC_FOO = $$(OPIE_BUILD_QUICK_APP) -tqcontains( TEMPLATE, quick-template ){ - tqcontains( QUICK_SPEC_FOO, quick-app-lib ){ +contains( TEMPLATE, quick-template ){ + contains( QUICK_SPEC_FOO, quick-app-lib ){ message( "foo" ) system( rm $$TARGET ) system( ln -s $$(OPIEDIR)/bin/quicklauncher $$TARGET) diff --git a/languages/cpp/app_templates/opiemenu/app.pro b/languages/cpp/app_templates/opiemenu/app.pro index f9600bf4..71bc208c 100644 --- a/languages/cpp/app_templates/opiemenu/app.pro +++ b/languages/cpp/app_templates/opiemenu/app.pro @@ -6,8 +6,8 @@ TARGET = %{APPNAMELC} QUICK_SPEC_FOO = $$(OPIE_BUILD_QUICK_APP) -tqcontains( TEMPLATE, quick-template ){ - tqcontains( QUICK_SPEC_FOO, quick-app-lib ){ +contains( TEMPLATE, quick-template ){ + contains( QUICK_SPEC_FOO, quick-app-lib ){ message( "foo" ) system( rm $$TARGET ) system( ln -s $$(OPIEDIR)/bin/quicklauncher $$TARGET) diff --git a/languages/cpp/app_templates/opienet/app.pro b/languages/cpp/app_templates/opienet/app.pro index df87650c..53fb6eea 100644 --- a/languages/cpp/app_templates/opienet/app.pro +++ b/languages/cpp/app_templates/opienet/app.pro @@ -7,8 +7,8 @@ LIBS += -linterfaces QUICK_SPEC_FOO = $$(OPIE_BUILD_QUICK_APP) -tqcontains( TEMPLATE, quick-template ){ - tqcontains( QUICK_SPEC_FOO, quick-app-lib ){ +contains( TEMPLATE, quick-template ){ + contains( QUICK_SPEC_FOO, quick-app-lib ){ message( "foo" ) system( rm $$TARGET ) system( ln -s $$(OPIEDIR)/bin/quicklauncher $$TARGET) diff --git a/languages/cpp/app_templates/opienet/simplemodule.cpp b/languages/cpp/app_templates/opienet/simplemodule.cpp index f8e963bd..143e9f90 100644 --- a/languages/cpp/app_templates/opienet/simplemodule.cpp +++ b/languages/cpp/app_templates/opienet/simplemodule.cpp @@ -29,7 +29,7 @@ */ bool %{APPNAME}Module::isOwner( Interface* iface ) { /* check if it is our device */ - return m_interfaces.tqfind( iface ) != -1; + return m_interfaces.find( iface ) != -1; } TQWidget* %{APPNAME}Module::configure( Interface* ) { diff --git a/languages/cpp/app_templates/opietoday/app.pro b/languages/cpp/app_templates/opietoday/app.pro index 73e03efb..152dc6f6 100644 --- a/languages/cpp/app_templates/opietoday/app.pro +++ b/languages/cpp/app_templates/opietoday/app.pro @@ -6,8 +6,8 @@ TARGET = %{APPNAMELC} QUICK_SPEC_FOO = $$(OPIE_BUILD_QUICK_APP) -tqcontains( TEMPLATE, quick-template ){ - tqcontains( QUICK_SPEC_FOO, quick-app-lib ){ +contains( TEMPLATE, quick-template ){ + contains( QUICK_SPEC_FOO, quick-app-lib ){ message( "foo" ) system( rm $$TARGET ) system( ln -s $$(OPIEDIR)/bin/quicklauncher $$TARGET) diff --git a/languages/cpp/ast_utils.cpp b/languages/cpp/ast_utils.cpp index 4c9d63d1..8db2e754 100644 --- a/languages/cpp/ast_utils.cpp +++ b/languages/cpp/ast_utils.cpp @@ -118,7 +118,7 @@ TQString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove if ( !typeSpec ) return TQString(); - return typeSpec->text().tqreplace( TQRegExp( " :: " ), "::" ); + return typeSpec->text().replace( TQRegExp( " :: " ), "::" ); } TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, bool skipPtrOp ) @@ -185,6 +185,6 @@ TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, b text += " const"; } - return text.tqreplace( TQRegExp( " :: " ), "::" ).simplifyWhiteSpace(); + return text.replace( TQRegExp( " :: " ), "::" ).simplifyWhiteSpace(); } //kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/backgroundparser.cpp b/languages/cpp/backgroundparser.cpp index 4e22dcc7..13b831e0 100644 --- a/languages/cpp/backgroundparser.cpp +++ b/languages/cpp/backgroundparser.cpp @@ -220,7 +220,7 @@ public: return ret; } - bool tqcontains( const TQString& fileName ) const + bool contains( const TQString& fileName ) const { TQMutexLocker locker( &m_mutex ); ListType::const_iterator it = m_fileList.begin(); @@ -283,7 +283,7 @@ void BackgroundParser::addFile( const TQString& fileName, bool readFromDisk ) TQString fn = deepCopy( fileName ); //bool added = false; - /*if ( !m_fileList->tqcontains( fn ) ) + /*if ( !m_fileList->contains( fn ) ) { m_fileList->push_back( fn, readFromDisk ); added = true; @@ -299,7 +299,7 @@ void BackgroundParser::addFileFront( const TQString& fileName, bool readFromDisk TQString fn = deepCopy( fileName ); bool added = false; - /*if ( m_fileList->tqcontains( fn ) ) + /*if ( m_fileList->contains( fn ) ) m_fileList->remove( fn );*/ m_fileList->push_front( fn, readFromDisk ); @@ -410,7 +410,7 @@ void BackgroundParser::fileParsed( ParsedFile& file ) { static_cast<KDevSourceProvider*>( m_driver->sourceProvider() ) ->setReadFromDisk( false ); - if ( m_unitDict.tqfind( file.fileName() ) != m_unitDict.end() ) + if ( m_unitDict.find( file.fileName() ) != m_unitDict.end() ) { Unit * u = m_unitDict[ file.fileName() ]; m_unitDict.remove( file.fileName() ); @@ -430,12 +430,12 @@ void BackgroundParser::fileParsed( ParsedFile& file ) { Unit* BackgroundParser::findUnit( const TQString& fileName ) { - TQMap<TQString, Unit*>::Iterator it = m_unitDict.tqfind( fileName ); + TQMap<TQString, Unit*>::Iterator it = m_unitDict.find( fileName ); return it != m_unitDict.end() ? *it : 0; } bool BackgroundParser::hasTranslationUnit( const TQString& fileName ) { - TQMap<TQString, Unit*>::Iterator it = m_unitDict.tqfind( fileName ); + TQMap<TQString, Unit*>::Iterator it = m_unitDict.find( fileName ); return it != m_unitDict.end(); } diff --git a/languages/cpp/ccconfigwidget.cpp b/languages/cpp/ccconfigwidget.cpp index c9092969..7bf2601e 100644 --- a/languages/cpp/ccconfigwidget.cpp +++ b/languages/cpp/ccconfigwidget.cpp @@ -314,7 +314,7 @@ void CCConfigWidget::slotGetterSetterValuesChanged( ) m_edtExampleSet->setPaletteForegroundColor( TQColor( "black" ) ); } - TQStringList prefixes = TQStringList::split( ",", m_edtRemovePrefix->text().tqreplace( " ", "" ) ); + TQStringList prefixes = TQStringList::split( ",", m_edtRemovePrefix->text().replace( " ", "" ) ); unsigned int len = 0; TQStringList::ConstIterator theend = prefixes.end(); for ( TQStringList::ConstIterator ci = prefixes.begin(); ci != theend; ++ci ) @@ -355,7 +355,7 @@ void CCConfigWidget::saveGetterSetterTab( ) config->setPrefixGet( m_edtGet->text() ); config->setPrefixSet( m_edtSet->text() ); - config->setPrefixVariable( TQStringList::split( ",", m_edtRemovePrefix->text().tqreplace( " ", "" ) ) ); + config->setPrefixVariable( TQStringList::split( ",", m_edtRemovePrefix->text().replace( " ", "" ) ) ); config->setParameterName( m_edtParameterName->text() ); config->store(); } diff --git a/languages/cpp/codeinformationrepository.cpp b/languages/cpp/codeinformationrepository.cpp index 3533dd73..b2c3c30c 100644 --- a/languages/cpp/codeinformationrepository.cpp +++ b/languages/cpp/codeinformationrepository.cpp @@ -30,7 +30,7 @@ my_unique( const TQValueList<KTextEditor::CompletionEntry>& entryList ) e.text + " " + e.prefix + " " + e.postfix + " "; - if ( map.tqfind( key ) == map.end() ) + if ( map.find( key ) == map.end() ) { map[ key ] = TRUE; l << e; diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp index 0c287beb..533f6ad7 100644 --- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp +++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp @@ -224,21 +224,21 @@ void OptimizationTab::readFlags( TQStringList *list ) optBox->readFlags( list ); TQStringList::Iterator sli; - sli = list->tqfind( "-O0" ); + sli = list->find( "-O0" ); if ( sli != list->end() ) { O0->setChecked( true ); list->remove ( sli ); } - sli = list->tqfind( "-O1" ); + sli = list->find( "-O1" ); if ( sli != list->end() ) { O1->setChecked( true ); list->remove ( sli ); } - sli = list->tqfind( "-O2" ); + sli = list->find( "-O2" ); if ( sli != list->end() ) { O2->setChecked( true ); diff --git a/languages/cpp/cppcodecompletion.cpp b/languages/cpp/cppcodecompletion.cpp index 3d9fcb73..846aec77 100644 --- a/languages/cpp/cppcodecompletion.cpp +++ b/languages/cpp/cppcodecompletion.cpp @@ -134,7 +134,7 @@ CppCodeCompletion* cppCompletionInstance = 0; //file global functions, must be before any "using namespace" TQString cleanForMenu( TQString txt ) { - return txt.tqreplace( "&", "&&" ).tqreplace( " ", " " ); + return txt.replace( "&", "&&" ).replace( " ", " " ); } TQString buildSignature( TypePointer currType ) { @@ -254,7 +254,7 @@ static TQValueList<ItemType> unique( const TQValueList<ItemType>& entryList ) { e.prefix + " " + e.text + " " + e.postfix + " " ).simplifyWhiteSpace().stripWhiteSpace(); - if ( map.tqfind( key ) == map.end() ) { + if ( map.find( key ) == map.end() ) { map[ key ] = TRUE; l << e; } @@ -269,7 +269,7 @@ static TQStringList unique( const TQStringList& entryList ) { TQStringList::ConstIterator it = entryList.begin(); while ( it != entryList.end() ) { TQString e = *it++; - if ( map.tqfind( e ) == map.end() ) { + if ( map.find( e ) == map.end() ) { map[ e ] = TRUE; l << e; } @@ -285,7 +285,7 @@ static TQStringList unique( const TQValueList<TQStringList>& entryList ) { while ( it != entryList.end() ) { TQStringList li = ( *it++ ); TQString e = li.join( "\n" ); - if ( map.tqfind( e ) == map.end() ) { + if ( map.find( e ) == map.end() ) { map[ e ] = TRUE; l += li; } @@ -376,7 +376,7 @@ struct PopupFillerHelpStruct { if ( cm && cm->item() ) { TQPopupMenu * m = PopupTracker::createPopup( tqparent ); TQString scope = cm->scope().join("::"); - TQMap< TQString, TQPopupMenu* >::iterator it = m_namespacePopupCache.tqfind( scope ); + TQMap< TQString, TQPopupMenu* >::iterator it = m_namespacePopupCache.find( scope ); if( it != m_namespacePopupCache.end() ) { tqparent->insertItem( "Imported Namespace " + scope, *it ); delete m; @@ -1121,7 +1121,7 @@ void CppCodeCompletion::slotTextChanged() { // !!WARNING!! This is very hackish, but KTE doesn't offer a way // to tell the completion box to _go_away_ if ( ch.simplifyWhiteSpace().isEmpty() && - !strCurLine.simplifyWhiteSpace().tqcontains( "virtual" ) && + !strCurLine.simplifyWhiteSpace().contains( "virtual" ) && m_bCompletionBoxShow ) { TQValueList<KTextEditor::CompletionEntry> entryList; m_bCompletionBoxShow = true; @@ -1139,7 +1139,7 @@ void CppCodeCompletion::slotTextChanged() { // m_codeCompleteCh2Rx completes on "->" and "::" if ( ( argsHint && ch == "(" ) || - ( codeComplete && strCurLine.simplifyWhiteSpace().tqcontains( "virtual" ) ) || + ( codeComplete && strCurLine.simplifyWhiteSpace().contains( "virtual" ) ) || ( codeComplete && ( m_codeCompleteChRx.search( ch ) != -1 || m_codeCompleteCh2Rx.search( ch2 ) != -1 ) ) || ( headComplete && ( ch == "\"" || ch == "<" ) && m_includeRx.search( strCurLine ) != -1 ) ) { @@ -1238,7 +1238,7 @@ TQString CppCodeCompletion::replaceCppComments( const TQString& contents ) { after.fill( ' ', before.length() - 5 ); after.prepend( "/*" ); after.append( "*/" ); - text.tqreplace( pos, before.length() - 1, after ); + text.replace( pos, before.length() - 1, after ); pos += after.length(); } else { pos += m_cppCodeCommentsRx.matchedLength(); @@ -1444,7 +1444,7 @@ EvaluationResult CppCodeCompletion::evaluateExpressionAt( int line, int column , } void CppCodeCompletion::popupAction( int number ) { - PopupActions::iterator it = m_popupActions.tqfind( number ); + PopupActions::iterator it = m_popupActions.find( number ); if ( it != m_popupActions.end() ) { TQString fileName = ( *it ).file == "current_file" ? m_activeFileName : ( *it ).file.operator TQString(); if( (*it).startLine == -1 ) { @@ -1459,7 +1459,7 @@ void CppCodeCompletion::popupAction( int number ) { } void CppCodeCompletion::popupDefinitionAction( int number ) { - PopupActions::iterator it = m_popupDefinitionActions.tqfind( number ); + PopupActions::iterator it = m_popupDefinitionActions.find( number ); if ( it != m_popupDefinitionActions.end() ) { TQString fileName = ( *it ).file == "current_file" ? m_activeFileName : ( *it ).file.operator TQString(); if ( !m_pSupport->switchHeaderImpl( fileName, ( *it ).startLine, ( *it ).startCol ) ) @@ -1481,7 +1481,7 @@ void CppCodeCompletion::selectItem( ItemDom item ) { } void CppCodeCompletion::popupClassViewAction( int number ) { - PopupClassViewActions::iterator it = m_popupClassViewActions.tqfind( number ); + PopupClassViewActions::iterator it = m_popupClassViewActions.find( number ); if ( it != m_popupClassViewActions.end() ) { if ( ( *it ) ) selectItem( *it ); @@ -1744,7 +1744,7 @@ bool CppCodeCompletion::isTypeExpression( const TQString& expr ) { bool CppCodeCompletion::mayBeTypeTail( int line, int column, TQString& append, bool inFunction ) { TQString tail = clearComments( m_activeEditor->text( line, column + 1, line + 10 > ( int ) m_activeEditor->numLines() ? ( int ) m_activeEditor->numLines() : line + 10, 0 ) ); - tail.tqreplace( "\n", " " ); + tail.replace( "\n", " " ); SafetyCounter s ( 100 ); bool hadSpace = false; while ( !tail.isEmpty() && s ) { @@ -1830,7 +1830,7 @@ ExpressionInfo CppCodeCompletion::findExpressionAt( int line, int column, int st //make this a regexp TQString e = ret.expr(); - if ( e.tqcontains( "." ) || e.tqcontains( "->" ) || e.tqcontains( "(" ) || e.tqcontains( ")" ) || e.tqcontains( "=" ) || e.tqcontains( "-" ) ) + if ( e.contains( "." ) || e.contains( "->" ) || e.contains( "(" ) || e.contains( ")" ) || e.contains( "=" ) || e.contains( "-" ) ) mayBeType = false; if ( mayBeType ) { @@ -1988,8 +1988,8 @@ bool CppCodeCompletion::functionContains( FunctionDom f , int line, int col ) { if ( t.isEmpty() ) return false; - //int i = t.tqfind( '{' ); - int i = t.tqfind( '(' ); //This now includes the argument-list + //int i = t.find( '{' ); + int i = t.find( '(' ); //This now includes the argument-list if ( i == -1 ) return false; int lineCols = 0; @@ -2017,7 +2017,7 @@ void CppCodeCompletion::getFunctionBody( FunctionDom f , int& line, int& col ) { if ( t.isEmpty() ) return; - int i = t.tqfind( '{' ); + int i = t.find( '{' ); if ( i == -1 ) return; i++; @@ -2673,7 +2673,7 @@ void CppCodeCompletion::completeText( bool invokedOnDemand /*= false*/ ) { kdDebug(9007) << "------> found virtual keyword for class specifier '" << clazz->text() << "'" << endl; }*/ - } else if ( TQString( "virtual" ).tqfind( keyword ) != -1 ) + } else if ( TQString( "virtual" ).find( keyword ) != -1 ) m_blockForKeyword = true; else m_blockForKeyword = false; @@ -2756,7 +2756,7 @@ void CppCodeCompletion::completeText( bool invokedOnDemand /*= false*/ ) { if ( ch2 == "::" ) { TQString str = clearComments( expr ); - if ( !str.tqcontains( '.' ) && !str.tqcontains( "->" ) ) ///Necessary, because the expression may also be like user->BaseUser:: + if ( !str.contains( '.' ) && !str.contains( "->" ) ) ///Necessary, because the expression may also be like user->BaseUser:: isInstance = false; } @@ -4417,7 +4417,7 @@ TQString CppCodeCompletion::createTypeInfoString( int line, int column ) if ( type->resolved() ) { TQString scope = type->resolved()->scope().join("::"); - int pos = scope.tqfindRev("::"); + int pos = scope.findRev("::"); if ( scope.isEmpty() || pos == -1 ) { scope = "::"; diff --git a/languages/cpp/cppimplementationwidget.cpp b/languages/cpp/cppimplementationwidget.cpp index 0912678c..bd727d95 100644 --- a/languages/cpp/cppimplementationwidget.cpp +++ b/languages/cpp/cppimplementationwidget.cpp @@ -49,15 +49,15 @@ TQStringList CppImplementationWidget::createClassFiles() template_cpp += "\n#include \"$TQMOCINCLUDE$\"\n"; TQFileInfo formInfo( m_formName ); - template_h.tqreplace( TQRegExp( "\\$BASEINCLUDE\\$" ), formInfo.baseName() + ".h" ); - template_h.tqreplace( TQRegExp( "\\$CLASSNAME\\$" ), classNameEdit->text() ); - template_h.tqreplace( TQRegExp( "\\$BASECLASSNAME\\$" ), m_baseClassName ); - template_h.tqreplace( TQRegExp( "\\$DEFTEXT\\$" ), fileNameEdit->text().upper() ); + template_h.replace( TQRegExp( "\\$BASEINCLUDE\\$" ), formInfo.baseName() + ".h" ); + template_h.replace( TQRegExp( "\\$CLASSNAME\\$" ), classNameEdit->text() ); + template_h.replace( TQRegExp( "\\$BASECLASSNAME\\$" ), m_baseClassName ); + template_h.replace( TQRegExp( "\\$DEFTEXT\\$" ), fileNameEdit->text().upper() ); - template_cpp.tqreplace( TQRegExp( "\\$CLASSINCLUDE\\$" ), fileNameEdit->text() + ".h" ); - template_cpp.tqreplace( TQRegExp( "\\$CLASSNAME\\$" ), classNameEdit->text() ); - template_cpp.tqreplace( TQRegExp( "\\$BASECLASSNAME\\$" ), m_baseClassName ); - template_cpp.tqreplace( TQRegExp( "\\$TQMOCINCLUDE\\$" ), fileNameEdit->text() + ".tqmoc" ); + template_cpp.replace( TQRegExp( "\\$CLASSINCLUDE\\$" ), fileNameEdit->text() + ".h" ); + template_cpp.replace( TQRegExp( "\\$CLASSNAME\\$" ), classNameEdit->text() ); + template_cpp.replace( TQRegExp( "\\$BASECLASSNAME\\$" ), m_baseClassName ); + template_cpp.replace( TQRegExp( "\\$TQMOCINCLUDE\\$" ), fileNameEdit->text() + ".tqmoc" ); template_h = FileTemplate::read( m_part, "h" ) + template_h; template_cpp = FileTemplate::read( m_part, "cpp" ) + template_cpp; diff --git a/languages/cpp/cppnewclassdlg.cpp b/languages/cpp/cppnewclassdlg.cpp index 14d3cd49..db4d0160 100644 --- a/languages/cpp/cppnewclassdlg.cpp +++ b/languages/cpp/cppnewclassdlg.cpp @@ -146,7 +146,7 @@ TQStringList& gres( TQStringList &list, const TQRegExp & rx, const TQString & af TQStringList::Iterator it = list.begin(); while ( it != list.end() ) { - ( *it ).tqreplace( rx, after ); + ( *it ).replace( rx, after ); ++it; } return list; @@ -226,13 +226,13 @@ void CppNewClassDialog::classNameChanged( const TQString &text ) default: ; } - header = header.tqreplace( TQRegExp( "(template *<.*> *)?(class +)?" ), "" ); + header = header.replace( TQRegExp( "(template *<.*> *)?(class +)?" ), "" ); header_edit->setText( header ); } if ( !implementationModified ) { TQString implementation; - if ( str.tqcontains( "template" ) ) + if ( str.contains( "template" ) ) implementation = str + "_impl" + interface_suffix; else implementation = str + implementation_suffix; @@ -247,7 +247,7 @@ void CppNewClassDialog::classNameChanged( const TQString &text ) default: ; } - implementation = implementation.tqreplace( TQRegExp( "(template *<.*> *)?(class +)?" ), "" ); + implementation = implementation.replace( TQRegExp( "(template *<.*> *)?(class +)?" ), "" ); implementation_edit->setText( implementation ); } } @@ -279,9 +279,9 @@ void CppNewClassDialog::baseclassname_changed( const TQString &text ) } else { - if ( header.tqcontains( TQRegExp( "::" ) ) ) - header = header.mid( header.tqfindRev( TQRegExp( "::" ) ) + 2 ); - header = header.tqreplace( TQRegExp( " *<.*>" ), "" ); + if ( header.contains( TQRegExp( "::" ) ) ) + header = header.mid( header.findRev( TQRegExp( "::" ) ) + 2 ); + header = header.replace( TQRegExp( " *<.*>" ), "" ); header += interface_suffix; switch ( gen_config->superCase() ) @@ -516,23 +516,23 @@ void CppNewClassDialog::remBaseClassOnly() void CppNewClassDialog::remClassFromAdv( TQString text ) { // Strip off namespace qualification - if ( text.tqcontains( "::" ) ) - text = text.mid( text.tqfindRev( "::" ) + 2 ); + if ( text.contains( "::" ) ) + text = text.mid( text.findRev( "::" ) + 2 ); removeTemplateParams( text ); TQListViewItem *it = 0; - if ( ( it = access_view->tqfindItem( text, 0 ) ) ) + if ( ( it = access_view->findItem( text, 0 ) ) ) delete it; - if ( ( it = methods_view->tqfindItem( text, 0 ) ) ) + if ( ( it = methods_view->findItem( text, 0 ) ) ) delete it; - if ( ( it = constructors_view->tqfindItem( text, 0 ) ) ) + if ( ( it = constructors_view->findItem( text, 0 ) ) ) { /// @todo changing constructors text in constructors_cpp_edit // and constructors_h_edit must be implemented /* int *para = new int(1); int *index = new int(1); - if (constructors_cpp_edit->tqfind(text + "(", true, false, true, para, index)) + if (constructors_cpp_edit->find(text + "(", true, false, true, para, index)) { qWarning("%s( found", text.latin1()); if (para) constructors_cpp_edit->removeParagraph(*para); @@ -615,19 +615,19 @@ void CppNewClassDialog::currBaseSelected( TQListViewItem *it ) basename_edit->setText( it->text( 0 ) ); baseinclude_edit->setText( it->text( 3 ) ); scope_box->setCurrentItem( it->text( 2 ).toInt() ); - if ( it->text( 1 ).tqcontains( "private" ) ) + if ( it->text( 1 ).contains( "private" ) ) private_button->setChecked( true ); else private_button->setChecked( false ); - if ( it->text( 1 ).tqcontains( "protected" ) ) + if ( it->text( 1 ).contains( "protected" ) ) protected_button->setChecked( true ); else protected_button->setChecked( false ); - if ( it->text( 1 ).tqcontains( "public" ) ) + if ( it->text( 1 ).contains( "public" ) ) public_button->setChecked( true ); else public_button->setChecked( false ); - if ( it->text( 1 ).tqcontains( "virtual" ) ) + if ( it->text( 1 ).contains( "virtual" ) ) virtual_box->setChecked( true ); else virtual_box->setChecked( false ); @@ -704,7 +704,7 @@ void CppNewClassDialog::updateConstructorsOrder() while ( it.current() ) { - if ( ( c_it = constructors_view->tqfindItem( it.current() ->text( 0 ), 0 ) ) ) + if ( ( c_it = constructors_view->findItem( it.current() ->text( 0 ), 0 ) ) ) { c_it->moveItem( fc_it ); fc_it = c_it; @@ -796,11 +796,11 @@ void CppNewClassDialog::parseClass( TQString clName, TQString inheritance ) TQStringList clNamespace = currNamespace; bool clFullQualified = false; - if ( clName.tqcontains( "::" ) ) + if ( clName.contains( "::" ) ) { // Full qualified, override imported namespace clFullQualified = true; - int splitpoint = clName.tqfindRev( "::" ); + int splitpoint = clName.findRev( "::" ); clNamespace = TQStringList::split( "::", clName.left( splitpoint ) ); clName = clName.mid( splitpoint + 2 ); } @@ -875,13 +875,13 @@ void CppNewClassDialog::parseClass( TQString clName, TQString inheritance ) TQString inhModifier; //protected inheritance gives protected attributes - if ( inheritance.tqcontains( "protected" ) ) + if ( inheritance.contains( "protected" ) ) inhModifier = "protected"; //private inheritance gives private attributes - else if ( inheritance.tqcontains( "private" ) ) + else if ( inheritance.contains( "private" ) ) inhModifier = "private"; //public inheritance gives protected and public attributes - else if ( inheritance.tqcontains( "public" ) ) + else if ( inheritance.contains( "public" ) ) inhModifier = ( *methodIt ) ->access() == CodeModelItem::Public ? "public" : "protected"; addToUpgradeList( access_slots, *methodIt, inhModifier ); } @@ -896,13 +896,13 @@ void CppNewClassDialog::parseClass( TQString clName, TQString inheritance ) // see what modifier is given for the base class TQString inhModifier; //protected inheritance gives protected methods - if ( inheritance.tqcontains( "protected" ) ) + if ( inheritance.contains( "protected" ) ) inhModifier = "protected"; //private inheritance gives private methods - else if ( inheritance.tqcontains( "private" ) ) + else if ( inheritance.contains( "private" ) ) inhModifier = "private"; //public inheritance gives protected and public methods - else if ( inheritance.tqcontains( "public" ) ) + else if ( inheritance.contains( "public" ) ) inhModifier = ( *methodIt ) ->access() == CodeModelItem::Public ? "public" : "protected"; addToUpgradeList( access_methods, *methodIt, inhModifier ); } @@ -917,13 +917,13 @@ void CppNewClassDialog::parseClass( TQString clName, TQString inheritance ) { TQString inhModifier; //protected inheritance gives protected attributes - if ( inheritance.tqcontains( "protected" ) ) + if ( inheritance.contains( "protected" ) ) inhModifier = "protected"; //private inheritance gives private attributes - else if ( inheritance.tqcontains( "private" ) ) + else if ( inheritance.contains( "private" ) ) inhModifier = "private"; //public inheritance gives protected and public attributes - else if ( inheritance.tqcontains( "public" ) ) + else if ( inheritance.contains( "public" ) ) inhModifier = ( *varIt ) ->access() == CodeModelItem::Public ? "public" : "protected"; addToUpgradeList( access_attrs, *varIt, inhModifier ); } @@ -937,8 +937,8 @@ bool CppNewClassDialog::isConstructor( TQString className, const FunctionDom &me if ( ( className == method->name() ) ) { qWarning( "1x" ); - if ( ( method->argumentList().count() == 1 ) && ( m_part->formatModelItem( method->argumentList() [ 0 ].data() ).tqcontains( TQRegExp( " *(const)? *" + className + " *& *" ) ) ) ) - // if ( method->asString().tqcontains(TQRegExp(className + "\\s*\\(\\s*(const)?\\s*" + className + "\\s*&[A-Za-z_0-9\\s]*\\)", true, false)) ) + if ( ( method->argumentList().count() == 1 ) && ( m_part->formatModelItem( method->argumentList() [ 0 ].data() ).contains( TQRegExp( " *(const)? *" + className + " *& *" ) ) ) ) + // if ( method->asString().contains(TQRegExp(className + "\\s*\\(\\s*(const)?\\s*" + className + "\\s*&[A-Za-z_0-9\\s]*\\)", true, false)) ) return false; else return true; @@ -955,7 +955,7 @@ void CppNewClassDialog::addToConstructorsList( TQCheckListItem *myClass, Functio void CppNewClassDialog::addToMethodsList( TQListViewItem *tqparent, FunctionDom method ) { PCheckListItem<FunctionDom> *it = new PCheckListItem<FunctionDom>( method, tqparent, m_part->formatModelItem( method.data() ), TQCheckListItem::CheckBox ); - method->isAbstract() ? it->setText( 1, i18n( "tqreplace" ) ) : it->setText( 1, i18n( "extend" ) ); + method->isAbstract() ? it->setText( 1, i18n( "replace" ) ) : it->setText( 1, i18n( "extend" ) ); } void CppNewClassDialog::addToUpgradeList( TQListViewItem *tqparent, FunctionDom method, TQString modifier ) @@ -977,11 +977,11 @@ void CppNewClassDialog::parsePCSClass( TQString clName, TQString inheritance ) TQStringList clNamespace = currNamespace; bool clFullQualified = false; - if ( clName.tqcontains( "::" ) ) + if ( clName.contains( "::" ) ) { // Full qualified, override imported namespace clFullQualified = true; - int splitpoint = clName.tqfindRev( "::" ); + int splitpoint = clName.findRev( "::" ); clNamespace = TQStringList::split( "::", clName.left( splitpoint ) ); clName = clName.mid( splitpoint + 2 ); } @@ -1034,13 +1034,13 @@ void CppNewClassDialog::parsePCSClass( TQString clName, TQString inheritance ) TQString inhModifier; //protected inheritance gives protected attributes - if ( inheritance.tqcontains( "protected" ) ) + if ( inheritance.contains( "protected" ) ) inhModifier = "protected"; //private inheritance gives private attributes - else if ( inheritance.tqcontains( "private" ) ) + else if ( inheritance.contains( "private" ) ) inhModifier = "private"; //public inheritance gives protected and public attributes - else if ( inheritance.tqcontains( "public" ) ) + else if ( inheritance.contains( "public" ) ) inhModifier = ( *methodIt ) ->access() == CodeModelItem::Public ? "public" : "protected"; addToUpgradeList( access_slots, *methodIt, inhModifier ); } @@ -1055,13 +1055,13 @@ void CppNewClassDialog::parsePCSClass( TQString clName, TQString inheritance ) //see what modifier is given for the base class TQString inhModifier; //protected inheritance gives protected methods - if ( inheritance.tqcontains( "protected" ) ) + if ( inheritance.contains( "protected" ) ) inhModifier = "protected"; //private inheritance gives private methods - else if ( inheritance.tqcontains( "private" ) ) + else if ( inheritance.contains( "private" ) ) inhModifier = "private"; //public inheritance gives protected and public methods - else if ( inheritance.tqcontains( "public" ) ) + else if ( inheritance.contains( "public" ) ) inhModifier = ( *methodIt ) ->access() == CodeModelItem::Public ? "public" : "protected"; addToUpgradeList( access_methods, *methodIt, inhModifier ); } @@ -1076,13 +1076,13 @@ void CppNewClassDialog::parsePCSClass( TQString clName, TQString inheritance ) { TQString inhModifier; //protected inheritance gives protected attributes - if ( inheritance.tqcontains( "protected" ) ) + if ( inheritance.contains( "protected" ) ) inhModifier = "protected"; //private inheritance gives private attributes - else if ( inheritance.tqcontains( "private" ) ) + else if ( inheritance.contains( "private" ) ) inhModifier = "private"; //public inheritance gives protected and public attributes - else if ( inheritance.tqcontains( "public" ) ) + else if ( inheritance.contains( "public" ) ) inhModifier = ( *varIt ) ->access() == CodeModelItem::Public ? "public" : "protected"; addToUpgradeList( access_attrs, *varIt, inhModifier ); } @@ -1111,7 +1111,7 @@ void CppNewClassDialog::clearConstructorsList( bool clean ) TQListViewItemIterator it( constructors_view ); while ( it.current() ) { - if ( ! currBaseClasses.tqcontains(it.current().text(0)) ) + if ( ! currBaseClasses.contains(it.current().text(0)) ) delete it.current(); ++it; } @@ -1149,7 +1149,7 @@ void CppNewClassDialog::setAccessForBase( TQString baseclass, TQString newAccess { TQListViewItem * base; - if ( ( base = access_view->tqfindItem( baseclass, 0 ) ) ) + if ( ( base = access_view->findItem( baseclass, 0 ) ) ) { TQListViewItemIterator it( base ); while ( it.current() ) @@ -1211,7 +1211,7 @@ void CppNewClassDialog::extendFunctionality() void CppNewClassDialog::replaceFunctionality() { if ( methods_view->selectedItem() ) - methods_view->selectedItem() ->setText( 1, i18n( "tqreplace" ) ); + methods_view->selectedItem() ->setText( 1, i18n( "replace" ) ); } void CppNewClassDialog::selectall_button_clicked() @@ -1313,13 +1313,13 @@ bool CppNewClassDialog::ClassGenerator::validateInput() { className = dlg.classname_edit->text().simplifyWhiteSpace(); TQString temp = className; - className.tqreplace( TQRegExp( "template *<.*> *(class *)?" ), "" ); - templateStr = temp.tqreplace( TQRegExp( TQRegExp_escape( className ) ), "" ); - templateStr.tqreplace( TQRegExp( " *class *$" ), "" ); + className.replace( TQRegExp( "template *<.*> *(class *)?" ), "" ); + templateStr = temp.replace( TQRegExp( TQRegExp_escape( className ) ), "" ); + templateStr.replace( TQRegExp( " *class *$" ), "" ); templateParams = templateStr; - templateParams.tqreplace( TQRegExp( "^ *template *" ), "" ); - templateParams.tqreplace( TQRegExp( " *class *" ), "" ); + templateParams.replace( TQRegExp( "^ *template *" ), "" ); + templateParams.replace( TQRegExp( " *class *" ), "" ); templateParams.simplifyWhiteSpace(); if ( className.isEmpty() ) @@ -1342,7 +1342,7 @@ bool CppNewClassDialog::ClassGenerator::validateInput() } /// \FIXME - if ( ( header.tqfind( '/' ) != -1 || implementation.tqfind( '/' ) != -1 ) && !( dlg.m_part->project() ->options() & KDevProject::UsesTQMakeBuildSystem) ) + if ( ( header.find( '/' ) != -1 || implementation.find( '/' ) != -1 ) && !( dlg.m_part->project() ->options() & KDevProject::UsesTQMakeBuildSystem) ) { KMessageBox::error( &dlg, i18n( "Generated files will always be added to the " "active directory, so you must not give an " @@ -1482,14 +1482,14 @@ void CppNewClassDialog::ClassGenerator::common_text() if ( !dlg.constructors_h_edit->text().isEmpty() ) { advConstructorsHeader = " " + dlg.constructors_h_edit->text(); - advConstructorsHeader.tqreplace( TQRegExp( "\n" ), "\n " ); + advConstructorsHeader.replace( TQRegExp( "\n" ), "\n " ); } if ( !dlg.constructors_cpp_edit->text().isEmpty() ) { advConstructorsSource = dlg.constructors_cpp_edit->text(); } - advConstructorsHeader.tqreplace( TQRegExp( "[\\n ]*$" ), TQString() ); - advConstructorsSource.tqreplace( TQRegExp( "[\\n ]*$" ), TQString() ); + advConstructorsHeader.replace( TQRegExp( "[\\n ]*$" ), TQString() ); + advConstructorsSource.replace( TQRegExp( "[\\n ]*$" ), TQString() ); //advanced method overriding @@ -1572,7 +1572,7 @@ void CppNewClassDialog::ClassGenerator::common_text() *adv_h += "\n\n";*/ TQString methodName = curr_m->item() ->name(); - if ( !methodName.tqcontains( TQRegExp( "^[a-zA-z_]" ) ) ) + if ( !methodName.contains( TQRegExp( "^[a-zA-z_]" ) ) ) methodName = "operator" + methodName; *adv_h += " using " + curr_m->tqparent() ->tqparent() ->text( 0 ) + "::" + methodName + ";\n"; } @@ -1581,13 +1581,13 @@ void CppNewClassDialog::ClassGenerator::common_text() } TQRegExp e( "[\\n ]*$" ); - advH_public.tqreplace( e, TQString() ); - advH_public_slots.tqreplace( e, TQString() ); - advH_protected.tqreplace( e, TQString() ); - advH_protected_slots.tqreplace( e, TQString() ); - advH_private.tqreplace( e, TQString() ); - advH_private_slots.tqreplace( e, TQString() ); - advCpp.tqreplace( e, TQString() ); + advH_public.replace( e, TQString() ); + advH_public_slots.replace( e, TQString() ); + advH_protected.replace( e, TQString() ); + advH_protected_slots.replace( e, TQString() ); + advH_private.replace( e, TQString() ); + advH_private_slots.replace( e, TQString() ); + advCpp.replace( e, TQString() ); } void CppNewClassDialog::ClassGenerator::genMethodDeclaration( FunctionDom method, @@ -1596,7 +1596,7 @@ void CppNewClassDialog::ClassGenerator::genMethodDeclaration( FunctionDom method /* if ((*adv_h).isEmpty()) *adv_h += "\n\n";*/ TQString methodName = method->name(); - if ( !methodName.tqcontains( TQRegExp( "^[a-zA-z_]" ) ) ) + if ( !methodName.contains( TQRegExp( "^[a-zA-z_]" ) ) ) methodName = "operator" + methodName; *adv_h += " " + ( method->isVirtual() ? TQString( "virtual " ) : TQString( "" ) ) + ( method->isStatic() ? TQString( "static " ) : TQString( "" ) ) @@ -1657,8 +1657,8 @@ void CppNewClassDialog::ClassGenerator::gen_implementation() classImpl = FileTemplate::read( dlg.m_part, fi.extension( true ) ); } - classImpl.tqreplace( TQRegExp( "\\$MODULE\\$" ), module ); - classImpl.tqreplace( TQRegExp( "\\$FILENAME\\$" ), basefilename ); + classImpl.replace( TQRegExp( "\\$MODULE\\$" ), module ); + classImpl.replace( TQRegExp( "\\$FILENAME\\$" ), basefilename ); if ( objc ) { @@ -1689,7 +1689,7 @@ void CppNewClassDialog::ClassGenerator::gen_implementation() } TQString relPath; - for ( int i = implementation.tqfindRev( '/' ); i != -1; i = implementation.tqfindRev( '/', --i ) ) + for ( int i = implementation.findRev( '/' ); i != -1; i = implementation.findRev( '/', --i ) ) relPath += "../"; TQString constructors = ( advConstructorsSource.isEmpty() ? TQString( "$TEMPLATESTR$\n$CLASSNAME$$TEMPLATEPARAMS$::$CLASSNAME$($ARGS$)\n" @@ -1787,22 +1787,22 @@ void CppNewClassDialog::ClassGenerator::gen_implementation() baseInitializer += "\n"; } - constructors.tqreplace( TQRegExp( "\\$BASEINITIALIZER\\$" ), baseInitializer ); - constructors.tqreplace( TQRegExp( "\\$CLASSNAME\\$" ), className ); + constructors.replace( TQRegExp( "\\$BASEINITIALIZER\\$" ), baseInitializer ); + constructors.replace( TQRegExp( "\\$CLASSNAME\\$" ), className ); // qWarning("NEW CLASS: constructors = %s", constructors.latin1()); if ( templateStr.isEmpty() ) { - constructors.tqreplace( TQRegExp( "\\$TEMPLATESTR\\$\\n" ), "" ); - constructors.tqreplace( TQRegExp( "\\$TEMPLATEPARAMS\\$" ), "" ); + constructors.replace( TQRegExp( "\\$TEMPLATESTR\\$\\n" ), "" ); + constructors.replace( TQRegExp( "\\$TEMPLATEPARAMS\\$" ), "" ); } else { - constructors.tqreplace( TQRegExp( "\\$TEMPLATESTR\\$" ), templateStr ); - constructors.tqreplace( TQRegExp( "\\$TEMPLATEPARAMS\\$" ), templateParams ); - classImpl.tqreplace( TQRegExp( "#include \"\\$HEADER\\$\"\\n" ), "" ); + constructors.replace( TQRegExp( "\\$TEMPLATESTR\\$" ), templateStr ); + constructors.replace( TQRegExp( "\\$TEMPLATEPARAMS\\$" ), templateParams ); + classImpl.replace( TQRegExp( "#include \"\\$HEADER\\$\"\\n" ), "" ); } // qWarning("NEW CLASS: constructors = %s", constructors.latin1()); - constructors.tqreplace( TQRegExp( "\\$ARGS\\$" ), argsCpp ); + constructors.replace( TQRegExp( "\\$ARGS\\$" ), argsCpp ); // qWarning("NEW CLASS: constructors = %s", constructors.latin1()); @@ -1810,18 +1810,18 @@ void CppNewClassDialog::ClassGenerator::gen_implementation() TQString hp = relPath + header; beautifySource( classImpl, hp, className, namespaceBeg, constructors, advCpp, namespaceEnd, implementation ); - classImpl.tqreplace( TQRegExp( "\\$HEADER\\$" ), relPath + header ); - classImpl.tqreplace( TQRegExp( "\\$CLASSNAME\\$" ), className ); - classImpl.tqreplace( TQRegExp( "\\$NAMESPACEBEG\\$" ), namespaceBeg ); - classImpl.tqreplace( TQRegExp( "\\$CONSTRUCTORDEFINITIONS\\$" ), constructors ); - classImpl.tqreplace( TQRegExp( "\\$DEFINITIONS\\$" ), advCpp ); - classImpl.tqreplace( TQRegExp( "\\$NAMESPACEEND\\$" ), namespaceEnd ); - classImpl.tqreplace( TQRegExp( "\\$FILENAME\\$" ), implementation ); + classImpl.replace( TQRegExp( "\\$HEADER\\$" ), relPath + header ); + classImpl.replace( TQRegExp( "\\$CLASSNAME\\$" ), className ); + classImpl.replace( TQRegExp( "\\$NAMESPACEBEG\\$" ), namespaceBeg ); + classImpl.replace( TQRegExp( "\\$CONSTRUCTORDEFINITIONS\\$" ), constructors ); + classImpl.replace( TQRegExp( "\\$DEFINITIONS\\$" ), advCpp ); + classImpl.replace( TQRegExp( "\\$NAMESPACEEND\\$" ), namespaceEnd ); + classImpl.replace( TQRegExp( "\\$FILENAME\\$" ), implementation ); if ( ( dlg.m_part->project() ) && ( childClass || qobject ) && ( dlg.m_part->project() ->options() & KDevProject::UsesAutotoolsBuildSystem ) ) { TQString tqmoc = header; - tqmoc.tqreplace( TQRegExp( "\\..*" ), ".tqmoc" ); + tqmoc.replace( TQRegExp( "\\..*" ), ".tqmoc" ); classImpl += "#include \"" + tqmoc + "\"\n"; } @@ -1868,8 +1868,8 @@ void CppNewClassDialog::ClassGenerator::gen_interface() classIntf = FileTemplate::read( dlg.m_part, fi.extension( true ) ); } - classIntf.tqreplace( TQRegExp( "\\$MODULE\\$" ), module ); - classIntf.tqreplace( TQRegExp( "\\$FILENAME\\$" ), basefilename ); + classIntf.replace( TQRegExp( "\\$MODULE\\$" ), module ); + classIntf.replace( TQRegExp( "\\$FILENAME\\$" ), basefilename ); if ( objc ) { @@ -1911,21 +1911,21 @@ void CppNewClassDialog::ClassGenerator::gen_interface() switch ( dlg.gen_config->defCase() ) { case ClassGeneratorConfig::UpperCase: - headerGuard = namespaceStr.upper() + header.mid( header.tqfindRev( "/" )+1 ).upper(); + headerGuard = namespaceStr.upper() + header.mid( header.findRev( "/" )+1 ).upper(); break; case ClassGeneratorConfig::LowerCase: - headerGuard = namespaceStr.lower() + header.mid( header.tqfindRev( "/" )+1 ).lower(); + headerGuard = namespaceStr.lower() + header.mid( header.findRev( "/" )+1 ).lower(); break; case ClassGeneratorConfig::SameAsFileCase: - headerGuard = dlg.header_edit->text().mid( dlg.header_edit->text().tqfindRev( "/" )+1 ); + headerGuard = dlg.header_edit->text().mid( dlg.header_edit->text().findRev( "/" )+1 ); break; case ClassGeneratorConfig::SameAsClassCase: - headerGuard = namespaceStr + header.mid( header.tqfindRev( "/" )+1 ); + headerGuard = namespaceStr + header.mid( header.findRev( "/" )+1 ); break; } - headerGuard.tqreplace( TQRegExp( "\\." ), "_" ); - headerGuard.tqreplace( TQRegExp( "::" ), "_" ); + headerGuard.replace( TQRegExp( "\\." ), "_" ); + headerGuard.replace( TQRegExp( "::" ), "_" ); TQString includeBaseHeader; if( dlg.m_part->qtBuildConfig()->isUsed() ) { @@ -1988,13 +1988,13 @@ void CppNewClassDialog::ClassGenerator::gen_interface() { if ( inheritance != " : " ) inheritance += ", "; - if ( it.current() ->text( 1 ).tqcontains( "virtual" ) ) + if ( it.current() ->text( 1 ).contains( "virtual" ) ) inheritance += "virtual "; - if ( it.current() ->text( 1 ).tqcontains( "public" ) ) + if ( it.current() ->text( 1 ).contains( "public" ) ) inheritance += "public "; - if ( it.current() ->text( 1 ).tqcontains( "protected" ) ) + if ( it.current() ->text( 1 ).contains( "protected" ) ) inheritance += "protected "; - if ( it.current() ->text( 1 ).tqcontains( "private" ) ) + if ( it.current() ->text( 1 ).contains( "private" ) ) inheritance += "private "; inheritance += it.current() ->text( 0 ); } @@ -2008,8 +2008,8 @@ void CppNewClassDialog::ClassGenerator::gen_interface() TQString( " $CLASSNAME$($ARGS$);" ) : advConstructorsHeader ) + TQString( "\n\n ~$CLASSNAME$();" ); - constructors.tqreplace( TQRegExp( "\\$CLASSNAME\\$" ), className ); - constructors.tqreplace( TQRegExp( "\\$ARGS\\$" ), argsH ); + constructors.replace( TQRegExp( "\\$CLASSNAME\\$" ), className ); + constructors.replace( TQRegExp( "\\$ARGS\\$" ), argsH ); TQString qobjectStr; if ( childClass || qobject ) @@ -2026,30 +2026,30 @@ void CppNewClassDialog::ClassGenerator::gen_interface() advH_protected, advH_protected_slots, advH_private, advH_private_slots, namespaceEnd ); - classIntf.tqreplace( TQRegExp( "\\$HEADERGUARD\\$" ), headerGuard ); - classIntf.tqreplace( TQRegExp( "\\$INCLUDEBASEHEADER\\$" ), includeBaseHeader ); - classIntf.tqreplace( TQRegExp( "\\$AUTHOR\\$" ), author ); - classIntf.tqreplace( TQRegExp( "\\$DOC\\$" ), doc ); - classIntf.tqreplace( TQRegExp( "\\$TEMPLATE\\$" ), templateStr ); - classIntf.tqreplace( TQRegExp( "\\$CLASSNAME\\$" ), className ); + classIntf.replace( TQRegExp( "\\$HEADERGUARD\\$" ), headerGuard ); + classIntf.replace( TQRegExp( "\\$INCLUDEBASEHEADER\\$" ), includeBaseHeader ); + classIntf.replace( TQRegExp( "\\$AUTHOR\\$" ), author ); + classIntf.replace( TQRegExp( "\\$DOC\\$" ), doc ); + classIntf.replace( TQRegExp( "\\$TEMPLATE\\$" ), templateStr ); + classIntf.replace( TQRegExp( "\\$CLASSNAME\\$" ), className ); if ( dlg.baseclasses_view->childCount() > 0 ) - classIntf.tqreplace( TQRegExp( "\\$BASECLASS\\$" ), dlg.baseclasses_view->firstChild() ->text( 0 ) ); - classIntf.tqreplace( TQRegExp( "\\$INHERITANCE\\$" ), inheritance ); - classIntf.tqreplace( TQRegExp( "\\$TQOBJECT\\$" ), qobjectStr ); - classIntf.tqreplace( TQRegExp( "\\$ARGS\\$" ), argsH ); - classIntf.tqreplace( TQRegExp( "\\$FILENAME\\$" ), header ); - classIntf.tqreplace( TQRegExp( "\\$NAMESPACEBEG\\$" ), namespaceBeg ); - classIntf.tqreplace( TQRegExp( "\\$CONSTRUCTORDECLARATIONS\\$" ), constructors ); - classIntf.tqreplace( TQRegExp( "\\$PUBLICDECLARATIONS\\$" ), advH_public ); - classIntf.tqreplace( TQRegExp( "\\$PUBLICSLOTS\\$" ), advH_public_slots ); - classIntf.tqreplace( TQRegExp( "\\$PROTECTEDDECLARATIONS\\$" ), TQString( "protected:\n" ) + advH_protected ); - classIntf.tqreplace( TQRegExp( "\\$PROTECTEDSLOTS\\$" ), TQString( "protected slots:\n" ) + advH_protected_slots ); - classIntf.tqreplace( TQRegExp( "\\$PRIVATEDECLARATIONS\\$" ), TQString( "private:\n" ) + advH_private ); - classIntf.tqreplace( TQRegExp( "\\$PRIVATESLOTS\\$" ), TQString( "private slots:\n" ) + advH_private_slots ); - classIntf.tqreplace( TQRegExp( "\\$NAMESPACEEND\\$" ), namespaceEnd ); + classIntf.replace( TQRegExp( "\\$BASECLASS\\$" ), dlg.baseclasses_view->firstChild() ->text( 0 ) ); + classIntf.replace( TQRegExp( "\\$INHERITANCE\\$" ), inheritance ); + classIntf.replace( TQRegExp( "\\$TQOBJECT\\$" ), qobjectStr ); + classIntf.replace( TQRegExp( "\\$ARGS\\$" ), argsH ); + classIntf.replace( TQRegExp( "\\$FILENAME\\$" ), header ); + classIntf.replace( TQRegExp( "\\$NAMESPACEBEG\\$" ), namespaceBeg ); + classIntf.replace( TQRegExp( "\\$CONSTRUCTORDECLARATIONS\\$" ), constructors ); + classIntf.replace( TQRegExp( "\\$PUBLICDECLARATIONS\\$" ), advH_public ); + classIntf.replace( TQRegExp( "\\$PUBLICSLOTS\\$" ), advH_public_slots ); + classIntf.replace( TQRegExp( "\\$PROTECTEDDECLARATIONS\\$" ), TQString( "protected:\n" ) + advH_protected ); + classIntf.replace( TQRegExp( "\\$PROTECTEDSLOTS\\$" ), TQString( "protected slots:\n" ) + advH_protected_slots ); + classIntf.replace( TQRegExp( "\\$PRIVATEDECLARATIONS\\$" ), TQString( "private:\n" ) + advH_private ); + classIntf.replace( TQRegExp( "\\$PRIVATESLOTS\\$" ), TQString( "private slots:\n" ) + advH_private_slots ); + classIntf.replace( TQRegExp( "\\$NAMESPACEEND\\$" ), namespaceEnd ); if ( !templateStr.isEmpty() && (!headeronly) ) - classIntf.tqreplace( TQRegExp( "#endif" ), "#include \"" + dlg.implementation_edit->text() + "\"\n\n#endif" ); + classIntf.replace( TQRegExp( "#endif" ), "#include \"" + dlg.implementation_edit->text() + "\"\n\n#endif" ); if ( dlg.gen_config->reformat_box->isChecked() ) { @@ -2081,45 +2081,45 @@ void CppNewClassDialog::ClassGenerator::beautifyHeader( TQString &templ, TQStrin TQString &namespaceEnd ) { if ( headerGuard.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$HEADERGUARD\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$HEADERGUARD\\$[\\n ]*" ), TQString() ); if ( includeBaseHeader.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$INCLUDEBASEHEADER\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$INCLUDEBASEHEADER\\$[\\n ]*" ), TQString() ); if ( author.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$AUTHOR\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$AUTHOR\\$[\\n ]*" ), TQString() ); if ( doc.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$DOC\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$DOC\\$[\\n ]*" ), TQString() ); if ( className.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$CLASSNAME\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$CLASSNAME\\$[\\n ]*" ), TQString() ); if ( templateStr.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$TEMPLATE\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$TEMPLATE\\$[\\n ]*" ), TQString() ); if ( baseclass.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$BASECLASS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$BASECLASS\\$[\\n ]*" ), TQString() ); if ( inheritance.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$INHERITANCE\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$INHERITANCE\\$[\\n ]*" ), TQString() ); if ( qobjectStr.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$TQOBJECT\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$TQOBJECT\\$[\\n ]*" ), TQString() ); if ( args.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$ARGS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$ARGS\\$[\\n ]*" ), TQString() ); if ( header.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$FILENAME\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$FILENAME\\$[\\n ]*" ), TQString() ); if ( namespaceBeg.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$NAMESPACEBEG\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$NAMESPACEBEG\\$[\\n ]*" ), TQString() ); if ( constructors.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$CONSTRUCTORDECLARATIONS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$CONSTRUCTORDECLARATIONS\\$[\\n ]*" ), TQString() ); if ( advH_public.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$PUBLICDECLARATIONS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$PUBLICDECLARATIONS\\$[\\n ]*" ), TQString() ); if ( advH_public_slots.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$PUBLICSLOTS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$PUBLICSLOTS\\$[\\n ]*" ), TQString() ); if ( advH_protected.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$PROTECTEDDECLARATIONS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$PROTECTEDDECLARATIONS\\$[\\n ]*" ), TQString() ); if ( advH_protected_slots.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$PROTECTEDSLOTS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$PROTECTEDSLOTS\\$[\\n ]*" ), TQString() ); if ( advH_private.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$PRIVATEDECLARATIONS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$PRIVATEDECLARATIONS\\$[\\n ]*" ), TQString() ); if ( advH_private_slots.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$PRIVATESLOTS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$PRIVATESLOTS\\$[\\n ]*" ), TQString() ); if ( namespaceEnd.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$NAMESPACEEND\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$NAMESPACEEND\\$[\\n ]*" ), TQString() ); } @@ -2127,19 +2127,19 @@ void CppNewClassDialog::ClassGenerator::beautifySource( TQString &templ, TQStrin TQString &constructors, TQString &advCpp, TQString &namespaceEnd, TQString &implementation ) { if ( header.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$HEADER\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$HEADER\\$[\\n ]*" ), TQString() ); if ( className.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$CLASSNAME\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$CLASSNAME\\$[\\n ]*" ), TQString() ); if ( namespaceBeg.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$NAMESPACEBEG\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$NAMESPACEBEG\\$[\\n ]*" ), TQString() ); if ( constructors.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$CONSTRUCTORDEFINITIONS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$CONSTRUCTORDEFINITIONS\\$[\\n ]*" ), TQString() ); if ( advCpp.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$DEFINITIONS\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$DEFINITIONS\\$[\\n ]*" ), TQString() ); if ( namespaceEnd.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$NAMESPACEEND\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$NAMESPACEEND\\$[\\n ]*" ), TQString() ); if ( implementation.isEmpty() ) - templ.tqreplace( TQRegExp( "\\$FILENAME\\$[\\n ]*" ), TQString() ); + templ.replace( TQRegExp( "\\$FILENAME\\$[\\n ]*" ), TQString() ); } TQString CppNewClassDialog::classNameFormatted( ) @@ -2150,7 +2150,7 @@ TQString CppNewClassDialog::classNameFormatted( ) TQString CppNewClassDialog::classNameFormatted( const TQString &name ) { TQString temp = name.simplifyWhiteSpace(); - return temp.tqreplace( TQRegExp( "template *<.*> *(class *)?" ), "" ); + return temp.replace( TQRegExp( "template *<.*> *(class *)?" ), "" ); } @@ -2163,9 +2163,9 @@ TQString CppNewClassDialog::templateStrFormatted( const TQString &name ) { TQString className = name.simplifyWhiteSpace(); TQString temp = className; - className.tqreplace( TQRegExp( "template *<.*> *(class *)?" ), "" ); - TQString templateStr = temp.tqreplace( TQRegExp( TQRegExp_escape( className ) ), "" ); - templateStr.tqreplace( TQRegExp( " *class *$" ), "" ); + className.replace( TQRegExp( "template *<.*> *(class *)?" ), "" ); + TQString templateStr = temp.replace( TQRegExp( TQRegExp_escape( className ) ), "" ); + templateStr.replace( TQRegExp( " *class *$" ), "" ); return templateStr; } @@ -2178,13 +2178,13 @@ TQString CppNewClassDialog::templateParamsFormatted( const TQString &name ) { TQString className = name.simplifyWhiteSpace(); TQString temp = className; - className.tqreplace( TQRegExp( "template *<.*> *(class *)?" ), "" ); - TQString templateStr = temp.tqreplace( TQRegExp( TQRegExp_escape( className ) ), "" ); - templateStr.tqreplace( TQRegExp( " *class *$" ), "" ); + className.replace( TQRegExp( "template *<.*> *(class *)?" ), "" ); + TQString templateStr = temp.replace( TQRegExp( TQRegExp_escape( className ) ), "" ); + templateStr.replace( TQRegExp( " *class *$" ), "" ); TQString templateParams = templateStr; - templateParams.tqreplace( TQRegExp( "^ *template *" ), "" ); - templateParams.tqreplace( TQRegExp( " *class *" ), "" ); + templateParams.replace( TQRegExp( "^ *template *" ), "" ); + templateParams.replace( TQRegExp( " *class *" ), "" ); templateParams.simplifyWhiteSpace(); return templateParams; @@ -2194,19 +2194,19 @@ TQString CppNewClassDialog::templateActualParamsFormatted( const TQString & name { TQString className = name.simplifyWhiteSpace(); TQString temp = className; - className.tqreplace( TQRegExp( "<.*> *" ), "" ); - TQString templateStr = temp.tqreplace( TQRegExp( TQRegExp_escape( className ) ), "" ); + className.replace( TQRegExp( "<.*> *" ), "" ); + TQString templateStr = temp.replace( TQRegExp( TQRegExp_escape( className ) ), "" ); return templateStr; } void CppNewClassDialog::removeTemplateParams( TQString & name ) { - name.tqreplace( TQRegExp( "<.*> *" ), "" ); + name.replace( TQRegExp( "<.*> *" ), "" ); } bool CppNewClassDialog::isDestructor( TQString className, const FunctionDom &method ) { - if ( m_part->formatModelItem( method.data() ).tqcontains( TQRegExp( " *~ *" + className ) ) ) + if ( m_part->formatModelItem( method.data() ).contains( TQRegExp( " *~ *" + className ) ) ) return true; return false; } @@ -2218,4 +2218,4 @@ void CppNewClassDialog::headeronly_box_stateChanged(int val) #include "cppnewclassdlg.moc" -//kate: space-indent on; indent-width 4; tab-width 4; tqreplace-tabs on +//kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on diff --git a/languages/cpp/cppsupport_utils.cpp b/languages/cpp/cppsupport_utils.cpp index b4be045d..338fa724 100644 --- a/languages/cpp/cppsupport_utils.cpp +++ b/languages/cpp/cppsupport_utils.cpp @@ -75,7 +75,7 @@ TQMap<TQString, TQString> typedefMap( const CodeModel* model ) TQMap<TQString, TQString>::iterator it = map.begin(); for ( ; it != map.end(); ++it ) { - while ( map.tqcontains( map[ it.key() ] ) && + while ( map.contains( map[ it.key() ] ) && it.key() != map[ it.key() ] ) { map[ it.key() ] = map[ map[ it.key() ] ]; diff --git a/languages/cpp/cppsupportpart.cpp b/languages/cpp/cppsupportpart.cpp index 384ba03e..204195aa 100644 --- a/languages/cpp/cppsupportpart.cpp +++ b/languages/cpp/cppsupportpart.cpp @@ -753,7 +753,7 @@ void CppSupportPart::contextMenu( TQPopupMenu *popup, const Context *context ) text += "::"; } text += formatModelItem( *it, true ); - text = text.tqreplace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&&" ) ); + text = text.replace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&&" ) ); int id = m2->insertItem( text, this, TQT_SLOT( gotoDeclarationLine( int ) ) ); int line, column; ( *it ) ->getStartPosition( &line, &column ); @@ -794,7 +794,7 @@ void CppSupportPart::contextMenu( TQPopupMenu *popup, const Context *context ) text += "::"; } text += formatModelItem( *it, true ); - text = text.tqreplace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&&" ) ); + text = text.replace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&&" ) ); int id = m->insertItem( text, this, TQT_SLOT( gotoLine( int ) ) ); int line, column; ( *it ) ->getStartPosition( &line, &column ); @@ -850,7 +850,7 @@ TQStringList makeListUnique( const TQStringList& rhs ) { TQMap<TQString, bool> map; TQStringList ret; for( TQStringList::const_iterator it = rhs.begin(); it != rhs.end(); ++it ) { - if( map.tqfind( *it ) == map.end() ) { + if( map.find( *it ) == map.end() ) { ret << *it; map.insert( *it, true ); } @@ -878,7 +878,7 @@ TQStringList CppSupportPart::reorder( const TQStringList &list ) filePath = projectPath + "/" + filePath; } if( !isValidSource( filePath ) ) continue; - if ( headerExtensions.tqcontains( TQFileInfo( filePath ).extension() ) ) + if ( headerExtensions.contains( TQFileInfo( filePath ).extension() ) ) headers << ( filePath ); else others << ( filePath ); @@ -945,7 +945,7 @@ void CppSupportPart::savedFile( const KURL &file ) kdDebug( 9007 ) << "savedFile(): " << fileName.mid ( m_projectDirectory.length() + 1 ) << endl; - if ( m_projectFileList.tqcontains( fileName.mid ( m_projectDirectory.length() + 1 ) ) ) + if ( m_projectFileList.contains( fileName.mid ( m_projectDirectory.length() + 1 ) ) ) { maybeParse( fileName ); emit addedSourceInfo( fileName ); @@ -962,7 +962,7 @@ TQString CppSupportPart::findSourceFile() // extract the base path (full path without '.' and extension) TQString base = path.left( path.length() - ext.length() - 1 ); TQStringList candidates; - if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).tqcontains( ext ) ) + if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).contains( ext ) ) { candidates << ( base + ".c" ); candidates << ( base + ".cc" ); @@ -1017,7 +1017,7 @@ TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) // just the filename without the extension TQString fileNameWoExt = fi.fileName(); if ( !ext.isEmpty() ) - fileNameWoExt.tqreplace( "." + ext, "" ); + fileNameWoExt.replace( "." + ext, "" ); TQString possibleExts; // depending on the current extension assemble a list of // candidate files to look for @@ -1026,13 +1026,13 @@ TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) if ( path.endsWith( "_impl.h" ) ) { TQString headerpath = path; - headerpath.tqreplace( "_impl.h", ".h" ); + headerpath.replace( "_impl.h", ".h" ); candidates << headerpath; - fileNameWoExt.tqreplace( "_impl", "" ); + fileNameWoExt.replace( "_impl", "" ); possibleExts = "h"; } // if file is a header file search for implementation file - else if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).tqcontains( ext ) ) + else if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).contains( ext ) ) { candidates << ( base + ".c" ); candidates << ( base + ".cc" ); @@ -1048,7 +1048,7 @@ TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) possibleExts = "c,cc,cpp,c++,cxx,C,m,mm,M,inl,_impl.h"; } // if file is an implementation file, search for header file - else if ( TQStringList::split( ',', "c,cc,cpp,c++,cxx,C,m,mm,M,inl" ).tqcontains( ext ) ) + else if ( TQStringList::split( ',', "c,cc,cpp,c++,cxx,C,m,mm,M,inl" ).contains( ext ) ) { candidates << ( base + ".h" ); candidates << ( base + ".H" ); @@ -1081,10 +1081,10 @@ TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) candidateFileWoExt.setFile(*fileIt); //kdDebug( 9007 ) << "candidate file: " << *fileIt << endl; if( !candidateFileWoExt.extension().isEmpty() ) - candidateFileWoExtString = candidateFileWoExt.fileName().tqreplace( "." + candidateFileWoExt.extension(), "" ); + candidateFileWoExtString = candidateFileWoExt.fileName().replace( "." + candidateFileWoExt.extension(), "" ); if ( candidateFileWoExtString == fileNameWoExt ) { - if ( possibleExtsList.tqcontains( candidateFileWoExt.extension() ) || candidateFileWoExt.extension().isEmpty() ) + if ( possibleExtsList.contains( candidateFileWoExt.extension() ) || candidateFileWoExt.extension().isEmpty() ) { //kdDebug( 9007 ) << "checking if " << *fileIt << " exists" << endl; if ( TQFileInfo( *fileIt ).exists() ) @@ -1354,13 +1354,13 @@ KDevLanguageSupport::Features CppSupportPart::features() TQString CppSupportPart::formatClassName( const TQString &name ) { TQString n = name; - return n.tqreplace( ".", "::" ); + return n.replace( ".", "::" ); } TQString CppSupportPart::unformatClassName( const TQString &name ) { TQString n = name; - return n.tqreplace( "::", "." ); + return n.replace( "::", "." ); } bool CppSupportPart::shouldSplitDocument(const KURL &url) @@ -1554,9 +1554,9 @@ void CppSupportPart::slotParseFiles() { TQDateTime t = fileInfo.lastModified(); - if ( ! ( m_timestamp.tqcontains( absFilePath ) && m_timestamp[ absFilePath ] == t ) ) + if ( ! ( m_timestamp.contains( absFilePath ) && m_timestamp[ absFilePath ] == t ) ) { - if ( _jd->pcs.tqcontains( absFilePath ) ) + if ( _jd->pcs.contains( absFilePath ) ) { _jd->stream.tqdevice() ->at( _jd->pcs[ absFilePath ].second ); FileDom file = codeModel() ->create<FileModel>(); @@ -1678,7 +1678,7 @@ void CppSupportPart::maybeParse( const TQString& fn, bool background ) if ( !fileInfo.exists() ) return; - TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.tqfind( path ); + TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.find( path ); if ( codeModel()->hasFile( fn ) && it != m_timestamp.end() && *it == t ) return; @@ -1751,7 +1751,7 @@ void CppSupportPart::MakeMemberHelper( TQString& text, int& atLine, int& atColum } SimpleDeclarationAST* decl = currentNode ? ( SimpleDeclarationAST* ) currentNode : 0; - if ( decl && decl->storageSpecifier() && decl->storageSpecifier()->text().tqcontains("friend") ) + if ( decl && decl->storageSpecifier() && decl->storageSpecifier()->text().contains("friend") ) { kdDebug(9007) << "this is a friend declaration, don't create any definition" << endl; fail = true; @@ -1903,7 +1903,7 @@ TQStringList CppSupportPart::modifiedFileList() TQDateTime t = fileInfo.lastModified(); - TQMap<TQString, TQDateTime>::Iterator dictIt = m_timestamp.tqfind( path ); + TQMap<TQString, TQDateTime>::Iterator dictIt = m_timestamp.find( path ); if ( fileInfo.exists() && dictIt != m_timestamp.end() && *dictIt == t ) continue; @@ -1983,7 +1983,7 @@ void CppSupportPart::setupCatalog( ) kdDebug( 9007 ) << "CppSupportPart::setupCatalog()2 " << *it << endl; Catalog * catalog = new Catalog(); catalog->open( *it ); - catalog->setEnabled( enabledPCSs.tqcontains( TQFileInfo( *it ).baseName(true) ) ); + catalog->setEnabled( enabledPCSs.contains( TQFileInfo( *it ).baseName(true) ) ); ++it; for ( TQStringList::Iterator idxIt = indexList.begin(); idxIt != indexList.end(); ++idxIt ) @@ -2179,7 +2179,7 @@ void CppSupportPart::saveProjectSourceInfo() { const FileDom dom = ( *it ); stream << dom->name() << m_timestamp[ dom->name() ].toTime_t(); - if( m_timestamp.tqfind( dom->name() ) == m_timestamp.end() ) { + if( m_timestamp.find( dom->name() ) == m_timestamp.end() ) { kdDebug( 9007 ) << dom->name() << ": timestamp is missing " << endl; } offsets.insert( dom->name(), stream.tqdevice() ->at() ); @@ -2323,7 +2323,7 @@ int CppSupportPart::parseFilesAndDependencies( TQStringList files, bool backgrou int cgroup = nextGroup; nextGroup++; - if( fileGroups.tqfind( *it ) != fileGroups.end() ) + if( fileGroups.find( *it ) != fileGroups.end() ) cgroup = fileGroups[*it]; for( TQStringList::iterator lit = lst.begin(); lit != lst.end(); ++lit ) @@ -2575,19 +2575,19 @@ void CppSupportPart::emitFileParsed( TQStringList l ) bool CppSupportPart::isHeader( const TQString& fileName ) const { /*KMimeType::Ptr ptr = KMimeType::findByPath( fileName ); - if ( ptr && m_headerMimeTypes.tqcontains( ptr->name() ) ) + if ( ptr && m_headerMimeTypes.contains( ptr->name() ) ) return true;*/ - return ( m_headerExtensions.tqfindIndex( TQFileInfo( fileName ).extension() ) != -1 ); + return ( m_headerExtensions.findIndex( TQFileInfo( fileName ).extension() ) != -1 ); } bool CppSupportPart::isSource( const TQString& fileName ) const { /*KMimeType::Ptr ptr = KMimeType::findByPath( fileName ); - if ( ptr && m_sourceMimeTypes.tqcontains( ptr->name() ) ) + if ( ptr && m_sourceMimeTypes.contains( ptr->name() ) ) return true;*/ - return ( m_sourceExtensions.tqfindIndex( TQFileInfo( fileName ).extension() ) != -1 ); + return ( m_sourceExtensions.findIndex( TQFileInfo( fileName ).extension() ) != -1 ); } void CppSupportPart::gotoDeclarationLine( int line ) @@ -2825,7 +2825,7 @@ void CppSupportPart::addMethod( ClassDom aClass, const TQString& name, const TQS indentString = sourceFormatter->indentString(); editIface->insertText( findInsertionLineMethod( aClass, accessType ), 0, - finalDeclaration.tqreplace( "\n", "\n\t" ) + "\n" ); + finalDeclaration.replace( "\n", "\n\t" ) + "\n" ); backgroundParser() ->addFile( aClass->fileName() ); if ( isInline || isPureVirtual ) diff --git a/languages/cpp/cppsupportpart.h b/languages/cpp/cppsupportpart.h index 6e2ee964..650831e8 100644 --- a/languages/cpp/cppsupportpart.h +++ b/languages/cpp/cppsupportpart.h @@ -143,7 +143,7 @@ public: m_fileSet.insert( s ); } - bool tqcontains( const HashedString& str ) const { + bool contains( const HashedString& str ) const { TQMutexLocker locker( &m_mutex ); return m_fileSet.find( str ) != m_fileSet.end(); } @@ -512,7 +512,7 @@ private: ///files that were not requested must not be processed, since they maybe do not respect the group-relationships. bool reject( TQString file ) { for( List::iterator it = m_waiting.begin(); it != m_waiting.end(); ++it) { - if( (*it).first.tqfind( file ) != (*it).first.end() ) { + if( (*it).first.find( file ) != (*it).first.end() ) { return false; } } @@ -522,7 +522,7 @@ private: bool waiting( TQString file, Flags forbidFlags = None, int count = 1 ) const { int hits = 0; for( List::const_iterator it = m_waiting.begin(); it != m_waiting.end(); ++it) { - if( (*it).first.tqfind( file ) != (*it).first.end() ) { + if( (*it).first.find( file ) != (*it).first.end() ) { if( ((Flags)((*it).flags & forbidFlags )) == None ) { hits++; if( hits >= count ) return true; @@ -577,8 +577,8 @@ private: Processed processFile( TQString file, Flags flag = None ) { TQStringList ret; for( List::iterator it = m_waiting.begin(); it != m_waiting.end(); ++it) { - if( (*it).first.tqfind( file ) != (*it).first.end() ) { - if( (*it).second.tqfind( file ) == (*it).second.end() ) { + if( (*it).first.find( file ) != (*it).first.end() ) { + if( (*it).second.find( file ) == (*it).second.end() ) { (*it).flags = (Flags) ((*it).flags | flag); (*it).second << file; if( (*it).second.count() == (*it).first.count() ) { diff --git a/languages/cpp/createpcsdialog.cpp b/languages/cpp/createpcsdialog.cpp index cb5b25c1..a5b328c4 100644 --- a/languages/cpp/createpcsdialog.cpp +++ b/languages/cpp/createpcsdialog.cpp @@ -102,7 +102,7 @@ public: TQString gccLibPath = SetupHelper::getGccIncludePath(&ok); if (!ok) return; - gccLibPath = gccLibPath.tqreplace( TQRegExp( "[\r\n]" ), "" ); + gccLibPath = gccLibPath.replace( TQRegExp( "[\r\n]" ), "" ); addIncludePath( gccLibPath ); //addIncludePath( "/usr/include/g++-3" ); //addIncludePath( "/usr/include/g++" ); diff --git a/languages/cpp/debugger/dbgpsdlg.cpp b/languages/cpp/debugger/dbgpsdlg.cpp index e08a1cec..fe04ffd4 100644 --- a/languages/cpp/debugger/dbgpsdlg.cpp +++ b/languages/cpp/debugger/dbgpsdlg.cpp @@ -155,14 +155,14 @@ void Dbg_PS_Dialog::slotProcessExited() pidLines_ += '\n'; - int start = pidLines_.tqfind('\n', 0); // Skip the first line (header line) + int start = pidLines_.find('\n', 0); // Skip the first line (header line) int pos; static TQRegExp ps_output_line("^\\s*(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(.+)"); - while ( (pos = pidLines_.tqfind('\n', start)) != -1) { + while ( (pos = pidLines_.find('\n', start)) != -1) { TQString item = pidLines_.mid(start, pos-start); - if (!item.isEmpty() && item.tqfind(pidCmd_) == -1) + if (!item.isEmpty() && item.find(pidCmd_) == -1) { if(ps_output_line.search(item) == -1) { diff --git a/languages/cpp/debugger/dbgtoolbar.cpp b/languages/cpp/debugger/dbgtoolbar.cpp index 088aff77..58cea851 100644 --- a/languages/cpp/debugger/dbgtoolbar.cpp +++ b/languages/cpp/debugger/dbgtoolbar.cpp @@ -229,7 +229,7 @@ DbgDocker::DbgDocker(TQWidget* tqparent, DbgToolBar* toolBar, const TQPixmap& pi void DbgDocker::mousePressEvent(TQMouseEvent *e) { - if (!TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos())) + if (!TQT_TQRECT_OBJECT(rect()).contains( e->pos())) return; switch (e->button()) { diff --git a/languages/cpp/debugger/debuggerpart.cpp b/languages/cpp/debugger/debuggerpart.cpp index 22621630..43d6990e 100644 --- a/languages/cpp/debugger/debuggerpart.cpp +++ b/languages/cpp/debugger/debuggerpart.cpp @@ -376,7 +376,7 @@ void DebuggerPart::setupDcop() { QCStringList objects = kapp->dcopClient()->registeredApplications(); for (QCStringList::Iterator it = objects.begin(); it != objects.end(); ++it) - if ((*it).tqfind("drkonqi-") == 0) + if ((*it).find("drkonqi-") == 0) slotDCOPApplicationRegistered(*it); connect(kapp->dcopClient(), TQT_SIGNAL(applicationRegistered(const TQCString&)), TQT_SLOT(slotDCOPApplicationRegistered(const TQCString&))); @@ -385,7 +385,7 @@ void DebuggerPart::setupDcop() void DebuggerPart::slotDCOPApplicationRegistered(const TQCString& appId) { - if (appId.tqfind("drkonqi-") == 0) { + if (appId.find("drkonqi-") == 0) { TQByteArray answer; TQCString replyType; diff --git a/languages/cpp/debugger/gdbbreakpointwidget.cpp b/languages/cpp/debugger/gdbbreakpointwidget.cpp index 38d9e7e8..dffdf5d4 100644 --- a/languages/cpp/debugger/gdbbreakpointwidget.cpp +++ b/languages/cpp/debugger/gdbbreakpointwidget.cpp @@ -385,7 +385,7 @@ void GDBBreakpointWidget::slotWatchpointHit(int id, /***************************************************************************/ -BreakpointTableRow* GDBBreakpointWidget::tqfind(Breakpoint *breakpoint) +BreakpointTableRow* GDBBreakpointWidget::find(Breakpoint *breakpoint) { // NOTE:- The match doesn't have to be equal. Each type of bp // must decide on the match criteria. @@ -493,7 +493,7 @@ void GDBBreakpointWidget::slotToggleBreakpoint(const TQString &fileName, int lin { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); - BreakpointTableRow* btr = tqfind(fpBP); + BreakpointTableRow* btr = find(fpBP); if (btr) { removeBreakpoint(btr); @@ -508,7 +508,7 @@ void GDBBreakpointWidget::slotToggleBreakpointEnabled(const TQString &fileName, { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); - BreakpointTableRow* btr = tqfind(fpBP); + BreakpointTableRow* btr = find(fpBP); delete fpBP; if (btr) { @@ -523,7 +523,7 @@ void GDBBreakpointWidget::slotToggleBreakpointEnabled(const TQString &fileName, void GDBBreakpointWidget::slotToggleWatchpoint(const TQString &varName) { Watchpoint *watchpoint = new Watchpoint(varName, false, true); - BreakpointTableRow* btr = tqfind(watchpoint); + BreakpointTableRow* btr = find(watchpoint); if (btr) { removeBreakpoint(btr); @@ -917,7 +917,7 @@ void GDBBreakpointWidget::slotEditBreakpoint(const TQString &fileName, int lineN { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); - BreakpointTableRow* btr = tqfind(fpBP); + BreakpointTableRow* btr = find(fpBP); delete fpBP; if (btr) @@ -946,7 +946,7 @@ void GDBBreakpointWidget::slotBreakpointModified(Breakpoint* b) { emit publishBPState(*b); - if (BreakpointTableRow* btr = tqfind(b)) + if (BreakpointTableRow* btr = find(b)) { if (b->isActionDie()) { diff --git a/languages/cpp/debugger/gdbbreakpointwidget.h b/languages/cpp/debugger/gdbbreakpointwidget.h index f67bb03e..2379a318 100644 --- a/languages/cpp/debugger/gdbbreakpointwidget.h +++ b/languages/cpp/debugger/gdbbreakpointwidget.h @@ -106,7 +106,7 @@ signals: void tracingOutput(const char*); private: - BreakpointTableRow* tqfind(Breakpoint *bp); + BreakpointTableRow* find(Breakpoint *bp); BreakpointTableRow* findId(int id); BreakpointTableRow* findKey(int BPKey); diff --git a/languages/cpp/debugger/gdbcontroller.cpp b/languages/cpp/debugger/gdbcontroller.cpp index 93424396..ffa86b2b 100644 --- a/languages/cpp/debugger/gdbcontroller.cpp +++ b/languages/cpp/debugger/gdbcontroller.cpp @@ -401,7 +401,7 @@ void GDBController::executeCmd() setStateOn(s_waitForWrite); TQString prettyCmd = currentCmd_->cmdToSend(); - prettyCmd.tqreplace( TQRegExp("set prompt \032.\n"), "" ); + prettyCmd.replace( TQRegExp("set prompt \032.\n"), "" ); prettyCmd = "(gdb) " + prettyCmd; if (currentCmd_->isUserCommand()) @@ -1349,7 +1349,7 @@ void GDBController::defaultErrorHandler(const GDBMI::ResultRecord& result) { TQString msg = result["msg"].literal(); - if (msg.tqcontains("No such process")) + if (msg.contains("No such process")) { setState(s_appNotStarted|s_programExited); emit dbgtqStatus (i18n("Process exited"), state_); @@ -1447,7 +1447,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen) int i; bool got_any_command = false; // For each gdb reply. In MI mode, each reply is one string. - while((i = holdingZone_.tqfind('\n')) != -1) + while((i = holdingZone_.find('\n')) != -1) { got_any_command = true; diff --git a/languages/cpp/debugger/gdboutputwidget.cpp b/languages/cpp/debugger/gdboutputwidget.cpp index ba51e871..fe5059cb 100644 --- a/languages/cpp/debugger/gdboutputwidget.cpp +++ b/languages/cpp/debugger/gdboutputwidget.cpp @@ -291,8 +291,8 @@ void GDBOutputWidget::focusInEvent(TQFocusEvent */*e*/) TQString GDBOutputWidget::html_escape(const TQString& s) { TQString r(s); - r.tqreplace("<", "<"); - r.tqreplace(">", ">"); + r.replace("<", "<"); + r.replace(">", ">"); return r; } diff --git a/languages/cpp/debugger/gdbparser.cpp b/languages/cpp/debugger/gdbparser.cpp index 46f5251b..5a8588b1 100644 --- a/languages/cpp/debugger/gdbparser.cpp +++ b/languages/cpp/debugger/gdbparser.cpp @@ -138,7 +138,7 @@ TQString GDBParser::undecorateValue(DataType type, const TQString& s) if (value[0] == '@') { // It's a reference, we need to show just the value. - if (int i = value.tqfind(":")) + if (int i = value.find(":")) { value = value.mid(i+2); } @@ -149,7 +149,7 @@ TQString GDBParser::undecorateValue(DataType type, const TQString& s) } } - if (value.tqfind("Cannot access memory") == 0) + if (value.find("Cannot access memory") == 0) value = "(inaccessible)"; return value.stripWhiteSpace(); diff --git a/languages/cpp/debugger/memviewdlg.cpp b/languages/cpp/debugger/memviewdlg.cpp index 44a95b1a..c594d134 100644 --- a/languages/cpp/debugger/memviewdlg.cpp +++ b/languages/cpp/debugger/memviewdlg.cpp @@ -457,7 +457,7 @@ namespace GDBDebugger TQWidget* ncs = const_cast<TQWidget*>(s); TQString cap = caption; // Prevent intepreting '&' as accelerator specifier. - cap.tqreplace("&", "&&"); + cap.replace("&", "&&"); toolBox_->setItemLabel(toolBox_->indexOf(ncs), cap); } diff --git a/languages/cpp/debugger/stty.cpp b/languages/cpp/debugger/stty.cpp index 27bde0aa..07b848d9 100644 --- a/languages/cpp/debugger/stty.cpp +++ b/languages/cpp/debugger/stty.cpp @@ -105,7 +105,7 @@ static int chownpty(int fd, int grant) // { // signal from other child, behave like catchChild. // // guess this gives quite some control chaos... - // Shell* sh = shells.tqfind(rc); + // Shell* sh = shells.find(rc); // if (sh) { shells.remove(rc); sh->doneShell(w); } // goto retry; // } diff --git a/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop b/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop index af025ba1..03faba9a 100644 --- a/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop +++ b/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop @@ -9,7 +9,7 @@ <ignoreparts> <part>kdevsecurity</part> <part>kdevkonsoleview</part> - <part>kdevtqreplace</part> + <part>kdevreplace</part> <part>kdevctags2</part> <part>kdevvalgrind</part> </ignoreparts> diff --git a/languages/cpp/debugger/variablewidget.cpp b/languages/cpp/debugger/variablewidget.cpp index c5293c8c..2b9e4de3 100644 --- a/languages/cpp/debugger/variablewidget.cpp +++ b/languages/cpp/debugger/variablewidget.cpp @@ -711,7 +711,7 @@ void VariableTree::frameIdReady(const TQValueVector<TQString>& lines) frame_info += lines[i]; kdDebug(9012) << "frame info: " << frame_info << "\n"; - frame_info.tqreplace('\n', ""); + frame_info.replace('\n', ""); static TQRegExp frame_base_rx("frame at 0x([0-9a-fA-F]*)"); static TQRegExp frame_code_rx("saved [a-zA-Z0-9]* 0x([0-9a-fA-F]*)"); @@ -1619,7 +1619,7 @@ void VarItem::updateSpecialRepresentation(const TQString& xs) TQString s(xs); if (s[0] == '$') { - int i = s.tqfind('='); + int i = s.find('='); if (i != -1) s = s.mid(i+2); } @@ -1638,7 +1638,7 @@ void VarItem::updateSpecialRepresentation(const TQString& xs) // one TQChar from two characters from gdb. But to do that, we *should* // now if the data if generic gdb value, and result of request for string // data. Fixing is is for later. - s.tqreplace( TQRegExp("\\\\000|\\\\0"), "" ); + s.replace( TQRegExp("\\\\000|\\\\0"), "" ); // FIXME: for now, assume that all special representations are // just strings. diff --git a/languages/cpp/doc/cppannotations.toc b/languages/cpp/doc/cppannotations.toc index 7acb23a3..ad63b241 100644 --- a/languages/cpp/doc/cppannotations.toc +++ b/languages/cpp/doc/cppannotations.toc @@ -290,7 +290,7 @@ <tocsect2 name="17.4: The Generic Algorithms" url="cplusplus17.html#l227"> <tocsect3 name="17.4.1: accumulate()" url="cplusplus17.html#l228"/> <tocsect3 name="17.4.2: adjacent_difference()" url="cplusplus17.html#l229"/> - <tocsect3 name="17.4.3: adjacent_tqfind()" url="cplusplus17.html#l230"/> + <tocsect3 name="17.4.3: adjacent_find()" url="cplusplus17.html#l230"/> <tocsect3 name="17.4.4: binary_search()" url="cplusplus17.html#l231"/> <tocsect3 name="17.4.5: copy()" url="cplusplus17.html#l232"/> <tocsect3 name="17.4.6: copy_backward()" url="cplusplus17.html#l233"/> @@ -300,7 +300,7 @@ <tocsect3 name="17.4.10: equal_range()" url="cplusplus17.html#l237"/> <tocsect3 name="17.4.11: fill()" url="cplusplus17.html#l238"/> <tocsect3 name="17.4.12: fill_n()" url="cplusplus17.html#l239"/> - <tocsect3 name="17.4.13: tqfind()" url="cplusplus17.html#l240"/> + <tocsect3 name="17.4.13: find()" url="cplusplus17.html#l240"/> <tocsect3 name="17.4.14: find_end()" url="cplusplus17.html#l241"/> <tocsect3 name="17.4.15: find_first_of()" url="cplusplus17.html#l242"/> <tocsect3 name="17.4.16: find_if()" url="cplusplus17.html#l243"/> @@ -331,7 +331,7 @@ <tocsect3 name="17.4.41: remove_copy()" url="cplusplus17.html#l268"/> <tocsect3 name="17.4.42: remove_if()" url="cplusplus17.html#l269"/> <tocsect3 name="17.4.43: remove_copy_if()" url="cplusplus17.html#l270"/> - <tocsect3 name="17.4.44: tqreplace()" url="cplusplus17.html#l271"/> + <tocsect3 name="17.4.44: replace()" url="cplusplus17.html#l271"/> <tocsect3 name="17.4.45: replace_copy()" url="cplusplus17.html#l272"/> <tocsect3 name="17.4.46: replace_if()" url="cplusplus17.html#l273"/> <tocsect3 name="17.4.47: replace_copy_if()" url="cplusplus17.html#l274"/> diff --git a/languages/cpp/doc/kde2book.toc b/languages/cpp/doc/kde2book.toc index 00141e92..f779695e 100644 --- a/languages/cpp/doc/kde2book.toc +++ b/languages/cpp/doc/kde2book.toc @@ -238,7 +238,7 @@ <entry name="actions, editBookmarks" url="ch06.html"/> <entry name="actions, findNext" url="ch06.html"/> <entry name="actions, findPrev" url="ch06.html"/> -<entry name="actions, tqfind" url="ch06.html"/> +<entry name="actions, find" url="ch06.html"/> <entry name="actions, firstPage" url="ch06.html"/> <entry name="actions, fitToHeight" url="ch06.html"/> <entry name="actions, fitToPage" url="ch06.html"/> @@ -266,7 +266,7 @@ <entry name="actions, quit" url="ch06.html"/> <entry name="actions, redisplay" url="ch06.html"/> <entry name="actions, redo" url="ch06.html"/> -<entry name="actions, tqreplace" url="ch06.html"/> +<entry name="actions, replace" url="ch06.html"/> <entry name="actions, reportBug" url="ch06.html"/> <entry name="actions, revert" url="ch06.html"/> <entry name="actions, saveAs" url="ch06.html"/> diff --git a/languages/cpp/doc/stl.toc b/languages/cpp/doc/stl.toc index a3754311..d86b82b0 100644 --- a/languages/cpp/doc/stl.toc +++ b/languages/cpp/doc/stl.toc @@ -109,9 +109,9 @@ <tocsect1 name="Algorithms" url=""> <tocsect2 name="Non-mutating algorithms" url=""> <tocsect3 name="for_each" url="for_each.html"/> - <tocsect3 name="tqfind" url="find.html"/> + <tocsect3 name="find" url="find.html"/> <tocsect3 name="find_if" url="find_if.html"/> - <tocsect3 name="adjacent_tqfind" url="adjacent_find.html"/> + <tocsect3 name="adjacent_find" url="adjacent_find.html"/> <tocsect3 name="find_first_of" url="find_first_of.html"/> <tocsect3 name="count" url="count.html"/> <tocsect3 name="count_if" url="count_if.html"/> @@ -129,7 +129,7 @@ <tocsect3 name="iter_swap" url="iter_swap.html"/> <tocsect3 name="swap_ranges" url="swap_ranges.html"/> <tocsect3 name="transform" url="transform.html"/> - <tocsect3 name="tqreplace" url="tqreplace.html"/> + <tocsect3 name="replace" url="replace.html"/> <tocsect3 name="replace_if" url="replace_if.html"/> <tocsect3 name="replace_copy" url="replace_copy.html"/> <tocsect3 name="replace_copy_if" url="replace_copy_if.html"/> @@ -370,9 +370,9 @@ <entry name="distance, STL function" url="distance.html"/> <entry name="advance, STL function" url="advance.html"/> <entry name="for_each, STL algorithm" url="for_each.html"/> -<entry name="tqfind, STL algorithm" url="find.html"/> +<entry name="find, STL algorithm" url="find.html"/> <entry name="find_if, STL algorithm" url="find_if.html"/> -<entry name="adjacent_tqfind, STL algorithm" url="adjacent_find.html"/> +<entry name="adjacent_find, STL algorithm" url="adjacent_find.html"/> <entry name="find_first_of, STL algorithm" url="find_first_of.html"/> <entry name="count, STL algorithm" url="count.html"/> <entry name="count_if, STL algorithm" url="count_if.html"/> @@ -388,7 +388,7 @@ <entry name="iter_swap, STL algorithm" url="iter_swap.html"/> <entry name="swap_ranges, STL algorithm" url="swap_ranges.html"/> <entry name="transform, STL algorithm" url="transform.html"/> -<entry name="tqreplace, STL algorithm" url="tqreplace.html"/> +<entry name="replace, STL algorithm" url="replace.html"/> <entry name="replace_if, STL algorithm" url="replace_if.html"/> <entry name="replace_copy, STL algorithm" url="replace_copy.html"/> <entry name="fill, STL algorithm" url="fill.html"/> diff --git a/languages/cpp/doxydoc.cpp b/languages/cpp/doxydoc.cpp index 1f35708c..9b637798 100644 --- a/languages/cpp/doxydoc.cpp +++ b/languages/cpp/doxydoc.cpp @@ -20,7 +20,7 @@ void DoxyDoc::formatType( TQString& str ) { - str.tqreplace( TQRegExp( " " ), "" ); + str.replace( TQRegExp( " " ), "" ); } DoxyDoc::DoxyDoc( const TQStringList& dir ) @@ -36,7 +36,7 @@ TQString DoxyDoc::functionDescription( const TQString& tmpscope, const TQString& TQString scope = tmpscope; bool foundfile = false; //produce doxygen conform filenames - TQString filename = "/class" + scope.tqreplace( TQRegExp( "_" ), "__" ).tqreplace( TQRegExp( "::" ), "_1_1" ) + ".xml"; + TQString filename = "/class" + scope.replace( TQRegExp( "_" ), "__" ).replace( TQRegExp( "::" ), "_1_1" ) + ".xml"; //search for file in all directories for ( std::list<TQDir>::const_iterator ci = m_dirs.begin(); !foundfile && ci != m_dirs.end(); ++ci ) diff --git a/languages/cpp/includepathresolver.cpp b/languages/cpp/includepathresolver.cpp index fee9832e..1da45d76 100644 --- a/languages/cpp/includepathresolver.cpp +++ b/languages/cpp/includepathresolver.cpp @@ -18,7 +18,7 @@ * * * unsermake: - * unsermake is detected by reading the first line of the makefile. If it tqcontains "generated by unsermake" the following things are respected: + * unsermake is detected by reading the first line of the makefile. If it contains "generated by unsermake" the following things are respected: * 1. Since unsermake does not have the -W command(which should tell it to recompile the given file no matter whether it has been changed or not), the file-modification-time of the file is changed temporarily and the --no-real-compare option is used to force recompilation. * 2. The targets seem to be called *.lo instead of *.o when using unsermake, so *.lo names are used. * example-(test)command: unsermake --no-real-compare -n myfile.lo @@ -181,7 +181,7 @@ namespace CppTools { if( f.open( IO_ReadOnly ) ) { TQString firstLine; f.readLine( firstLine, 1000 ); - if( firstLine.tqfind( "generated by unsermake" ) != -1 ) { + if( firstLine.find( "generated by unsermake" ) != -1 ) { ret = true; } f.close(); @@ -261,7 +261,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePath( const TQString& fi TQStringList cachedPath; //If the call doesn't succeed, use the cached not up-to-date version TQDateTime makeFileModification = makeFile.lastModified(); - Cache::iterator it = m_cache.tqfind( dir.path() ); + Cache::iterator it = m_cache.find( dir.path() ); if( it != m_cache.end() ) { cachedPath = (*it).path; if( makeFileModification == (*it).modificationTime ) { @@ -272,7 +272,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePath( const TQString& fi return ret; } else { //We have a cached failed result. We should use that for some time but then try again. Return the failed result if: ( there were too many tries within this folder OR this file was already tried ) AND The last tries have not expired yet - if( /*((*it).failedFiles.size() > 3 || (*it).failedFiles.tqfind( file ) != (*it).failedFiles.end()) &&*/ (*it).failTime.secsTo( TQDateTime::tqcurrentDateTime() ) < CACHE_FAIL_FOR_SECONDS ) { + if( /*((*it).failedFiles.size() > 3 || (*it).failedFiles.find( file ) != (*it).failedFiles.end()) &&*/ (*it).failTime.secsTo( TQDateTime::tqcurrentDateTime() ) < CACHE_FAIL_FOR_SECONDS ) { PathResolutionResult ret(false); //Fake that the result is ok ret.errorMessage = i18n("Cached: ") + (*it).errorMessage; ret.longErrorMessage = (*it).longErrorMessage; @@ -297,7 +297,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePath( const TQString& fi absoluteFile = u.path(); int dot; - if( (dot = file.tqfindRev( '.' )) == -1 ) + if( (dot = file.findRev( '.' )) == -1 ) return PathResolutionResult( false, i18n( "Filename %1 seems to be malformed" ).tqarg(file) ); targetName = file.left( dot ); @@ -413,11 +413,11 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt return res; TQRegExp newLineRx("\\\\\\n"); - fullOutput.tqreplace( newLineRx, "" ); + fullOutput.replace( newLineRx, "" ); ///@todo collect multiple outputs at the same time for performance-reasons TQString firstLine = fullOutput; int lineEnd; - if( (lineEnd = fullOutput.tqfind('\n')) != -1 ) + if( (lineEnd = fullOutput.find('\n')) != -1 ) firstLine.truncate( lineEnd ); //Only look at the first line of output /** @@ -443,7 +443,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt else if( prefix.endsWith( ";" ) ) prefix.truncate( prefix.length() - 1 ); ///Now test if what we have as prefix is a simple "cd /foo/bar" call. - if( prefix.startsWith( "cd ") && !prefix.tqcontains( ";") && !prefix.tqcontains("&&") ) { + if( prefix.startsWith( "cd ") && !prefix.contains( ";") && !prefix.contains("&&") ) { newWorkingDirectory = prefix.right( prefix.length() - 3 ).stripWhiteSpace(); if( !newWorkingDirectory.startsWith("/") ) newWorkingDirectory = workingDirectory + "/" + newWorkingDirectory; @@ -456,7 +456,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt if( d.exists() ) { ///The recursive working-directory exists. TQString makeParams = firstLine.mid( offset+5 ); - if( !makeParams.tqcontains( ";" ) && !makeParams.tqcontains( "&&" ) ) { + if( !makeParams.contains( ";" ) && !makeParams.contains( "&&" ) ) { ///Looks like valid parameters ///Make the file-name absolute, so it can be referenced from any directory TQString absoluteFile = file; diff --git a/languages/cpp/kdevdriver.cpp b/languages/cpp/kdevdriver.cpp index 9e0918b2..22aec56f 100644 --- a/languages/cpp/kdevdriver.cpp +++ b/languages/cpp/kdevdriver.cpp @@ -138,7 +138,7 @@ void KDevDriver::setup() TQString str = cfg->customIncludePaths(); int pos = 0; while( pos < str.length() ) { - int end = str.tqfind( ';', pos ); + int end = str.find( ';', pos ); if( end == -1 ) { end = str.length(); } @@ -188,11 +188,11 @@ bool KDevDriver::shouldParseIncludedFile( const ParsedFilePointer& file ) { if( !m_shouldParseIncludedFiles ) return false; - m_cppSupport->safeFileSet().tqcontains( compoundString ); + m_cppSupport->safeFileSet().contains( compoundString ); - if( m_cppSupport->safeFileSet().tqcontains( file->fileName()) ){ + if( m_cppSupport->safeFileSet().contains( file->fileName()) ){ return false; - } else if( m_cppSupport->safeFileSet().tqcontains( compoundString ) ) { + } else if( m_cppSupport->safeFileSet().contains( compoundString ) ) { //kdDebug( 9007 ) << "ALREADY IN FILE-SET: " << compoundString << endl; return false; } else { diff --git a/languages/cpp/main.cpp b/languages/cpp/main.cpp index b29fe2d4..a1965f78 100644 --- a/languages/cpp/main.cpp +++ b/languages/cpp/main.cpp @@ -107,7 +107,7 @@ public: TQString gccLibPath = SetupHelper::getGccIncludePath(&ok); if (!ok) return; - gccLibPath = gccLibPath.tqreplace( TQRegExp( "[\r\n]" ), "" ); + gccLibPath = gccLibPath.replace( TQRegExp( "[\r\n]" ), "" ); addIncludePath( gccLibPath ); addIncludePath( "/usr/include/g++-3" ); addIncludePath( "/usr/include/g++" ); diff --git a/languages/cpp/pcsimporter/customimporter/settingsdialog.cpp b/languages/cpp/pcsimporter/customimporter/settingsdialog.cpp index ebef44ed..5845ff83 100644 --- a/languages/cpp/pcsimporter/customimporter/settingsdialog.cpp +++ b/languages/cpp/pcsimporter/customimporter/settingsdialog.cpp @@ -88,7 +88,7 @@ void SettingsDialog::validateDirectory( const TQString & dir ) { elb->lineEdit() ->setText( dir ); - if ( TQListBoxItem * item = elb->listBox() ->tqfindItem( dir, TQt::ExactMatch ) ) + if ( TQListBoxItem * item = elb->listBox() ->findItem( dir, TQt::ExactMatch ) ) { elb->listBox() ->removeItem( elb->listBox() ->index( item ) ); } diff --git a/languages/cpp/pcsimporter/kdelibsimporter/settingsdialog.cpp b/languages/cpp/pcsimporter/kdelibsimporter/settingsdialog.cpp index 612ff79a..a9a24c48 100644 --- a/languages/cpp/pcsimporter/kdelibsimporter/settingsdialog.cpp +++ b/languages/cpp/pcsimporter/kdelibsimporter/settingsdialog.cpp @@ -47,7 +47,7 @@ SettingsDialog::SettingsDialog( TQWidget* tqparent, const char* name, WFlags fl { TQString kdedir = *it; if ( !kdedir.isEmpty() && isValidKDELibsDir( kdedir ) ) - if ( !kdeListBox->tqfindItem( kdedir, ExactMatch ) ) + if ( !kdeListBox->findItem( kdedir, ExactMatch ) ) kdeListBox->insertItem( kdedir ); } @@ -81,7 +81,7 @@ void SettingsDialog::addUrlButton_clicked() if ( isValidKDELibsDir( kdeUrl->url() ) ) { kdeListBox->insertItem( kdeUrl->url() ); - if ( TQListBoxItem * item = kdeListBox->tqfindItem( kdeUrl->url(), ExactMatch ) ) + if ( TQListBoxItem * item = kdeListBox->findItem( kdeUrl->url(), ExactMatch ) ) { kdeListBox->setSelected( item, true ); } diff --git a/languages/cpp/pcsimporter/qt4importer/settingsdialog.cpp b/languages/cpp/pcsimporter/qt4importer/settingsdialog.cpp index 1b8e46f2..75fad7f3 100644 --- a/languages/cpp/pcsimporter/qt4importer/settingsdialog.cpp +++ b/languages/cpp/pcsimporter/qt4importer/settingsdialog.cpp @@ -49,7 +49,7 @@ SettingsDialog::SettingsDialog(TQWidget* tqparent, const char* name, WFlags fl) { TQString qtdir = *it; if( !qtdir.isEmpty() && isValidTQtDir(qtdir) ) - if (!qtListBox->tqfindItem(qtdir, ExactMatch)) + if (!qtListBox->findItem(qtdir, ExactMatch)) qtListBox->insertItem( qtdir ); } @@ -96,7 +96,7 @@ void SettingsDialog::addUrlButton_clicked( ) if ( isValidTQtDir( qtUrl->url() ) ) { qtListBox->insertItem( qtUrl->url() ); - if ( TQListBoxItem * item = qtListBox->tqfindItem( qtUrl->url(), ExactMatch ) ) + if ( TQListBoxItem * item = qtListBox->findItem( qtUrl->url(), ExactMatch ) ) { qtListBox->setSelected( item, true ); } diff --git a/languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp b/languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp index a03ac0d4..0c25753c 100644 --- a/languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp +++ b/languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp @@ -50,7 +50,7 @@ SettingsDialog::SettingsDialog( TQWidget* tqparent, const char* name, WFlags fl { TQString qtdir = *it; if ( !qtdir.isEmpty() && isValidTQtDir( qtdir ) ) - if ( !qtListBox->tqfindItem( qtdir, ExactMatch ) ) + if ( !qtListBox->findItem( qtdir, ExactMatch ) ) qtListBox->insertItem( qtdir ); } @@ -104,7 +104,7 @@ void SettingsDialog::addUrlButton_clicked( ) if ( isValidTQtDir( qtUrl->url() ) ) { qtListBox->insertItem( qtUrl->url() ); - if ( TQListBoxItem * item = qtListBox->tqfindItem( qtUrl->url(), ExactMatch ) ) + if ( TQListBoxItem * item = qtListBox->findItem( qtUrl->url(), ExactMatch ) ) { qtListBox->setSelected( item, true ); } diff --git a/languages/cpp/problemreporter.cpp b/languages/cpp/problemreporter.cpp index 32c078e1..ea1c3dc6 100644 --- a/languages/cpp/problemreporter.cpp +++ b/languages/cpp/problemreporter.cpp @@ -198,7 +198,7 @@ void ProblemReporter::filterList(KListView* listview, const TQString& level) TQListViewItemIterator it( listview ); while ( it.current() ) { - if ( it.current()->text(3).tqcontains(m_filterEdit->text(),false)) + if ( it.current()->text(3).contains(m_filterEdit->text(),false)) { new KListViewItem(m_filteredList,level, it.current()->text(0), it.current()->text(1), @@ -356,7 +356,7 @@ void ProblemReporter::reportProblem( const TQString& fileName, const Problem& p m_markIface->addMark( p.line(), markType ); TQString msg = p.text(); - msg = msg.tqreplace( TQRegExp("\n"), "" ); + msg = msg.replace( TQRegExp("\n"), "" ); TQString relFileName = m_cppSupport->project()->relativeProjectFile(fileName); diff --git a/languages/cpp/qtbuildconfig.cpp b/languages/cpp/qtbuildconfig.cpp index 1d20a9f9..a1a06a96 100644 --- a/languages/cpp/qtbuildconfig.cpp +++ b/languages/cpp/qtbuildconfig.cpp @@ -102,14 +102,14 @@ void QtBuildConfig::buildBinDirs( TQStringList & dirs ) const TQStringList paths = TQStringList::split(":",::getenv("PATH")); dirs += paths; TQString binpath = TQDir::rootDirPath() + "bin"; - if( dirs.tqfindIndex( binpath ) != -1 ) + if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "bin"; - if( dirs.tqfindIndex( binpath ) != -1 ) + if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "local" + TQString( TQChar( TQDir::separator() ) ) + "bin"; - if( dirs.tqfindIndex( binpath ) != -1 ) + if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; } @@ -213,4 +213,4 @@ void QtBuildConfig::setDesignerIntegration( const TQString& designerIntegration } #include "qtbuildconfig.moc" -//kate: space-indent on; indent-width 4; tab-width 4; tqreplace-tabs on +//kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on diff --git a/languages/cpp/qtdesignercppintegration.cpp b/languages/cpp/qtdesignercppintegration.cpp index b39d3ea1..943fda92 100644 --- a/languages/cpp/qtdesignercppintegration.cpp +++ b/languages/cpp/qtdesignercppintegration.cpp @@ -70,7 +70,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function TQString access = accessID( *it ); TQPair<int, int> funEndPoint = tqMakePair( funEndLine, funEndColumn ); - if ( !points.tqcontains( access ) || points[ access ] < funEndPoint ) + if ( !points.contains( access ) || points[ access ] < funEndPoint ) { points[ access ] = funEndPoint; } @@ -91,7 +91,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function str = " " + str; TQPair<int, int> pt; - if ( points.tqcontains( access ) ) + if ( points.contains( access ) ) { pt = points[ access ]; } @@ -103,7 +103,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function } editIface->insertText( pt.first + insertedLine + 1, 0 /*pt.second*/, str ); - insertedLine += str.tqcontains( TQChar( '\n' ) ); + insertedLine += str.contains( TQChar( '\n' ) ); CppSupportPart *cppPart = dynamic_cast<CppSupportPart *>( m_part ); cppPart->backgroundParser() ->addFile( klass->fileName() ); @@ -121,7 +121,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function TQFileInfo fi( klass->fileName() ); TQString implementationFile = fi.absFilePath(); - implementationFile.tqreplace( ".h", ".cpp" ); + implementationFile.replace( ".h", ".cpp" ); TQFileInfo fileInfo( implementationFile ); if ( !TQFile::exists( fileInfo.absFilePath() ) ) @@ -158,7 +158,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function } else { - if ( editIface->textLine( line ).tqcontains( TQRegExp( ".*#include .*\\.tqmoc.*" ) ) ) + if ( editIface->textLine( line ).contains( TQRegExp( ".*#include .*\\.tqmoc.*" ) ) ) atLine = line; break; } @@ -210,7 +210,7 @@ TQString QtDesignerCppIntegration::accessID( FunctionDom fun ) const void QtDesignerCppIntegration::processImplementationName( TQString &name ) { - name.tqreplace( ".h", ".cpp" ); + name.replace( ".h", ".cpp" ); } #include "qtdesignercppintegration.moc" diff --git a/languages/cpp/simpletype.cpp b/languages/cpp/simpletype.cpp index 9e9d6113..2a2b27de 100644 --- a/languages/cpp/simpletype.cpp +++ b/languages/cpp/simpletype.cpp @@ -39,11 +39,11 @@ BuiltinTypes::BuiltinTypes() { } bool BuiltinTypes::isBuiltin( const TypeDesc& desc ) { - return m_types.tqfind( desc.name() ) != m_types.end(); + return m_types.find( desc.name() ) != m_types.end(); } TQString BuiltinTypes::comment( const TypeDesc& desc ) { - TQMap<TQString, TQString>::iterator it = m_types.tqfind( desc.name() ); + TQMap<TQString, TQString>::iterator it = m_types.find( desc.name() ); if( it != m_types.end() ) { return *it; } else { @@ -428,7 +428,7 @@ class TemplateParamMatch { for( int a = 0; a < m_candidateParams.count(); a++ ) { SimpleTypeImpl::TemplateParamInfo::TemplateParam t; if( m_candidateParams.getParam( t, a ) ) { - if( !m_hadParameters.tqcontains( t.name ) ) { + if( !m_hadParameters.contains( t.name ) ) { m_matched = false; } } else { @@ -472,7 +472,7 @@ class TemplateParamMatch { t.value = val; - if( m_hadParameters.tqcontains( t.name ) && oldValue != t.value ) { + if( m_hadParameters.contains( t.name ) && oldValue != t.value ) { return false; ///We have a mismatch, two different values for the same template-parameter. } else { m_candidateParams.addParam( t ); @@ -998,7 +998,7 @@ void SimpleTypeImpl::takeTemplateParams( TypeDesc desc ) { //SimpleTypeImpl::TemplateParamInfo implementation bool SimpleTypeImpl::TemplateParamInfo::getParam( TemplateParam& target, TQString name ) const { - TQMap<TQString, TemplateParam>::const_iterator it = m_paramsByName.tqfind( name ); + TQMap<TQString, TemplateParam>::const_iterator it = m_paramsByName.find( name ); if ( it != m_paramsByName.end() ) { target = *it; return true; @@ -1007,7 +1007,7 @@ bool SimpleTypeImpl::TemplateParamInfo::getParam( TemplateParam& target, TQStrin } bool SimpleTypeImpl::TemplateParamInfo::getParam( TemplateParam& target, int number ) const { - TQMap<int, TemplateParam>::const_iterator it = m_paramsByNumber.tqfind( number ); + TQMap<int, TemplateParam>::const_iterator it = m_paramsByNumber.find( number ); if ( it != m_paramsByNumber.end() ) { target = *it; return true; @@ -1016,7 +1016,7 @@ bool SimpleTypeImpl::TemplateParamInfo::getParam( TemplateParam& target, int num } void SimpleTypeImpl::TemplateParamInfo::removeParam( int number ) { - TQMap<int, TemplateParam>::iterator it = m_paramsByNumber.tqfind( number ); + TQMap<int, TemplateParam>::iterator it = m_paramsByNumber.find( number ); if ( it != m_paramsByNumber.end() ) { m_paramsByName.remove( ( *it ).name ); m_paramsByNumber.remove( it ); diff --git a/languages/cpp/simpletypecachebinder.h b/languages/cpp/simpletypecachebinder.h index 9d6ed77a..3f950cbf 100644 --- a/languages/cpp/simpletypecachebinder.h +++ b/languages/cpp/simpletypecachebinder.h @@ -203,7 +203,7 @@ class SimpleTypeCacheBinder : public Base { } #ifdef TEST_REMAP - typename MemberMap::iterator it = m_memberCache.tqfind( key ); + typename MemberMap::iterator it = m_memberCache.find( key ); if ( it == m_memberCache.end() ) dbgMajor() << "\"" << Base::str() << "\"remap failed with \"" << name.fullNameChain() << "\"" << endl; #endif @@ -260,7 +260,7 @@ class SimpleTypeCacheBinder : public Base { (*r.first).second = t; #ifdef TEST_REMAP - typename LocateMap::iterator it = m_locateCache.tqfind( desc ); + typename LocateMap::iterator it = m_locateCache.find( desc ); if ( it == m_locateCache.end() ) dbgMajor() << "\"" << Base::str() << "\"remap failed with \"" << name.fullNameChain() << "\"" << endl; #endif return t; diff --git a/languages/cpp/simpletypecatalog.h b/languages/cpp/simpletypecatalog.h index 92563781..69a920c7 100644 --- a/languages/cpp/simpletypecatalog.h +++ b/languages/cpp/simpletypecatalog.h @@ -77,7 +77,7 @@ private: int pointerDepthFromString( const TQString& str ) { TQRegExp ptrRx( "(\\*|\\&)" ); - TQString ptr = str.mid( str.tqfind( ptrRx ) ); + TQString ptr = str.mid( str.find( ptrRx ) ); TQStringList ptrList = TQStringList::split( "", ptr ); return ptrList.size(); } diff --git a/languages/cpp/simpletypenamespace.cpp b/languages/cpp/simpletypenamespace.cpp index cbd128eb..10e9b83d 100644 --- a/languages/cpp/simpletypenamespace.cpp +++ b/languages/cpp/simpletypenamespace.cpp @@ -116,7 +116,7 @@ SimpleTypeImpl::MemberInfo SimpleTypeNamespace::findMember( TypeDesc name, Membe ImportList m_aliasImports; - AliasMap::iterator itt = m_aliases.tqfind( name.name() ); + AliasMap::iterator itt = m_aliases.find( name.name() ); if ( itt != m_aliases.end() && !( *itt ).empty() ) { ifVerbose( dbg() << "\"" << str() << "\": namespace-sub-aliases \"" << name.name() << "\"" << "\" requested, locating targets" << endl ); @@ -227,7 +227,7 @@ void SimpleTypeNamespace::addAliasMap( const TypeDesc& name, const TypeDesc& ali invalidateSecondaryCache(); invalidatePrimaryCache( true ); //Only not-found items are cleared updated here for performance-reasons(found items will stay cached) - AliasMap::iterator it = m_aliases.tqfind( name.name() ); + AliasMap::iterator it = m_aliases.find( name.name() ); if ( it == m_aliases.end() ) it = m_aliases.insert( name.name(), ImportList() ); @@ -253,7 +253,7 @@ std::set<size_t> SimpleTypeNamespace::updateAliases( const IncludeFiles& files/* if ( m_activeSlaves.empty() || !safetyCounter.ok() ) return possibleSlaves; // if( !isRecursion ) { // ///Test the cache -// SlavesCache::const_iterator it = m_slavesCache.tqfind( files ); +// SlavesCache::const_iterator it = m_slavesCache.find( files ); // if( it != m_slavesCache.end() && it->second.first == m_slavesCache.size() ) return; ///The cache already contains a valid entry, and the work is done // } @@ -320,8 +320,8 @@ std::set<size_t> SimpleTypeNamespace::updateAliases( const IncludeFiles& files/* void SimpleTypeNamespace::addAliases( TQString map, const IncludeFiles& files ) { while ( !map.isEmpty() ) { - int mid = map.tqfind( "=" ); - int mid2 = map.tqfind( "<<" ); + int mid = map.find( "=" ); + int mid2 = map.find( "<<" ); int found = mid; int len = 1; if ( mid2 != -1 && ( mid2 < found || found == -1 ) ) { @@ -331,7 +331,7 @@ void SimpleTypeNamespace::addAliases( TQString map, const IncludeFiles& files ) if ( found == -1 ) break; - int end = map.tqfind( ";", found + len ); + int end = map.find( ";", found + len ); if ( end == -1 ) { //break; end = map.length(); @@ -377,7 +377,7 @@ bool SimpleTypeNamespace::hasNode() const { SimpleTypeNamespace::SlaveList SimpleTypeNamespace::getSlaves( const IncludeFiles& files ) { /* ///Test the cache - SlavesCache::const_iterator it = m_slavesCache.tqfind( files ); + SlavesCache::const_iterator it = m_slavesCache.find( files ); if( it != m_slavesCache.end() && it->second.first == m_activeSlaves.size() ) return it->second.second; ///The cache already contains a valid entry, and the work is done*/ std::set<size_t> allSlaves = updateAliases( files ); diff --git a/languages/cpp/store_walker.cpp b/languages/cpp/store_walker.cpp index e0c9bfd6..8b13b808 100644 --- a/languages/cpp/store_walker.cpp +++ b/languages/cpp/store_walker.cpp @@ -519,7 +519,7 @@ void StoreWalker::parseClassSpecifier( ClassSpecifierAST* ast ) klass->setEndPosition( endLine, endColumn ); klass->setFileName( m_fileName ); - int i = className.tqfind( '<' ); + int i = className.find( '<' ); if( i != -1 ) { klass->setSpecializationDeclaration( className.mid( i ) ); className = className.left( i ); @@ -982,7 +982,7 @@ ClassDom StoreWalker::findClassFromScope( const TQStringList& scope ) { TQString scopeText = scope.join("::"); if( !m_imports.isEmpty() ) { - TQMapIterator<TQString, ClassDom> it = m_imports.back().first.tqfind( scopeText ); + TQMapIterator<TQString, ClassDom> it = m_imports.back().first.find( scopeText ); if( it != m_imports.back().first.end() ) { return *it; } @@ -1052,7 +1052,7 @@ ClassDom StoreWalker::classFromScope(const TQStringList& scope) { if( c ) { ///Check the file that overrides the code-model file - it = m_overrides.tqfind( c->fileName() ); + it = m_overrides.find( c->fileName() ); //Find the class within the file that is overriding the one in code-model. if( it != m_overrides.end() ) { diff --git a/languages/cpp/storeconverter.cpp b/languages/cpp/storeconverter.cpp index 4eae290a..6ad55925 100644 --- a/languages/cpp/storeconverter.cpp +++ b/languages/cpp/storeconverter.cpp @@ -140,7 +140,7 @@ void StoreConverter::parseArguments(FunctionDom function, CppFunction<Tag> &cppF { ArgumentDom arg = m_model->create<ArgumentModel>(); arg->setType(*it); - arg->setName(cppFun.argumentNames()[args.tqfindIndex(*it)]); + arg->setName(cppFun.argumentNames()[args.findIndex(*it)]); function->addArgument(arg); } diff --git a/languages/cpp/stringhelpers.cpp b/languages/cpp/stringhelpers.cpp index bc1a8dc7..bc267c15 100644 --- a/languages/cpp/stringhelpers.cpp +++ b/languages/cpp/stringhelpers.cpp @@ -36,9 +36,9 @@ TQString clearComments( TQString str ) { int lastPos = 0; int pos; int len = str.length(); - while( (pos = str.tqfind( "/*", lastPos )) != -1 ) { + while( (pos = str.find( "/*", lastPos )) != -1 ) { if( !s ) return str; - int i = str.tqfind( "*/", pos ); + int i = str.find( "*/", pos ); if( i != -1 && i <= len - 2 ) { clearStr( str, pos, i+2 ); lastPos = i+2; @@ -49,9 +49,9 @@ TQString clearComments( TQString str ) { } lastPos = 0; - while( (pos = str.tqfind( "//", lastPos )) != -1 ) { + while( (pos = str.find( "//", lastPos )) != -1 ) { if( !s ) return str; - int i = str.tqfind( "\n", pos ); + int i = str.find( "\n", pos ); if( i != -1 && i <= len - 1 ) { clearStr( str, pos, i+1 ); lastPos = i+1; @@ -66,17 +66,17 @@ TQString clearComments( TQString str ) { TQString cutTemplateParams( TQString str ) { int p; - if( (p = str.tqfind('<') ) != -1) { + if( (p = str.find('<') ) != -1) { return str.left( p ); } - return str.stripWhiteSpace().tqreplace('*',""); + return str.stripWhiteSpace().replace('*',""); } TQPair<TQString, TQString> splitTemplateParams( TQString str ) { TQPair<TQString, TQString> ret; int p; - if( (p = str.tqfind('<') ) != -1) { + if( (p = str.find('<') ) != -1) { ret.first = str.left( p ).stripWhiteSpace(); ret.second = str.mid( p ).stripWhiteSpace(); } else { @@ -238,8 +238,8 @@ int countExtract( TQChar c, const TQString& str ) { TQString templateParamFromString( int num, TQString str ) { if( str.endsWith("::") ) str.truncate( str.length() - 2 ); - int begin = str.tqfind('<'); - int end = str.tqfindRev('>'); + int begin = str.find('<'); + int end = str.findRev('>'); if(begin == -1 || end == -1) return ""; diff --git a/languages/cpp/stringhelpers.h b/languages/cpp/stringhelpers.h index a6815f2b..33e01827 100644 --- a/languages/cpp/stringhelpers.h +++ b/languages/cpp/stringhelpers.h @@ -63,8 +63,8 @@ TQStringList splitType( TQString str ) ; class ParamIterator { public: ParamIterator( TQString parens, TQString source ) : m_source( source ), m_parens( parens ), m_cur( 0 ), m_curEnd ( 0 ) { - int begin = m_source.tqfind( m_parens[ 0 ] ); - int end = m_source.tqfindRev( m_parens[ 1 ] ); + int begin = m_source.find( m_parens[ 0 ] ); + int end = m_source.findRev( m_parens[ 1 ] ); m_prefix = m_source.left( begin ); if ( begin == -1 || end == -1 && end - begin > 1 ) diff --git a/languages/cpp/subclassingdlg.cpp b/languages/cpp/subclassingdlg.cpp index 27b08f27..72db362b 100644 --- a/languages/cpp/subclassingdlg.cpp +++ b/languages/cpp/subclassingdlg.cpp @@ -145,7 +145,7 @@ m_newFileNames(dummy), m_cppSupport( cppSupport ) { kdDebug() << "base class " << baseClass << " class " << (*classIt)->name() << " parents " << (*classIt)->baseClassList().join(",") << endl; - if ( (*classIt)->baseClassList().tqfindIndex(baseClass) != -1 ) + if ( (*classIt)->baseClassList().findIndex(baseClass) != -1 ) { kdDebug() << "base class matched " << endl; m_edClassName->setText((*classIt)->name()); @@ -167,7 +167,7 @@ bool SubclassingDlg::alreadyInSubclass(const TQString &method) { for (uint i=0;i<m_parsedMethods.count();i++) { - if (method.tqfind(m_parsedMethods[i])==0) + if (method.find(m_parsedMethods[i])==0) return true; } return false; @@ -276,14 +276,14 @@ void SubclassingDlg::updateDlg() { } -void SubclassingDlg::tqreplace(TQString &string, const TQString& search, const TQString& tqreplace) +void SubclassingDlg::replace(TQString &string, const TQString& search, const TQString& replace) { - int nextPos = string.tqfind(search); + int nextPos = string.find(search); unsigned int searchLength = search.length(); while (nextPos>-1) { - string = string.tqreplace(nextPos,searchLength,tqreplace); - nextPos = string.tqfind(search,nextPos+tqreplace.length()); + string = string.replace(nextPos,searchLength,replace); + nextPos = string.find(search,nextPos+replace.length()); } } @@ -304,24 +304,24 @@ bool SubclassingDlg::loadBuffer(TQString &buffer, const TQString& filename) bool SubclassingDlg::replaceKeywords(TQString &buffer,bool canBeModal) { - tqreplace(buffer,"$NEWFILENAMEUC$",m_edFileName->text().upper()); - tqreplace(buffer,"$BASEFILENAMELC$",m_formName.lower()); - tqreplace(buffer,"$BASEFILENAME$",m_formName); - tqreplace(buffer,"$NEWCLASS$",m_edClassName->text()); - tqreplace(buffer,"$TQTBASECLASS$", m_qtBaseClassName ); - tqreplace(buffer,"$BASECLASS$",m_baseClassName); - tqreplace(buffer,"$NEWFILENAMELC$",m_edFileName->text().lower()); + replace(buffer,"$NEWFILENAMEUC$",m_edFileName->text().upper()); + replace(buffer,"$BASEFILENAMELC$",m_formName.lower()); + replace(buffer,"$BASEFILENAME$",m_formName); + replace(buffer,"$NEWCLASS$",m_edClassName->text()); + replace(buffer,"$TQTBASECLASS$", m_qtBaseClassName ); + replace(buffer,"$BASECLASS$",m_baseClassName); + replace(buffer,"$NEWFILENAMELC$",m_edFileName->text().lower()); if (canBeModal) { - tqreplace(buffer,"$CAN_BE_MODAL_H$",", bool modal = FALSE"); - tqreplace(buffer,"$CAN_BE_MODAL_CPP1$",", bool modal"); - tqreplace(buffer,"$CAN_BE_MODAL_CPP2$",", modal"); + replace(buffer,"$CAN_BE_MODAL_H$",", bool modal = FALSE"); + replace(buffer,"$CAN_BE_MODAL_CPP1$",", bool modal"); + replace(buffer,"$CAN_BE_MODAL_CPP2$",", modal"); } else { - tqreplace(buffer,"$CAN_BE_MODAL_H$",""); - tqreplace(buffer,"$CAN_BE_MODAL_CPP1$",""); - tqreplace(buffer,"$CAN_BE_MODAL_CPP2$",""); + replace(buffer,"$CAN_BE_MODAL_H$",""); + replace(buffer,"$CAN_BE_MODAL_CPP1$",""); + replace(buffer,"$CAN_BE_MODAL_CPP2$",""); } return true; @@ -378,8 +378,8 @@ void SubclassingDlg::accept() TQFileInfo fi(m_filename + ".h"); TQString module = fi.baseName(); TQString basefilename = fi.baseName(true); - buffer.tqreplace(TQRegExp("\\$MODULE\\$"),module); - buffer.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename); + buffer.replace(TQRegExp("\\$MODULE\\$"),module); + buffer.replace(TQRegExp("\\$FILENAME\\$"),basefilename); } else loadBuffer(buffer,m_filename+".h"); @@ -411,12 +411,12 @@ void SubclassingDlg::accept() if (!slitem->m_isFunc) { declBuild += spacer.fill(' ',43-declBuild.length()) + slitem->m_methodName + ";"; - tqreplace(buffer,"/*$PUBLIC_SLOTS$*/",declBuild); + replace(buffer,"/*$PUBLIC_SLOTS$*/",declBuild); } else { declBuild += spacer.fill(' ',47-declBuild.length()) + slitem->m_methodName + ";"; - tqreplace(buffer,"/*$PUBLIC_FUNCTIONS$*/",declBuild); + replace(buffer,"/*$PUBLIC_FUNCTIONS$*/",declBuild); } } if (slitem->m_access=="protected") @@ -424,12 +424,12 @@ void SubclassingDlg::accept() if (!slitem->m_isFunc) { declBuild += spacer.fill(' ',46-declBuild.length()) + slitem->m_methodName + ";"; - tqreplace(buffer,"/*$PROTECTED_SLOTS$*/",declBuild); + replace(buffer,"/*$PROTECTED_SLOTS$*/",declBuild); } else { declBuild += spacer.fill(' ',50-declBuild.length()) + slitem->m_methodName + ";"; - tqreplace(buffer,"/*$PROTECTED_FUNCTIONS$*/",declBuild); + replace(buffer,"/*$PROTECTED_FUNCTIONS$*/",declBuild); } } } @@ -473,8 +473,8 @@ void SubclassingDlg::accept() TQFileInfo fi(m_filename + ".cpp"); TQString module = fi.baseName(); TQString basefilename = fi.baseName(true); - buffer.tqreplace(TQRegExp("\\$MODULE\\$"),module); - buffer.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename); + buffer.replace(TQRegExp("\\$MODULE\\$"),module); + buffer.replace(TQRegExp("\\$FILENAME\\$"),basefilename); if ( (m_cppSupport->project()) && (m_cppSupport->project()->options() & KDevProject::UsesAutotoolsBuildSystem)) buffer += "\n#include \"$NEWFILENAMELC$.tqmoc\"\n"; } @@ -489,11 +489,11 @@ void SubclassingDlg::accept() slitem->m_alreadyInSubclass) continue; TQString impl = slitem->m_callBaseClass ? implementation_callbase : implementation; - tqreplace(impl,"$RETURNTYPE$",slitem->m_returnType); - tqreplace(impl,"$NEWCLASS$",m_edClassName->text()); - tqreplace(impl,"$METHOD$", slitem->m_methodName); - tqreplace(impl,"$TQTBASECLASS$", m_qtBaseClassName); - tqreplace(buffer,"/*$SPECIALIZATION$*/",impl); + replace(impl,"$RETURNTYPE$",slitem->m_returnType); + replace(impl,"$NEWCLASS$",m_edClassName->text()); + replace(impl,"$METHOD$", slitem->m_methodName); + replace(impl,"$TQTBASECLASS$", m_qtBaseClassName); + replace(buffer,"/*$SPECIALIZATION$*/",impl); } if (reformat_box->isChecked()) diff --git a/languages/cpp/subclassingdlg.h b/languages/cpp/subclassingdlg.h index ca07059a..e63dee7b 100644 --- a/languages/cpp/subclassingdlg.h +++ b/languages/cpp/subclassingdlg.h @@ -54,7 +54,7 @@ private: TQString readBaseClassName(); void updateDlg(); bool replaceKeywords( TQString &buffer, bool canBeModal = true ); - void tqreplace( TQString &string, const TQString& search, const TQString& tqreplace ); + void replace( TQString &string, const TQString& search, const TQString& replace ); bool saveBuffer( TQString &buffer, const TQString& filename ); bool loadBuffer( TQString &buffer, const TQString& filename ); bool alreadyInSubclass( const TQString &method ); diff --git a/languages/cpp/tag_creator.cpp b/languages/cpp/tag_creator.cpp index 2ac8d54b..80ab86f5 100644 --- a/languages/cpp/tag_creator.cpp +++ b/languages/cpp/tag_creator.cpp @@ -47,10 +47,10 @@ void TagCreator::parseDeclaration( DeclarationAST* ast ) { if( ast->nodeType() == NodeType_AccessDeclaration || m_currentAccess.isEmpty() || - m_currentAccess.tqcontains("private") || ///In order to correctly evaluate templates, the private members are necessary too - m_currentAccess.tqcontains("public") || - m_currentAccess.tqcontains("protected") || - m_currentAccess.tqcontains("signals") ) + m_currentAccess.contains("private") || ///In order to correctly evaluate templates, the private members are necessary too + m_currentAccess.contains("public") || + m_currentAccess.contains("protected") || + m_currentAccess.contains("signals") ) { TreeParser::parseDeclaration( ast ); } @@ -362,7 +362,7 @@ void TagCreator::parseFunctionDefinition( FunctionDefinitionAST* ast ) checkTemplateDeclarator( tag ); TQString arguments = tag.attribute( "a" ).toStringList().join( "," ); -tag.setAttribute( "description", m_documentation->functionDescription( scopeStr.tqreplace( TQRegExp( "." ), ":" ), id, typeOfDeclaration( typeSpec, d ), arguments ) ); +tag.setAttribute( "description", m_documentation->functionDescription( scopeStr.replace( TQRegExp( "." ), ":" ), id, typeOfDeclaration( typeSpec, d ), arguments ) ); tagBuilder.setAccess( TagUtils::stringToAccess( m_currentAccess ) ); @@ -469,7 +469,7 @@ void TagCreator::parseClassSpecifier( ClassSpecifierAST* ast ) tag.setFileName( m_fileName ); - int i = className.tqfind( '<' ); + int i = className.find( '<' ); TQString specialization; if( i != -1 ) { @@ -862,7 +862,7 @@ int TagUtils::stringToAccess( const TQString & access ) << "public slots" << "protected slots" << "private slots" << "signals"; - int idx = l.tqfindIndex( access ); + int idx = l.findIndex( access ); return idx == -1 ? 0 : idx+1; } diff --git a/languages/cpp/typedecoration.h b/languages/cpp/typedecoration.h index 9e52bb5e..e142d837 100644 --- a/languages/cpp/typedecoration.h +++ b/languages/cpp/typedecoration.h @@ -47,9 +47,9 @@ class TypeDecoration { } void operator += ( const TypeDecoration& rhs ) { - if ( !m_decoration_front.tqcontains( rhs.m_decoration_front ) ) + if ( !m_decoration_front.contains( rhs.m_decoration_front ) ) m_decoration_front += rhs.m_decoration_front; - if ( !m_decoration_back.tqcontains( rhs.m_decoration_back ) ) + if ( !m_decoration_back.contains( rhs.m_decoration_back ) ) m_decoration_back += rhs.m_decoration_back; } diff --git a/languages/cpp/typedesc.cpp b/languages/cpp/typedesc.cpp index 757b4eae..bc314743 100644 --- a/languages/cpp/typedesc.cpp +++ b/languages/cpp/typedesc.cpp @@ -150,7 +150,7 @@ TypeDesc::TypeDesc( const TypeDesc& rhs ) { bool TypeDesc::isValidType() const { if ( !m_data ) return false; - if ( m_data->m_cleanName.tqfind( "->" ) != -1 || m_data->m_cleanName.tqcontains( '.' ) || m_data->m_cleanName.tqcontains( ' ' ) || m_data->m_cleanName.isEmpty() ) + if ( m_data->m_cleanName.find( "->" ) != -1 || m_data->m_cleanName.contains( '.' ) || m_data->m_cleanName.contains( ' ' ) || m_data->m_cleanName.isEmpty() ) return false; for ( TemplateParams::const_iterator it = m_data->m_templateParams.begin(); it != m_data->m_templateParams.end(); ++it ) { @@ -708,7 +708,7 @@ void TypeDesc::init( TQString stri ) { ///Since function-names are also processed by this function, this check has to be done if( shorten ) { ///Remove any prefixes like const or typename(very limited algorithm) - int len = str.tqfind( "<" ); + int len = str.find( "<" ); if ( len == -1 ) len = str.length(); int currentStart = 0; |