From 36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: [PATCH] rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfilereplace/commandengine.cpp | 12 +- kfilereplace/configurationclasses.cpp | 6 +- kfilereplace/configurationclasses.h | 2 +- kfilereplace/kaddstringdlg.h | 2 +- kfilereplace/kfilereplacepart.cpp | 32 ++-- kfilereplace/kfilereplaceview.h | 2 +- kfilereplace/knewprojectdlg.cpp | 2 +- kfilereplace/knewprojectdlg.h | 2 +- kfilereplace/report.cpp | 2 +- kfilereplace/whatthis.h | 2 +- kimagemapeditor/drawzone.cpp | 8 +- kimagemapeditor/imagemap.cpp | 8 +- kimagemapeditor/imageslistview.cpp | 8 +- kimagemapeditor/kimagemapeditor.cpp | 96 ++++++------ kimagemapeditor/kimearea.cpp | 34 ++--- kimagemapeditor/kimearea.h | 10 +- kimagemapeditor/kimedialogs.cpp | 12 +- kimagemapeditor/mapslistview.cpp | 6 +- kimagemapeditor/qextfileinfo.cpp | 10 +- klinkstatus/src/engine/linkchecker.cpp | 2 +- klinkstatus/src/engine/linkfilter.cpp | 6 +- klinkstatus/src/engine/searchmanager.cpp | 6 +- klinkstatus/src/engine/searchmanager_impl.h | 2 +- klinkstatus/src/parser/htmlparser.cpp | 8 +- klinkstatus/src/parser/http.cpp | 8 +- klinkstatus/src/parser/mstring.cpp | 8 +- klinkstatus/src/parser/node.cpp | 16 +- klinkstatus/src/parser/node_impl.h | 4 +- klinkstatus/src/parser/url.cpp | 2 +- klinkstatus/src/ui/klshistorycombo.cpp | 4 +- klinkstatus/src/ui/tablelinkstatus.cpp | 6 +- klinkstatus/src/utils/utils.cpp | 12 +- klinkstatus/src/utils/xsl.cpp | 4 +- kommander/Kommander-TODO.kno | 2 +- kommander/editor/actiondnd.cpp | 42 +++--- kommander/editor/actiondnd.h | 2 +- kommander/editor/asciivalidator.cpp | 2 +- kommander/editor/assoctexteditorimpl.cpp | 12 +- kommander/editor/choosewidgetimpl.cpp | 4 +- kommander/editor/command.cpp | 12 +- kommander/editor/connectioneditorimpl.cpp | 8 +- kommander/editor/formfile.cpp | 8 +- kommander/editor/formwindow.cpp | 88 +++++------ kommander/editor/functionsimpl.cpp | 8 +- kommander/editor/hierarchyview.cpp | 6 +- kommander/editor/kommander-new.xml | 8 +- kommander/editor/kommander.xml | 10 +- kommander/editor/layout.cpp | 4 +- kommander/editor/mainwindow.cpp | 24 +-- kommander/editor/mainwindowactions.cpp | 2 +- kommander/editor/metadatabase.cpp | 138 ++++++++--------- kommander/editor/newformimpl.cpp | 6 +- kommander/editor/parser.cpp | 10 +- kommander/editor/pics/images.h | 2 +- kommander/editor/pixmapchooser.cpp | 2 +- kommander/editor/propertyeditor.cpp | 30 ++-- kommander/editor/qcompletionedit.cpp | 4 +- kommander/editor/resource.cpp | 70 ++++----- kommander/editor/tableeditorimpl.cpp | 14 +- kommander/editor/widgetdatabase.cpp | 10 +- kommander/editor/widgetfactory.cpp | 48 +++--- kommander/editor/widgetfactory.h | 2 +- kommander/editor/workspace.cpp | 2 +- kommander/examples/current/editor-poc.kmdr | 10 +- kommander/examples/current/passvariables.kmdr | 2 +- kommander/examples/old/tidy.kmdr | 2 +- kommander/examples/tutorial/calc.kmdr | 2 +- kommander/examples/tutorial/picview.kmdr | 2 +- kommander/examples/tutorial/progressbar.kmdr | 4 +- kommander/examples/tutorial/strings.kmdr | 6 +- kommander/examples/tutorial/tree.kmdr | 2 +- kommander/executor/instance.cpp | 2 +- kommander/executor/main.cpp | 2 +- kommander/executor/register.cpp | 6 +- kommander/factory/kommanderfactory.cpp | 26 ++-- kommander/kmdrtools/dcoptool-oldparser.kmdr | 30 ++-- kommander/plugin/specialinformation.cpp | 36 ++--- kommander/plugin/specials.h | 2 +- kommander/pluginmanager/pluginmanager.cpp | 4 +- kommander/widget/expression.cpp | 2 +- kommander/widget/functionlib.cpp | 18 +-- kommander/widget/invokeclass.cpp | 4 +- kommander/widget/kommanderfunctions.cpp | 10 +- kommander/widget/kommanderwidget.cpp | 16 +- kommander/widget/myprocess.cpp | 2 +- kommander/widget/parser.cpp | 14 +- kommander/widget/parserdata.cpp | 6 +- kommander/widgets/buttongroup.cpp | 4 +- kommander/widgets/fileselector.cpp | 2 +- kommander/widgets/listbox.cpp | 10 +- kommander/widgets/richtexteditor.cpp | 2 +- kommander/widgets/scriptobject.cpp | 2 +- kommander/widgets/textedit.cpp | 4 +- kommander/widgets/treewidget.cpp | 16 +- kxsldbg/data/testdoc.xsl | 4 +- kxsldbg/kxsldbgpart/kxsldbg_part.cpp | 12 +- .../kxsldbgpart/libxsldbg/breakpoint_cmds.cpp | 4 +- kxsldbg/kxsldbgpart/libxsldbg/options.cpp | 2 +- kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp | 2 +- kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h | 12 +- kxsldbg/kxsldbgpart/qxsldbgdoc.cpp | 2 +- kxsldbg/kxsldbgpart/xsldbgoutputview.cpp | 22 +-- .../kmdi/qextmdi/kdockwidget.cpp | 22 +-- .../kmdi/qextmdi/kmdichildarea.cpp | 10 +- .../kmdi/qextmdi/kmdichildfrm.cpp | 6 +- lib/compatibility/kmdi/qextmdi/kmdichildfrm.h | 2 +- .../kmdi/qextmdi/kmdichildfrmcaption.cpp | 4 +- .../kmdi/qextmdi/kmdichildfrmcaption.h | 2 +- .../kmdi/qextmdi/kmdichildview.cpp | 4 +- .../kmdi/qextmdi/kmdichildview.h | 4 +- .../kmdi/qextmdi/kmdidockcontainer.cpp | 18 +-- .../kmdi/qextmdi/kmdidockcontainer.h | 2 +- .../qextmdi/kmdidocumentviewtabwidget.cpp | 2 +- .../kmdi/qextmdi/kmdidocumentviewtabwidget.h | 2 +- .../kmdi/qextmdi/kmdifocuslist.cpp | 2 +- .../kmdi/qextmdi/kmdifocuslist.h | 2 +- .../kmdi/qextmdi/kmdiguiclient.cpp | 2 +- .../kmdi/qextmdi/kmdiguiclient.h | 2 +- lib/compatibility/kmdi/qextmdi/kmdiiterator.h | 2 +- .../kmdi/qextmdi/kmdilistiterator.h | 2 +- .../kmdi/qextmdi/kmdimainfrm.cpp | 12 +- lib/compatibility/kmdi/qextmdi/kmdimainfrm.h | 2 +- .../kmdi/qextmdi/kmdinulliterator.h | 2 +- .../kmdi/qextmdi/kmditaskbar.cpp | 2 +- lib/compatibility/kmdi/qextmdi/kmditaskbar.h | 2 +- .../kmdi/qextmdi/kmditoolviewaccessor.cpp | 2 +- .../kmdi/qextmdi/kmditoolviewaccessor.h | 2 +- lib/compatibility/kmdi/qextmdi/ktabbar.cpp | 10 +- lib/compatibility/kmdi/qextmdi/ktabwidget.cpp | 2 +- .../knewstuff/downloaddialog.cpp | 2 +- lib/compatibility/knewstuff/entry.cpp | 6 +- .../knewstuff/knewstuffgeneric.cpp | 2 +- lib/compatibility/knewstuff/security.cpp | 10 +- lib/ksavealldialog.cpp | 2 +- lib/qextfileinfo.cpp | 14 +- .../components/csseditor/colorrequester.cpp | 4 +- quanta/components/csseditor/csseditor.cpp | 54 +++---- .../csseditor/csseditor_globals.cpp | 4 +- quanta/components/csseditor/cssselector.cpp | 6 +- .../csseditor/cssshpropertyparser.cpp | 12 +- .../csseditor/fontfamilychooser.cpp | 8 +- .../components/csseditor/shorthandformer.cpp | 126 ++++++++-------- .../components/csseditor/stylesheetparser.cpp | 22 +-- .../debugger/conditionalbreakpointdialog.cpp | 2 +- .../components/debugger/dbgp/dbgpnetwork.cpp | 2 +- .../components/debugger/dbgp/dbgpsettings.cpp | 2 +- .../debugger/dbgp/qbytearrayfifo.cpp | 8 +- .../components/debugger/dbgp/qbytearrayfifo.h | 2 +- .../debugger/dbgp/quantadebuggerdbgp.cpp | 12 +- .../debugger/debuggerbreakpointlist.cpp | 8 +- .../debugger/debuggerbreakpointlist.h | 2 +- .../debugger/gubed/gubedsettings.cpp | 2 +- .../debugger/gubed/quantadebuggergubed.cpp | 62 ++++---- .../debugger/quantadebuggerinterface.cpp | 18 +-- quanta/components/framewizard/treenode.cpp | 2 +- quanta/components/framewizard/treenode.h | 2 +- .../framewizard/visualframeeditor.cpp | 38 ++--- quanta/components/tableeditor/tableeditor.cpp | 18 +-- quanta/dialogs/actionconfigdialog.cpp | 48 +++--- quanta/dialogs/dtepeditdlg.cpp | 2 +- quanta/dialogs/dtepeditdlgs.ui | 4 +- quanta/dialogs/dtepstructureeditdlgs.ui | 4 +- quanta/dialogs/settings/abbreviation.cpp | 8 +- quanta/dialogs/settings/filemasks.cpp | 6 +- quanta/dialogs/specialchardialog.cpp | 6 +- quanta/dialogs/tagdialogs/corewidgetdlg.cpp | 12 +- quanta/dialogs/tagdialogs/tagattr.cpp | 4 +- quanta/dialogs/tagdialogs/tagattr.h | 2 +- quanta/dialogs/tagdialogs/tagdialog.cpp | 8 +- quanta/dialogs/tagdialogs/tagimgdlg.cpp | 16 +- quanta/dialogs/tagdialogs/tagimgdlgdata.cpp | 2 +- quanta/dialogs/tagdialogs/tagmaildlg.cpp | 10 +- quanta/dialogs/tagdialogs/tagwidget.cpp | 8 +- quanta/dialogs/tagdialogs/tagxml.cpp | 30 ++-- quanta/messages/annotationoutput.cpp | 20 +-- quanta/messages/messageitem.cpp | 6 +- quanta/messages/messageoutput.cpp | 2 +- quanta/parsers/dtd/dtd.cpp | 60 ++++---- quanta/parsers/dtd/dtdparser.cpp | 4 +- quanta/parsers/node.cpp | 8 +- quanta/parsers/parser.cpp | 56 +++---- quanta/parsers/parsercommon.cpp | 6 +- quanta/parsers/qtag.cpp | 14 +- quanta/parsers/sagroupparser.cpp | 30 ++-- quanta/parsers/saparser.cpp | 24 +-- quanta/parsers/tag.cpp | 18 +-- quanta/parts/kafka/htmldocumentproperties.cpp | 14 +- quanta/parts/kafka/htmlenhancer.cpp | 6 +- quanta/parts/kafka/kafkacommon.cpp | 14 +- quanta/parts/kafka/wkafkapart.cpp | 34 ++--- quanta/plugins/quantaplugin.cpp | 2 +- quanta/plugins/quantaplugineditor.cpp | 6 +- quanta/plugins/quantaplugininterface.cpp | 4 +- quanta/project/eventeditordlg.cpp | 8 +- quanta/project/membereditdlg.cpp | 2 +- quanta/project/project.cpp | 34 ++--- quanta/project/project.h | 2 +- quanta/project/projectlist.cpp | 24 +-- quanta/project/projectlist.h | 10 +- quanta/project/projectnewgeneral.cpp | 2 +- quanta/project/projectnewlocal.cpp | 14 +- quanta/project/projectnewweb.cpp | 6 +- quanta/project/projectprivate.cpp | 40 ++--- quanta/project/projectupload.cpp | 10 +- quanta/project/rescanprj.cpp | 4 +- quanta/project/uploadprofiles.cpp | 2 +- quanta/quanta_uml.xmi | 12 +- quanta/scripts/dwt.pl | 8 +- quanta/scripts/gubed_install.kmdr | 4 +- quanta/scripts/tidy.kmdr | 2 +- quanta/src/dcopquanta.cpp | 12 +- quanta/src/dcopsettings.cpp | 6 +- quanta/src/document.cpp | 142 +++++++++--------- quanta/src/document.h | 4 +- quanta/src/dtds.cpp | 42 +++--- quanta/src/dtds.h | 10 +- quanta/src/kqapp.cpp | 2 +- quanta/src/quanta.cpp | 114 +++++++------- quanta/src/quanta_init.cpp | 26 ++-- quanta/src/quantadoc.cpp | 8 +- quanta/src/quantaview.cpp | 6 +- quanta/src/viewmanager.cpp | 8 +- quanta/treeviews/basetreeview.cpp | 20 +-- quanta/treeviews/doctreeview.cpp | 10 +- quanta/treeviews/filestreeview.cpp | 20 +-- quanta/treeviews/projecttreeview.cpp | 18 +-- quanta/treeviews/scripttreeview.cpp | 4 +- quanta/treeviews/servertreeview.cpp | 2 +- quanta/treeviews/structtreetag.cpp | 10 +- quanta/treeviews/structtreeview.cpp | 8 +- quanta/treeviews/tagattributeitems.cpp | 4 +- quanta/treeviews/tagattributetree.cpp | 2 +- quanta/treeviews/templatestreeview.cpp | 24 +-- quanta/treeviews/uploadtreeview.cpp | 4 +- quanta/utility/qpevents.cpp | 10 +- quanta/utility/quantabookmarks.cpp | 8 +- quanta/utility/quantabookmarks.h | 2 +- quanta/utility/quantacommon.cpp | 38 ++--- quanta/utility/quantanetaccess.cpp | 6 +- quanta/utility/tagaction.cpp | 70 ++++----- quanta/utility/tagactionmanager.cpp | 4 +- quanta/utility/toolbartabwidget.cpp | 8 +- 242 files changed, 1573 insertions(+), 1573 deletions(-) diff --git a/kfilereplace/commandengine.cpp b/kfilereplace/commandengine.cpp index aaf40f38..e8955556 100644 --- a/kfilereplace/commandengine.cpp +++ b/kfilereplace/commandengine.cpp @@ -89,11 +89,11 @@ TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg) Q_UNUSED(arg); TQString tempOpt = opt; - tempOpt.tqreplace("ln","l"); - tempOpt.tqreplace("sin","s"); - tempOpt.tqreplace("cos","c"); - tempOpt.tqreplace("arctan","a"); - tempOpt.tqreplace("exp","e"); + tempOpt.replace("ln","l"); + tempOpt.replace("sin","s"); + tempOpt.replace("cos","c"); + tempOpt.replace("arctan","a"); + tempOpt.replace("exp","e"); TQString program = "var=("+tempOpt+");print var"; TQString script = "echo '"+program+"' | bc -l;"; @@ -156,7 +156,7 @@ TQString CommandEngine::variableValue(const TQString &variable) s.remove("[$").remove("$]").remove(" "); - if(s.tqcontains(":") == 0) + if(s.contains(":") == 0) return variable; else { diff --git a/kfilereplace/configurationclasses.cpp b/kfilereplace/configurationclasses.cpp index 8d0ff303..bb66c3ef 100644 --- a/kfilereplace/configurationclasses.cpp +++ b/kfilereplace/configurationclasses.cpp @@ -104,12 +104,12 @@ ResultViewEntry::ResultViewEntry(TQString nkey, TQString ndata, bool regexp, boo int ResultViewEntry::lineNumber(const TQString& line) const { - return line.mid(0,m_pos).tqcontains('\n')+1; + return line.mid(0,m_pos).contains('\n')+1; } int ResultViewEntry::columnNumber(const TQString& line) const { - return(m_pos - line.tqfindRev('\n',m_pos)); + return(m_pos - line.findRev('\n',m_pos)); } void ResultViewEntry::incOccurrences() @@ -132,7 +132,7 @@ int ResultViewEntry::pos(const TQString& line) if(m_regexp) m_pos = m_rxKey.search(line,m_pos); else - m_pos = line.tqfind(m_key, m_pos, m_caseSensitive); + m_pos = line.find(m_key, m_pos, m_caseSensitive); return m_pos; } diff --git a/kfilereplace/configurationclasses.h b/kfilereplace/configurationclasses.h index e5fc77d4..0d36261b 100644 --- a/kfilereplace/configurationclasses.h +++ b/kfilereplace/configurationclasses.h @@ -52,7 +52,7 @@ const TQString rcSearchMode = "Search only mode"; const TQString rcBackupExtension = "Backup file extension"; const TQString rcIgnoreFiles = "Ignore files if there is no match"; const TQString rcNotifyOnErrors = "NotifyOnErrors"; -const TQString rcAskConfirmReplace = "Ask confirmation on tqreplace"; +const TQString rcAskConfirmReplace = "Ask confirmation on replace"; const TQString rcDontAskAgain = "Dont ask again"; // Default configuration options const TQString EncodingOption = "utf8"; diff --git a/kfilereplace/kaddstringdlg.h b/kfilereplace/kaddstringdlg.h index 6193cbae..0a3ee320 100644 --- a/kfilereplace/kaddstringdlg.h +++ b/kfilereplace/kaddstringdlg.h @@ -64,7 +64,7 @@ class KAddStringDlg : public KAddStringDlgS */ void raiseView(); /** - * Verifies whether 'lv' tqcontains 's' + * Verifies whether 'lv' contains 's' */ bool columnContains(TQListView* lv,const TQString& s, int column); void saveViewContentIntoMap(); diff --git a/kfilereplace/kfilereplacepart.cpp b/kfilereplace/kfilereplacepart.cpp index c68821d7..d6a5aa6d 100644 --- a/kfilereplace/kfilereplacepart.cpp +++ b/kfilereplace/kfilereplacepart.cpp @@ -464,7 +464,7 @@ void KFileReplacePart::resetActions() actionCollection()->action("new_project")->setEnabled(true); actionCollection()->action("search")->setEnabled(hasItems && searchOnlyMode); actionCollection()->action("file_simulate")->setEnabled(hasItems && !searchOnlyMode); - actionCollection()->action("tqreplace")->setEnabled(hasItems && !searchOnlyMode); + actionCollection()->action("replace")->setEnabled(hasItems && !searchOnlyMode); actionCollection()->action("save_results")->setEnabled(hasItems); actionCollection()->action("stop")->setEnabled(false); @@ -570,7 +570,7 @@ void KFileReplacePart::initGUI() (void)new KAction(i18n("Customize Search/Replace Session..."), "projectopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetNewParameters()), actionCollection(), "new_project"); (void)new KAction(i18n("&Search"), "filesearch", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSearchingOperation()), actionCollection(), "search"); (void)new KAction(i18n("S&imulate"), "filesimulate", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSimulatingOperation()), actionCollection(), "file_simulate"); - (void)new KAction(i18n("&Replace"), "filereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(slotReplacingOperation()), actionCollection(), "tqreplace"); + (void)new KAction(i18n("&Replace"), "filereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(slotReplacingOperation()), actionCollection(), "replace"); (void)new KAction(i18n("Sto&p"), "stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStop()), actionCollection(), "stop"); (void)new KAction(i18n("Cre&ate Report File..."), "filesaveas", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCreateReport()), actionCollection(), "save_results"); @@ -583,8 +583,8 @@ void KFileReplacePart::initGUI() (void)new KAction(i18n("&Save Strings List to File..."), "filesaveas", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsSave()), actionCollection(), "strings_save"); (void)new KAction(i18n("&Load Strings List From File..."), "unsortedList", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsLoad()), actionCollection(), "strings_load"); (void)new KRecentFilesAction(i18n("&Load Recent Strings Files"), "fileopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenRecentStringFile(const KURL&)), actionCollection(),"strings_load_recent"); - (void)new KAction(i18n("&Invert Current String (search <--> tqreplace)"), "invert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert"); - (void)new KAction(i18n("&Invert All Strings (search <--> tqreplace)"), "invert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsInvertAll()), actionCollection(), "strings_invert_all"); + (void)new KAction(i18n("&Invert Current String (search <--> replace)"), "invert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert"); + (void)new KAction(i18n("&Invert All Strings (search <--> replace)"), "invert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsInvertAll()), actionCollection(), "strings_invert_all"); // Options (void)new KToggleAction(i18n("&Include Sub-Folders"), "recursive_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionRecursive()), actionCollection(), "options_recursive"); @@ -630,7 +630,7 @@ void KFileReplacePart::freezeActions() actionCollection()->action("stop")->setEnabled(true); actionCollection()->action("file_simulate")->setEnabled(false); - actionCollection()->action("tqreplace")->setEnabled(false); + actionCollection()->action("replace")->setEnabled(false); actionCollection()->action("search")->setEnabled(false); actionCollection()->action("strings_add")->setEnabled(false); actionCollection()->action("strings_del")->setEnabled(false); @@ -1381,15 +1381,15 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa int pos; if(m_option->m_regularExpressions) - pos = line.tqfind(rxKey); + pos = line.find(rxKey); else - pos = line.tqfind(strKey, 0 ,m_option->m_caseSensitive); + pos = line.find(strKey, 0 ,m_option->m_caseSensitive); if(pos != -1) { atLeastOneStringFound = true; - int lineNumber = line.mid(0,pos).tqcontains('\n')+1; - int columnNumber = pos - line.tqfindRev('\n',pos); + int lineNumber = line.mid(0,pos).contains('\n')+1; + int columnNumber = pos - line.findRev('\n',pos); if (!item) item = new KListViewItem(rv); @@ -1418,7 +1418,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa if(m_option->m_regularExpressions) pos = rxKey.search(line,pos); else - pos = line.tqfind(strKey, pos ,m_option->m_caseSensitive); + pos = line.find(strKey, pos ,m_option->m_caseSensitive); while(pos != -1) { @@ -1429,8 +1429,8 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa atLeastOneStringFound = true; TQString msg, capturedText; - int lineNumber = line.mid(0,pos).tqcontains('\n')+1; - int columnNumber = pos - line.tqfindRev('\n',pos); + int lineNumber = line.mid(0,pos).contains('\n')+1; + int columnNumber = pos - line.findRev('\n',pos); if(m_option->m_regularExpressions) { @@ -1440,7 +1440,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa else { capturedText = line.mid(pos,strKey.length()); - pos = line.tqfind(strKey,pos+strKey.length()); + pos = line.find(strKey,pos+strKey.length()); } msg = i18n(" Line:%2, Col:%3 - \"%1\"").tqarg(capturedText).tqarg(TQString::number(lineNumber,10)).tqarg(TQString::number(columnNumber,10)); @@ -1569,7 +1569,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName) // Adds file to "load strings form file" menu TQStringList fileList = m_option->m_recentStringFileList; - if(!fileList.tqcontains(fileName)) + if(!fileList.contains(fileName)) { fileList.append(fileName); ((KRecentFilesAction* ) actionCollection()->action("strings_load_recent"))->setItems(fileList); @@ -1623,10 +1623,10 @@ bool KFileReplacePart::checkBeforeOperation() loadViewContent(); KListView* sv = m_view->getStringsView(); - // Checks if there are strings to tqreplace (not need in search operation) + // Checks if there are strings to replace (not need in search operation) if (sv->childCount() == 0) { - KMessageBox::error(m_w, i18n("There are no strings to search and tqreplace.")); + KMessageBox::error(m_w, i18n("There are no strings to search and replace.")); return false; } diff --git a/kfilereplace/kfilereplaceview.h b/kfilereplace/kfilereplaceview.h index 4e94081e..1402c0a7 100644 --- a/kfilereplace/kfilereplaceview.h +++ b/kfilereplace/kfilereplaceview.h @@ -52,7 +52,7 @@ class coord /** - * The view of KFiletqreplace. + * The view of KFilereplace. */ class KFileReplaceView : public KFileReplaceViewWdg { diff --git a/kfilereplace/knewprojectdlg.cpp b/kfilereplace/knewprojectdlg.cpp index 14221357..5aa5abc8 100644 --- a/kfilereplace/knewprojectdlg.cpp +++ b/kfilereplace/knewprojectdlg.cpp @@ -493,7 +493,7 @@ void KNewProjectDlg::setDatas(const TQString& directoryString, const TQString& f m_cbFilter->setEditText(filterString); } -bool KNewProjectDlg::tqcontains(TQListView* lv,const TQString& s, int column) +bool KNewProjectDlg::contains(TQListView* lv,const TQString& s, int column) { TQListViewItem* i = lv->firstChild(); while (i != 0) diff --git a/kfilereplace/knewprojectdlg.h b/kfilereplace/knewprojectdlg.h index 7459bacf..b0af6ff2 100644 --- a/kfilereplace/knewprojectdlg.h +++ b/kfilereplace/knewprojectdlg.h @@ -77,7 +77,7 @@ class KNewProjectDlg : public KNewProjectDlgS void saveFiltersList(); void saveBackupExtensionOptions(); - bool tqcontains(TQListView* lv,const TQString& s, int column); + bool contains(TQListView* lv,const TQString& s, int column); void setDatas(const TQString& directoryString, const TQString& filterString); void whatsThis(); }; diff --git a/kfilereplace/report.cpp b/kfilereplace/report.cpp index 5497b045..62e59173 100644 --- a/kfilereplace/report.cpp +++ b/kfilereplace/report.cpp @@ -60,7 +60,7 @@ void Report::createReportFile() columnReplaceWith = i18n("-"); } - TQString css = cssFileName.mid(cssFileName.tqfindRev("/")+1,cssFileName.length()-(cssFileName.tqfindRev("/")+1)); + TQString css = cssFileName.mid(cssFileName.findRev("/")+1,cssFileName.length()-(cssFileName.findRev("/")+1)); TQTextStream oTStream( &report ); oTStream << "\n" "" diff --git a/kfilereplace/whatthis.h b/kfilereplace/whatthis.h index 01c1e1f4..09f6ac80 100644 --- a/kfilereplace/whatthis.h +++ b/kfilereplace/whatthis.h @@ -31,7 +31,7 @@ namespace whatthisNameSpace const TQString lvStringsWhatthis = i18n("Shows a list of strings to search for (and if you specified it, a list of strings to replace with). Use the \"add strings\" dialog to edit your string list or double click on a string."); //KNewProjectDlg messages - const TQString cbLocationWhatthis = i18n("Base folder for operations of search/tqreplace. Insert path string here by hand or use the search button."); + const TQString cbLocationWhatthis = i18n("Base folder for operations of search/replace. Insert path string here by hand or use the search button."); const TQString cbFilterWhatthis = i18n("Shell-like wildcards. Example: \"*.html;*.txt;*.xml\"."); diff --git a/kimagemapeditor/drawzone.cpp b/kimagemapeditor/drawzone.cpp index 3ed3465a..275fb86f 100644 --- a/kimagemapeditor/drawzone.cpp +++ b/kimagemapeditor/drawzone.cpp @@ -238,7 +238,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e) drawStart=e->pos(); // Check if it's on picture if not // move it to the picture's border - if (!imageRect.tqcontains(drawStart)) { + if (!imageRect.contains(drawStart)) { if (drawStart.x()>imageRect.right()) drawStart.setX(imageRect.right()); if (drawStart.x()imageRect.right()) drawEnd.setX(imageRect.right()); if (drawEnd.x()selectionPoints()->count()>2) - && (currentArea->selectionPoints()->first()->tqcontains(drawEnd) + && (currentArea->selectionPoints()->first()->contains(drawEnd) || (e->button()==Qt::RightButton))) { currentArea->setFinished(true); @@ -528,7 +528,7 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e) // If outside the image // set it to the border - if (!imageRect.tqcontains(drawCurrent)) { + if (!imageRect.contains(drawCurrent)) { if (drawCurrent.x()>imageRect.right()) drawCurrent.setX(imageRect.right()); if (drawCurrent.x()pos(); // Check if it's on picture if not // move it to the picture's border - if (!imageRect.tqcontains(drawStart)) { + if (!imageRect.contains(drawStart)) { if (drawStart.x()>imageRect.right()) drawStart.setX(imageRect.right()); if (drawStart.x()imageRect.right()) drawEnd.setX(imageRect.right()); if (drawEnd.x()selectionPoints()->count()>2) - && (currentArea->selectionPoints()->first()->tqcontains(drawEnd) + && (currentArea->selectionPoints()->first()->contains(drawEnd) || (e->button()==RightButton))) { currentArea->setFinished(true); @@ -243,7 +243,7 @@ void ImageMap::contentsMouseMoveEvent(TQMouseEvent *e) { // If outside the image // set it to the border - if (!imageRect.tqcontains(drawCurrent)) { + if (!imageRect.contains(drawCurrent)) { if (drawCurrent.x()>imageRect.right()) drawCurrent.setX(imageRect.right()); if (drawCurrent.x()tqfind("src")) - src=*_imageTag->tqfind("src"); - if (_imageTag->tqfind("usemap")) - usemap=*_imageTag->tqfind("usemap"); + if (_imageTag->find("src")) + src=*_imageTag->find("src"); + if (_imageTag->find("usemap")) + usemap=*_imageTag->find("usemap"); setText(0,src); setText(1,usemap); diff --git a/kimagemapeditor/kimagemapeditor.cpp b/kimagemapeditor/kimagemapeditor.cpp index abc6edd1..5a08d551 100644 --- a/kimagemapeditor/kimagemapeditor.cpp +++ b/kimagemapeditor/kimagemapeditor.cpp @@ -1100,7 +1100,7 @@ void KImageMapEditor::slotSelectionChanged() for ( ; it.current() != 0L; ++it) { - if ( it.current()->listViewItem()->isSelected() != (list.tqcontainsRef(it.current()) > 0) ) + if ( it.current()->listViewItem()->isSelected() != (list.containsRef(it.current()) > 0) ) { it.current()->listViewItem()->isSelected() ? select( it.current() ) @@ -1280,7 +1280,7 @@ void KImageMapEditor::updateUpDownBtn() return; } // if the first Area is in the selection can't move up - if (list.tqfind( areas->getFirst() ) == -1) + if (list.find( areas->getFirst() ) == -1) { forwardOneAction->setEnabled(true); areaListView->upBtn->setEnabled(true); @@ -1293,7 +1293,7 @@ void KImageMapEditor::updateUpDownBtn() drawZone->repaintArea(*currentSelected); // if the last Area is in the selection can't move down - if (list.tqfind( areas->getLast() ) == -1) + if (list.find( areas->getLast() ) == -1) { backOneAction->setEnabled(true); areaListView->downBtn->setEnabled(true); @@ -1315,7 +1315,7 @@ void KImageMapEditor::deselectAll() Area* KImageMapEditor::onArea(const TQPoint & p) const { for (Area* s=areas->first();s!=0L;s=areas->next()) { - if (s->tqcontains(p)) + if (s->contains(p)) return s; } return 0L; @@ -1861,9 +1861,9 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c attr=new TQDict(getTagAttributes(s,temp)); origcode.append(temp); - if (attr->tqfind("tagname")) { + if (attr->find("tagname")) { - if (attr->tqfind("tagname")->lower()=="img") { + if (attr->find("tagname")->lower()=="img") { HtmlImgElement *el = new HtmlImgElement(origcode); el->imgTag = static_cast(attr); images->append(el->imgTag); @@ -1871,12 +1871,12 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c origcode = TQString(); } else - if (attr->tqfind("tagname")->lower()=="map") { + if (attr->find("tagname")->lower()=="map") { map = new MapTag(); - map->name=(*attr->tqfind("name")); + map->name=(*attr->find("name")); readMap=true; } else - if (attr->tqfind("tagname")->lower()=="/map") { + if (attr->find("tagname")->lower()=="/map") { readMap=false; maps->append(map); HtmlMapElement *el = new HtmlMapElement(origcode); @@ -1886,7 +1886,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c origcode = TQString(); } else if (readMap) { - if (attr->tqfind("tagname")->lower()=="area") { + if (attr->find("tagname")->lower()=="area") { map->prepend(attr); } } else { @@ -1924,7 +1924,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c if (images->count() == 1) { if (images->first()) { ImageTag* imgTag = images->first(); - TQString *src = imgTag->tqfind("src"); + TQString *src = imgTag->find("src"); if (src) imageUrl = KURL(url,*src); } @@ -1936,12 +1936,12 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c ImageTag* imageTag; for ( imageTag = images->first(); imageTag; imageTag = images->next() ) { - TQString *usemap = imageTag->tqfind("usemap"); + TQString *usemap = imageTag->find("usemap"); if (usemap) { // Remove the # TQString usemapName = usemap->right(usemap->length()-1); if (usemapName == map->name) { - TQString *src = imageTag->tqfind("src"); + TQString *src = imageTag->find("src"); if (src) imageUrl = KURL(url,*src); } @@ -2005,7 +2005,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c */ HtmlElement* KImageMapEditor::findHtmlElement(const TQString & containingText) { for (HtmlElement * el = _htmlContent.first(); el; el = _htmlContent.next() ) { - if (el->htmlCode.tqcontains(containingText,false)) { + if (el->htmlCode.contains(containingText,false)) { return el; } } @@ -2038,7 +2038,7 @@ void KImageMapEditor::addMap(const TQString & name = TQString()) { // if we found one add the new map right after the body tag if (bodyTag) { - uint index = _htmlContent.tqfind(bodyTag); + uint index = _htmlContent.find(bodyTag); // Add a newline before the map _htmlContent.insert(index+1, new HtmlElement("\n")); @@ -2160,8 +2160,8 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) { for (AreaTag *tag=map->first();tag!=0L;tag=map->next()) { TQString tqshape="rect"; - if (tag->tqfind("tqshape")) - tqshape=*tag->tqfind("tqshape"); + if (tag->find("tqshape")) + tqshape=*tag->find("tqshape"); Area::ShapeType type=Area::Rectangle; if (tqshape=="circle") @@ -2173,35 +2173,35 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) { Area* a=AreaCreator::create(type); - if (tag->tqfind("href")) - a->setAttribute("href",*tag->tqfind("href")); + if (tag->find("href")) + a->setAttribute("href",*tag->find("href")); - if (tag->tqfind("alt")) - a->setAttribute("alt",*tag->tqfind("alt")); + if (tag->find("alt")) + a->setAttribute("alt",*tag->find("alt")); - if (tag->tqfind("target")) - a->setAttribute("target",*tag->tqfind("target")); + if (tag->find("target")) + a->setAttribute("target",*tag->find("target")); - if (tag->tqfind("title")) - a->setAttribute("title",*tag->tqfind("title")); + if (tag->find("title")) + a->setAttribute("title",*tag->find("title")); - if (tag->tqfind("onclick")) - a->setAttribute("onclick",*tag->tqfind("onclick")); + if (tag->find("onclick")) + a->setAttribute("onclick",*tag->find("onclick")); - if (tag->tqfind("onmousedown")) - a->setAttribute("onmousedown",*tag->tqfind("onmousedown")); + if (tag->find("onmousedown")) + a->setAttribute("onmousedown",*tag->find("onmousedown")); - if (tag->tqfind("onmouseup")) - a->setAttribute("onmouseup",*tag->tqfind("onmouseup")); + if (tag->find("onmouseup")) + a->setAttribute("onmouseup",*tag->find("onmouseup")); - if (tag->tqfind("onmouseover")) - a->setAttribute("onmouseover",*tag->tqfind("onmouseover")); + if (tag->find("onmouseover")) + a->setAttribute("onmouseover",*tag->find("onmouseover")); - if (tag->tqfind("onmousemove")) - a->setAttribute("onmousemove",*tag->tqfind("onmousemove")); + if (tag->find("onmousemove")) + a->setAttribute("onmousemove",*tag->find("onmousemove")); - if (tag->tqfind("onmouseout")) - a->setAttribute("onmouseout",*tag->tqfind("onmouseout")); + if (tag->find("onmouseout")) + a->setAttribute("onmouseout",*tag->find("onmouseout")); @@ -2211,8 +2211,8 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) { continue; } - if (tag->tqfind("coords")) - a->setCoords(*tag->tqfind("coords")); + if (tag->find("coords")) + a->setCoords(*tag->find("coords")); a->setMoving(false); addArea(a); @@ -2375,7 +2375,7 @@ void KImageMapEditor::slotBackOne() // move every selected Area one step lower for (int i=areas->count()-2; i > -1; i--) { - if (list.tqfind( areas->at(i) ) > -1 ) + if (list.find( areas->at(i) ) > -1 ) { a = areas->at(i); areas->remove(a); @@ -2399,7 +2399,7 @@ void KImageMapEditor::slotForwardOne() // move every selected Area one step higher for (int i=1; i < (int)areas->count(); i++) { - if (list.tqfind( areas->at(i) ) > -1 ) + if (list.find( areas->at(i) ) > -1 ) { a = areas->at(i); areas->remove(a); @@ -2683,7 +2683,7 @@ void KImageMapEditor::addImage(const KURL & imgUrl) { HtmlElement *bodyEl = findHtmlElement("selectedImage(); if (selected) { - TQString *url = selected->tqfind("src"); + TQString *url = selected->find("src"); if (url) { setPicture(KURL(*url)); } @@ -2746,11 +2746,11 @@ void KImageMapEditor::imageUsemap() { TQString usemap; - if (imageTag->tqfind("usemap")) - usemap=*imageTag->tqfind("usemap"); + if (imageTag->find("usemap")) + usemap=*imageTag->find("usemap"); TQStringList maps = mapsListView->getMaps(); - int index = maps.tqfindIndex(usemap); + int index = maps.findIndex(usemap); if (index == -1) { maps.prepend(""); index = 0; @@ -2764,7 +2764,7 @@ void KImageMapEditor::imageUsemap() { i18n("Enter the usemap value:"), maps,index,true,&ok,widget()); if (ok) { - imageTag->tqreplace("usemap", new TQString(input)); + imageTag->replace("usemap", new TQString(input)); imagesListView->updateImage(imageTag); setModified(true); @@ -2772,7 +2772,7 @@ void KImageMapEditor::imageUsemap() { HtmlImgElement* imgEl = findHtmlImgElement(imageTag); imgEl->htmlCode = "<"; - TQString *tagName = imgEl->imgTag->tqfind("tagname"); + TQString *tagName = imgEl->imgTag->find("tagname"); imgEl->htmlCode += TQString(*tagName); TQDictIterator it( *imgEl->imgTag ); diff --git a/kimagemapeditor/kimearea.cpp b/kimagemapeditor/kimearea.cpp index 4a6be5be..e3cb169f 100644 --- a/kimagemapeditor/kimearea.cpp +++ b/kimagemapeditor/kimearea.cpp @@ -85,7 +85,7 @@ Area::~Area() { } -bool Area::tqcontains(const TQPoint &) const { +bool Area::contains(const TQPoint &) const { return false; } @@ -100,7 +100,7 @@ TQString Area::attribute(const TQString & name) const void Area::setAttribute(const TQString & name, const TQString & value) { - _attributes.tqreplace(name.lower(),value); + _attributes.replace(name.lower(),value); if (value.isEmpty()) _attributes.remove(name.lower()); } @@ -279,9 +279,9 @@ void Area::removeCoord(int pos) { bool Area::removeSelectionPoint(TQRect * r) { - if (_selectionPoints->tqcontains(r)) + if (_selectionPoints->contains(r)) { - removeCoord(_selectionPoints->tqfind(r)); + removeCoord(_selectionPoints->find(r)); return true; } @@ -447,7 +447,7 @@ TQRect* Area::onSelectionPoint(const TQPoint & p, double zoom) const r2.moveCenter(r2.center()*zoom); - if (r2.tqcontains(p)) + if (r2.contains(p)) { return r; @@ -683,8 +683,8 @@ TQString RectArea::coordsToString() const return retStr; } -bool RectArea::tqcontains(const TQPoint & p) const{ - return rect().tqcontains(p); +bool RectArea::contains(const TQPoint & p) const{ + return rect().contains(p); } void RectArea::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p) @@ -841,10 +841,10 @@ TQString CircleArea::coordsToString() const return retStr; } -bool CircleArea::tqcontains(const TQPoint & p) const +bool CircleArea::contains(const TQPoint & p) const { TQRegion r(_rect,TQRegion::Ellipse); - return r.tqcontains(p); + return r.contains(p); } void CircleArea::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p) @@ -1160,12 +1160,12 @@ int PolyArea::addCoord(const TQPoint & p) } -bool PolyArea::tqcontains(const TQPoint & p) const +bool PolyArea::contains(const TQPoint & p) const { // A line can't contain a point if (_coords->count() >2 ) { TQRegion r(*_coords); - return r.tqcontains(p); + return r.contains(p); } else return false; @@ -1338,7 +1338,7 @@ void AreaSelection::add(Area *a) for (Area* area = list.first(); area != 0L; area = list.next() ) { - if ( _areas->tqfind( area ) == -1 ) { + if ( _areas->find( area ) == -1 ) { _areas->append( area ); // Must come before area->setSelected area->setSelected( true ); } @@ -1346,7 +1346,7 @@ void AreaSelection::add(Area *a) } else { - if ( _areas->tqfind( a ) == -1 ) { + if ( _areas->find( a ) == -1 ) { _areas->append( a ); // Must come before a->setSelected a->setSelected( true ); } @@ -1357,7 +1357,7 @@ void AreaSelection::add(Area *a) void AreaSelection::remove(Area *a) { - if (_areas->tqfind(a) == -1) + if (_areas->find(a) == -1) return; a->setSelected( false ); @@ -1378,14 +1378,14 @@ void AreaSelection::reset() tqinvalidate(); } -bool AreaSelection::tqcontains(const TQPoint & p) const +bool AreaSelection::contains(const TQPoint & p) const { bool b=false; AreaListIterator it=getAreaListIterator(); for ( ; it.current() != 0L; ++it ) { - if ( it.current()->tqcontains( p ) ) + if ( it.current()->contains( p ) ) { b=true; break; @@ -1730,7 +1730,7 @@ bool AreaSelection::isMoving() const **/ bool AreaSelection::allAreasWithin(const TQRect & r) const { - if ( ! r.tqcontains(rect()) ) + if ( ! r.contains(rect()) ) { AreaListIterator it=getAreaListIterator(); diff --git a/kimagemapeditor/kimearea.h b/kimagemapeditor/kimearea.h index 5c084a02..8bf4b6e6 100644 --- a/kimagemapeditor/kimearea.h +++ b/kimagemapeditor/kimearea.h @@ -73,7 +73,7 @@ public: virtual Area* clone() const; // Default implementation; is specified by subclasses - virtual bool tqcontains(const TQPoint &) const; + virtual bool contains(const TQPoint &) const; // Default implementation; is specified by subclasses virtual TQString coordsToString() const; virtual void draw(TQPainter &); @@ -172,7 +172,7 @@ class RectArea : public Area virtual ~RectArea(); virtual Area* clone() const; - virtual bool tqcontains(const TQPoint & p) const; + virtual bool contains(const TQPoint & p) const; virtual TQString coordsToString() const; virtual void draw(TQPainter & p); virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); @@ -194,7 +194,7 @@ class CircleArea : public Area virtual ~CircleArea(); virtual Area* clone() const; - virtual bool tqcontains(const TQPoint & p) const; + virtual bool contains(const TQPoint & p) const; virtual TQString coordsToString() const; virtual void draw(TQPainter & p); virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); @@ -217,7 +217,7 @@ class PolyArea :public Area virtual ~PolyArea(); virtual Area* clone() const; - virtual bool tqcontains(const TQPoint & p) const; + virtual bool contains(const TQPoint & p) const; virtual TQString coordsToString() const; virtual void draw(TQPainter & p); virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); @@ -294,7 +294,7 @@ class AreaSelection : public Area { /** * Overiden Methods of the Area class */ - virtual bool tqcontains(const TQPoint & p) const; + virtual bool contains(const TQPoint & p) const; /** * diff --git a/kimagemapeditor/kimedialogs.cpp b/kimagemapeditor/kimedialogs.cpp index 4cb26986..cd7999f0 100644 --- a/kimagemapeditor/kimedialogs.cpp +++ b/kimagemapeditor/kimedialogs.cpp @@ -687,10 +687,10 @@ void ImageMapChooseDialog::initImageListTable(TQWidget* tqparent) { for (ImageTag *tag = images->first(); tag!=0L; tag=images->next()) { TQString src=""; TQString usemap=""; - if (tag->tqfind("src")) - src=*tag->tqfind("src"); - if (tag->tqfind("usemap")) - usemap=*tag->tqfind("usemap"); + if (tag->find("src")) + src=*tag->find("src"); + if (tag->find("usemap")) + usemap=*tag->find("usemap"); imageListTable->setText(row,0,src); imageListTable->setText(row,1,usemap); @@ -711,8 +711,8 @@ void ImageMapChooseDialog::slotImageChanged() { int i=imageListTable->currentRow(); TQImage pix; - if (images->at(i)->tqfind("src")) { - TQString str=*images->at(i)->tqfind("src"); + if (images->at(i)->find("src")) { + TQString str=*images->at(i)->find("src"); // relative url pixUrl=KURL(baseUrl,str); pix=TQImage(pixUrl.path()); diff --git a/kimagemapeditor/mapslistview.cpp b/kimagemapeditor/mapslistview.cpp index d215e157..b3a2758d 100644 --- a/kimagemapeditor/mapslistview.cpp +++ b/kimagemapeditor/mapslistview.cpp @@ -56,7 +56,7 @@ void MapsListView::addMaps(TQPtrList * maps) { } void MapsListView::selectMap(const TQString & name) { - TQListViewItem* item = _listView->tqfindItem(name,0); + TQListViewItem* item = _listView->findItem(name,0); if (item) { selectMap(item); } else @@ -83,7 +83,7 @@ TQString MapsListView::selectedMap() { } void MapsListView::removeMap(const TQString & name) { - TQListViewItem* item = _listView->tqfindItem(name,0); + TQListViewItem* item = _listView->findItem(name,0); if (item) { _listView->takeItem(item); _listView->setSelected(_listView->currentItem(),true); @@ -108,7 +108,7 @@ void MapsListView::slotItemRenamed(TQListViewItem* item) { void MapsListView::changeMapName(const TQString & oldName, const TQString & newName) { // kdDebug() << "MapsListView::changeMapName : " << oldName << " to " << newName << endl; - TQListViewItem* item = _listView->tqfindItem(oldName,0); + TQListViewItem* item = _listView->findItem(oldName,0); if (item) { item->setText(0,newName); // kdDebug() << "MapsListView::changeMapName : successful" << endl; diff --git a/kimagemapeditor/qextfileinfo.cpp b/kimagemapeditor/qextfileinfo.cpp index 072a854e..c3aad2a7 100644 --- a/kimagemapeditor/qextfileinfo.cpp +++ b/kimagemapeditor/qextfileinfo.cpp @@ -52,8 +52,8 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL) int pos1=0; for (;;) { - pos=path.tqfind("/"); - pos1=basePath.tqfind("/"); + pos=path.find("/"); + pos1=basePath.find("/"); if ( pos<0 || pos1<0 ) break; if ( path.left(pos+1 ) == basePath.left(pos1+1) ) { @@ -65,7 +65,7 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL) }; if ( basePath == "/" ) basePath=""; - int level = basePath.tqcontains("/"); + int level = basePath.contains("/"); for (int i=0; i=0 ) + while ( (pos = cutname.find("../")) >=0 ) { cutname.remove( 0, pos+3 ); cutdir.remove( cutdir.length()-1, 1 ); - cutdir.remove( cutdir.tqfindRev('/')+1 , 1000); + cutdir.remove( cutdir.findRev('/')+1 , 1000); } resultURL.setPath(TQDir::cleanDirPath(cutdir+cutname)); } diff --git a/klinkstatus/src/engine/linkchecker.cpp b/klinkstatus/src/engine/linkchecker.cpp index 32e17329..7efe5a45 100644 --- a/klinkstatus/src/engine/linkchecker.cpp +++ b/klinkstatus/src/engine/linkchecker.cpp @@ -554,7 +554,7 @@ void LinkChecker::checkRef() else { - i_ref = url.url().tqfind("#"); + i_ref = url.url().find("#"); url_base = url.url().left(i_ref); //kdDebug(23100) << "url_base: " << url_base << endl; diff --git a/klinkstatus/src/engine/linkfilter.cpp b/klinkstatus/src/engine/linkfilter.cpp index 92dee430..fe4020fe 100644 --- a/klinkstatus/src/engine/linkfilter.cpp +++ b/klinkstatus/src/engine/linkfilter.cpp @@ -35,10 +35,10 @@ bool LinkMatcher::matches(LinktqStatus const& link ) const { /* kdDebug() << link.absoluteUrl().url() << endl; kdDebug() << link.label() << endl; - kdDebug() << link.absoluteUrl().url().tqcontains(m_text) << endl; - kdDebug() << link.label().tqcontains(m_text) << endl; + kdDebug() << link.absoluteUrl().url().contains(m_text) << endl; + kdDebug() << link.label().contains(m_text) << endl; */ - return (link.absoluteUrl().url().tqcontains(m_text, false) || link.label().tqcontains(m_text, false)) && + return (link.absoluteUrl().url().contains(m_text, false) || link.label().contains(m_text, false)) && ResultView::displayableWithtqStatus(&link, m_status); } diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp index 02d85853..82c7350a 100644 --- a/klinkstatus/src/engine/searchmanager.cpp +++ b/klinkstatus/src/engine/searchmanager.cpp @@ -497,7 +497,7 @@ void SearchManager::checkLinksSimultaneously(vector const& links) slotLinkChecked(ls, 0); } - else if(ls->absoluteUrl().prettyURL().tqcontains("javascript:", false)) + else if(ls->absoluteUrl().prettyURL().contains("javascript:", false)) { ++ignored_links_; ls->setIgnored(true); @@ -749,7 +749,7 @@ bool SearchManager::generalDomain() const if(!check_parent_dirs_) return false; - int barra = domain_.tqfind('/'); + int barra = domain_.find('/'); if(barra != -1 && (uint)barra != domain_.length() - 1) { kdDebug(23100) << "Domain nao vago" << endl; @@ -813,7 +813,7 @@ void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker) KHTMLPart* SearchManager::htmlPart(TQString const& key_url) const { - if(!html_parts_.tqcontains(key_url)) + if(!html_parts_.contains(key_url)) return 0; return html_parts_[key_url]; diff --git a/klinkstatus/src/engine/searchmanager_impl.h b/klinkstatus/src/engine/searchmanager_impl.h index 0342428a..20000390 100644 --- a/klinkstatus/src/engine/searchmanager_impl.h +++ b/klinkstatus/src/engine/searchmanager_impl.h @@ -67,7 +67,7 @@ inline void SearchManager::setExternalDomainDepth(int depth) inline void SearchManager::setDomain(TQString const& domain) { - Q_ASSERT(domain.tqfind("http://") == -1); + Q_ASSERT(domain.find("http://") == -1); domain_ = domain; general_domain_ = generalDomain(); checked_general_domain_ = true; diff --git a/klinkstatus/src/parser/htmlparser.cpp b/klinkstatus/src/parser/htmlparser.cpp index ebe8e362..759553e1 100644 --- a/klinkstatus/src/parser/htmlparser.cpp +++ b/klinkstatus/src/parser/htmlparser.cpp @@ -131,11 +131,11 @@ int HtmlParser::endOfTag(TQString const& s, int index, TQChar end_of_tag) if( (uint)index >= s.length() ) return -1; - int _end_of_tag = s.tqfind(end_of_tag, index); + int _end_of_tag = s.find(end_of_tag, index); if(_end_of_tag == -1) return _end_of_tag; - int open_aspas = s.tqfind('"', index); + int open_aspas = s.find('"', index); if(open_aspas == -1) return _end_of_tag + 1; @@ -147,7 +147,7 @@ int HtmlParser::endOfTag(TQString const& s, int index, TQChar end_of_tag) else { - int close_aspas = s.tqfind('"', open_aspas + 1); + int close_aspas = s.find('"', open_aspas + 1); if(close_aspas != -1) return endOfTag(s, close_aspas + 1, end_of_tag); else @@ -259,7 +259,7 @@ void HtmlParser::parseNodesOfTypeBASE() if(inicio == -1 || !doc[inicio].isSpace()) return; - fim = doc.tqfind(">", inicio); + fim = doc.find(">", inicio); if(fim == -1) return; diff --git a/klinkstatus/src/parser/http.cpp b/klinkstatus/src/parser/http.cpp index 0a62a9a2..6e086739 100644 --- a/klinkstatus/src/parser/http.cpp +++ b/klinkstatus/src/parser/http.cpp @@ -34,8 +34,8 @@ void HttpResponseHeader::parseLocation() int location = findWord(cabecalho, "Location: "); Q_ASSERT(location != -1); - int fim_de_linha_1 = cabecalho.tqfind('\n', location); - int fim_de_linha_2 = cabecalho.tqfind('\r', location); + int fim_de_linha_1 = cabecalho.find('\n', location); + int fim_de_linha_2 = cabecalho.find('\r', location); Q_ASSERT(fim_de_linha_1 != -1 || fim_de_linha_2 != -1); @@ -67,11 +67,11 @@ TQString HttpResponseHeader::charset(TQString const& contentTypeHttpHeaderLine) if(contentTypeHttpHeaderLine.isEmpty()) return _charset; - int index = contentTypeHttpHeaderLine.tqfind("charset="); + int index = contentTypeHttpHeaderLine.find("charset="); if(index != -1) index += TQString("charset=").length(); else { - index = contentTypeHttpHeaderLine.tqfind("charset:"); + index = contentTypeHttpHeaderLine.find("charset:"); if(index != -1) index += TQString("charset:").length(); } diff --git a/klinkstatus/src/parser/mstring.cpp b/klinkstatus/src/parser/mstring.cpp index f84c5809..aa2cdec7 100644 --- a/klinkstatus/src/parser/mstring.cpp +++ b/klinkstatus/src/parser/mstring.cpp @@ -28,7 +28,7 @@ using namespace std; int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice) { - int indice = s.tqfind(palavra, a_partir_do_indice, false); + int indice = s.find(palavra, a_partir_do_indice, false); if(indice == -1) return indice; @@ -38,7 +38,7 @@ int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice int findChar(TQString const& s, TQChar letra, uint a_partir_do_indice) { - int index = s.tqfind(letra, a_partir_do_indice, false); + int index = s.find(letra, a_partir_do_indice, false); if(index == -1) return index; else @@ -173,7 +173,7 @@ vector tokenizeWordsSeparatedByDots(TQString s) if(inicio == -1) return v; - int fim = s.tqfind('.', inicio); + int fim = s.find('.', inicio); if(fim == -1) { v.push_back(s.mid(inicio)); @@ -200,7 +200,7 @@ vector tokenizeWordsSeparatedBy(TQString s, TQChar criteria) if(inicio == -1) return v; - int fim = s.tqfind(criteria, inicio); + int fim = s.find(criteria, inicio); if(fim == -1) { v.push_back(s.mid(inicio)); diff --git a/klinkstatus/src/parser/node.cpp b/klinkstatus/src/parser/node.cpp index ad5ce064..f83031c8 100644 --- a/klinkstatus/src/parser/node.cpp +++ b/klinkstatus/src/parser/node.cpp @@ -39,19 +39,19 @@ TQString Node::getAttribute(TQString const& atributo) { if(content_[inicio] == '"') { - fim = content_.tqfind("\"", inicio + 1); + fim = content_.find("\"", inicio + 1); tem_aspas_ou_plicas = true; } else if(content_[inicio] == '\'') { - fim = content_.tqfind("'", inicio + 1); + fim = content_.find("'", inicio + 1); tem_aspas_ou_plicas = true; } else { int fim_bloco = nextSpaceChar(content_, inicio + 1); - int fim_tag = content_.tqfind(">", inicio + 1); - int fim_aspas = content_.tqfind("\"", inicio + 1); + int fim_tag = content_.find(">", inicio + 1); + int fim_aspas = content_.find("\"", inicio + 1); if(fim_bloco == -1 && fim_tag == -1 && fim_aspas == -1) { @@ -137,7 +137,7 @@ void NodeLink::parseLinkLabel() do { - fim_tag = content_.tqfind(">", fim_tag); + fim_tag = content_.find(">", fim_tag); if(fim_tag != -1) proximo_caractere = TQChar(content_[++fim_tag]); @@ -147,7 +147,7 @@ void NodeLink::parseLinkLabel() if(fim_tag != -1) { - int fim_label = content_.tqfind("<", fim_tag); + int fim_label = content_.find("<", fim_tag); if(fim_label != -1) { @@ -183,7 +183,7 @@ void NodeMETA::parseAttributeURL() int aspas = -1; do { - aspas = attribute_url_.tqfind("\""); + aspas = attribute_url_.find("\""); if(aspas != -1) attribute_url_.remove(aspas, 1); } @@ -206,7 +206,7 @@ TQString NodeMETA::charset() const if(content.isEmpty()) return charset; - int index = content.tqfind("charset="); + int index = content.find("charset="); if(index != -1) { index += TQString("charset=").length(); diff --git a/klinkstatus/src/parser/node_impl.h b/klinkstatus/src/parser/node_impl.h index f1ebed13..bd62104b 100644 --- a/klinkstatus/src/parser/node_impl.h +++ b/klinkstatus/src/parser/node_impl.h @@ -404,8 +404,8 @@ inline TQString const& NodeTITLE::attributeTITLE() const inline void NodeTITLE::parseAttributeTITLE() { attribute_title_ = content_; - attribute_title_.tqreplace("", "", false); - attribute_title_.tqreplace("", "", false); + attribute_title_.replace("", "", false); + attribute_title_.replace("", "", false); attribute_title_.stripWhiteSpace(); //kdDebug(23100) << "TITLE: " << attribute_title_ << endl; diff --git a/klinkstatus/src/parser/url.cpp b/klinkstatus/src/parser/url.cpp index 173c734b..90a6e4e6 100644 --- a/klinkstatus/src/parser/url.cpp +++ b/klinkstatus/src/parser/url.cpp @@ -39,7 +39,7 @@ Node::LinkType Url::resolveLinkType(TQString const& url) return Node::file_href; else if(findWord(KCharsets::resolveEntities(url), "MAILTO:") != -1) return Node::mailto; - else if( (int)url.tqfind(":/") != -1) + else if( (int)url.find(":/") != -1) return Node::href; else return Node::relative; diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp index bcfef44c..f342faa7 100644 --- a/klinkstatus/src/ui/klshistorycombo.cpp +++ b/klinkstatus/src/ui/klshistorycombo.cpp @@ -143,7 +143,7 @@ void KLSHistoryCombo::selectWord(TQKeyEvent *e) if( allow_space_break && text[pos].isSpace() && count > 1 ) break; } - while( pos >= 0 && (chars.tqfindIndex(text[pos]) == -1 || count <= 1) ); + while( pos >= 0 && (chars.findIndex(text[pos]) == -1 || count <= 1) ); if( e->state() & ShiftButton ) { @@ -172,7 +172,7 @@ void KLSHistoryCombo::selectWord(TQKeyEvent *e) if( allow_space_break && text[pos].isSpace() ) break; } - while( pos < (int) text.length() && chars.tqfindIndex(text[pos]) == -1 ); + while( pos < (int) text.length() && chars.findIndex(text[pos]) == -1 ); if( e->state() & ShiftButton ) { diff --git a/klinkstatus/src/ui/tablelinkstatus.cpp b/klinkstatus/src/ui/tablelinkstatus.cpp index d7bca792..9fbd3b31 100644 --- a/klinkstatus/src/ui/tablelinkstatus.cpp +++ b/klinkstatus/src/ui/tablelinkstatus.cpp @@ -587,9 +587,9 @@ TQColor const& TableItemURL::textStatusColor() const if(linktqStatus()->errorOccurred()) { - if(linktqStatus()->error().tqcontains(i18n( "Timeout" ))) + if(linktqStatus()->error().contains(i18n( "Timeout" ))) return darkMagenta; - else if(linktqStatus()->error().tqcontains(i18n( "not supported" ))) + else if(linktqStatus()->error().contains(i18n( "not supported" ))) return lightGray; else return red; @@ -652,7 +652,7 @@ void TableItemtqStatus::setPixmap() if(linktqStatus()->errorOccurred()) { - if(linktqStatus()->error().tqcontains(i18n( "Timeout" ))) + if(linktqStatus()->error().contains(i18n( "Timeout" ))) { TQTableItem::setPixmap(SmallIcon("kalarm")); } diff --git a/klinkstatus/src/utils/utils.cpp b/klinkstatus/src/utils/utils.cpp index 83956dee..25384b4b 100644 --- a/klinkstatus/src/utils/utils.cpp +++ b/klinkstatus/src/utils/utils.cpp @@ -131,14 +131,14 @@ TQString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = { void decode(TQString& url) { - if( (int)url.tqfind('&') != -1) + if( (int)url.find('&') != -1) { for(int i = 0; i != NUMBER_OF_HTML_CODES; ++i) { - int index = url.tqfind(htmlDocCharset[i][0]); + int index = url.find(htmlDocCharset[i][0]); if(index != - 1) { - url.tqreplace(htmlDocCharset[i][0], htmlDocCharset[i][1]); + url.replace(htmlDocCharset[i][0], htmlDocCharset[i][1]); } } } @@ -146,15 +146,15 @@ void decode(TQString& url) /* void decode(string& url) { - if( (int)url.tqfind('&') != -1) + if( (int)url.find('&') != -1) { for(int i = 0; i != NUMBER_OF_HTML_CODES; ++i) { - int index = url.tqfind(htmlDocCharset[i][0].latin1()); + int index = url.find(htmlDocCharset[i][0].latin1()); if(index != - 1) { int length = htmlDocCharset[i][0].length(); - url.tqreplace(index, length, htmlDocCharset[i][1].latin1()); + url.replace(index, length, htmlDocCharset[i][1].latin1()); } } } diff --git a/klinkstatus/src/utils/xsl.cpp b/klinkstatus/src/utils/xsl.cpp index 320f14cd..541c0498 100644 --- a/klinkstatus/src/utils/xsl.cpp +++ b/klinkstatus/src/utils/xsl.cpp @@ -349,7 +349,7 @@ void XSLT::setXSLT( const TQString &_document ) } //kdDebug( 14010 ) << k_funcinfo << "Translated text: " << trans << endl; // Add "" and "" to length, hence the '+ 27' - document.tqreplace( uint( pos ), orig.length() + 27, trans ); + document.replace( uint( pos ), orig.length() + 27, trans ); } #ifdef RAWXSL @@ -379,7 +379,7 @@ void XSLT::setXSLT( const TQString &_document ) //We have a flag. Enable it; TQCString flagData( (const char*)child->content ); - if( flagData.tqcontains( "Flag:" ) ) + if( flagData.contains( "Flag:" ) ) { flags += flagData.mid(5); } diff --git a/kommander/Kommander-TODO.kno b/kommander/Kommander-TODO.kno index d90ec71b..824c9063 100644 --- a/kommander/Kommander-TODO.kno +++ b/kommander/Kommander-TODO.kno @@ -147,7 +147,7 @@
  • detect incorrect path at shebang, allow user to choose correct one and remeber that pair
-

If we keep the old parser.


Make it possible to use any language with Kommander. The idea is to replace Kommander specials with language specific code in a way that it will not break conditions and loops, like now. example:
#!/bin/bash
array="1 2 3 4 5"
for i in $array do
@Label.setText($i)
done

This does not work now. The idea is to tqreplace @Widget.method() with a language specific DCOP call.
If the language has DCOP bindings, use those bindings to execute the dcop call. If not, use the command line
DCOP application. This is slower, but always works. In the above case, Kommander would tqreplace
@Label.setText($i)
with
dcop kmdr-executor-PID KommanderIf setText Label $i

Kommander will have description files for each supported language about how to execute DCOP calls.
If the language has DCOP bindings, this description tells the syntax of the bindings. If it doesn't have, the description gives a way how to execute external applications. This should always exists, as all languages can execute external applications.

In KDE4, of course use DBUS instead of DCOP.

+

If we keep the old parser.


Make it possible to use any language with Kommander. The idea is to replace Kommander specials with language specific code in a way that it will not break conditions and loops, like now. example:
#!/bin/bash
array="1 2 3 4 5"
for i in $array do
@Label.setText($i)
done

This does not work now. The idea is to replace @Widget.method() with a language specific DCOP call.
If the language has DCOP bindings, use those bindings to execute the dcop call. If not, use the command line
DCOP application. This is slower, but always works. In the above case, Kommander would replace
@Label.setText($i)
with
dcop kmdr-executor-PID KommanderIf setText Label $i

Kommander will have description files for each supported language about how to execute DCOP calls.
If the language has DCOP bindings, this description tells the syntax of the bindings. If it doesn't have, the description gives a way how to execute external applications. This should always exists, as all languages can execute external applications.

In KDE4, of course use DBUS instead of DCOP.

\NewEntry 1 Aliases diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp index 54a5e0f9..a9437ad7 100644 --- a/kommander/editor/actiondnd.cpp +++ b/kommander/editor/actiondnd.cpp @@ -329,7 +329,7 @@ void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); - else if ( w->isWidgetType() && formWindow->widgets()->tqfind( w ) ) { + else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) { formWindow->clearSelection( false ); formWindow->selectWidget( w ); } @@ -343,7 +343,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * const int ID_DELETE = 1; const int ID_SEP = 2; const int ID_DELTOOLBAR = 3; - TQMap::Iterator it = actionMap.tqfind( (TQWidget*)o ); + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); if ( it != actionMap.end() && (*it)->inherits( "QSeparatorAction" ) ) menu.insertItem( i18n("Delete Separator" ), ID_DELETE ); else @@ -353,11 +353,11 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * menu.insertItem( i18n("Delete Toolbar" ), ID_DELTOOLBAR ); int res = menu.exec( e->globalPos() ); if ( res == ID_DELETE ) { - TQMap::Iterator it = actionMap.tqfind( (TQWidget*)o ); + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); if ( it == actionMap.end() ) return; TQAction *a = *it; - int index = actionList.tqfind( a ); + int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ). tqarg( a->name() ).tqarg( caption() ), @@ -367,7 +367,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * } else if ( res == ID_SEP ) { calcIndicatorPos( mapFromGlobal( e->globalPos() ) ); TQAction *a = new QSeparatorAction( 0 ); - int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; if ( !insertAnchor ) @@ -413,11 +413,11 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) void QDesignerToolBar::removeWidget( TQWidget *w ) { - TQMap::Iterator it = actionMap.tqfind( w ); + TQMap::Iterator it = actionMap.find( w ); if ( it == actionMap.end() ) return; TQAction *a = *it; - int index = actionList.tqfind( a ); + int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ). tqarg( a->name() ).tqarg( caption() ), @@ -434,13 +434,13 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) return; if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) return; - TQMap::Iterator it = actionMap.tqfind( (TQWidget*)o ); + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); if ( it == actionMap.end() ) return; TQAction *a = *it; if ( !a ) return; - int index = actionList.tqfind( a ); + int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ). tqarg( a->name() ).tqarg( caption() ), @@ -457,7 +457,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) drag->setEncodedData( TQCString( s.latin1() ) ); drag->setPixmap( a->iconSet().pixmap() ); if ( a->inherits( "QDesignerAction" ) ) { - if ( formWindow->widgets()->tqfind( ( (QDesignerAction*)a )->widget() ) ) + if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) formWindow->selectWidget( TQT_TQOBJECT(( (QDesignerAction*)a )->widget()), false ); } if ( !drag->drag() ) { @@ -519,7 +519,7 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) indicator->hide(); TQAction *a = 0; - int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; if ( !insertAnchor ) @@ -534,7 +534,7 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) a = (QDesignerActionGroup*)s.toLong(); } - if ( actionList.tqfindRef( a ) != -1 ) { + if ( actionList.findRef( a ) != -1 ) { TQMessageBox::warning( MainWindow::self, i18n("Insert/Move Action" ), i18n("Action '%1' has already been added to this toolbar.\n" "An Action may only occur once in a given toolbar." ). @@ -665,7 +665,7 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p ) installEventFilters( w ); MainWindow::self->formWindow()->insertWidget( w, true ); QDesignerAction *a = new QDesignerAction( w, tqparent() ); - int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; if ( !insertAnchor ) @@ -738,7 +738,7 @@ void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) menu.insertItem( i18n("Rename Item..." ), 2 ); int res = menu.exec( e->globalPos() ); if ( res == 1 ) { - TQMenuItem *item = tqfindItem( idAt( itm ) ); + TQMenuItem *item = findItem( idAt( itm ) ); RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).tqarg( item->text() ), formWindow, (TQMainWindow*)parentWidget(), this, @@ -789,8 +789,8 @@ void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) int itm = itemAtPos( dragStartPos ); if ( itm == -1 ) return; - TQPopupMenu *popup = tqfindItem( idAt( itm ) )->popup(); - TQString txt = tqfindItem( idAt( itm ) )->text(); + TQPopupMenu *popup = findItem( idAt( itm ) )->popup(); + TQString txt = findItem( idAt( itm ) )->text(); removeItemAt( itm ); TQStoredDrag *drag = new TQStoredDrag( "application/x-designer-menuitem", this ); @@ -874,8 +874,8 @@ void QDesignerMenuBar::dropEvent( TQDropEvent *e ) return; e->accept(); TQString s( e->tqencodedData( "application/x-designer-menuitem" ) ); - TQString s1 = s.left( s.tqfind( "/" ) ); - TQString s2 = s.mid( s.tqfind( "/" ) + 1 ); + TQString s1 = s.left( s.find( "/" ) ); + TQString s2 = s.mid( s.find( "/" ) + 1 ); TQPopupMenu *popup = (TQPopupMenu*)s1.toLong(); // #### huha, that is evil TQString txt = s2; insertItem( txt, popup, -1, insertAt ); @@ -948,14 +948,14 @@ void QDesignerMenuBar::setItemName( const TQCString &s ) { if ( itemNum < 0 || itemNum >= (int)count() ) return; - tqfindItem( idAt( itemNum ) )->popup()->setName( s ); + findItem( idAt( itemNum ) )->popup()->setName( s ); } TQCString QDesignerMenuBar::itemName() const { if ( itemNum < 0 || itemNum >= (int)count() ) return ""; - return tqfindItem( idAt( itemNum ) )->popup()->name(); + return findItem( idAt( itemNum ) )->popup()->name(); } @@ -1155,7 +1155,7 @@ void QDesignerPopupMenu::dropEvent( TQDropEvent *e ) } } - if ( actionList.tqfindRef( a ) != -1 ) { + if ( actionList.findRef( a ) != -1 ) { TQMessageBox::warning( MainWindow::self, i18n("Insert/Move Action" ), i18n("Action '%1' has already been added to this menu.\n" "An Action may only occur once in a given menu." ). diff --git a/kommander/editor/actiondnd.h b/kommander/editor/actiondnd.h index 66a87c5b..c041f9db 100644 --- a/kommander/editor/actiondnd.h +++ b/kommander/editor/actiondnd.h @@ -44,7 +44,7 @@ public: : TQActionGroup( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ) {} TQWidget *widget() const { return wid; } - TQWidget *widget( TQAction *a ) const { return *widgets.tqfind( a ); } + TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); } int index() const { return idx; } protected: diff --git a/kommander/editor/asciivalidator.cpp b/kommander/editor/asciivalidator.cpp index 947b3ec1..33381e0b 100644 --- a/kommander/editor/asciivalidator.cpp +++ b/kommander/editor/asciivalidator.cpp @@ -67,7 +67,7 @@ TQValidator::State AsciiValidator::validate( TQString &s, int & ) const } } - if ( allowedChars.tqfind( s[ i ] ) != -1 ) + if ( allowedChars.find( s[ i ] ) != -1 ) continue; s[i] = '_'; diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp index 76bf67f6..106e0ab0 100644 --- a/kommander/editor/assoctexteditorimpl.cpp +++ b/kommander/editor/assoctexteditorimpl.cpp @@ -113,7 +113,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, if (a) a->plug(popup); popup->insertSeparator(); - a = view->actionCollection()->action("edit_tqfind"); + a = view->actionCollection()->action("edit_find"); if (a) a->plug(popup); a = view->actionCollection()->action("edit_find_next"); @@ -122,7 +122,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, a = view->actionCollection()->action("edit_find_prev"); if (a) a->plug(popup); - a = view->actionCollection()->action("edit_tqreplace"); + a = view->actionCollection()->action("edit_replace"); if (a) a->plug(popup); popup->insertSeparator(); @@ -246,7 +246,7 @@ void AssocTextEditor::setWidget(TQWidget *a_widget) undoIf->clearUndo(); - if (openedWidgets.tqcontains(m_widget)) + if (openedWidgets.contains(m_widget)) { if (readOnlyAction && !readOnly) readOnlyAction->activate(); @@ -317,7 +317,7 @@ TQStringList AssocTextEditor::buildWidgetList() TQMetaObject *metaObj = it.current()->tqmetaObject(); if(metaObj) { - int id = metaObj->tqfindProperty("KommanderWidget", true); + int id = metaObj->findProperty("KommanderWidget", true); const TQMetaProperty *metaProp = metaObj->property(id, true); if(metaProp && metaProp->isValid()) pExists = true; @@ -363,7 +363,7 @@ void AssocTextEditor::stateChanged(int a_index) { if (hlIf->hlModeSectionName(i) == "Scripts") highlightPopup->insertItem(hlIf->hlModeName(i), i); - if (hlIf->hlModeName(i).tqcontains(hlType, false) > 0) + if (hlIf->hlModeName(i).contains(hlType, false) > 0) { hlIf->setHlMode(i); highlightPopup->setItemChecked(i, true); @@ -464,7 +464,7 @@ TQString AssocTextEditor::widgetToString(TQWidget* widget, bool formatted) TQWidget* AssocTextEditor::widgetFromString(const TQString& name) { TQString realname = name; - int i = realname.tqfind(' '); + int i = realname.find(' '); if (i != -1) realname.truncate(i); return m_widgetList[realname]; diff --git a/kommander/editor/choosewidgetimpl.cpp b/kommander/editor/choosewidgetimpl.cpp index 4fe816e2..e440a8fd 100644 --- a/kommander/editor/choosewidgetimpl.cpp +++ b/kommander/editor/choosewidgetimpl.cpp @@ -93,7 +93,7 @@ TQString ChooseWidget::selection() void ChooseWidget::textChanged(const TQString& text) { - TQListViewItem* item = widgetView->tqfindItem(text, 0, TQt::BeginsWith); + TQListViewItem* item = widgetView->findItem(text, 0, TQt::BeginsWith); if (item) { widgetView->setCurrentItem(item); widgetView->ensureItemVisible(item); @@ -106,7 +106,7 @@ bool ChooseWidget::isKommanderWidget(TQObject* w) TQMetaObject *metaObj = w->tqmetaObject(); if (metaObj) { - int id = metaObj->tqfindProperty("KommanderWidget", true); + int id = metaObj->findProperty("KommanderWidget", true); const TQMetaProperty *metaProp = metaObj->property(id, true); if (metaProp && metaProp->isValid()) pExists = true; diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index df4568fb..40a1c088 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -396,7 +396,7 @@ void DeleteCommand::unexecute() w->setName( s ); formWindow()->widgets()->insert( w, w ); formWindow()->selectWidget( TQT_TQOBJECT(w) ); - TQValueList conns = *connections.tqfind( w ); + TQValueList conns = *connections.find( w ); TQValueList::Iterator it = conns.begin(); for ( ; it != conns.end(); ++it ) { MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, @@ -461,7 +461,7 @@ bool SetPropertyCommand::canMerge( Command *c ) { SetPropertyCommand *cmd = (SetPropertyCommand*)c; const TQMetaProperty *p = - widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( propName, true ), true ); + widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( propName, true ), true ); if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) return true; @@ -532,16 +532,16 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ editor->propertyList()->setCurrentProperty( propName ); const TQMetaProperty *p = - widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( propName, true ), true ); + widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( propName, true ), true ); if ( !p ) { if ( propName == "hAlign" ) { - p = widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( "tqalignment", true ), true ); + p = widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( "tqalignment", true ), true ); int align = widget->property( "tqalignment" ).toInt(); align &= ~( AlignHorizontal_Mask ); align |= p->keyToValue( currentItemText ); widget->setProperty( "tqalignment", TQVariant( align ) ); } else if ( propName == "vAlign" ) { - p = widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( "tqalignment", true ), true ); + p = widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( "tqalignment", true ), true ); int align = widget->property( "tqalignment" ).toInt(); align &= ~( AlignVertical_Mask ); align |= p->keyToValue( currentItemText ); @@ -1522,7 +1522,7 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T col.text = table->horizontalHeader()->label( i ); if ( table->horizontalHeader()->iconSet( i ) ) col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); - col.field = *columnFields.tqfind( col.text ); + col.field = *columnFields.find( col.text ); oldColumns.append( col ); } for ( i = 0; i < table->verticalHeader()->count(); ++i ) { diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp index e6a48fde..62110d73 100644 --- a/kommander/editor/connectioneditorimpl.cpp +++ b/kommander/editor/connectioneditorimpl.cpp @@ -109,7 +109,7 @@ ConnectionEditor::ConnectionEditor(TQWidget* tqparent, TQObject* sndr, TQObject* !it.current()->inherits("Spacer") && qstrcmp(it.current()->name(), "central widget") && !m_formWindow->isMainContainer(TQT_TQOBJECT(it.current())) && - !lst.tqcontains(it.current()->name())) + !lst.contains(it.current()->name())) lst << it.current()->name(); } @@ -213,7 +213,7 @@ void ConnectionEditor::disconnectClicked() if (!p_item) return; - TQMap ::Iterator it = m_connections.tqfind(p_item); + TQMap ::Iterator it = m_connections.find(p_item); if (it != m_connections.end()) m_connections.remove(it); delete p_item; @@ -277,7 +277,7 @@ void ConnectionEditor::senderChanged(const TQString& s) TQStrList p_sigs = m_sender->tqmetaObject()->signalNames(true); signalBox->clear(); for (TQStrListIterator it(p_sigs); it.current(); ++it) - if (!isSignalIgnored(it.current()) && !signalBox->tqfindItem(it.current(), TQt::ExactMatch)) + if (!isSignalIgnored(it.current()) && !signalBox->findItem(it.current(), TQt::ExactMatch)) signalBox->insertItem(it.current()); if (TQT_BASE_OBJECT(m_sender) == TQT_BASE_OBJECT(m_formWindow->mainContainer())) signalBox->insertStringList(MetaDataBase::signalList(TQT_TQOBJECT(m_formWindow))); @@ -298,7 +298,7 @@ void ConnectionEditor::receiverChanged(const TQString& s) for (int i = 0; i < n; ++i) { const TQMetaData* md = m_receiver->tqmetaObject()->slot(i, true); - if (!isSlotIgnored(md) && !slotBox->tqfindItem(md->tqt_mo_ci_name, TQt::ExactMatch)) + if (!isSlotIgnored(md) && !slotBox->findItem(md->tqt_mo_ci_name, TQt::ExactMatch)) slotBox->insertItem(md->tqt_mo_ci_name); } slotBox->sort(); diff --git a/kommander/editor/formfile.cpp b/kommander/editor/formfile.cpp index 90b9ba18..ff2e4c06 100644 --- a/kommander/editor/formfile.cpp +++ b/kommander/editor/formfile.cpp @@ -80,7 +80,7 @@ void FormFile::setFileName(const TQString &fn) return; if (fn.isEmpty()) { fileNameTemp = true; - if (filename.tqfind("unnamed")) + if (filename.find("unnamed")) filename = createUnnamedFileName(); return; } @@ -264,7 +264,7 @@ TQString FormFile::formName() const line = ts.readLine(); if (!className.isEmpty()) { - int end = line.tqfind(""); + int end = line.find(""); if (end == -1) className += line; else @@ -275,9 +275,9 @@ TQString FormFile::formName() const continue; } int start; - if ((start = line.tqfind("")) != -1) + if ((start = line.find("")) != -1) { - int end = line.tqfind(""); + int end = line.find(""); if (end == -1) className = line.mid(start + 7); else diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index 590d1c47..55c1b142 100644 --- a/kommander/editor/formwindow.cpp +++ b/kommander/editor/formwindow.cpp @@ -81,7 +81,7 @@ static void setCursorToAll(const TQCursor &c, TQWidget *start) static void restoreCursors(TQWidget *start, FormWindow *fw) { - if (fw->widgets()->tqfind(start)) + if (fw->widgets()->find(start)) start->setCursor(MetaDataBase::cursor(start)); else start->setCursor(TQt::ArrowCursor); @@ -210,7 +210,7 @@ void FormWindow::paintGrid(TQWidget *w, TQPaintEvent *e) TQPixmap grid; TQString grid_name; grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y()); - if(!TQPixmapCache::tqfind(grid_name, grid)) { + if(!TQPixmapCache::find(grid_name, grid)) { grid = TQPixmap(350 + (350 % mainWindow()->grid().x()), 350 + (350 % mainWindow()->grid().y())); grid.fill(tqcolorGroup().color(TQColorGroup::Foreground)); TQBitmap tqmask(grid.width(), grid.height()); @@ -362,10 +362,10 @@ void FormWindow::insertWidget() TQObject *o = it.current(); ++it; if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo(this) && - insertedWidgets.tqfind((TQWidget*)o) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w)) + insertedWidgets.find((TQWidget*)o) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w)) { TQRect r2(((TQWidget*)o)->pos(), ((TQWidget*)o)->size()); - if (r.tqcontains(r2)) + if (r.contains(r2)) lst.append((TQWidget*)o); } } @@ -461,7 +461,7 @@ void FormWindow::handleContextMenu(TQContextMenuEvent *e, TQWidget *w) // if widget is laid out, find the first non-laid out super-widget TQWidget *realWidget = w; // but store the original one while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) != - WidgetFactory::NoLayout || !insertedWidgets.tqfind(w))) + WidgetFactory::NoLayout || !insertedWidgets.find(w))) w = w->parentWidget(); if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget) @@ -530,7 +530,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) { if (!o->isWidgetType()) continue; - if (insertedWidgets.tqfind((TQWidget*)o)) + if (insertedWidgets.find((TQWidget*)o)) selectWidget(TQT_TQOBJECT(o), false); } setPropertyShowingBlocked(false); @@ -552,7 +552,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) // if widget is laid out, find the first non-laid out super-widget while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout - || !insertedWidgets.tqfind(w))) + || !insertedWidgets.find(w))) w = w->parentWidget(); if (e->button() == Qt::LeftButton) @@ -609,7 +609,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) orderedWidgets.append(w); for (TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev()) { - int i = stackedWidgets.tqfindRef(wid); + int i = stackedWidgets.findRef(wid); if (i != -1) { stackedWidgets.removeRef(wid); @@ -665,7 +665,7 @@ void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *w) orderedWidgets.append(w); for (TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev()) { - int i = stackedWidgets.tqfindRef(wid); + int i = stackedWidgets.findRef(wid); if (i != -1) { stackedWidgets.removeRef(wid); @@ -696,7 +696,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w) { // we are prepated for a move // if widget is laid out, find the first non-laid out super-widget while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) != - WidgetFactory::NoLayout || !insertedWidgets.tqfind(w))) + WidgetFactory::NoLayout || !insertedWidgets.find(w))) w = w->parentWidget(); // calc correct position TQPoint pos = w->mapFromGlobal(e->globalPos()); @@ -793,7 +793,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w) wid = tqApp->widgetAt(e->globalPos(), true); if (wid) wid = designerWidget(TQT_TQOBJECT(wid)); - if (wid && (isMainContainer(TQT_TQOBJECT(wid)) || insertedWidgets.tqfind(wid)) && wid->isVisibleTo(this)) + if (wid && (isMainContainer(TQT_TQOBJECT(wid)) || insertedWidgets.find(wid)) && wid->isVisibleTo(this)) newReceiver = wid; if (newReceiver && (newReceiver->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) || newReceiver->inherits("Spacer"))) @@ -801,7 +801,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w) drawRecRect = TQT_BASE_OBJECT(newReceiver) != TQT_BASE_OBJECT(connectReceiver); currentConnectPos = mapFromGlobal(e->globalPos()); if (newReceiver && (isMainContainer(TQT_TQOBJECT(newReceiver)) - || insertedWidgets.tqfind(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver))) + || insertedWidgets.find(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver))) connectReceiver = connectableObject(TQT_TQOBJECT(newReceiver), TQT_TQOBJECT(connectReceiver)); mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").tqarg(connectSender->name()). arg(connectReceiver->name())); @@ -832,7 +832,7 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w) { // we moved the widget sizePreviewLabel->hide(); - if (moving.isEmpty() || w->pos() == *moving.tqfind((ulong) w)) + if (moving.isEmpty() || w->pos() == *moving.find((ulong) w)) break; // restore targetContainer @@ -1064,7 +1064,7 @@ void FormWindow::handleKeyPress(TQKeyEvent * e, TQWidget * w) TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); if (!l) return; - if (l->tqfind(TQT_TQOBJECT(w)) != -1) + if (l->find(TQT_TQOBJECT(w)) != -1) e->accept(); delete l; } @@ -1118,7 +1118,7 @@ void FormWindow::selectWidget(TQObject * o, bool select) repaintSelection((TQWidget *) opw); if (!isPropertyShowingBlocked()) emitShowProperties(propertyWidget); - WidgetSelection *s = usedSelections.tqfind(w); + WidgetSelection *s = usedSelections.find(w); if (s) { s->show(); @@ -1143,7 +1143,7 @@ void FormWindow::selectWidget(TQObject * o, bool select) emitSelectionChanged(); } else { - WidgetSelection *s = usedSelections.tqfind(w); + WidgetSelection *s = usedSelections.find(w); if (s) s->setWidget(0); TQObject *opw = propertyWidget; @@ -1168,7 +1168,7 @@ TQPoint FormWindow::grid() const void FormWindow::updateSelection(TQWidget * w) { - WidgetSelection *s = usedSelections.tqfind(w); + WidgetSelection *s = usedSelections.find(w); if (!w->isVisibleTo(this)) selectWidget(TQT_TQOBJECT(w), false); else if (s) @@ -1177,14 +1177,14 @@ void FormWindow::updateSelection(TQWidget * w) void FormWindow::raiseSelection(TQWidget * w) { - WidgetSelection *s = usedSelections.tqfind(w); + WidgetSelection *s = usedSelections.find(w); if (s) s->show(); } void FormWindow::repaintSelection(TQWidget * w) { - WidgetSelection *s = usedSelections.tqfind(w); + WidgetSelection *s = usedSelections.find(w); if (s) s->update(); } @@ -1291,7 +1291,7 @@ void FormWindow::selectWidgets() TQPoint p = ((TQWidget *) o)->mapToGlobal(TQPoint(0, 0)); p = mapFromGlobal(p); TQRect r(p, ((TQWidget *) o)->size()); - if (r.intersects(currRect) && !r.tqcontains(currRect)) + if (r.intersects(currRect) && !r.contains(currRect)) selectWidget(TQT_TQOBJECT(o)); } } @@ -1303,7 +1303,7 @@ void FormWindow::selectWidgets() bool FormWindow::isWidgetSelected(TQObject * w) { if (w->isWidgetType()) - return usedSelections.tqfind((TQWidget *) w) != 0; + return usedSelections.find((TQWidget *) w) != 0; return false; // #### do stuff for TQObjects } @@ -1350,7 +1350,7 @@ void FormWindow::raiseChildSelections(TQWidget * w) TQPtrDictIterator < WidgetSelection > it(usedSelections); for (; it.current(); ++it) { - if (l->tqfindRef(TQT_TQOBJECT(it.current()->widget())) != -1) + if (l->findRef(TQT_TQOBJECT(it.current()->widget())) != -1) it.current()->show(); } delete l; @@ -1363,7 +1363,7 @@ void FormWindow::updateChildSelections(TQWidget * w) { for (TQObject * o = l->first(); o; o = l->next()) { - if (o->isWidgetType() && insertedWidgets.tqfind((TQWidget *) o)) + if (o->isWidgetType() && insertedWidgets.find((TQWidget *) o)) updateSelection((TQWidget *) o); } delete l; @@ -1385,7 +1385,7 @@ void FormWindow::checkSelectionsForMove(TQWidget * w) if (it.current()->widget() == mainContainer()) continue; ++it; - if (l->tqfind(TQT_TQOBJECT(sel->widget())) == -1) + if (l->find(TQT_TQOBJECT(sel->widget())) == -1) { if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) sel->setWidget(0); @@ -1500,7 +1500,7 @@ void FormWindow::invalidCheckedSelections() void FormWindow::checkPreviewGeometry(TQRect & r) { - if (TQT_TQRECT_OBJECT(rect()).tqcontains(r)) + if (TQT_TQRECT_OBJECT(rect()).contains(r)) return; if (r.left() < rect().left()) r.moveTopLeft(TQPoint(0, r.top())); @@ -1699,7 +1699,7 @@ void FormWindow::showOrderIndicators() { OrderIndicator *ind = new OrderIndicator(order++, w, this); orderIndicators.append(ind); - if (stackedWidgets.tqfindRef(w) == -1) + if (stackedWidgets.findRef(w) == -1) stackedWidgets.append(w); } } @@ -1788,14 +1788,14 @@ void FormWindow::lowerWidgets() static void find_accel(const TQString & txt, TQMap < TQChar, TQWidgetList > &accels, TQWidget * w) { - int i = txt.tqfind("&"); + int i = txt.find("&"); if (i == -1) return; TQChar c = txt[i + 1]; if (c.isNull() || c == '&') return; c = c.lower(); - TQMap < TQChar, TQWidgetList >::Iterator it = accels.tqfind(c); + TQMap < TQChar, TQWidgetList >::Iterator it = accels.find(c); if (it == accels.end()) { TQWidgetList wl; @@ -1820,11 +1820,11 @@ void FormWindow::checkAccels() { TQWidget *w = (TQWidget *) o; const TQMetaProperty *text = - w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true); const TQMetaProperty *title = - w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true); const TQMetaProperty *pageTitle = - w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pageTitle", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pageTitle", true), true); if (text) find_accel(w->property("text").toString(), accels, w); if (title) @@ -1969,7 +1969,7 @@ void FormWindow::layoutHorizontalContainer(TQWidget * w) for (TQObject * o = l.first(); o; o = l.next()) { if (o->isWidgetType() && - ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o)) + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) widgets.append((TQWidget *) o); } LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out ChildrenQt::Horizontally"), @@ -1990,7 +1990,7 @@ void FormWindow::layoutVerticalContainer(TQWidget * w) for (TQObject * o = l.first(); o; o = l.next()) { if (o->isWidgetType() && - ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o)) + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) widgets.append((TQWidget *) o); } LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out ChildrenQt::Vertically"), @@ -2014,7 +2014,7 @@ void FormWindow::layoutGridContainer(TQWidget * w) for (TQObject * o = l.first(); o; o = l.next()) { if (o->isWidgetType() && - ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o)) + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) widgets.append((TQWidget *) o); } LayoutGridCommand *cmd = new LayoutGridCommand(i18n("Lay Out Children in a Grid"), @@ -2067,7 +2067,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand(TQWidget * w) { if (o->isWidgetType() && !mainWindow()->isAToolBarChild(TQT_TQOBJECT(o)) && - ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o)) + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) widgets.append((TQWidget *) o); } return new BreakLayoutCommand(i18n("Break Layout"), this, @@ -2102,7 +2102,7 @@ bool FormWindow::hasInsertedChildren(TQWidget *w) const for (TQObject *o = l->first(); o; o = l->next()) if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo((FormWindow*)this) && - insertedWidgets.tqfind((TQWidget*)o)) + insertedWidgets.find((TQWidget*)o)) { delete l; return true; @@ -2116,7 +2116,7 @@ bool FormWindow::allowMove(TQWidget *w) w = w->parentWidget(); while (w) { - if ((isMainContainer(TQT_TQOBJECT(w)) || insertedWidgets.tqfind(w)) && WidgetFactory::layoutType(w) == + if ((isMainContainer(TQT_TQOBJECT(w)) || insertedWidgets.find(w)) && WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) return true; w = w->parentWidget(); @@ -2197,7 +2197,7 @@ void FormWindow::restoreConnectionLine() w = h = 64; r = r.normalize(); - while (r.tqcontains(p)) + while (r.contains(p)) { unclippedPainter->drawPixmap(p, *buffer, TQRect(p, TQSize(w, h))); unclippedPainter->setPen(red); @@ -2366,7 +2366,7 @@ bool FormWindow::isDatabaseWidgetUsed() const for (; it.current(); ++it) { TQString c(it.current()->className()); - if (dbClasses.tqcontains(c) > 0) + if (dbClasses.contains(c) > 0) return true; } #endif @@ -2444,7 +2444,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf) TQWidget *container = 0; int depth = -1; TQWidgetList selected = selectedWidgets(); - if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(pos))) + if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(pos))) { container = mainContainer(); depth = widgetDepth(container); @@ -2457,7 +2457,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf) continue; if (!it.current()->isVisibleTo(this)) continue; - if (selected.tqfind(it.current()) != -1) + if (selected.find(it.current()) != -1) continue; if (!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(it.current())))) && it.current() != mainContainer()) @@ -2467,7 +2467,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf) TQWidget *w = it.current(); while (w && !w->isTopLevel()) { - if (!TQT_TQRECT_OBJECT(w->rect()).tqcontains((w->mapFromGlobal(pos)))) + if (!TQT_TQRECT_OBJECT(w->rect()).contains((w->mapFromGlobal(pos)))) break; w = w->parentWidget(); } @@ -2475,8 +2475,8 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf) int wd = widgetDepth(it.current()); if (wd == depth && container && (it.current()->parentWidget()-> - childrenListObject()).tqfind(TQT_TQOBJECT(it.current())) > - (container->parentWidget()->childrenListObject()).tqfind(TQT_TQOBJECT(container))) + childrenListObject()).find(TQT_TQOBJECT(it.current())) > + (container->parentWidget()->childrenListObject()).find(TQT_TQOBJECT(container))) wd++; if (wd > depth && !isChildOf(it.current(), notParentOf)) { depth = wd; diff --git a/kommander/editor/functionsimpl.cpp b/kommander/editor/functionsimpl.cpp index 991377f8..9520360f 100644 --- a/kommander/editor/functionsimpl.cpp +++ b/kommander/editor/functionsimpl.cpp @@ -133,7 +133,7 @@ TQString FunctionsDialog::currentFunctionText() return TQString("%1%2%3").tqarg(prefix).tqarg(functionListBox->currentText()).tqarg(params()); else if (groupComboBox->currentItem() == m_DCOP || groupComboBox->currentItem() == m_Slots) return TQString("%1%2.%3%4").tqarg(prefix).tqarg(widgetComboBox->currentText().section(' ', 0, 0)) - .tqarg(functionListBox->currentText().left(functionListBox->currentText().tqfind('('))).tqarg(params()); + .tqarg(functionListBox->currentText().left(functionListBox->currentText().find('('))).tqarg(params()); else return TQString("%1%2%3%4").tqarg(prefix).tqarg(function) .tqarg(functionListBox->currentText()).tqarg(params()); @@ -152,10 +152,10 @@ void FunctionsDialog::groupChanged(int index) { TQString slot = pFunctions[i]; TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1); - if (slotArgStr.isEmpty() || m_acceptedSlots.tqcontains(slotArgStr)) + if (slotArgStr.isEmpty() || m_acceptedSlots.contains(slotArgStr)) { TQString name = slot.remove("()"); - if (!m_slotList.tqcontains(name)) + if (!m_slotList.contains(name)) { m_slotList[name] = slot; functionListBox->insertItem(name); @@ -238,7 +238,7 @@ void FunctionsDialog::copyText() insertedText->getCursorPosition(¶, &i); // int cursorPos = insertedText->cursorPosition(); insertedText->insert(text); - insertedText->setCursorPosition(para, i + text.tqfind('(') + 1); + insertedText->setCursorPosition(para, i + text.find('(') + 1); } void FunctionsDialog::showParameters() diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp index 318a17a2..ee5c6642 100644 --- a/kommander/editor/hierarchyview.cpp +++ b/kommander/editor/hierarchyview.cpp @@ -254,7 +254,7 @@ void HierarchyList::objectClicked( TQListViewItem *i ) return; } - if ( !formWindow->widgets()->tqfind( w ) ) { + if ( !formWindow->widgets()->find( w ) ) { if ( w->tqparent() && w->tqparent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) && w->tqparent()->tqparent() && ( w->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || @@ -427,7 +427,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent ) for ( ; it.current(); --it ) { if ( !it.current()->isWidgetType() || ( (TQWidget*)it.current() )->isHidden() ) continue; - if ( !formWindow->widgets()->tqfind( (TQWidget*)it.current() ) ) { + if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { if ( it.current()->tqparent() && ( it.current()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || it.current()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) && @@ -491,7 +491,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) return; if ( w != formWindow && - !formWindow->widgets()->tqfind( w ) ) + !formWindow->widgets()->find( w ) ) return; if ( w->isVisibleTo( formWindow ) ) { diff --git a/kommander/editor/kommander-new.xml b/kommander/editor/kommander-new.xml index 7fe9f7dc..5c170485 100644 --- a/kommander/editor/kommander-new.xml +++ b/kommander/editor/kommander-new.xml @@ -140,14 +140,14 @@ str_length - str_tqcontains - str_tqfind - str_tqfindRev + str_contains + str_find + str_findRev str_left str_right str_mid str_remove - str_tqreplace + str_replace str_upper str_lower str_compare diff --git a/kommander/editor/kommander.xml b/kommander/editor/kommander.xml index b88bd6d7..a2f926fa 100644 --- a/kommander/editor/kommander.xml +++ b/kommander/editor/kommander.xml @@ -104,14 +104,14 @@ length - tqcontains - tqfind - tqfindRev + contains + find + findRev left right mid remove - tqreplace + replace upper lower compare @@ -418,7 +418,7 @@ expr fbset file - tqfind + find flex flex++ fmt diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp index 8d7d3d50..152548b2 100644 --- a/kommander/editor/layout.cpp +++ b/kommander/editor/layout.cpp @@ -189,7 +189,7 @@ void Layout::finishLayout( bool needMove, TQLayout *tqlayout ) formWindow->insertWidget( layoutBase ); formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); TQString n = layoutBase->name(); - if ( n.tqfind( "qt_dead_widget_" ) != -1 ) { + if ( n.find( "qt_dead_widget_" ) != -1 ) { n.remove( 0, TQString( "qt_dead_widget_" ).length() ); layoutBase->setName( n ); } @@ -242,7 +242,7 @@ void Layout::breakLayout() w->reparent( layoutBase->parentWidget(), 0, layoutBase->pos() + w->pos(), true ); if ( needResize ) { - TQMap::Iterator it = rects.tqfind( w ); + TQMap::Iterator it = rects.find( w ); if ( it != rects.end() ) w->setGeometry( TQRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) ); } diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index 8a30d812..8290fbda 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -108,7 +108,7 @@ static TQString textNoAccel(const TQString& text) { TQString t = text; int i; - while ((i = t.tqfind('&'))>= 0) { + while ((i = t.find('&'))>= 0) { t.remove(i,1); } return t; @@ -837,7 +837,7 @@ FormWindow *MainWindow::formWindow() if (qworkspace->activeWindow()->inherits("FormWindow")) fw = (FormWindow*)qworkspace->activeWindow(); else if (lastActiveFormWindow && - qworkspace->windowList().tqfind(lastActiveFormWindow) != -1) + qworkspace->windowList().find(lastActiveFormWindow) != -1) fw = lastActiveFormWindow; return fw; } @@ -1012,18 +1012,18 @@ void MainWindow::popupWidgetMenu(const TQPoint &gp, FormWindow * /*fw*/, TQWidge void MainWindow::setupRMBProperties(TQValueList &ids, TQMap &props, TQWidget *w) { - const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true); + const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true); if (text && qstrcmp(text->type(), TQSTRING_OBJECT_NAME_STRING) != 0) text = 0; - const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true); + const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true); if (title && qstrcmp(title->type(), TQSTRING_OBJECT_NAME_STRING) != 0) title = 0; const TQMetaProperty* pagetitle = - w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pageTitle", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pageTitle", true), true); if (pagetitle && qstrcmp(pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0) pagetitle = 0; const TQMetaProperty* pixmap = - w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pixmap", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pixmap", true), true); if (pixmap && qstrcmp(pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0) pixmap = 0; @@ -1627,8 +1627,8 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*) return true; } - const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true); - const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true); + const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true); + const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true); if (text && text->designable(w)) { bool ok = false; TQString text; @@ -1706,9 +1706,9 @@ TQString MainWindow::documentationPath() const TQString result = docPath; if (docPath[0] == '$') { - int fs = docPath.tqfind('/'); + int fs = docPath.find('/'); if (fs == -1) - fs = docPath.tqfind('\\'); + fs = docPath.find('\\'); if (fs > -1) { result = docPath.mid(1, fs-1); @@ -1777,9 +1777,9 @@ void MainWindow::showDialogHelp() else if (w->inherits("DatabaseConnectionBase")) link += "dialog-edit-database-connections"; else if (w->inherits("FindDialog")) - link += "dialog-tqfind-text"; + link += "dialog-find-text"; else if (w->inherits("ReplaceDialog")) - link += "dialog-tqreplace-text"; + link += "dialog-replace-text"; else if (w->inherits("GotoLineDialog")) link += "dialog-go-to-line"; else if (w->inherits("ConnectionEditorBase")) diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp index 9ed36f59..356b4804 100644 --- a/kommander/editor/mainwindowactions.cpp +++ b/kommander/editor/mainwindowactions.cpp @@ -393,7 +393,7 @@ void MainWindow::setupToolActions() if (!fi->isFile() || fi->extension() != "kmdr") continue; TQString name = fi->baseName(); - name = name.tqreplace("_", " "); + name = name.replace("_", " "); editMenu->insertItem(name, TQT_TQOBJECT(this), TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count()); m_editorTools.append(fi->filePath()); } diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp index 72f63de5..acf64cb9 100644 --- a/kommander/editor/metadatabase.cpp +++ b/kommander/editor/metadatabase.cpp @@ -110,7 +110,7 @@ void MetaDataBase::addEntry( TQObject *o ) if ( !o ) return; setupDataBase(); - if ( db->tqfind( o ) ) + if ( db->find( o ) ) return; MetaDataBaseRecord *r = new MetaDataBaseRecord; r->object = o; @@ -129,7 +129,7 @@ void MetaDataBase::removeEntry( TQObject *o ) void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -137,10 +137,10 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo } if ( changed ) { - if ( r->changedProperties.tqfindIndex( property ) == -1 ) + if ( r->changedProperties.findIndex( property ) == -1 ) r->changedProperties.append( property ); } else { - if ( r->changedProperties.tqfindIndex( property ) != -1 ) + if ( r->changedProperties.findIndex( property ) != -1 ) r->changedProperties.remove( property ); } @@ -166,20 +166,20 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return false; } - return r->changedProperties.tqfindIndex( property ) != -1; + return r->changedProperties.findIndex( property ) != -1; } TQStringList MetaDataBase::changedProperties( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -193,7 +193,7 @@ TQStringList MetaDataBase::changedProperties( TQObject *o ) void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -206,20 +206,20 @@ void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, co TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQString(); } - return *r->propertyComments.tqfind( property ); + return *r->propertyComments.find( property ); } void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -231,13 +231,13 @@ void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQVariant(); } - TQMap::Iterator it = r->fakeProperties.tqfind( property ); + TQMap::Iterator it = r->fakeProperties.find( property ); if ( it != r->fakeProperties.end() ) return r->fakeProperties[property]; return WidgetFactory::defaultValue( o, property ); @@ -247,7 +247,7 @@ TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) TQMap* MetaDataBase::fakeProperties( TQObject* o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -261,7 +261,7 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -282,7 +282,7 @@ int MetaDataBase::spacing( TQObject *o ) setupDataBase(); if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->tqfind( TQT_TQOBJECT(o) ); + MetaDataBaseRecord *r = db->find( TQT_TQOBJECT(o) ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -297,7 +297,7 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -320,7 +320,7 @@ int MetaDataBase::margin( TQObject *o ) setupDataBase(); if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -334,7 +334,7 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString TQObject *receiver, const TQCString &slot ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -352,7 +352,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr TQObject *receiver, const TQCString &slot ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -374,7 +374,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr TQValueList MetaDataBase::connections( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -387,7 +387,7 @@ TQValueList MetaDataBase::connections( TQObject *o, TQ TQObject *receiver ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -409,7 +409,7 @@ TQValueList MetaDataBase::connections( TQObject *o, TQ TQValueList MetaDataBase::connections( TQObject *o, TQObject *object ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -430,7 +430,7 @@ TQValueList MetaDataBase::connections( TQObject *o, TQ void MetaDataBase::doConnections( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -473,8 +473,8 @@ void MetaDataBase::doConnections( TQObject *o ) TQStrList slotList = receiver->tqmetaObject()->slotNames( true ); // avoid warnings - if ( signalList.tqfind( conn.signal ) == -1 || - slotList.tqfind( conn.slot ) == -1 ) + if ( signalList.find( conn.signal ) == -1 || + slotList.find( conn.slot ) == -1 ) continue; TQObject::connect( sender, s, receiver, s2 ); @@ -485,7 +485,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& const TQString &access, const TQString &language, const TQString &returnType ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -498,7 +498,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& s.access = access; s.language = language; s.returnType = returnType; - TQValueList::Iterator it = r->slotList.tqfind( s ); + TQValueList::Iterator it = r->slotList.find( s ); if ( it != r->slotList.end() ) r->slotList.remove( it ); r->slotList.append( s ); @@ -510,7 +510,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& void MetaDataBase::setSlotList( TQObject *o, const TQValueList &slotList ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -523,7 +523,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQStrin const TQString &access, const TQString &language, const TQString &returnType ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -546,7 +546,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQStrin void MetaDataBase::removeSlot( TQObject *o, const TQString &slot ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -565,7 +565,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQString &slot ) TQValueList MetaDataBase::slotList( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -578,7 +578,7 @@ TQValueList MetaDataBase::slotList( TQObject *o ) bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -596,7 +596,7 @@ bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) void MetaDataBase::changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -617,7 +617,7 @@ void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot, const TQString &language, const TQString &returnType ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -639,7 +639,7 @@ void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot, bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -648,13 +648,13 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom if ( !onlyCustom ) { TQStrList slotList = o->tqmetaObject()->slotNames( true ); - if ( slotList.tqfind( slot ) != -1 ) + if ( slotList.find( slot ) != -1 ) return true; if ( o->inherits( "FormWindow" ) ) { o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); slotList = o->tqmetaObject()->slotNames( true ); - if ( slotList.tqfind( slot ) != -1 ) + if ( slotList.find( slot ) != -1 ) return true; } @@ -682,7 +682,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom TQString MetaDataBase::languageOfSlot( TQObject *o, const TQCString &slot ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -779,7 +779,7 @@ bool MetaDataBase::hasCustomWidget( const TQString &className ) void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*) w ); + MetaDataBaseRecord *r = db->find( (void*) w ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", w, w->name(), w->className() ); @@ -792,7 +792,7 @@ void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*) w ); + MetaDataBaseRecord *r = db->find( (void*) w ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", w, w->name(), w->className() ); @@ -805,7 +805,7 @@ TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -818,7 +818,7 @@ void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs ) TQValueList MetaDataBase::includes( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -831,7 +831,7 @@ TQValueList MetaDataBase::includes( TQObject *o ) void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -844,7 +844,7 @@ void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) TQStringList MetaDataBase::forwards( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -857,7 +857,7 @@ TQStringList MetaDataBase::forwards( TQObject *o ) void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -871,10 +871,10 @@ void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) bool hasSemicolon = s.endsWith( ";" ); if ( hasSemicolon ) s = s.left( s.length() - 1 ); - int p = s.tqfind( '(' ); + int p = s.find( '(' ); if ( p < 0 ) p = s.length(); - int sp = s.tqfind( ' ' ); + int sp = s.find( ' ' ); if ( sp >= 0 && sp < p ) { s = s.mid( sp+1 ); p -= sp + 1; @@ -890,7 +890,7 @@ void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) TQStringList MetaDataBase::signalList( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -903,7 +903,7 @@ TQStringList MetaDataBase::signalList( TQObject *o ) void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -916,7 +916,7 @@ void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -958,7 +958,7 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)w ); + MetaDataBaseRecord *r = db->find( (void*)w ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", w, w->name(), w->className() ); @@ -971,7 +971,7 @@ void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) TQCursor MetaDataBase::cursor( TQWidget *w ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)w ); + MetaDataBaseRecord *r = db->find( (void*)w ); if ( !r ) { w->unsetCursor(); return w->cursor(); @@ -1007,7 +1007,7 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const { TQStrList sigList = TQWidget::tqstaticMetaObject()->signalNames( true ); - if ( sigList.tqfind( signal ) != -1 ) + if ( sigList.find( signal ) != -1 ) return true; for ( TQValueList::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { if ( normalizeSlot( *it ) == normalizeSlot( signal ) ) @@ -1019,7 +1019,7 @@ bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const { TQStrList slotList = TQWidget::tqstaticMetaObject()->slotNames( true ); - if ( slotList.tqfind( normalizeSlot( slot ) ) != -1 ) + if ( slotList.find( normalizeSlot( slot ) ) != -1 ) return true; for ( TQValueList::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { @@ -1032,7 +1032,7 @@ bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const { TQStrList propList = TQWidget::tqstaticMetaObject()->propertyNames( true ); - if ( propList.tqfind( prop ) != -1 ) + if ( propList.find( prop ) != -1 ) return true; for ( TQValueList::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { @@ -1047,7 +1047,7 @@ void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &a if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1063,14 +1063,14 @@ TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap ) if ( !o ) return TQString(); setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQString(); } - return *r->pixmapArguments.tqfind( pixmap ); + return *r->pixmapArguments.find( pixmap ); } void MetaDataBase::clearPixmapArguments( TQObject *o ) @@ -1078,7 +1078,7 @@ void MetaDataBase::clearPixmapArguments( TQObject *o ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1094,7 +1094,7 @@ void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1110,14 +1110,14 @@ TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap ) if ( !o ) return TQString(); setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQString(); } - return *r->pixmapKeys.tqfind( pixmap ); + return *r->pixmapKeys.find( pixmap ); } void MetaDataBase::clearPixmapKeys( TQObject *o ) @@ -1125,7 +1125,7 @@ void MetaDataBase::clearPixmapKeys( TQObject *o ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1142,7 +1142,7 @@ void MetaDataBase::setColumnFields( TQObject *o, const TQMap if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1157,7 +1157,7 @@ TQMap MetaDataBase::columnFields( TQObject *o ) if ( !o ) return TQMap(); setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1187,7 +1187,7 @@ void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1202,7 +1202,7 @@ TQString MetaDataBase::exportMacro( TQObject *o ) if ( !o ) return ""; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1214,6 +1214,6 @@ TQString MetaDataBase::exportMacro( TQObject *o ) bool MetaDataBase::hasObject( TQObject *o ) { - return !!db->tqfind( o ); + return !!db->find( o ); } diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp index e1ef5662..37e47e6a 100644 --- a/kommander/editor/newformimpl.cpp +++ b/kommander/editor/newformimpl.cpp @@ -100,12 +100,12 @@ static void unifyFormName(FormWindow *fw, TQWorkspace *qworkspace) if (w != fw) lst << w->name(); - if (lst.tqfindIndex(fw->name()) == -1) + if (lst.findIndex(fw->name()) == -1) return; TQString origName = fw->name(); TQString n = origName; int i = 1; - while (lst.tqfindIndex(n) != -1) + while (lst.findIndex(n) != -1) n = origName + TQString::number(i++); fw->setName(n); fw->setCaption(n); @@ -173,7 +173,7 @@ NewForm::NewForm(TQWidget *tqparent, const TQString &templatePath) if (!fi->isFile() || fi->extension() != "kmdr") continue; TQString name = fi->baseName(); - name = name.tqreplace("_", " "); + name = name.replace("_", " "); CustomFormItem *ci = new CustomFormItem(templateView, name); allItems.append(ci); ci->setDragEnabled(false); diff --git a/kommander/editor/parser.cpp b/kommander/editor/parser.cpp index cbd3946a..fa264796 100644 --- a/kommander/editor/parser.cpp +++ b/kommander/editor/parser.cpp @@ -32,9 +32,9 @@ public: TQString Parser::cleanArgs( const TQString &func ) { TQString slot( func ); - int begin = slot.tqfind( "(" ) + 1; + int begin = slot.find( "(" ) + 1; TQString args = slot.mid( begin ); - args = args.left( args.tqfind( ")" ) ); + args = args.left( args.find( ")" ) ); TQStringList lst = TQStringList::split( ',', args ); TQString res = slot.left( begin ); for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { @@ -42,13 +42,13 @@ TQString Parser::cleanArgs( const TQString &func ) res += ","; TQString arg = *it; int pos = 0; - if ( ( pos = arg.tqfind( "&" ) ) != -1 ) { + if ( ( pos = arg.find( "&" ) ) != -1 ) { arg = arg.left( pos + 1 ); - } else if ( ( pos = arg.tqfind( "*" ) ) != -1 ) { + } else if ( ( pos = arg.find( "*" ) ) != -1 ) { arg = arg.left( pos + 1 ); } else { arg = arg.simplifyWhiteSpace(); - if ( ( pos = arg.tqfind( ':' ) ) != -1 ) + if ( ( pos = arg.find( ':' ) ) != -1 ) arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace(); TQStringList l = TQStringList::split( ' ', arg ); if ( l.count() == 2 ) { diff --git a/kommander/editor/pics/images.h b/kommander/editor/pics/images.h index 4b14e2ac..57997088 100644 --- a/kommander/editor/pics/images.h +++ b/kommander/editor/pics/images.h @@ -10957,7 +10957,7 @@ static struct Embed { static const TQByteArray& qembed_findData( const char* name ) { static TQDict dict; - TQByteArray* ba = dict.tqfind( name ); + TQByteArray* ba = dict.find( name ); if ( !ba ) { for ( int i = 0; embed_vec[i].data; i++ ) { if ( strcmp(embed_vec[i].name, name) == 0 ) { diff --git a/kommander/editor/pixmapchooser.cpp b/kommander/editor/pixmapchooser.cpp index f0e8ab3a..c94bf065 100644 --- a/kommander/editor/pixmapchooser.cpp +++ b/kommander/editor/pixmapchooser.cpp @@ -1016,7 +1016,7 @@ ImageIconProvider::~ImageIconProvider() const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi ) { TQString ext = fi.extension().upper(); - if ( fmts.tqcontains( ext ) ) { + if ( fmts.contains( ext ) ) { return &imagepm; } else { return TQFileIconProvider::pixmap( fi ); diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp index d579c3b6..9d72fe02 100644 --- a/kommander/editor/propertyeditor.cpp +++ b/kommander/editor/propertyeditor.cpp @@ -548,7 +548,7 @@ void PropertyItem::setText( int col, const TQString &t ) { TQString txt( t ); if ( col == 1 ) - txt = txt.tqreplace( TQRegExp( "\n" ), " " ); + txt = txt.replace( TQRegExp( "\n" ), " " ); TQListViewItem::setText( col, txt ); } @@ -2534,10 +2534,10 @@ void PropertyList::setupProperties() for ( TQPtrListIterator it( lst ); it.current(); ++it ) { const TQMetaProperty* p = editor->widget()->tqmetaObject()-> - property( editor->widget()->tqmetaObject()->tqfindProperty( it.current(), allProperties), allProperties ); + property( editor->widget()->tqmetaObject()->findProperty( it.current(), allProperties), allProperties ); if ( !p ) continue; - if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) ) + if ( unique.contains( TQString::tqfromLatin1( it.current() ) ) ) continue; if ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) @@ -2693,7 +2693,7 @@ void PropertyList::setupProperties() } } if ( item && !p->isSetType() ) { - if ( valueSet.tqfindIndex( item->name() ) == -1 ) { + if ( valueSet.findIndex( item->name() ) == -1 ) { setPropertyValue( item ); valueSet << item->name(); } @@ -2750,7 +2750,7 @@ void PropertyList::setupProperties() MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); if ( cw ) { for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( unique.tqcontains( TQString( (*it).property ) ) ) + if ( unique.contains( TQString( (*it).property ) ) ) continue; unique.insert( TQString( (*it).property ), true ); addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); @@ -3048,9 +3048,9 @@ static void clearAlignList( TQStrList &l ) { if ( l.count() == 1 ) return; - if ( l.tqfind( "AlignAuto" ) != -1 ) + if ( l.find( "AlignAuto" ) != -1 ) l.remove( "AlignAuto" ); - if ( l.tqfind( "WordBreak" ) != -1 ) + if ( l.find( "WordBreak" ) != -1 ) l.remove( "WordBreak" ); } @@ -3062,12 +3062,12 @@ void PropertyList::setPropertyValue( PropertyItem *i ) { const TQMetaProperty *p = editor->widget()->tqmetaObject()-> - property( editor->widget()->tqmetaObject()->tqfindProperty( i->name(), true), true ); + property( editor->widget()->tqmetaObject()->findProperty( i->name(), true), true ); if ( !p ) { if ( i->name() == "hAlign" ) { int align = editor->widget()->property( "tqalignment" ).toInt(); p = editor->widget()->tqmetaObject()-> - property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", true ), true ); + property( editor->widget()->tqmetaObject()->findProperty( "tqalignment", true ), true ); align &= ~AlignVertical_Mask; TQStrList l = p->valueToKeys( align ); clearAlignList( l ); @@ -3075,7 +3075,7 @@ void PropertyList::setPropertyValue( PropertyItem *i ) } else if ( i->name() == "vAlign" ) { int align = editor->widget()->property( "tqalignment" ).toInt(); p = editor->widget()->tqmetaObject()-> - property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", true ), true ); + property( editor->widget()->tqmetaObject()->findProperty( "tqalignment", true ), true ); align &= ~AlignHorizontal_Mask; ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() ); } else if ( i->name() == "wordwrap" ) { @@ -3235,7 +3235,7 @@ TQString PropertyList::whatsThisText( TQListViewItem *i ) TQString s; s = TQString( mo->className() ) + "::" + prop; TQMap::Iterator it; - if ( ( it = propertyDocs.tqfind( s ) ) != propertyDocs.end() ) { + if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) { return *it; } mo = mo->tqsuperClass(); @@ -3363,7 +3363,7 @@ void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) if ( MetaDataBase::hasEvents( "C++" ) ) { #endif TQString s1 = i->text( 0 ); - int pt = s1.tqfind( "(" ); + int pt = s1.find( "(" ); if ( pt != -1 ) s1 = s1.left( pt ); s = TQString( editor->widget()->name() ) + "_" + s1; @@ -3403,7 +3403,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) if ( MetaDataBase::hasEvents( "C++" ) ) { #endif TQString s1 = ( i->tqparent() ? i->tqparent() : i )->text( 0 ); - int pt = s1.tqfind( "(" ); + int pt = s1.find( "(" ); if ( pt != -1 ) s1 = s1.left( pt ); s = TQString( editor->widget()->name() ) + "_" + s1; @@ -3491,7 +3491,7 @@ void EventList::renamed( TQListViewItem *i ) "C++", "void" ); #endif editor->formWindow()->mainWindow()-> - editFunction( i->text( 0 ).left( i->text( 0 ).tqfind( "(" ) ), + editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), #ifndef KOMMANDER editor->formWindow()->project()->language(), true ); #else @@ -3677,7 +3677,7 @@ TQString PropertyEditor::classOfCurrentProperty() const TQMetaObject *mo = o->tqmetaObject(); while ( mo ) { TQStrList props = mo->propertyNames( false ); - if ( props.tqfind( curr.latin1() ) != -1 ) + if ( props.find( curr.latin1() ) != -1 ) return mo->className(); mo = mo->tqsuperClass(); } diff --git a/kommander/editor/qcompletionedit.cpp b/kommander/editor/qcompletionedit.cpp index 61d0407e..537216c5 100644 --- a/kommander/editor/qcompletionedit.cpp +++ b/kommander/editor/qcompletionedit.cpp @@ -154,7 +154,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) void QCompletionEdit::addCompletionEntry( const TQString &entry ) { - if ( compList.tqfind( entry ) == compList.end() ) { + if ( compList.find( entry ) == compList.end() ) { compList << entry; compList.sort(); } @@ -162,7 +162,7 @@ void QCompletionEdit::addCompletionEntry( const TQString &entry ) void QCompletionEdit::removeCompletionEntry( const TQString &entry ) { - TQStringList::Iterator it = compList.tqfind( entry ); + TQStringList::Iterator it = compList.find( entry ); if ( it != compList.end() ) compList.remove( it ); } diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp index f55c963c..c2ece48b 100644 --- a/kommander/editor/resource.cpp +++ b/kommander/editor/resource.cpp @@ -84,12 +84,12 @@ static TQString makeIndent( int indent ) static TQString entitize( const TQString &s, bool attribute = false ) { TQString s2 = s; - s2 = s2.tqreplace( TQRegExp( "&" ), "&" ); - s2 = s2.tqreplace( TQRegExp( ">" ), ">" ); - s2 = s2.tqreplace( TQRegExp( "<" ), "<" ); + s2 = s2.replace( TQRegExp( "&" ), "&" ); + s2 = s2.replace( TQRegExp( ">" ), ">" ); + s2 = s2.replace( TQRegExp( "<" ), "<" ); if ( attribute ) { - s2 = s2.tqreplace( TQRegExp( "\"" ), """ ); - s2 = s2.tqreplace( TQRegExp( "'" ), "'" ); + s2 = s2.replace( TQRegExp( "\"" ), """ ); + s2 = s2.replace( TQRegExp( "'" ), "'" ); } return s2; } @@ -181,7 +181,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev ) TQString content = stream.read(); if (content.startsWith("#!")) { - content = content.mid(content.tqfind('\n')); + content = content.mid(content.find('\n')); } if ( !doc.setContent( content) ) { // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); @@ -476,7 +476,7 @@ TQString Resource::copy() TQWidget *p = w->parentWidget(); bool save = true; while ( p ) { - if ( tmp.tqfindRef( p ) != -1 ) { + if ( tmp.findRef( p ) != -1 ) { save = false; break; } @@ -580,7 +580,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea const char* className = WidgetFactory::classNameOf( obj ); if ( obj->isA( "CustomWidget" ) ) usedCustomWidgets << TQString( className ); - if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->tqfind( (TQWidget*)obj ) ) + if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) ) return; // we don't know anything about this thing TQString attributes; @@ -801,7 +801,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) if ( table->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !columnFields.isEmpty() ) { ts << makeIndent( indent ) << "" << endl; indent++; - ts << makeIndent( indent ) << "" << entitize( *columnFields.tqfind( l[ 0 ] ) ) << "" << endl; + ts << makeIndent( indent ) << "" << entitize( *columnFields.find( l[ 0 ] ) ) << "" << endl; indent--; ts << makeIndent( indent ) << "" << endl; } @@ -984,9 +984,9 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) changed = MetaDataBase::changedProperties( w ); if ( w->isWidgetType() ) { if ( w->inherits( "Spacer" ) ) { - if ( !changed.tqcontains( "tqsizeHint" ) ) + if ( !changed.contains( "tqsizeHint" ) ) changed << "tqsizeHint"; - if ( !changed.tqcontains( "geometry" ) ) + if ( !changed.contains( "geometry" ) ) changed << "geometry"; } } else if ( w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) { // #### should be cleaner (RS) @@ -994,9 +994,9 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) } if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { - if ( changed.tqfindIndex( "geometry" ) == -1 ) + if ( changed.findIndex( "geometry" ) == -1 ) changed << "geometry"; - if ( changed.tqfindIndex( "caption" ) == -1 ) + if ( changed.findIndex( "caption" ) == -1 ) changed << "caption"; } @@ -1008,13 +1008,13 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) TQStrList lst = w->tqmetaObject()->propertyNames( !w->inherits( "Spacer" ) ); for ( TQPtrListIterator it( lst ); it.current(); ++it ) { - if ( changed.tqfind( TQString::tqfromLatin1( it.current() ) ) == changed.end() ) + if ( changed.find( TQString::tqfromLatin1( it.current() ) ) == changed.end() ) continue; - if ( saved.tqfind( TQString::tqfromLatin1( it.current() ) ) != saved.end() ) + if ( saved.find( TQString::tqfromLatin1( it.current() ) ) != saved.end() ) continue; saved << TQString::tqfromLatin1( it.current() ); const TQMetaProperty* p = w->tqmetaObject()-> - property( w->tqmetaObject()->tqfindProperty( it.current(), true ), true ); + property( w->tqmetaObject()->findProperty( it.current(), true ), true ); if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) continue; if ( w->inherits( TQLABEL_OBJECT_NAME_STRING ) && qstrcmp( p->name(), "pixmap" ) == 0 && @@ -1066,7 +1066,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) { - const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, true ), true ); + const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( name, true ), true ); TQStrList l( p->valueToKeys( w->property( name ).toInt() ) ); TQString v; for ( uint i = 0; i < l.count(); ++i ) { @@ -1079,7 +1079,7 @@ void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Ty void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) { - const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, true ), true ); + const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( name, true ), true ); ts << makeIndent( indent ) << "" << p->valueToKey( w->property( name ).toInt() ) << "" << endl; } @@ -1090,7 +1090,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant int num, unum; double dob; TQString comment; - if ( w && formwindow->widgets()->tqfind( (TQWidget*)w ) ) + if ( w && formwindow->widgets()->find( (TQWidget*)w ) ) comment = MetaDataBase::propertyComment( w, name ); switch ( t ) { case TQVariant::String: @@ -1644,7 +1644,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQL */ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) { - const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, true ), true ); + const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->findProperty( prop, true ), true ); if ( !obj->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {// no layouts in metadatabase... (RS) if ( obj->inherits( "CustomWidget" ) ) { @@ -1920,9 +1920,9 @@ void Resource::saveConnections( TQTextStream &ts, int indent ) TQValueList::Iterator it = connections.begin(); for ( ; it != connections.end(); ++it ) { MetaDataBase::Connection conn = *it; - if ( ( knownNames.tqfindIndex( TQString( conn.sender->name() ) ) == -1 && + if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 && qstrcmp( conn.sender->name(), "this" ) != 0 ) || - ( knownNames.tqfindIndex( TQString( conn.receiver->name() ) ) == -1 && + ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) continue; if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && @@ -2080,7 +2080,7 @@ void Resource::saveCustomWidgets( TQTextStream &ts, int indent ) TQPtrList *lst = MetaDataBase::customWidgets(); for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - if ( usedCustomWidgets.tqfindIndex( w->className ) == -1 ) + if ( usedCustomWidgets.findIndex( w->className ) == -1 ) continue; ts << makeIndent( indent ) << "" << endl; indent++; @@ -2214,7 +2214,7 @@ void Resource::saveTabOrder( TQTextStream &ts, int indent ) indent++; for ( TQWidget *w = l.first(); w; w = l.next() ) { - if ( w->testWState( TQt::WState_ForceHide ) || knownNames.tqfindIndex( w->name() ) == -1 ) + if ( w->testWState( TQt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 ) continue; ts << makeIndent( indent ) << "" << w->name() << "" << endl; } @@ -2547,9 +2547,9 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) for ( int i = 0; i < (int)mw->menuBar()->count(); ++i ) { ts << makeIndent( indent ) << "menuBar()->text( mw->menuBar()->idAt( i ) ) ) - << "\" name=\"" << entitize( mw->menuBar()->tqfindItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl; + << "\" name=\"" << entitize( mw->menuBar()->findItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl; indent++; - TQMenuItem *m = mw->menuBar()->tqfindItem( mw->menuBar()->idAt( i ) ); + TQMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) ); if ( !m ) continue; TQPtrList actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions(); @@ -2668,7 +2668,7 @@ void Resource::saveFormCode() for ( ; sit != slotList.end(); ++sit ) { MetaDataBase::Slot slot = *sit; TQMap::Iterator it = - functionBodies.tqfind( MetaDataBase::normalizeSlot( (*sit).slot ) ); + functionBodies.find( MetaDataBase::normalizeSlot( (*sit).slot ) ); LanguageInterface::Function func; func.name = slot.slot; func.body = *it; @@ -2700,14 +2700,14 @@ void Resource::saveFormCode() static TQString make_function_pretty( const TQString &s ) { TQString res = s; - if ( res.tqfind( ")" ) - res.tqfind( "(" ) == 1 ) + if ( res.find( ")" ) - res.find( "(" ) == 1 ) return res; - res.tqreplace( TQRegExp( "[(]" ), "( " ); - res.tqreplace( TQRegExp( "[)]" ), " )" ); - res.tqreplace( TQRegExp( "&" ), " &" ); - res.tqreplace( TQRegExp( "[*]" ), " *" ); - res.tqreplace( TQRegExp( "," ), ", " ); - res.tqreplace( TQRegExp( ":" ), " : " ); + res.replace( TQRegExp( "[(]" ), "( " ); + res.replace( TQRegExp( "[)]" ), " )" ); + res.replace( TQRegExp( "&" ), " &" ); + res.replace( TQRegExp( "[*]" ), " *" ); + res.replace( TQRegExp( "," ), ", " ); + res.replace( TQRegExp( ":" ), " : " ); res = res.simplifyWhiteSpace(); return res; } @@ -2747,7 +2747,7 @@ void Resource::loadFunctions( const TQDomElement &e ) ( (*it).returnType.isEmpty() ? TQString( "void" ) : (*it).returnType ) ); - TQMap::Iterator bit = bodies.tqfind( MetaDataBase::normalizeSlot( (*it).slot ) ); + TQMap::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) ); if ( bit != bodies.end() ) code += "\n" + *bit + "\n\n"; else diff --git a/kommander/editor/tableeditorimpl.cpp b/kommander/editor/tableeditorimpl.cpp index e5b39340..777fd874 100644 --- a/kommander/editor/tableeditorimpl.cpp +++ b/kommander/editor/tableeditorimpl.cpp @@ -132,11 +132,11 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i ) #ifndef TQT_NO_TABLE if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) { - TQString s = *fieldMap.tqfind( listColumns->index( i ) ); + TQString s = *fieldMap.find( listColumns->index( i ) ); if ( s.isEmpty() ) comboFields->setCurrentItem( 0 ); - else if ( comboFields->listBox()->tqfindItem( s ) ) - comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->tqfindItem( s ) ) ); + else if ( comboFields->listBox()->findItem( s ) ) + comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->findItem( s ) ) ); else comboFields->lineEdit()->setText( s ); } @@ -208,7 +208,7 @@ void TableEditor::newColumnClicked() m.insert( table->horizontalHeader()->label( i ), true ); int n = table->numCols() - 1; TQString t = TQString::number( n ); - while ( m.tqfind( t ) != m.end() ) + while ( m.find( t ) != m.end() ) t = TQString::number( ++n ); table->horizontalHeader()->setLabel( table->numCols() - 1, t ); listColumns->insertItem( t ); @@ -233,7 +233,7 @@ void TableEditor::newRowClicked() m.insert( table->verticalHeader()->label( i ), true ); int n = table->numRows() - 1; TQString t = TQString::number( n ); - while ( m.tqfind( t ) != m.end() ) + while ( m.find( t ) != m.end() ) t = TQString::number( ++n ); table->verticalHeader()->setLabel( table->numRows() - 1, t ); listRows->insertItem( t ); @@ -302,7 +302,7 @@ void TableEditor::applyClicked() col.text = table->horizontalHeader()->label( i ); if ( table->horizontalHeader()->iconSet( i ) ) col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); - col.field = *fieldMap.tqfind( i ); + col.field = *fieldMap.find( i ); cols.append( col ); } for ( i = 0; i < table->verticalHeader()->count(); ++i ) { @@ -392,7 +392,7 @@ void TableEditor::readFromTable() table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) ); listColumns->insertItem( editTable->horizontalHeader()->label( i ) ); } - TQString cf = *columnFields.tqfind( editTable->horizontalHeader()->label( i ) ); + TQString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) ); fieldMap.insert( i, cf ); } diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp index 63f5c2d8..37c9672d 100644 --- a/kommander/editor/widgetdatabase.cpp +++ b/kommander/editor/widgetdatabase.cpp @@ -867,14 +867,14 @@ int WidgetDatabase::idFromClassName( const TQString &name ) setupDataBase( -1 ); if ( name.isEmpty() ) return 0; - int *i = className2Id->tqfind( name ); + int *i = className2Id->find( name ); if ( i ) return *i; if ( name == "FormWindow" ) return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ); #ifdef UIC setupDataBase( -2 ); - i = className2Id->tqfind( name ); + i = className2Id->find( name ); if ( i ) return *i; #endif @@ -883,7 +883,7 @@ int WidgetDatabase::idFromClassName( const TQString &name ) bool WidgetDatabase::hasWidget( const TQString &name ) { - return className2Id->tqfind( name ) != 0; + return className2Id->find( name ) != 0; } WidgetDatabaseRecord *WidgetDatabase::at( int index ) @@ -916,7 +916,7 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r ) TQString WidgetDatabase::widgetGroup( const TQString &g ) { - if ( wGroups->tqfind( g ) == -1 ) + if ( wGroups->find( g ) == -1 ) wGroups->append( g ); return g; } @@ -957,7 +957,7 @@ int WidgetDatabase::numWidgetGroups() bool WidgetDatabase::isGroupVisible( const TQString &g ) { setupDataBase( -1 ); - return invisibleGroups->tqfind( g ) == -1; + return invisibleGroups->find( g ) == -1; } int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r ) diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp index 43011071..f33d27b3 100644 --- a/kommander/editor/widgetfactory.cpp +++ b/kommander/editor/widgetfactory.cpp @@ -232,7 +232,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) int index = 0; TQRect rect; for ( ; index < tabBar()->count(); index++ ) { - if ( tabBar()->tabAt( index )->rect().tqcontains( de->pos() ) ) { + if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { rect = tabBar()->tabAt( index )->rect(); break; } @@ -241,7 +241,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) if ( index == tabBar()->count() -1 ) { TQRect rect2 = rect; rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.tqcontains( de->pos() ) ) + if ( rect2.contains( de->pos() ) ) index++; } @@ -269,20 +269,20 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) int newIndex = 0; for ( ; newIndex < tabBar()->count(); newIndex++ ) { - if ( tabBar()->tabAt( newIndex )->rect().tqcontains( de->pos() ) ) + if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) ) break; } if ( newIndex == tabBar()->count() -1 ) { TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.tqcontains( de->pos() ) ) + if ( rect2.contains( de->pos() ) ) newIndex++; } int oldIndex = 0; for ( ; oldIndex < tabBar()->count(); oldIndex++ ) { - if ( tabBar()->tabAt( oldIndex )->rect().tqcontains( pressPoint ) ) + if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) ) break; } @@ -365,7 +365,7 @@ int QDesignerWizard::pageNum( TQWidget *p ) void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) { TQWizard::addPage( p, t ); - if ( removedPages.tqfind( p ) ) + if ( removedPages.find( p ) ) removedPages.remove( p ); } @@ -378,7 +378,7 @@ void QDesignerWizard::removePage( TQWidget *p ) void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) { TQWizard::insertPage( p, t, index ); - if ( removedPages.tqfind( p ) ) + if ( removedPages.find( p ) ) removedPages.remove( p ); } @@ -406,9 +406,9 @@ void WidgetFactory::saveDefaultProperties( TQWidget *w, int id ) var = TQVariant( TQPixmap() ); else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 ) var = TQVariant( TQIconSet() ); - propMap.tqreplace( lst.at( i ), var ); + propMap.replace( lst.at( i ), var ); } - defaultProperties->tqreplace( id, propMap ); + defaultProperties->replace( id, propMap ); } static void saveChangedProperties( TQWidget *w, int id ) @@ -512,7 +512,7 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e ) int index = 0; TQRect rect; for ( ; index < tabBar()->count(); index++ ) { - if ( tabBar()->tabAt( index )->rect().tqcontains( de->pos() ) ) { + if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { rect = tabBar()->tabAt( index )->rect(); break; } @@ -521,7 +521,7 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e ) if ( index == tabBar()->count() -1 ) { TQRect rect2 = rect; rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.tqcontains( de->pos() ) ) + if ( rect2.contains( de->pos() ) ) index++; } @@ -549,20 +549,20 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e ) int newIndex = 0; for ( ; newIndex < tabBar()->count(); newIndex++ ) { - if ( tabBar()->tabAt( newIndex )->rect().tqcontains( de->pos() ) ) + if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) ) break; } if ( newIndex == tabBar()->count() -1 ) { TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.tqcontains( de->pos() ) ) + if ( rect2.contains( de->pos() ) ) newIndex++; } int oldIndex = 0; for ( ; oldIndex < tabBar()->count(); oldIndex++ ) { - if ( tabBar()->tabAt( oldIndex )->rect().tqcontains( pressPoint ) ) + if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) ) break; } @@ -660,9 +660,9 @@ TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, b return 0; MetaDataBase::addEntry(TQT_TQOBJECT(w)); - if (!defaultProperties->tqcontains(id)) + if (!defaultProperties->contains(id)) saveDefaultProperties(w, id); - if (!changedProperties->tqcontains(id)) + if (!changedProperties->contains(id)) saveChangedProperties(w, id); return w; @@ -1530,7 +1530,7 @@ bool WidgetFactory::hasSpecialEditor( int id ) return true; if (className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING) return true; - if (className.tqcontains("Table")) + if (className.contains("Table")) return true; return false; @@ -1544,7 +1544,7 @@ bool WidgetFactory::hasItems( int id ) return true; if (className.mid(1) == "ListBox" || className.mid(1) == "ListView" || className.mid(1) == "IconView" || className.mid(1) == "ComboBox" || - className.tqcontains("Table")) + className.contains("Table")) return true; return false; @@ -1648,7 +1648,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget return; } #ifndef TQT_NO_TABLE - if (className.tqcontains("Table")) + if (className.contains("Table")) { TableEditor *e = new TableEditor(tqparent, editWidget, fw); e->exec(); @@ -1662,14 +1662,14 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) { if ( propName == "name" || propName == "geometry" ) return false; - TQStringList l = *changedProperties->tqfind( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); - return l.tqfindIndex( propName ) == -1; + TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); + return l.findIndex( propName ) == -1; } bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) { const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()-> - tqfindProperty( propName, true ), true ); + findProperty( propName, true ), true ); if (!p ) return false; return p->reset( w ); @@ -1696,13 +1696,13 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) return TQVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() ); } - return *( *defaultProperties->tqfind( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).tqfind( propName ); + return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName ); } TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) { const TQMetaProperty *p = w->tqmetaObject()-> - property( w->tqmetaObject()->tqfindProperty( propName, true ), true ); + property( w->tqmetaObject()->findProperty( propName, true ), true ); if ( !p ) { int v = defaultValue( w, "tqalignment" ).toInt(); if ( propName == "hAlign" ) { diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h index 9ad4ce6c..178c3172 100644 --- a/kommander/editor/widgetfactory.h +++ b/kommander/editor/widgetfactory.h @@ -208,7 +208,7 @@ public: void addPage( TQWidget *p, const TQString & ); void removePage( TQWidget *p ); void insertPage( TQWidget *p, const TQString &t, int index ); - bool isPageRemoved( TQWidget *p ) { return (removedPages.tqfind( p ) != 0); } + bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); } void reject() {} diff --git a/kommander/editor/workspace.cpp b/kommander/editor/workspace.cpp index ecccce3d..971add70 100644 --- a/kommander/editor/workspace.cpp +++ b/kommander/editor/workspace.cpp @@ -755,7 +755,7 @@ void Workspace::bufferChosen( const TQString &buffer ) bufferEdit->setText( "" ); #ifndef KOMMANDER - if ( MainWindow::self->projectFileNames().tqcontains( buffer ) ) { + if ( MainWindow::self->projectFileNames().contains( buffer ) ) { MainWindow::self->setCurrentProjectByFilename( buffer ); return; } diff --git a/kommander/examples/current/editor-poc.kmdr b/kommander/examples/current/editor-poc.kmdr index 4c678ca8..d5b19e99 100755 --- a/kommander/examples/current/editor-poc.kmdr +++ b/kommander/examples/current/editor-poc.kmdr @@ -73,7 +73,7 @@ _file["dirty"] = true - @Input.text("Kommander Edit", "Text to tqfind", "") + @Input.text("Kommander Edit", "Text to find", "") @@ -179,16 +179,16 @@ while chrs < maxc do //debug("link test = "+str_mid(a, ch, 2)+" pos="+ch) if str_mid(a, ch, 2) == "<a" then inlink = true - lb = str_toint(str_tqfind(a, "\"", ch)+1) - le = str_toint(str_tqfind(a, "\"", lb)) + lb = str_toint(str_find(a, "\"", ch)+1) + le = str_toint(str_find(a, "\"", lb)) linkscript = str_mid(a, lb, le-lb) //debug("link data - "+lb+" "+le+" "+linkscript) elseif str_mid(a, ch, 3) == "<p>" then lc = lc + 1 cc = 0 endif - ck1 = str_toint(str_tqfind(a, ">", ch))+1 - ck2 = str_tqfind(a, "<", ck1) + ck1 = str_toint(str_find(a, ">", ch))+1 + ck2 = str_find(a, "<", ck1) if ck1 == -1 || ck2 == -1 then break endif diff --git a/kommander/examples/current/passvariables.kmdr b/kommander/examples/current/passvariables.kmdr index c8162eda..5a0406ae 100644 --- a/kommander/examples/current/passvariables.kmdr +++ b/kommander/examples/current/passvariables.kmdr @@ -124,7 +124,7 @@ LineEdit6.setText(ret) // test for PHP pt = exec("php --version") -if str_tqcontains(pt, "Zend") then +if str_contains(pt, "Zend") then php = ScriptObjectPHP.execute(LineEdit7.text,LineEdit1.text,LineEdit2.text) LineEdit4.setText(php) else diff --git a/kommander/examples/old/tidy.kmdr b/kommander/examples/old/tidy.kmdr index 26e05120..53623c53 100644 --- a/kommander/examples/old/tidy.kmdr +++ b/kommander/examples/old/tidy.kmdr @@ -1012,7 +1012,7 @@ escape-cdata Boolean y/n, yes/no, t/f, true/false, 1/0 language String - ncr Boolean y/n, yes/no, t/f, true/false, 1/0 output-bom AutoBool auto, y/n, yes/no, t/f, true/false, 1/0 -tqreplace-color Boolean y/n, yes/no, t/f, true/false, 1/0 +replace-color Boolean y/n, yes/no, t/f, true/false, 1/0 css-prefix Name CSS1 selector new-inline-tags Tag names tagX, tagY, ... new-blocklevel-tags Tag names tagX, tagY, ... diff --git a/kommander/examples/tutorial/calc.kmdr b/kommander/examples/tutorial/calc.kmdr index a476c254..2f17439e 100644 --- a/kommander/examples/tutorial/calc.kmdr +++ b/kommander/examples/tutorial/calc.kmdr @@ -194,7 +194,7 @@ @ListBox1.insertItem(@expr(@LineEdit1.text), -1) @LineEdit1.clear -@LineEdit2.setText("Sum: @expr(@String.tqreplace(@ListBox1.text, "\n", "+"))") +@LineEdit2.setText("Sum: @expr(@String.replace(@ListBox1.text, "\n", "+"))") diff --git a/kommander/examples/tutorial/picview.kmdr b/kommander/examples/tutorial/picview.kmdr index 495edaaa..2c51a869 100644 --- a/kommander/examples/tutorial/picview.kmdr +++ b/kommander/examples/tutorial/picview.kmdr @@ -91,7 +91,7 @@ - @exec(cd @FileSelector1.text && tqfind * -name "*.jpg" -o -name "*.png" -o -name "*.gif" -o -name "*.bmp") + @exec(cd @FileSelector1.text && find * -name "*.jpg" -o -name "*.png" -o -name "*.gif" -o -name "*.bmp") diff --git a/kommander/examples/tutorial/progressbar.kmdr b/kommander/examples/tutorial/progressbar.kmdr index c5b929dc..fc3c327d 100644 --- a/kommander/examples/tutorial/progressbar.kmdr +++ b/kommander/examples/tutorial/progressbar.kmdr @@ -137,12 +137,12 @@ @# set up a loop using loop variable named "file" -@forEach(file, @exec(cd @FileSelector1.text && tqfind * -maxdepth 0)) +@forEach(file, @exec(cd @FileSelector1.text && find * -maxdepth 0)) @# set the scale using the generated @[loopvar]_count @ProgressBar1.setMaximum(@file_count) @# show file name in statusbar @StatusBar1.setText(@file) - @TreeWidget1.insertItems(@exec(cd @FileSelector1.text && tqfind @file -name "*"), -1) + @TreeWidget1.insertItems(@exec(cd @FileSelector1.text && find @file -name "*"), -1) @# use the generated @[loopvar]_index to update progressbar @ProgressBar1.setText(@file_index) @end diff --git a/kommander/examples/tutorial/strings.kmdr b/kommander/examples/tutorial/strings.kmdr index ce0b469b..15cfe615 100644 --- a/kommander/examples/tutorial/strings.kmdr +++ b/kommander/examples/tutorial/strings.kmdr @@ -49,13 +49,13 @@ <b>Last 5 chars:</b> @String.right("@LineEdit1", 5)<br> <b>Chars from 6th to 10th:</b> @String.mid("@LineEdit1", 6, 5)<br> <b>Remove spaces:</b> @String.remove("@LineEdit1", " ")<br> -<b>Replace spaces with *</b>: @String.tqreplace("@LineEdit1", " ", *)<br> +<b>Replace spaces with *</b>: @String.replace("@LineEdit1", " ", *)<br> <b>Uppercase:</b> @String.upper("@LineEdit1")<br> <b>Lowercase:</b> @String.lower("@LineEdit1")<br> <b>Is a number?:</b> @Array.value(Bool, @String.isNumber("@LineEdit1"))<br> <b>Is empty?</b> @Array.value(Bool, @String.isEmpty("@LineEdit1"))<br> -<b>Contains "Kommander"?:</b> @String.tqcontains("@LineEdit1", "Kommander")<br> -<b>Position of "Kommander":</b> @String.tqfind("@LineEdit1", "Kommander")<br> +<b>Contains "Kommander"?:</b> @String.contains("@LineEdit1", "Kommander")<br> +<b>Position of "Kommander":</b> @String.find("@LineEdit1", "Kommander")<br> <b>Compare with "Kommander":</b> @execBegin if [ @String.compare("@LineEdit1", "Kommander") -lt 0 ];then diff --git a/kommander/examples/tutorial/tree.kmdr b/kommander/examples/tutorial/tree.kmdr index dc1bc996..0e5d76df 100644 --- a/kommander/examples/tutorial/tree.kmdr +++ b/kommander/examples/tutorial/tree.kmdr @@ -60,7 +60,7 @@ @TreeWidget1.clear -@TreeWidget1.insertItems(@exec(cd @FileSelector1.text && tqfind * -name "*.kmdr"), -1) +@TreeWidget1.insertItems(@exec(cd @FileSelector1.text && find * -name "*.kmdr"), -1) diff --git a/kommander/executor/instance.cpp b/kommander/executor/instance.cpp index d24e856a..88d7d7ec 100644 --- a/kommander/executor/instance.cpp +++ b/kommander/executor/instance.cpp @@ -67,7 +67,7 @@ void Instance::addCmdlineArguments(const TQStringList& args) TQStringList stdArgs; for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) { - int pos = (*it).tqfind('='); + int pos = (*it).find('='); if (pos != -1) m_textInstance->setGlobal((*it).left(pos), (*it).mid(pos+1)); else diff --git a/kommander/executor/main.cpp b/kommander/executor/main.cpp index d49dd373..00d7e509 100644 --- a/kommander/executor/main.cpp +++ b/kommander/executor/main.cpp @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) { char buf[200]; TQString baseFile = args->url(0).fileName(); - int ext = baseFile.tqfindRev('.'); + int ext = baseFile.findRev('.'); if (ext != -1) baseFile = baseFile.left(ext); strcpy(buf, baseFile.latin1()); diff --git a/kommander/executor/register.cpp b/kommander/executor/register.cpp index 5a442326..db794e25 100644 --- a/kommander/executor/register.cpp +++ b/kommander/executor/register.cpp @@ -80,15 +80,15 @@ void Instance::registerSpecials() SpecialInformation::setCurrentObject("String"); SpecialInformation::insert("length", 1, 1, i18n( "Return number of chars in the string.") ); - SpecialInformation::insert("tqcontains", 2, 2, i18n( "Check if the string contains given substring.") ); - SpecialInformation::insert("tqfind", 2, 2, i18n( "Return position of a substring in the string, " + SpecialInformation::insert("contains", 2, 2, i18n( "Check if the string contains given substring.") ); + SpecialInformation::insert("find", 2, 2, i18n( "Return position of a substring in the string, " "or -1 if it isn't found.") ); SpecialInformation::insert("left", 2, 2, i18n( "Return first n chars of the string.") ); SpecialInformation::insert("right", 2, 2, i18n( "Return last n chars of the string.") ); SpecialInformation::insert("mid", 3, 3, i18n( "Return substring of the string, starting from " "given position.") ); SpecialInformation::insert("remove", 2, 2, i18n( "Replace all occurencies of given substring.") ); - SpecialInformation::insert("tqreplace", 3, 3, i18n( "Replace all occurencies of given substring " + SpecialInformation::insert("replace", 3, 3, i18n( "Replace all occurencies of given substring " "with given replacement.") ); SpecialInformation::insert("upper", 1, 1, i18n( "Convert the string to uppercase.") ); SpecialInformation::insert("lower", 1, 1, i18n( "Convert the string to lowercase.") ); diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp index 504af6f9..5b1e12bc 100644 --- a/kommander/factory/kommanderfactory.cpp +++ b/kommander/factory/kommanderfactory.cpp @@ -150,7 +150,7 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg TQTextStream stream(dev); TQString content = stream.read(); if (content.startsWith("#!")) - content = content.mid(content.tqfind('\n')); + content = content.mid(content.find('\n')); if ( !doc.setContent( content ) ) { // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); return 0; @@ -233,7 +233,7 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg for ( TQDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) if ( n.tagName() == "slot" ) { TQString s = n.firstChild().toText().data(); - widgetFactory->languageSlots.insert( s.left( s.tqfind( "(" ) ) , n.attribute( "language", "C++" ) ); + widgetFactory->languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language", "C++" ) ); } } @@ -257,7 +257,7 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg #ifndef TQT_NO_SQL TQMap::Iterator cit = widgetFactory->sqlWidgetConnections.begin(); for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) { - if ( widgetFactory->noDatabaseWidgets.tqfind( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() ) + if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() ) continue; if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); @@ -269,9 +269,9 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key(), TQDATATABLE_OBJECT_NAME_STRING ); if ( !table ) continue; - if ( widgetFactory->noDatabaseWidgets.tqfind( table->name() ) != widgetFactory->noDatabaseWidgets.end() ) + if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != widgetFactory->noDatabaseWidgets.end() ) continue; - TQValueList fieldMap = *widgetFactory->fieldMaps.tqfind( table ); + TQValueList fieldMap = *widgetFactory->fieldMaps.find( table ); TQString conn = (*it)[ 0 ]; TQSqlCursor* c = 0; TQSqlDatabase *db = 0; @@ -728,7 +728,7 @@ KommanderFactory::LayoutType KommanderFactory::layoutType( TQLayout *tqlayout ) void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) { - const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, true ), true ); + const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->findProperty( prop, true ), true ); TQVariant defVariant; if ( e.tagName() == "font" ) { @@ -1101,14 +1101,14 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect TQStrList slotList = receiver->tqmetaObject()->slotNames( true ); // if this is a connection to a custom slot and we have a connector, try this as receiver - if ( slotList.tqfind( conn.slot ) == -1 && TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel) && connector ) { + if ( slotList.find( conn.slot ) == -1 && TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel) && connector ) { slotList = connector->tqmetaObject()->slotNames( true ); receiver = connector; } // avoid warnings - if ( signalList.tqfind( conn.signal ) == -1 || - slotList.tqfind( conn.slot ) == -1 ) { + if ( signalList.find( conn.signal ) == -1 || + slotList.find( conn.slot ) == -1 ) { n = n.nextSibling().toElement(); continue; } @@ -1117,11 +1117,11 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect EventFunction ef = eventMap[ conn.sender ]; ef.events.append( conn.signal ); ef.functions.append( TQStringList::split( ',', conn.slot ) ); - eventMap.tqreplace( conn.sender, ef ); + eventMap.replace( conn.sender, ef ); } } else if ( n.tagName() == "slot" ) { TQString s = n.firstChild().toText().data(); - languageSlots.insert( s.left( s.tqfind( "(" ) ) , n.attribute( "language" ) ); + languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language" ) ); } n = n.nextSibling().toElement(); } @@ -1206,8 +1206,8 @@ void KommanderFactory::createColumn( const TQDomElement &e, TQWidget *widget ) TQString txt; TQString field; TQValueList fieldMap; - if ( fieldMaps.tqfind( table ) != fieldMaps.end() ) { - fieldMap = *fieldMaps.tqfind( table ); + if ( fieldMaps.find( table ) != fieldMaps.end() ) { + fieldMap = *fieldMaps.find( table ); fieldMaps.remove( table ); } while ( !n.isNull() ) { diff --git a/kommander/kmdrtools/dcoptool-oldparser.kmdr b/kommander/kmdrtools/dcoptool-oldparser.kmdr index 26b2d0c2..a5c2f55e 100755 --- a/kommander/kmdrtools/dcoptool-oldparser.kmdr +++ b/kommander/kmdrtools/dcoptool-oldparser.kmdr @@ -105,14 +105,14 @@ append(QString,QString)") @setGlobal(KommanderMessage,"") @setGlobal(String,"length(QString) -tqcontains(QString,QString) -tqfind(QString,QString,int) -tqfindRev(QString,QString,int) +contains(QString,QString) +find(QString,QString,int) +findRev(QString,QString,int) left(QString,int) right(QString,int) mid(QString,int,int) remove(QString,QString) -tqreplace(QString,QString,QString) +replace(QString,QString,QString) upper(QString) lower(QString) compare(QString,QString) @@ -400,9 +400,9 @@ args(QString,QString,QString,QString)") @switch(@String.mid(@dcopstr.selection, 1, 4)) @case(dcop) - @setGlobal("outstring","@dcopstr.selection @window.selection, @branch.selection, "@proto.selection", @String.mid(@wname.selection, 0, @String.tqfind(@wname.selection, " ", ))@param1@param2@param3@param4)") + @setGlobal("outstring","@dcopstr.selection @window.selection, @branch.selection, "@proto.selection", @String.mid(@wname.selection, 0, @String.find(@wname.selection, " ", ))@param1@param2@param3@param4)") @case(cop) - @setGlobal("outstring","@dcopstr.selection @window.selection @branch.selection @global(short) @String.mid(@wname.selection, 0, @String.tqfind(@wname.selection, " ", ))@param1@param2@param3@param4") + @setGlobal("outstring","@dcopstr.selection @window.selection @branch.selection @global(short) @String.mid(@wname.selection, 0, @String.find(@wname.selection, " ", ))@param1@param2@param3@param4") @case(*) @setGlobal("outstring","@dcopstr.selection - not found") @end @@ -1445,29 +1445,29 @@ fi @setGlobal(PARM4,"") @setGlobal(short,length) @setGlobal(DESC,"Returns number of chars in the string.") -@case(String::tqcontains(QString,QString)) +@case(String::contains(QString,QString)) @setGlobal(enWidget,0) @setGlobal(PARM1,"string") @setGlobal(PARM2,"substring") @setGlobal(PARM3,"") @setGlobal(PARM4,"") - @setGlobal(short,tqcontains) + @setGlobal(short,contains) @setGlobal(DESC,"Checks if the the string contains the given substring.") -@case(String::tqfind(QString,QString,int)) +@case(String::find(QString,QString,int)) @setGlobal(enWidget,0) @setGlobal(PARM1,"string") @setGlobal(PARM2,"sought") @setGlobal(PARM3,"index") @setGlobal(PARM4,"") - @setGlobal(short,tqfind) + @setGlobal(short,find) @setGlobal(DESC,"Returns the position of a substring in the string, or -1 if it is not found.") -@case(String::tqfindRev(QString,QString,int)) +@case(String::findRev(QString,QString,int)) @setGlobal(enWidget,0) @setGlobal(PARM1,"string") @setGlobal(PARM2,"sought") @setGlobal(PARM3,"index") @setGlobal(PARM4,"") - @setGlobal(short,tqfindRev) + @setGlobal(short,findRev) @setGlobal(DESC,"Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards") @case(String::left(QString,int)) @setGlobal(enWidget,0) @@ -1501,13 +1501,13 @@ fi @setGlobal(PARM4,"") @setGlobal(short,remove) @setGlobal(DESC,"Removes all occurrences of given substring.") -@case(String::tqreplace(QString,QString,QString)) +@case(String::replace(QString,QString,QString)) @setGlobal(enWidget,0) @setGlobal(PARM1,"string") @setGlobal(PARM2,"substring") @setGlobal(PARM3,"replacement") @setGlobal(PARM4,"") - @setGlobal(short,tqreplace) + @setGlobal(short,replace) @setGlobal(DESC,"Replaces all occurrences of the given substring with the given replacement.") @case(String::upper(QString)) @setGlobal(enWidget,0) @@ -1879,7 +1879,7 @@ setEditable(QString,bool)") @##### put the following in @wfilter checked ######### -@setGlobal(start,@expr(@String.tqfind("@wname.selection", " ")+2)) +@setGlobal(start,@expr(@String.find("@wname.selection", " ")+2)) @setGlobal(stop,@expr(@String.length("@wname.selection")-1)) @setGlobal(length,@expr(@global(stop)-@global(start))) @setGlobal(teststr, @String.lower(@String.mid("@wname.selection", @global(start), @global(length)))) diff --git a/kommander/plugin/specialinformation.cpp b/kommander/plugin/specialinformation.cpp index 75faf9e0..a653dfd6 100644 --- a/kommander/plugin/specialinformation.cpp +++ b/kommander/plugin/specialinformation.cpp @@ -22,8 +22,8 @@ SpecialFunction::SpecialFunction(const TQString& name, const TQString& descripti int minArgs, int maxArgs) { m_parserTypes = AllParsers; - int lbracket = name.tqfind('('); - int rbracket = name.tqfind(')'); + int lbracket = name.find('('); + int rbracket = name.find(')'); m_function = (lbracket != -1) ? name.left(lbracket) : name; m_description = description; if (lbracket != -1 && rbracket != -1) @@ -44,8 +44,8 @@ SpecialFunction::SpecialFunction(ParserType p, const TQString& name, const TQStr int minArgs, int maxArgs) { m_parserTypes = p; - int lbracket = name.tqfind('('); - int rbracket = name.tqfind(')'); + int lbracket = name.find('('); + int rbracket = name.find(')'); m_function = (lbracket != -1) ? name.left(lbracket) : name; m_description = description; if (lbracket != -1 && rbracket != -1) @@ -107,9 +107,9 @@ int SpecialFunction::argumentCount() const int SpecialInformation::function(int group, const TQString& fname) { TQString f = fname.lower(); - if (m_functions.tqcontains(group) && m_functions[group].tqcontains(f)) + if (m_functions.contains(group) && m_functions[group].contains(f)) return m_functions[group][f]; - else if (m_aliases.tqcontains(group) && m_aliases[group].tqcontains(f)) + else if (m_aliases.contains(group) && m_aliases[group].contains(f)) return m_aliases[group][f]; return -1; } @@ -122,14 +122,14 @@ SpecialFunction SpecialInformation::functionObject(const TQString& gname, const int SpecialInformation::group(const TQString& gname) { - if (m_groups.tqcontains(gname)) + if (m_groups.contains(gname)) return m_groups[gname]; return -1; } bool SpecialInformation::isValid(int gname, int fname) { - return m_specials.tqcontains(gname) && m_specials[gname].tqcontains(fname); + return m_specials.contains(gname) && m_specials[gname].contains(fname); } bool SpecialInformation::isValid(const TQString& gname, const TQString& fname) @@ -139,7 +139,7 @@ bool SpecialInformation::isValid(const TQString& gname, const TQString& fname) bool SpecialInformation::isValid(int gname, int fname, SpecialFunction::ParserType p) { - return m_specials.tqcontains(gname) && m_specials[gname].tqcontains(fname) + return m_specials.contains(gname) && m_specials[gname].contains(fname) && m_specials[gname][fname].isSupported(p); } @@ -198,9 +198,9 @@ bool SpecialInformation::insert(int id, const TQString& function, const TQString { if (isValid(m_defaultGroup, id)) /* function already defined */ return false; - if (m_functions[m_defaultGroup].tqcontains(function.lower())) + if (m_functions[m_defaultGroup].contains(function.lower())) return false; /* function name already in use */ - if (m_aliases[m_defaultGroup].tqcontains(function.lower())) + if (m_aliases[m_defaultGroup].contains(function.lower())) return false; /* function name already in use */ SpecialFunction sf(pType, function, description, minArgs, maxArgs); m_specials[m_defaultGroup][id] = sf; @@ -224,9 +224,9 @@ bool SpecialInformation::insertAlias(int id, const TQString& alias) { if (!isValid(m_defaultGroup, id)) /* function doesn't exists */ return false; - if (m_functions[m_defaultGroup].tqcontains(alias.lower())) + if (m_functions[m_defaultGroup].contains(alias.lower())) return false; - if (m_aliases[m_defaultGroup].tqcontains(alias.lower())) + if (m_aliases[m_defaultGroup].contains(alias.lower())) return false; m_aliases[m_defaultGroup][alias] = id; return true; @@ -248,7 +248,7 @@ void SpecialInformation::insertGroup(int id, const TQString& name, const TQStrin TQString SpecialInformation::parserGroupName(const TQString& name) { - if (m_parserGroups.tqcontains(name)) + if (m_parserGroups.contains(name)) return m_parserGroups[name]; else return name; @@ -524,11 +524,11 @@ void SpecialInformation::registerSpecials() insertGroup(Group::String, "String", "str"); insert(String::length, "length(TQString string)", i18n("Returns number of chars in the string."), 1); - insert(String::tqcontains, "tqcontains(TQString string, TQString substring)", + insert(String::contains, "contains(TQString string, TQString substring)", i18n("Checks if the the string contains the given substring."), 2); - insert(String::tqfind, "tqfind(TQString string, TQString sought, int index)", + insert(String::find, "find(TQString string, TQString sought, int index)", i18n("Returns the position of a substring in the string, or -1 if it is not found."), 2); - insert(String::tqfindRev, "tqfindRev(TQString string, TQString sought, int index)", + insert(String::findRev, "findRev(TQString string, TQString sought, int index)", i18n("Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards"), 2); insertInternal(String::count, "count(TQString String, TQString substring)", i18n("Returns the count of a given substring in the given string."), 2); @@ -540,7 +540,7 @@ void SpecialInformation::registerSpecials() i18n("Returns n chars of the string, starting from start."), 3); insert(String::remove, "remove(TQString string, TQString substring)", i18n("Removes all occurrences of given substring."), 2); - insert(String::tqreplace, "tqreplace(TQString string, TQString substring, TQString replacement)", + insert(String::replace, "replace(TQString string, TQString substring, TQString replacement)", i18n("Replaces all occurrences of the given substring with the given replacement."), 3); insert(String::upper, "upper(TQString string)", i18n("Converts the string to uppercase."), 1); diff --git a/kommander/plugin/specials.h b/kommander/plugin/specials.h index e6e9cf94..793f44dc 100644 --- a/kommander/plugin/specials.h +++ b/kommander/plugin/specials.h @@ -55,7 +55,7 @@ namespace Matrix namespace String { - enum {length, tqcontains, tqfind, tqfindRev, left, right, mid, remove, tqreplace, upper, lower, + enum {length, contains, find, findRev, left, right, mid, remove, replace, upper, lower, compare, isEmpty, isNumber, section, args, toInt, toDouble, round, sort, trim, padLeft, padRight, count}; } diff --git a/kommander/pluginmanager/pluginmanager.cpp b/kommander/pluginmanager/pluginmanager.cpp index 2bfbab89..79da4d81 100644 --- a/kommander/pluginmanager/pluginmanager.cpp +++ b/kommander/pluginmanager/pluginmanager.cpp @@ -47,7 +47,7 @@ bool PluginManager::add(const TQString& plugin, bool) TQString plugName= libraryName(plugin); if (plugName.isNull()) return false; - if (m_list->tqcontains(plugName)) + if (m_list->contains(plugName)) return false; m_list->append(plugName); return true; @@ -55,7 +55,7 @@ bool PluginManager::add(const TQString& plugin, bool) bool PluginManager::remove(const TQString& plugin) { - if (!m_list->tqcontains(plugin)) + if (!m_list->contains(plugin)) return false; m_list->remove(plugin); return true; diff --git a/kommander/widget/expression.cpp b/kommander/widget/expression.cpp index 350646e1..d29d94e8 100644 --- a/kommander/widget/expression.cpp +++ b/kommander/widget/expression.cpp @@ -57,7 +57,7 @@ Expression& Expression::operator=(const TQString& s) m_parts.append(TQVariant(s.mid(start, i - start).toDouble())); else m_parts.append(TQVariant(s.mid(start, i - start).toInt())); - } else if (single.tqcontains(s[i])) + } else if (single.contains(s[i])) m_parts.append(TQVariant(TQString(s[i++]))); else if (s[i] == '\"') { diff --git a/kommander/widget/functionlib.cpp b/kommander/widget/functionlib.cpp index 90a8ef28..da699bd2 100644 --- a/kommander/widget/functionlib.cpp +++ b/kommander/widget/functionlib.cpp @@ -52,7 +52,7 @@ static ParseNode f_stringLength(Parser*, const ParameterList& params) static ParseNode f_stringContains(Parser*, const ParameterList& params) { - return params[0].toString().tqcontains(params[1].toString()); + return params[0].toString().contains(params[1].toString()); } static ParseNode f_stringCompare(Parser*, const ParameterList& params) @@ -71,12 +71,12 @@ static ParseNode f_stringCompare(Parser*, const ParameterList& params) static ParseNode f_stringFind(Parser*, const ParameterList& params) { - return params[0].toString().tqfind(params[1].toString(), params.count() == 3 ? params[2].toInt() : 0); + return params[0].toString().find(params[1].toString(), params.count() == 3 ? params[2].toInt() : 0); } static ParseNode f_stringFindRev(Parser*, const ParameterList& params) { - return params[0].toString().tqfindRev(params[1].toString(), + return params[0].toString().findRev(params[1].toString(), params.count() == 3 ? params[2].toInt() : params[0].toString().length()); } @@ -102,7 +102,7 @@ static ParseNode f_stringRemove(Parser*, const ParameterList& params) static ParseNode f_stringReplace(Parser*, const ParameterList& params) { - return params[0].toString().tqreplace(params[1].toString(), params[2].toString()); + return params[0].toString().replace(params[1].toString(), params[2].toString()); } static ParseNode f_stringLower(Parser*, const ParameterList& params) @@ -354,7 +354,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params) else if (*it == "bool") byteDataStream << (bool)params[i++].toInt(); else if (*it == TQSTRINGLIST_OBJECT_NAME_STRING) - if (params[i].toString().tqfind('\n') != -1) + if (params[i].toString().find('\n') != -1) byteDataStream << TQStringList::split("\n", params[i++].toString(), true); else byteDataStream << TQStringList::split("\\n", params[i++].toString(), true); @@ -648,7 +648,7 @@ static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& pa return ParseNode(); //out of index range for (int i = 0; i < count; i++) { - if (keys.tqcontains(TQString::number(i)) != 1) + if (keys.contains(TQString::number(i)) != 1) return ParseNode(); //array is not indexed } for (int i = key; i <= key + num; i++) @@ -910,15 +910,15 @@ static ParseNode f_write_setting(Parser* parser, const ParameterList& params) void ParserData::registerStandardFunctions() { registerFunction("str_length", Function(&f_stringLength, ValueInt, ValueString)); - registerFunction("str_tqcontains", Function(&f_stringContains, ValueInt, ValueString, ValueString)); + registerFunction("str_contains", Function(&f_stringContains, ValueInt, ValueString, ValueString)); registerFunction("str_compare", Function(&f_stringCompare, ValueInt, ValueString, ValueString)); - registerFunction("str_tqfind", Function(&f_stringFind, ValueInt, ValueString, ValueString, ValueInt, 2)); + registerFunction("str_find", Function(&f_stringFind, ValueInt, ValueString, ValueString, ValueInt, 2)); registerFunction("str_findrev", Function(&f_stringFindRev, ValueInt, ValueString, ValueString, ValueInt, 2)); registerFunction("str_left", Function(&f_stringLeft, ValueString, ValueString, ValueInt)); registerFunction("str_right", Function(&f_stringRight, ValueString, ValueString, ValueInt)); registerFunction("str_mid", Function(&f_stringMid, ValueString, ValueString, ValueInt, ValueInt, 2)); registerFunction("str_remove", Function(&f_stringRemove, ValueString, ValueString, ValueString)); - registerFunction("str_tqreplace", Function(&f_stringReplace, ValueString, ValueString, ValueString, ValueString)); + registerFunction("str_replace", Function(&f_stringReplace, ValueString, ValueString, ValueString, ValueString)); registerFunction("str_lower", Function(&f_stringLower, ValueString, ValueString)); registerFunction("str_upper", Function(&f_stringUpper, ValueString, ValueString)); registerFunction("str_section", Function(&f_stringSection, ValueString, ValueString, ValueString, ValueInt, ValueInt, 3)); diff --git a/kommander/widget/invokeclass.cpp b/kommander/widget/invokeclass.cpp index ec08dfff..a82a5305 100644 --- a/kommander/widget/invokeclass.cpp +++ b/kommander/widget/invokeclass.cpp @@ -23,7 +23,7 @@ InvokeClass::InvokeClass(TQObject *tqparent):TQObject(tqparent) void InvokeClass::invokeSlot(TQObject *object, const TQString& slot, TQStringList args) { TQString invokeName = slot; - invokeName = invokeName.mid(invokeName.tqfind('(')); + invokeName = invokeName.mid(invokeName.find('(')); invokeName.prepend(TQString::number(TQSIGNAL_CODE) + "invoke"); TQString slotName = TQString::number(TQSLOT_CODE) + slot; connect(this, invokeName.ascii(), object, slotName.ascii()); @@ -33,7 +33,7 @@ void InvokeClass::invokeSlot(TQObject *object, const TQString& slot, TQStringLis else { TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1); - uint argNum = slotArgStr.tqcontains(',') + 1; + uint argNum = slotArgStr.contains(',') + 1; for (uint i = args.count(); i < argNum; i++) args << ""; //poor man's invokeMetaObject diff --git a/kommander/widget/kommanderfunctions.cpp b/kommander/widget/kommanderfunctions.cpp index 0ddcb951..701b5e01 100644 --- a/kommander/widget/kommanderfunctions.cpp +++ b/kommander/widget/kommanderfunctions.cpp @@ -114,7 +114,7 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL TQString KommanderWidget::evalExecBlock(const TQStringList& args, const TQString& s, int& pos) { - int f = s.tqfind("@execEnd", pos); + int f = s.find("@execEnd", pos); if (f == -1) { printError(i18n("Unterminated @execBegin ... @execEnd block.")); @@ -131,7 +131,7 @@ TQString KommanderWidget::evalExecBlock(const TQStringList& args, const TQString TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQString& s, int& pos) { - int f = s.tqfind("@end", pos); + int f = s.find("@end", pos); //FIXME: better detection of block boundaries if (f == -1) { @@ -157,7 +157,7 @@ TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQStr TQString KommanderWidget::evalForBlock(const TQStringList& args, const TQString& s, int& pos) { - int f = s.tqfind("@end", pos); + int f = s.find("@end", pos); //FIXME: better detection of block boundaries if (f == -1) { @@ -193,7 +193,7 @@ TQString KommanderWidget::evalForBlock(const TQStringList& args, const TQString& TQString KommanderWidget::evalIfBlock(const TQStringList& args, const TQString& s, int& pos) { - int f = s.tqfind("@endif", pos); + int f = s.find("@endif", pos); //FIXME: better detection of block boundaries; add error message if (f == -1) { @@ -214,7 +214,7 @@ TQString KommanderWidget::evalIfBlock(const TQStringList& args, const TQString& TQString KommanderWidget::evalSwitchBlock(const TQStringList& args, const TQString& s, int& pos) { - int f = s.tqfind("@end", pos); + int f = s.find("@end", pos); //FIXME: better detection of block boundaries; add error message if (f == -1) { diff --git a/kommander/widget/kommanderwidget.cpp b/kommander/widget/kommanderwidget.cpp index 6c9540be..793be627 100644 --- a/kommander/widget/kommanderwidget.cpp +++ b/kommander/widget/kommanderwidget.cpp @@ -74,7 +74,7 @@ TQStringList KommanderWidget::associatedText() const bool KommanderWidget::hasAssociatedText() { - int index = states().tqfindIndex(currentState()); + int index = states().findIndex(currentState()); if (index == -1 || m_associatedText[index].isEmpty()) return false; return true; @@ -113,7 +113,7 @@ void KommanderWidget::setDisplayStates(const TQStringList& a_displayStates) TQString KommanderWidget::evalAssociatedText() // expands and returns associated text as a string { - int index = ( states().tqfindIndex( currentState()) ); + int index = ( states().findIndex( currentState()) ); if (index == -1) { printError(i18n("Invalid state for associated text.")); @@ -143,7 +143,7 @@ TQString KommanderWidget::evalAssociatedText(const TQString& a_text) int pos = 0, baseTextLength = a_text.length(); while (pos < baseTextLength) { - int ident = a_text.tqfind(ESCCHAR, pos); + int ident = a_text.find(ESCCHAR, pos); if (ident == -1) { evalText += a_text.mid(pos); break; @@ -164,7 +164,7 @@ TQString KommanderWidget::evalAssociatedText(const TQString& a_text) if (identifier.isEmpty()) { if (pos < baseTextLength && a_text[pos] == '#') { // comment - int newpos = a_text.tqfind('\n', pos+1); + int newpos = a_text.find('\n', pos+1); if (newpos == -1) newpos = a_text.length(); if (pos > 1 && a_text[pos-2] == '\n') @@ -260,7 +260,7 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query) // parse function arguments TQString function = a_query[2], pTypes; function.remove(' '); - int start = function.tqfind('('); + int start = function.find('('); bool ok = false; if (start != -1) pTypes = parseBrackets(function, start, ok); @@ -296,7 +296,7 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query) else if (argTypes[i] == "bool") byteDataStream << (bool)(a_query[i+3] != "false" && a_query[i+3] != "false" && a_query[i+3] != "0"); else if (argTypes[i] == TQSTRINGLIST_OBJECT_NAME_STRING) - if (a_query[i+3].tqfind('\n') != -1) + if (a_query[i+3].find('\n') != -1) byteDataStream << TQStringList::split("\n", a_query[i+3], true); else byteDataStream << TQStringList::split("\\n", a_query[i+3], true); @@ -616,7 +616,7 @@ int KommanderWidget::parseBlockBoundary(const TQString& s, int from, const TQStr int shortest = -1; for (uint i=0; i match || shortest == -1) shortest = match; } @@ -632,7 +632,7 @@ TQString KommanderWidget::substituteVariable(TQString text, TQString variable, T int newpos, pos = 0; while (true) { - newpos = text.tqfind(var, pos); + newpos = text.find(var, pos); if (newpos != -1) { newtext += text.mid(pos, newpos-pos); diff --git a/kommander/widget/myprocess.cpp b/kommander/widget/myprocess.cpp index 4914a95a..90d2caf0 100644 --- a/kommander/widget/myprocess.cpp +++ b/kommander/widget/myprocess.cpp @@ -74,7 +74,7 @@ TQString MyProcess::run(const TQString& a_command, const TQString& a_shell) // Look for shell if (at.startsWith("#!")) { - int eol = at.tqfind("\n"); + int eol = at.find("\n"); if (eol == -1) eol = at.length(); shellName = at.mid(2, eol-1).stripWhiteSpace(); diff --git a/kommander/widget/parser.cpp b/kommander/widget/parser.cpp index 07ffb88c..848507bb 100644 --- a/kommander/widget/parser.cpp +++ b/kommander/widget/parser.cpp @@ -24,7 +24,7 @@ using namespace Parse; TQString unescape(TQString s) { - return s.tqreplace("\\\"", "\"").tqreplace("\\t", "\t").tqreplace("\\n", "\n").tqreplace("\\\\", "\\"); + return s.replace("\\\"", "\"").replace("\\t", "\t").replace("\\n", "\n").replace("\\\\", "\\"); } Parser::Parser(ParserData* pData) : m_data(pData), m_start(0), m_error(TQString()), m_errorPosition(0), @@ -814,9 +814,9 @@ void Parser::setVariable(const TQString& name, ParseNode value) ParseNode Parser::variable(const TQString& name) const { if (isGlobal(name)) - return m_globalVariables.tqcontains(name) ? m_globalVariables[name] : ParseNode(); + return m_globalVariables.contains(name) ? m_globalVariables[name] : ParseNode(); else - return m_variables.tqcontains(name) ? m_variables[name] : ParseNode(); + return m_variables.contains(name) ? m_variables[name] : ParseNode(); } bool Parser::isGlobal(const TQString& name) const @@ -826,7 +826,7 @@ bool Parser::isGlobal(const TQString& name) const bool Parser::isVariable(const TQString& name) const { - return m_variables.tqcontains(name) || m_globalVariables.tqcontains(name); + return m_variables.contains(name) || m_globalVariables.contains(name); } void Parser::unsetVariable(const TQString& key) @@ -847,7 +847,7 @@ const TQMap& Parser::array(const TQString& name) const bool Parser::isArray(const TQString& name) const { - return m_arrays.tqcontains(name) || m_globalArrays.tqcontains(name); + return m_arrays.contains(name) || m_globalArrays.contains(name); } void Parser::setArray(const TQString& name, const TQString& key, ParseNode value) @@ -881,9 +881,9 @@ ParseNode Parser::arrayValue(const TQString& name, const TQString& key) const if (!isArray(name)) return ParseNode(); if (isGlobal(name)) - return m_globalArrays[name].tqcontains(key) ? m_globalArrays[name][key] : ParseNode(); + return m_globalArrays[name].contains(key) ? m_globalArrays[name][key] : ParseNode(); else - return m_arrays[name].tqcontains(key) ? m_arrays[name][key] : ParseNode(); + return m_arrays[name].contains(key) ? m_arrays[name][key] : ParseNode(); } diff --git a/kommander/widget/parserdata.cpp b/kommander/widget/parserdata.cpp index b5346fd4..274d7220 100644 --- a/kommander/widget/parserdata.cpp +++ b/kommander/widget/parserdata.cpp @@ -19,7 +19,7 @@ using namespace Parse; KeywordGroup ParserData::keywordGroup(Keyword k) const { - if (m_groups.tqcontains(k)) + if (m_groups.contains(k)) return m_groups[k]; else return GroupMisc; @@ -28,7 +28,7 @@ KeywordGroup ParserData::keywordGroup(Keyword k) const Keyword ParserData::stringToKeyword(const TQString& s) const { TQString k = s.lower(); - if (m_keywords.tqcontains(k)) + if (m_keywords.contains(k)) return m_keywords[k]; else return Variable; @@ -116,7 +116,7 @@ ParserData::ParserData() bool ParserData::isFunction(const TQString& name) const { - return m_functions.tqcontains(name.lower()); + return m_functions.contains(name.lower()); } const Function& ParserData::function(const TQString& name) const diff --git a/kommander/widgets/buttongroup.cpp b/kommander/widgets/buttongroup.cpp index 6b0feef3..e0c8b6ed 100644 --- a/kommander/widgets/buttongroup.cpp +++ b/kommander/widgets/buttongroup.cpp @@ -120,8 +120,8 @@ TQString ButtonGroup::handleDCOP(int function, const TQStringList& args) { TQString text; for (int i = 0; i < count(); i++) - if (dynamic_cast(tqfind(i))) - text += (dynamic_cast(tqfind(i)))->evalAssociatedText(); + if (dynamic_cast(find(i))) + text += (dynamic_cast(find(i)))->evalAssociatedText(); return text; } case DCOP::checked: diff --git a/kommander/widgets/fileselector.cpp b/kommander/widgets/fileselector.cpp index f6806e5b..ce4b93e0 100644 --- a/kommander/widgets/fileselector.cpp +++ b/kommander/widgets/fileselector.cpp @@ -222,7 +222,7 @@ TQString FileSelector::handleDCOP(int function, const TQStringList& args) return m_lineEdit->selectedText(); case DCOP::setSelection: { - int f = m_lineEdit->text().tqfind(args[0]); + int f = m_lineEdit->text().find(args[0]); if (f != -1) m_lineEdit->setSelection(f, args[0].length()); break; diff --git a/kommander/widgets/listbox.cpp b/kommander/widgets/listbox.cpp index 1135a540..ad0cbafa 100644 --- a/kommander/widgets/listbox.cpp +++ b/kommander/widgets/listbox.cpp @@ -125,7 +125,7 @@ TQString ListBox::handleDCOP(int function, const TQStringList& args) } case DCOP::setSelection: { - TQListBoxItem* found = tqfindItem(args[0], TQt::ExactMatch); + TQListBoxItem* found = findItem(args[0], TQt::ExactMatch); if (found) setCurrentItem(index(found)); break; @@ -162,14 +162,14 @@ TQString ListBox::handleDCOP(int function, const TQStringList& args) return TQString(); } case DCOP::addUniqueItem: - if (!tqfindItem(args[0], TQt::ExactMatch)) + if (!findItem(args[0], TQt::ExactMatch)) insertItem(args[0]); break; case DCOP::findItem: { - TQListBoxItem* found = tqfindItem(args[0], TQt::ExactMatch); - if (!found) found = tqfindItem(args[0], TQt::BeginsWith); - if (!found) found = tqfindItem(args[0], TQt::Contains); + TQListBoxItem* found = findItem(args[0], TQt::ExactMatch); + if (!found) found = findItem(args[0], TQt::BeginsWith); + if (!found) found = findItem(args[0], TQt::Contains); if (found) return TQString::number(index(found)); else return TQString::number(-1); diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp index fb3c7697..5c6c530c 100644 --- a/kommander/widgets/richtexteditor.cpp +++ b/kommander/widgets/richtexteditor.cpp @@ -180,7 +180,7 @@ void RichTextEditor::textItalic(bool a_isOn) void RichTextEditor::textAlign(int a_id) { - TQToolButton *b = (TQToolButton *)m_alignGroup->tqfind(a_id); + TQToolButton *b = (TQToolButton *)m_alignGroup->find(a_id); if(b == m_buttonTextLeft) m_textedit->tqsetAlignment(TQt::AlignLeft); else if(b == m_buttonTextCenter) diff --git a/kommander/widgets/scriptobject.cpp b/kommander/widgets/scriptobject.cpp index 472bb98c..ddc7d32a 100644 --- a/kommander/widgets/scriptobject.cpp +++ b/kommander/widgets/scriptobject.cpp @@ -93,7 +93,7 @@ void ScriptObject::populate() TQString ScriptObject::executeProcess(bool blocking) { - int index = ( states().tqfindIndex( currentState()) ); + int index = ( states().findIndex( currentState()) ); if (index == -1) { printError(i18n("Invalid state for associated text.")); diff --git a/kommander/widgets/textedit.cpp b/kommander/widgets/textedit.cpp index 1ca2e167..dbdb59d7 100644 --- a/kommander/widgets/textedit.cpp +++ b/kommander/widgets/textedit.cpp @@ -200,8 +200,8 @@ TQString TextEdit::handleDCOP(int function, const TQStringList& args) { // int para = args[3].toInt(); // int idx = args[4].toInt(); -// return TQString::number(TQTextEdit::tqfind(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx )); - return TQString::number(TQTextEdit::tqfind(args[0], args[1].toUInt(), false )); +// return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx )); + return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false )); break; } case TE_VAsuperScript: diff --git a/kommander/widgets/treewidget.cpp b/kommander/widgets/treewidget.cpp index e04fe41d..d9f6b0c8 100644 --- a/kommander/widgets/treewidget.cpp +++ b/kommander/widgets/treewidget.cpp @@ -129,7 +129,7 @@ void TreeWidget::addItemFromString(const TQString& s) TQListViewItem* TreeWidget::itemFromString(TQListViewItem* tqparent, const TQString& s) { TQStringList elements; - if (s.tqcontains("\t")) + if (s.contains("\t")) elements = TQStringList::split("\t", s, true); else elements = TQStringList::split("\\t", s, true); @@ -368,14 +368,14 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args) } case DCOP::setSelection: if (selectionModeExt() == Single || selectionModeExt() == NoSelection) - setCurrentItem(tqfindItem(args[0], 0)); + setCurrentItem(findItem(args[0], 0)); else { clearSelection(); TQStringList items(TQStringList::split("\n", args[0])); for (TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it) { - TQListViewItem* item = tqfindItem(*it, 0); + TQListViewItem* item = findItem(*it, 0); if (item) { item->setSelected(true); @@ -405,17 +405,17 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args) break; case DCOP::findItem: if (!args[1]) - return TQString::number(itemToIndexSafe(tqfindItem(args[0], 0))); + return TQString::number(itemToIndexSafe(findItem(args[0], 0))); else { if (args[2].toUInt() && args[3].toUInt()) - return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt()))); + return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt()))); else if (args[2].toUInt()) - return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::CaseSensitive | TQt::Contains))); + return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), TQt::CaseSensitive | TQt::Contains))); else if (args[3].toUInt()) - return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::ExactMatch))); + return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), TQt::ExactMatch))); else - return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::Contains))); + return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), TQt::Contains))); } break; case DCOP::item: diff --git a/kxsldbg/data/testdoc.xsl b/kxsldbg/data/testdoc.xsl index a25a14d2..da6447f3 100644 --- a/kxsldbg/data/testdoc.xsl +++ b/kxsldbg/data/testdoc.xsl @@ -23,9 +23,9 @@ version="1.0"> - Global variable tqcontains + Global variable contains - Local variable tqcontains + Local variable contains diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.cpp b/kxsldbg/kxsldbgpart/kxsldbg_part.cpp index 62d40250..8d156990 100644 --- a/kxsldbg/kxsldbgpart/kxsldbg_part.cpp +++ b/kxsldbg/kxsldbgpart/kxsldbg_part.cpp @@ -116,7 +116,7 @@ KXsldbgPart::KXsldbgPart( TQWidget *parentWidget, const char * /*widgetName*/, actionCollection(), "configureCmd" ); (void) new KAction( i18n("Inspect..."), - "tqfind", Key_I, + "find", Key_I, this, TQT_SLOT(inspectorCmd_activated()), actionCollection(), "inspectCmd" ); @@ -374,13 +374,13 @@ void KXsldbgPart::lookupSystemID( TQString systemID) #if KDE_IS_VERSION(3, 1, 90) systemID = KInputDialog::getText( i18n( "Lookup SystemID" ), - i18n( "Please enter SystemID to tqfind:" ), + i18n( "Please enter SystemID to find:" ), TQString(), &ok, mainView); #else systemID = TQInputDialog::getText( i18n( "Lookup SystemID" ), - i18n( "Please enter SystemID to tqfind:" ), + i18n( "Please enter SystemID to find:" ), TQLineEdit::Normal, TQString(), &ok, mainView); #endif @@ -406,12 +406,12 @@ void KXsldbgPart::lookupPublicID(TQString publicID) #if KDE_IS_VERSION(3, 1, 90) publicID = KInputDialog::getText( i18n( "Lookup PublicID" ), - i18n( "Please enter PublicID to tqfind:" ), + i18n( "Please enter PublicID to find:" ), TQString(), &ok, mainView ); #else publicID = TQInputDialog::getText( i18n( "Lookup PublicID" ), - i18n( "Please enter PublicID to tqfind:" ), + i18n( "Please enter PublicID to find:" ), TQLineEdit::Normal, TQString(), &ok, mainView ); #endif }else{ @@ -821,7 +821,7 @@ void KXsldbgPart::breakpointItem(TQString fileName, int lineNumber , } }else{ /* - if (!fileName.tqcontains("://")){ + if (!fileName.contains("://")){ // relative path ? must handle this special case KURL url; url.setFileName(fileName); diff --git a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp index ff3fd47c..a301aa8a 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp @@ -210,7 +210,7 @@ validateSource(xmlChar ** url, long *lineNo) result = 1; } } else{ - xsldbgGenericErrorFunc(i18n("Error: Unable to find a stylesheet file whose name tqcontains %1.\n").tqarg(xsldbgUrl(*url))); + xsldbgGenericErrorFunc(i18n("Error: Unable to find a stylesheet file whose name contains %1.\n").tqarg(xsldbgUrl(*url))); if (lineNo){ xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").tqarg(xsldbgUrl(*url)).tqarg(*lineNo)); } @@ -301,7 +301,7 @@ validateData(xmlChar ** url, long *lineNo) if (lineNo){ xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").tqarg(xsldbgUrl(*url)).tqarg(*lineNo)); } else{ - xsldbgGenericErrorFunc(i18n("Error: Unable to find a data file whose name tqcontains %1.\n").tqarg(xsldbgUrl(*url))); + xsldbgGenericErrorFunc(i18n("Error: Unable to find a data file whose name contains %1.\n").tqarg(xsldbgUrl(*url))); } result = 1; } else { diff --git a/kxsldbg/kxsldbgpart/libxsldbg/options.cpp b/kxsldbg/kxsldbgpart/libxsldbg/options.cpp index 9d6bd217..7b098220 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/options.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/options.cpp @@ -119,7 +119,7 @@ static TQString langLookupDir( const TQString &fname ) TQStringList::Iterator it; for (it = search.begin(); it != search.end(); ++it) { - TQString baseDir = (*it).left((*it).tqfindRev('/')) ; + TQString baseDir = (*it).left((*it).findRev('/')) ; TQFileInfo info(baseDir + "/"+ fname); if (info.exists() && info.isFile() && info.isReadable()) return baseDir; diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp index 70a68570..241d9730 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp @@ -672,7 +672,7 @@ xsldbgMain(int argc, char **argv) for ( it = xslParams.begin(); it != xslParams.end(); ++it){ param = (*it); paramOK = true; - separatorIdx = param.tqfind(':'); + separatorIdx = param.find(':'); if (separatorIdx > 0){ paramName = param.left((uint)separatorIdx); paramValue = param.mid((uint)separatorIdx + 1); diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h index 92117282..e75c8419 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h +++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h @@ -64,13 +64,13 @@ public: XsldbgEventData *takeNode( TQLNode *n ) { return (XsldbgEventData *)TQGList::takeNode(n); } void clear(void) { TQGList::clear(); } void sort(void) { TQGList::sort(); } - int tqfind( const XsldbgEventData *d ) { return TQGList::tqfind((TQPtrCollection::Item)d); } - int findNext( const XsldbgEventData *d ) { return TQGList::tqfind((TQPtrCollection::Item)d,FALSE); } - int tqfindRef( const XsldbgEventData *d ) { return TQGList::tqfindRef((TQPtrCollection::Item)d); } - int findNextRef( const XsldbgEventData *d ){ return TQGList::tqfindRef((TQPtrCollection::Item)d,FALSE);} - uint tqcontains( const XsldbgEventData *d ) const { return TQGList::tqcontains((TQPtrCollection::Item)d); } + int find( const XsldbgEventData *d ) { return TQGList::find((TQPtrCollection::Item)d); } + int findNext( const XsldbgEventData *d ) { return TQGList::find((TQPtrCollection::Item)d,FALSE); } + int findRef( const XsldbgEventData *d ) { return TQGList::findRef((TQPtrCollection::Item)d); } + int findNextRef( const XsldbgEventData *d ){ return TQGList::findRef((TQPtrCollection::Item)d,FALSE);} + uint contains( const XsldbgEventData *d ) const { return TQGList::contains((TQPtrCollection::Item)d); } uint containsRef( const XsldbgEventData *d ) const - { return TQGList::tqcontainsRef((TQPtrCollection::Item)d); } + { return TQGList::containsRef((TQPtrCollection::Item)d); } XsldbgEventData *at( uint i ) { return (XsldbgEventData *)TQGList::at(i); } int at(void) const { return TQGList::at(); } XsldbgEventData *current(void) const { return (XsldbgEventData *)TQGList::get(); } diff --git a/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp b/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp index 690847e8..1cdb0293 100644 --- a/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp +++ b/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp @@ -25,7 +25,7 @@ QXsldbgDoc::QXsldbgDoc(TQWidget *tqparent, KURL url) KURL cleanUrl; // convert paths relative to PWD into a absolute path TQString relUrl = url.prettyURL(); - if (!relUrl.tqcontains(":/")){ + if (!relUrl.contains(":/")){ if (!(relUrl.left(1) == "/")) relUrl.prepend(TQDir::currentDirPath() + "/"); cleanUrl.setFileName(relUrl); diff --git a/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp b/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp index 0292e282..db15bc1d 100644 --- a/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp @@ -70,26 +70,26 @@ void XsldbgOutputView::slotProcShowMessage(TQString msg) bool processed = FALSE; // Is this a result of an evaluate command if ((msg[0] == TQChar('=')) && (msg[1] == TQChar(' '))){ - int endPosition = msg.tqfind(TQChar('\n')); + int endPosition = msg.find(TQChar('\n')); if (endPosition >= 0){ processed = TRUE; showDialog(TQMessageBox::Information, i18n("Result of evaluation"), msg.mid(endPosition + 1)); } }else /* Is there some sort of error message in msg */ - if ((msg.tqfind("Error:") != -1) || - (msg.tqfind("Warning:") != -1) || - (msg.tqfind("Request to xsldbg failed") != -1) || + if ((msg.find("Error:") != -1) || + (msg.find("Warning:") != -1) || + (msg.find("Request to xsldbg failed") != -1) || /* the following errors are libxml or libxslt generated */ - (msg.tqfind("error:") != -1) || - (msg.tqfind("xmlXPathEval:") != -1) || - (msg.tqfind("runtime error") != -1)) { + (msg.find("error:") != -1) || + (msg.find("xmlXPathEval:") != -1) || + (msg.find("runtime error") != -1)) { /* OK we've found an error but ingore any errors about data or source files */ - if ((msg.tqfind("Error: No XSL source file supplied") == -1) && - (msg.tqfind("Error: No XML data file supplied") == -1) && - (msg.tqfind("Load of source deferred") == -1) && - (msg.tqfind("Load of data deferred") == -1) ) + if ((msg.find("Error: No XSL source file supplied") == -1) && + (msg.find("Error: No XML data file supplied") == -1) && + (msg.find("Load of source deferred") == -1) && + (msg.find("Load of data deferred") == -1) ) showDialog(TQMessageBox::Warning, i18n("Request Failed "), msg); processed = TRUE; diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp index 38af2a94..0e63ed8a 100644 --- a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp +++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp @@ -358,7 +358,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { btn->reparent(this,TQPoint(0,0)); } btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); - if (!d->btns.tqcontainsRef(btn)) d->btns.append(btn); + if (!d->btns.containsRef(btn)) d->btns.append(btn); btn->show(); @@ -386,7 +386,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { void KDockWidgetHeader::removeButton(KDockButton_Private* btn) { if (btn->parentWidget()==this) { - if (d->btns.tqcontainsRef(btn)) d->btns.removeRef(btn); + if (d->btns.containsRef(btn)) d->btns.removeRef(btn); delete btn; } } @@ -1841,12 +1841,12 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) } w = p; } - if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L; - if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L; + if ( qt_find_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L; + if ( qt_find_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L; if (dynamic_cast(w)) return 0L; if (!childDockWidgetList) return 0L; - if ( childDockWidgetList->tqfind(w) != -1 ) return 0L; + if ( childDockWidgetList->find(w) != -1 ) return 0L; if ( currentDragWidget->isGroup && ((KDockWidget*)w)->parentDockTabGroup() ) return 0L; KDockWidget* www = (KDockWidget*)w; @@ -1892,7 +1892,7 @@ void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const while ( it.current() ) { if ( it.current()->isWidgetType() ) { w = (TQWidget*)it.current(); - if ( w->isVisible() && w->tqgeometry().tqcontains(pos) ) { + if ( w->isVisible() && w->tqgeometry().contains(pos) ) { if ( w->inherits("KDockWidget") ) ww = w; findChildDockWidget( ww, w, w->mapFromParent(pos) ); return; @@ -2176,8 +2176,8 @@ void KDockManager::writeConfig(TQDomElement &base) TQStringList::Iterator nListIt=nList.begin(); while ( nListIt!=nList.end() ) { KDockWidget *obj = getDockWidgetFromName( *nListIt); - if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.tqfind( obj->firstName.latin1() ) == -1 - || nameList.tqfind(obj->lastName.latin1()) == -1)) { + if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.find( obj->firstName.latin1() ) == -1 + || nameList.find(obj->lastName.latin1()) == -1)) { // Skip until tqchildren are saved (why?) ++nListIt; // nList.next(); @@ -2524,7 +2524,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) } /*************************************************************************************************/ if ( obj->isGroup ){ - if ( (findList.tqfind( obj->firstName ) != findList.end()) && (findList.tqfind( obj->lastName ) != findList.end() )){ + if ( (findList.find( obj->firstName ) != findList.end()) && (findList.find( obj->lastName ) != findList.end() )){ c->writeEntry( cname+":type", "GROUP"); if ( !obj->tqparent() ){ @@ -2547,9 +2547,9 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) } else { /*************************************************************************************************/ //debug(" Skip %s", nList.current()); - //if ( findList.tqfind( obj->firstName ) == -1 ) + //if ( findList.find( obj->firstName ) == -1 ) // debug(" ? Not found %s", obj->firstName); - //if ( findList.tqfind( obj->lastName ) == -1 ) + //if ( findList.find( obj->lastName ) == -1 ) // debug(" ? Not found %s", obj->lastName); ++nListIt; // if ( !nList.current() ) nList.first(); diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp index 063c76ba..63a860e7 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp @@ -75,11 +75,11 @@ void KMdiChildArea::manageChild( KMdiChildFrm* child, bool show, bool cascade ) KMdiChildFrm* top = topChild(); //remove old references. There can be more than one so we remove them all - if ( m_pZ->tqfindRef( child ) != -1 ) + if ( m_pZ->findRef( child ) != -1 ) { - //TQPtrList::tqfind* moves current() to the found item + //TQPtrList::find* moves current() to the found item m_pZ->take(); - while ( m_pZ->tqfindNextRef( child ) != -1 ) + while ( m_pZ->findNextRef( child ) != -1 ) m_pZ->take(); } @@ -323,7 +323,7 @@ TQPoint KMdiChildArea::getCascadePoint( int indexOfWindow ) void KMdiChildArea::childMinimized( KMdiChildFrm *minimizedChild, bool wasMaximized ) { //can't find the child in our list, so we don't care. - if ( m_pZ->tqfindRef( minimizedChild ) == -1 ) + if ( m_pZ->findRef( minimizedChild ) == -1 ) { kdDebug( 760 ) << k_funcinfo << "child was minimized but wasn't in our list!" << endl; return; @@ -790,4 +790,4 @@ void KMdiChildArea::getCaptionColors( const TQPalette& /*pal*/, TQColor& activeB inactiveFG = KGlobalSettings::inactiveTextColor(); } -// kate: space-indent off; tqreplace-tabs off; tab-width 4; indent-mode csands; +// kate: space-indent off; replace-tabs off; tab-width 4; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp index ed26a9e5..b57b93a8 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp @@ -842,7 +842,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) { // for each found object... TQWidget * widg = ( TQWidget* ) obj; ++it; - TQ_FocusPolicy* pFocPol = pFocPolDict->tqfind( widg->name() ); // remember the focus policy from before the reparent + TQ_FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent if ( pFocPol ) widg->setFocusPolicy( *pFocPol ); @@ -894,7 +894,7 @@ void KMdiChildFrm::linkChildren( TQDict* pFocPolDict ) { // for each found object... TQWidget* widg = ( TQWidget* ) obj; ++it; - TQ_FocusPolicy* pFocPol = pFocPolDict->tqfind( widg->name() ); // remember the focus policy from before the reparent + TQ_FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent if ( pFocPol != 0 ) widg->setFocusPolicy( *pFocPol ); @@ -1406,4 +1406,4 @@ TQRect KMdiChildFrm::mdiAreaContentsRect() const } } -// kate: indent-mode csands; tab-width 4; space-indent off; tqreplace-tabs off; +// kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off; diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h index 21ea562f..c808e088 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h @@ -445,4 +445,4 @@ private: #endif //_KMDICHILDFRM_H_ -// kate: space-indent off; tqreplace-tabs off; tab-width 4; indent-mode csands; +// kate: space-indent off; replace-tabs off; tab-width 4; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp index 744ceb19..3bebc235 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp @@ -146,7 +146,7 @@ void KMdiChildFrmCaption::mouseMoveEvent( TQMouseEvent *e ) TQPoint relMousePosInChildArea = m_pParent->m_pManager->mapFromGlobal( e->globalPos() ); // mouse out of child area? stop child frame dragging - if ( !TQT_TQRECT_OBJECT(m_pParent->m_pManager->rect()).tqcontains( relMousePosInChildArea ) ) + if ( !TQT_TQRECT_OBJECT(m_pParent->m_pManager->rect()).contains( relMousePosInChildArea ) ) { if ( relMousePosInChildArea.x() < 0 ) relMousePosInChildArea.rx() = 0; @@ -319,4 +319,4 @@ void KMdiChildFrmCaption::slot_moveViaSystemMenu() m_offset = mapFromGlobal( TQCursor::pos() ); } -// kate: space-indent off; tqreplace-tabs off; indent-mode csands; tab-width 4; +// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4; diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h index b3c8d88a..fde6d3b7 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h @@ -143,4 +143,4 @@ private: #endif //_KMDICAPTION_H_ -// kate: space-indent off; tqreplace-tabs off; indent-mode csands; tab-width 4; +// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4; diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp index ae39849c..94670ce8 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp @@ -545,7 +545,7 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) if ( obj->isWidgetType() ) { TQObjectList * list = queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( list->tqfind( obj ) != -1 ) + if ( list->find( obj ) != -1 ) m_focusedChildWidget = ( TQWidget* ) obj; delete list; // delete the list, not the objects @@ -770,4 +770,4 @@ void KMdiChildView::raise() TQWidget::raise(); } -// kate: space-indent off; tqreplace-tabs off; indent-mode csands; tab-width 4; +// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4; diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildview.h b/lib/compatibility/kmdi/qextmdi/kmdichildview.h index e7d04768..1530a155 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildview.h +++ b/lib/compatibility/kmdi/qextmdi/kmdichildview.h @@ -78,7 +78,7 @@ class KMdiChildViewPrivate; * // captions * TQString shortName = pNewView->caption(); * int length = shortName.length(); - * shortName = shortName.right(length - (shortName.tqfindRev('/') +1)); + * shortName = shortName.right(length - (shortName.findRev('/') +1)); * pMDICover->setTabCaption( shortName); * pMDICover->setCaption(pNewView->caption()); * @@ -613,4 +613,4 @@ inline KMdiChildFrm *KMdiChildView::mdiParent() const #endif //_KMDICHILDVIEW_H_ -// kate: space-indent off; tqreplace-tabs off; indent-mode csands; tab-width 4; +// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4; diff --git a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp index 28b42bc8..3041834e 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp @@ -138,7 +138,7 @@ KMdiDockContainer::~KMdiDockContainer() { it = m_map.begin(); KDockWidget *w = it.key(); - if ( m_overlapButtons.tqcontains( w ) ) + if ( m_overlapButtons.contains( w ) ) { ( static_cast( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[w] ); m_overlapButtons.remove( w ); @@ -185,7 +185,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl; KDockWidget* w = dwdg; int tab; - bool alreadyThere = m_map.tqcontains( w ); + bool alreadyThere = m_map.contains( w ); if ( alreadyThere ) { @@ -319,7 +319,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event ) void KMdiDockContainer::showWidget( KDockWidget *w ) { - if ( !m_map.tqcontains( w ) ) + if ( !m_map.contains( w ) ) return ; int id = m_map[ w ]; @@ -366,7 +366,7 @@ void KMdiDockContainer::hideIfNeeded() void KMdiDockContainer::removeWidget( KDockWidget* dwdg ) { KDockWidget * w = dwdg; - if ( !m_map.tqcontains( w ) ) + if ( !m_map.contains( w ) ) return; //we don't have this widget in our container kdDebug( 760 ) << k_funcinfo << endl; @@ -382,7 +382,7 @@ void KMdiDockContainer::removeWidget( KDockWidget* dwdg ) m_ws->removeWidget( w ); m_map.remove( w ); m_revMap.remove( id ); - if ( m_overlapButtons.tqcontains( w ) ) + if ( m_overlapButtons.contains( w ) ) { ( static_cast( w->getHeader() ->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[ w ] ); m_overlapButtons.remove( w ); @@ -398,7 +398,7 @@ void KMdiDockContainer::undockWidget( KDockWidget *dwdg ) { KDockWidget * w = dwdg; - if ( !m_map.tqcontains( w ) ) + if ( !m_map.contains( w ) ) return ; int id = m_map[ w ]; @@ -815,7 +815,7 @@ void KMdiDockContainer::prevToolView() { kdDebug( 760 ) << k_funcinfo << endl; TQPtrList* tabs = m_tb->tabs(); - int pos = tabs->tqfindRef( m_tb->tab( oldtab ) ); + int pos = tabs->findRef( m_tb->tab( oldtab ) ); if ( pos == -1 ) return ; @@ -836,7 +836,7 @@ void KMdiDockContainer::nextToolView() { kdDebug( 760 ) << k_funcinfo << endl; TQPtrList* tabs = m_tb->tabs(); - int pos = tabs->tqfindRef( m_tb->tab( oldtab ) ); + int pos = tabs->findRef( m_tb->tab( oldtab ) ); if ( pos == -1 ) return ; @@ -853,4 +853,4 @@ void KMdiDockContainer::nextToolView() tabClicked( tab->id() ); } -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h index eb984d0d..1767922c 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h +++ b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h @@ -165,4 +165,4 @@ signals: #endif -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp index c595700e..9259a34b 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp @@ -148,5 +148,5 @@ KMdi::TabWidgetVisibility KMdiDocumentViewTabWidget::tabWidgetVisibility( ) #include "kmdidocumentviewtabwidget.moc" #endif -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h index f3d3346b..10a9a182 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h +++ b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h @@ -120,5 +120,5 @@ signals: #endif -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp index ff9ff0b4..cc6b8535 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp @@ -67,4 +67,4 @@ void KMdiFocusList::objectHasBeenDestroyed( TQObject * o ) m_list.remove( w ); } -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h index a816fc4f..68db1656 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h +++ b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h @@ -40,4 +40,4 @@ private: }; #endif -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp index bc3d764a..54b885d5 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp @@ -317,4 +317,4 @@ void KMDIGUIClient::mdiModeHasBeenChangedTo( KMdi::MdiMode mode ) } -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h index 13491db3..6f784992 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h +++ b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h @@ -145,4 +145,4 @@ protected slots: } #endif -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdiiterator.h b/lib/compatibility/kmdi/qextmdi/kmdiiterator.h index 52ae39dd..75fb980a 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdiiterator.h +++ b/lib/compatibility/kmdi/qextmdi/kmdiiterator.h @@ -47,5 +47,5 @@ protected: ; #endif // _KMDIITERATOR_H_ -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h b/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h index 5236b389..f65872fe 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h +++ b/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h @@ -57,5 +57,5 @@ private: }; #endif // _KMDILISTITERATOR_H_ -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp index 259b814f..92624120 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp @@ -557,7 +557,7 @@ KMdiToolViewAccessor *KMdiMainFrm::createToolWindow() void KMdiMainFrm::deleteToolWindow( TQWidget* pWnd ) { - if ( m_pToolViews->tqcontains( pWnd ) ) + if ( m_pToolViews->contains( pWnd ) ) deleteToolWindow( ( *m_pToolViews ) [ pWnd ] ); } @@ -963,13 +963,13 @@ bool KMdiMainFrm::windowExists( KMdiChildView *pWnd, ExistsAs as ) { if ( ( as == ToolView ) || ( as == AnyView ) ) { - if ( m_pToolViews->tqcontains( pWnd ) ) + if ( m_pToolViews->contains( pWnd ) ) return true; if ( as == ToolView ) return false; } - if ( m_pDocumentViews->tqfindRef( pWnd ) != -1 ) + if ( m_pDocumentViews->findRef( pWnd ) != -1 ) return true; return false; @@ -2361,7 +2361,7 @@ void KMdiMainFrm::activateFirstWin() return ; TQDateTime current = activeWindow() ->getTimeStamp(); - TQMap::iterator pos( m.tqfind( current ) ); + TQMap::iterator pos( m.find( current ) ); TQMap::iterator newPos = pos; if ( pos != m.end() ) { @@ -2394,7 +2394,7 @@ void KMdiMainFrm::activateLastWin() return ; TQDateTime current = activeWindow() ->getTimeStamp(); - TQMap::iterator pos( m.tqfind( current ) ); + TQMap::iterator pos( m.find( current ) ); if ( pos != m.begin() ) { --pos; @@ -2938,4 +2938,4 @@ KTabWidget * KMdiMainFrm::tabWidget() const #include "kmdimainfrm.moc" // vim: ts=2 sw=2 et -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h index 7200c941..1d4842d7 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h +++ b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h @@ -870,4 +870,4 @@ signals: #endif //_KMDIMAINFRM_H_ -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmdinulliterator.h b/lib/compatibility/kmdi/qextmdi/kmdinulliterator.h index 3e0e1268..be75ebe8 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdinulliterator.h +++ b/lib/compatibility/kmdi/qextmdi/kmdinulliterator.h @@ -45,5 +45,5 @@ public: }; #endif // _KMDINULLITERATOR_H_ -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp index 192717bb..eaf15892 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp @@ -387,4 +387,4 @@ void KMdiTaskBar::resizeEvent( TQResizeEvent* rse ) KToolBar::resizeEvent( rse ); } -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmditaskbar.h b/lib/compatibility/kmdi/qextmdi/kmditaskbar.h index e4ec2f8b..7c7891a0 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditaskbar.h +++ b/lib/compatibility/kmdi/qextmdi/kmditaskbar.h @@ -217,5 +217,5 @@ private: }; #endif //_KMDITASKBAR_H_ -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp index a2dd531a..c43fdf53 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp @@ -265,5 +265,5 @@ void KMdiToolViewAccessor::show() #ifndef NO_INCLUDE_TQMOCFILES #include "kmditoolviewaccessor.moc" #endif -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h index bb21bbcb..f4dd40d9 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h +++ b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h @@ -83,5 +83,5 @@ protected: #endif //_KMDITOOLVIEWACCESSOR_H_ -// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/lib/compatibility/kmdi/qextmdi/ktabbar.cpp b/lib/compatibility/kmdi/qextmdi/ktabbar.cpp index 9c7075cc..87701e9c 100644 --- a/lib/compatibility/kmdi/qextmdi/ktabbar.cpp +++ b/lib/compatibility/kmdi/qextmdi/ktabbar.cpp @@ -76,7 +76,7 @@ void KTabBar::setTabEnabled( int id, bool enabled ) if ( t->isEnabled() ) { r = r.unite( t->rect() ); - tablist->append( tablist->take( tablist->tqfindRef( t ) ) ); + tablist->append( tablist->take( tablist->findRef( t ) ) ); emit selected( t->identifier() ); } } @@ -181,7 +181,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) } rect.moveLeft( t->rect().left() + 2 + xoff ); rect.moveTop( t->rect().center().y()-pixmap.height()/2 + yoff ); - if ( rect.tqcontains( e->pos() ) ) { + if ( rect.contains( e->pos() ) ) { if ( mHoverCloseButton ) { if ( mHoverCloseButtonTab == t ) return; @@ -299,7 +299,7 @@ void KTabBar::setTabColor( int id, const TQColor& color ) const TQColor &KTabBar::tabColor( int id ) const { - if ( mTabColors.tqcontains( id ) ) + if ( mTabColors.contains( id ) ) return mTabColors[id]; return tqcolorGroup().foreground(); @@ -311,7 +311,7 @@ int KTabBar::insertTab( TQTab *t, int index ) if ( mTabCloseActivatePrevious && count() > 2 ) { TQPtrList *tablist = tabList(); - tablist->insert( count()-2, tablist->take( tablist->tqfindRef( t ) ) ); + tablist->insert( count()-2, tablist->take( tablist->findRef( t ) ) ); } return res; @@ -358,7 +358,7 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br, flags |= TQStyle::Style_HasFocus; TQColorGroup cg( tqcolorGroup() ); - if ( mTabColors.tqcontains( t->identifier() ) ) + if ( mTabColors.contains( t->identifier() ) ) cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] ); tqstyle().tqdrawControl( TQStyle::CE_TabBarLabel, p, this, r, diff --git a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp index eab93b48..b12152b4 100644 --- a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp +++ b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp @@ -284,7 +284,7 @@ void KTabWidget::updateTab( int index ) setTabToolTip( page( index ), title ); title = KStringHandler::rsqueeze( title, d->m_CurrentMaxLength ).leftJustify( d->m_minLength, ' ' ); - title.tqreplace( '&', "&&" ); + title.replace( '&', "&&" ); if ( TQTabWidget::label( index ) != title ) TQTabWidget::setTabLabel( page( index ), title ); diff --git a/lib/compatibility/knewstuff/downloaddialog.cpp b/lib/compatibility/knewstuff/downloaddialog.cpp index a4cfca68..581263e2 100644 --- a/lib/compatibility/knewstuff/downloaddialog.cpp +++ b/lib/compatibility/knewstuff/downloaddialog.cpp @@ -558,7 +558,7 @@ void DownloadDialog::slotPage(TQWidget *w) kdDebug() << "changed widget!!!" << endl; - if(m_map.tqfind(w) == m_map.end()) return; + if(m_map.find(w) == m_map.end()) return; m_page = w; diff --git a/lib/compatibility/knewstuff/entry.cpp b/lib/compatibility/knewstuff/entry.cpp index eb953b0e..ba08f345 100644 --- a/lib/compatibility/knewstuff/entry.cpp +++ b/lib/compatibility/knewstuff/entry.cpp @@ -89,7 +89,7 @@ void Entry::setSummary( const TQString &text, const TQString &lang ) { mSummaryMap.insert( lang, text ); - if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } TQString Entry::summary( const TQString &lang ) const @@ -144,7 +144,7 @@ void Entry::setPayload( const KURL &url, const TQString &lang ) { mPayloadMap.insert( lang, url ); - if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } KURL Entry::payload( const TQString &lang ) const @@ -167,7 +167,7 @@ void Entry::setPreview( const KURL &url, const TQString &lang ) { mPreviewMap.insert( lang, url ); - if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } KURL Entry::preview( const TQString &lang ) const diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.cpp b/lib/compatibility/knewstuff/knewstuffgeneric.cpp index 90130944..66878137 100644 --- a/lib/compatibility/knewstuff/knewstuffgeneric.cpp +++ b/lib/compatibility/knewstuff/knewstuffgeneric.cpp @@ -70,7 +70,7 @@ bool KNewStuffGeneric::install( const TQString &fileName ) kdDebug(5850) << "InstallationCommand: " << cmd << endl; list = TQStringList::split( " ", cmd ); for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it) { - list2 << (*it).tqreplace("%f", fileName); + list2 << (*it).replace("%f", fileName); } KProcess proc; proc << list2; diff --git a/lib/compatibility/knewstuff/security.cpp b/lib/compatibility/knewstuff/security.cpp index 3e135e1f..9dc5615a 100644 --- a/lib/compatibility/knewstuff/security.cpp +++ b/lib/compatibility/knewstuff/security.cpp @@ -125,7 +125,7 @@ void Security::slotDataArrived(KProcIO *procIO) key.mail=data.section('<', -1, -1); key.mail.truncate(key.mail.length() - 1); key.name=data.section('<',0,0); - if (key.name.tqfind("(")!=-1) + if (key.name.find("(")!=-1) key.name=key.name.section('(',0,0); m_keys[shortId] = key; } @@ -137,7 +137,7 @@ void Security::slotDataArrived(KProcIO *procIO) m_result &= SIGNED_BAD_CLEAR; m_result |= SIGNED_OK; TQString id = data.section(" ", 1 , 1).right(8); - if (!m_keys.tqcontains(id)) + if (!m_keys.contains(id)) { m_result |= UNKNOWN; } else @@ -154,7 +154,7 @@ void Security::slotDataArrived(KProcIO *procIO) { m_result |= SIGNED_BAD; TQString id = data.section(" ", 1 , 1).right(8); - if (!m_keys.tqcontains(id)) + if (!m_keys.contains(id)) { m_result |= UNKNOWN; } else @@ -170,7 +170,7 @@ void Security::slotDataArrived(KProcIO *procIO) break; case Sign: - if (data.tqfind("passphrase.enter") != -1) + if (data.find("passphrase.enter") != -1) { TQCString password; KeyStruct key = m_keys[m_secretKey]; @@ -187,7 +187,7 @@ void Security::slotDataArrived(KProcIO *procIO) return; } } else - if (data.tqfind("BAD_PASSPHRASE") != -1) + if (data.find("BAD_PASSPHRASE") != -1) { m_result |= BAD_PASSPHRASE; } diff --git a/lib/ksavealldialog.cpp b/lib/ksavealldialog.cpp index 0dde858b..d0c072ba 100644 --- a/lib/ksavealldialog.cpp +++ b/lib/ksavealldialog.cpp @@ -71,7 +71,7 @@ KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List co KURL::List::ConstIterator it = filelist.begin(); while ( it != filelist.end() ) { - if ( !ignorelist.tqcontains( *it ) ) + if ( !ignorelist.contains( *it ) ) { TQCheckListItem * x = new CheckURL( _listview, *it ); x->setOn( true ); diff --git a/lib/qextfileinfo.cpp b/lib/qextfileinfo.cpp index 767e28b9..a50455f4 100644 --- a/lib/qextfileinfo.cpp +++ b/lib/qextfileinfo.cpp @@ -98,8 +98,8 @@ KURL QExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bo int pos1=0; for (;;) { - pos=path.tqfind("/"); - pos1=basePath.tqfind("/"); + pos=path.find("/"); + pos1=basePath.find("/"); if ( pos<0 || pos1<0 ) break; if ( path.left(pos+1 ) == basePath.left(pos1+1) ) { @@ -111,7 +111,7 @@ KURL QExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bo }; if ( basePath == "/" ) basePath=""; - int level = basePath.tqcontains("/"); + int level = basePath.contains("/"); for (int i=0; i=0 ) + while ( (pos = cutname.find("../")) >=0 ) { cutname.remove( 0, pos+3 ); cutdir.remove( cutdir.length()-1, 1 ); - cutdir.remove( cutdir.tqfindRev('/')+1 , 1000); + cutdir.remove( cutdir.findRev('/')+1 , 1000); } resultURL.setPath(TQDir::cleanDirPath(cutdir+cutname)); } @@ -511,7 +511,7 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis else u.setPath(linkDest); u.adjustPath(+1); - if (!dirListItems.tqcontains(u) && u.url() != m_listStartURL && !u.isParentOf(item->url())) + if (!dirListItems.contains(u) && u.url() != m_listStartURL && !u.isParentOf(item->url())) { linkItems.append(new KFileItem(*item)); } else @@ -577,7 +577,7 @@ void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList KURL u = item->url(); u.setPath(item->linkDest()); TQString urlStr = u.url(); - if (detailedDirListItems.tqfind(urlStr) == 0L && + if (detailedDirListItems.find(urlStr) == 0L && (urlStr != m_listStartURL)) { linkItems.append(new KFileItem(*item)); diff --git a/quanta/components/csseditor/colorrequester.cpp b/quanta/components/csseditor/colorrequester.cpp index fc4399bb..3dfd357b 100644 --- a/quanta/components/csseditor/colorrequester.cpp +++ b/quanta/components/csseditor/colorrequester.cpp @@ -93,7 +93,7 @@ KLineEdit * colorRequester::lineEdit() const{ void colorRequester::setInitialValue(/*const TQString& s*/){ TQString temp = d->edit->text(); temp.remove(" "); - if( temp.tqcontains("#") != 0){ + if( temp.contains("#") != 0){ temp.remove("#"); if(temp.length() == 3) { TQString temp2; @@ -113,7 +113,7 @@ void colorRequester::setInitialValue(/*const TQString& s*/){ } else - if( temp.tqcontains("rgb(") != 0){ + if( temp.contains("rgb(") != 0){ temp.remove("rgb(").remove(")"); TQStringList rgbValues = TQStringList::split(",",temp); // bool ok; diff --git a/quanta/components/csseditor/csseditor.cpp b/quanta/components/csseditor/csseditor.cpp index afe90315..07fc1815 100644 --- a/quanta/components/csseditor/csseditor.cpp +++ b/quanta/components/csseditor/csseditor.cpp @@ -136,19 +136,19 @@ void CSSEditor::buildListView(TQDomNodeList l, TQListView *lv){ } void CSSEditor::setCurrentPropOn(const TQString& s){ - if( (m_currentProp = static_cast(lvVisual->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvVisual->findItem( s,0 )) )) m_currentProp->setOn(true); else - if( (m_currentProp = static_cast(lvAll->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvAll->findItem( s,0 )) )) m_currentProp->setOn(true); else - if( (m_currentProp = static_cast(lvAural->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvAural->findItem( s,0 )) )) m_currentProp->setOn(true); else - if( (m_currentProp = static_cast(lvInteractive->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvInteractive->findItem( s,0 )) )) m_currentProp->setOn(true); else - if( (m_currentProp = static_cast(lvPaged->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvPaged->findItem( s,0 )) )) m_currentProp->setOn(true); if( m_currentProp && m_currentProp->depth() ) { @@ -167,14 +167,14 @@ void CSSEditor::setCurrentPropOn(const TQString& s){ } void CSSEditor::setSidesOfPropertyBorderOn(const TQString& s){ - static_cast(lvVisual->tqfindItem( "border-top",0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-right",0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-bottom",0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-left",0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-top-"+s,0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-right-"+s,0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-bottom-"+s,0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-left-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-top",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-right",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-bottom",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-left",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-top-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-right-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-bottom-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-left-"+s,0 ))->setOn(true); } void CSSEditor::hidePreviewer(){ @@ -266,7 +266,7 @@ void CSSEditor::initialize(){ const TQString propertyName((*it).section(":",0,0).stripWhiteSpace()); const TQString propertyValue((*it).section(":",1)); - if( ShorthandFormer::SHFormList().tqcontains(propertyName)==0 ) { + if( ShorthandFormer::SHFormList().contains(propertyName)==0 ) { temp+= propertyName + " : " + propertyValue +";\n\t"; addAndSetPropertyOn(propertyName,propertyValue); } @@ -323,12 +323,12 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ m_ps->setComboBox(); TQStringList values = TQStringList::split(",",curr.attribute("value")); m_ps->ComboBox()->insertStringList(values); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) - if( values.tqcontains(m_currentProp->text(0))) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) + if( values.contains(m_currentProp->text(0))) m_ps->ComboBox()->setCurrentText(m_properties[m_currentProp->text(0)]); if(curr.attribute("editable") == "yes"){ m_ps->ComboBox()->setEditable(true); - /*if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + /*if(m_properties.contains(m_currentProp->text(0)) !=0 ) m_ps->ComboBox()->setEditText(m_properties[m_currentProp->text(0)]); */ } } @@ -344,7 +344,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ if( valueTypeName == "number") m_ps->setLineEdit(); else if( valueTypeName == "integer") { - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) { + if(m_properties.contains(m_currentProp->text(0)) !=0 ) { if(!curr.attribute("minValue").isNull()) m_ps->setSpinBox(m_properties[m_currentProp->text(0)],curr.attribute("minValue")); else @@ -359,7 +359,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "length") { lengthEditor *editor = new lengthEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else editor->setInitialValue(TQString()); @@ -367,7 +367,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ } else if( valueTypeName == "percentage") { - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ percentageEditor *editor = new percentageEditor(m_properties[m_currentProp->text(0)],m_ps); m_ps->installMiniEditor(editor); } @@ -380,7 +380,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ if( valueTypeName == "doubleLength") { doubleLengthEditor *editor = new doubleLengthEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), sx(temp.section(" ",0,0)), dx(temp.section(" ",1,1)); @@ -394,7 +394,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ if( valueTypeName == "doublePercentage") { doublePercentageEditor *editor = new doublePercentageEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), sx(temp.section(" ",0,0)), dx(temp.section(" ",1,1)); @@ -407,7 +407,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "frequency") { frequencyEditor *editor = new frequencyEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else editor->setInitialValue(TQString()); @@ -416,7 +416,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "time") { timeEditor *editor = new timeEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else editor->setInitialValue(TQString()); @@ -425,7 +425,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "angle") { angleEditor *editor = new angleEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else editor->setInitialValue(TQString()); @@ -454,7 +454,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ if( valueTypeName == "colors") { RGBcolorSlider *RGBeditor = new RGBcolorSlider(m_ps); colorRequester *CReditor = new colorRequester(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ CReditor->lineEdit()->setText(m_properties[m_currentProp->text(0)]); CReditor->setInitialValue(); @@ -474,7 +474,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "fontDialog" ){ fontEditor *editor = new fontEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ editor->setInitialValue(m_properties[m_currentProp->text(0)]); } else editor->setInitialValue(TQString()); diff --git a/quanta/components/csseditor/csseditor_globals.cpp b/quanta/components/csseditor/csseditor_globals.cpp index 3e9e1ca2..bd0eac48 100644 --- a/quanta/components/csseditor/csseditor_globals.cpp +++ b/quanta/components/csseditor/csseditor_globals.cpp @@ -34,12 +34,12 @@ void mySpinBox::checkSuffix(const TQString&){// check if the suffix is present a if(!suffix().isEmpty()){ const TQString suf(suffix()); TQString t(editor()->text()); - if( t.tqcontains(suf) ==0 ) { + if( t.contains(suf) ==0 ) { editor()->setText( t + suf); editor()->setCursorPosition(editor()->cursorPosition() - 1); } else - if( t.tqcontains(suf) >1 ) { + if( t.contains(suf) >1 ) { editor()->setText( t.remove(suf) + suf); editor()->setCursorPosition(editor()->cursorPosition() - 1); } diff --git a/quanta/components/csseditor/cssselector.cpp b/quanta/components/csseditor/cssselector.cpp index 2598336c..316a8db4 100644 --- a/quanta/components/csseditor/cssselector.cpp +++ b/quanta/components/csseditor/cssselector.cpp @@ -324,15 +324,15 @@ void CSSSelector::loadCSSContent(const TQString& s){ for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) { if(!it.key().startsWith("@rule") && !it.key().startsWith("/*")){ TQListViewItem *item; - if(it.key().tqcontains(":")){ + if(it.key().contains(":")){ item = new TQListViewItem(lvPseudo); } else - if(it.key().tqcontains("#")){ + if(it.key().contains("#")){ item = new TQListViewItem(lvIDs); } else - if(it.key().tqcontains(".")){ + if(it.key().contains(".")){ item = new TQListViewItem(lvClasses); } else { diff --git a/quanta/components/csseditor/cssshpropertyparser.cpp b/quanta/components/csseditor/cssshpropertyparser.cpp index b523a1b4..d117b5f5 100644 --- a/quanta/components/csseditor/cssshpropertyparser.cpp +++ b/quanta/components/csseditor/cssshpropertyparser.cpp @@ -61,7 +61,7 @@ TQString CSSSHPropertyParser::extractQuotedStringList(){ unsigned int i=0; while(!stop && iinsertItem( m_currentSelectedFont ); switch(m_fontOrigin) { - case available: lbAvailable->removeItem(lbAvailable->index(lbAvailable->tqfindItem(m_currentSelectedFont))); + case available: lbAvailable->removeItem(lbAvailable->index(lbAvailable->findItem(m_currentSelectedFont))); break; - case generic : lbGeneric->removeItem(lbGeneric->index(lbGeneric->tqfindItem(m_currentSelectedFont))); + case generic : lbGeneric->removeItem(lbGeneric->index(lbGeneric->findItem(m_currentSelectedFont))); break; } } @@ -156,7 +156,7 @@ TQStringList fontFamilyChooser::fontList(){ TQStringList list; TQListBoxItem *item = lbSelected->firstItem(); while( item != 0 ){ - if( item->text().tqcontains( TQRegExp("\\W") ) ) list.append( "'" + item->text() + "'" ); + if( item->text().contains( TQRegExp("\\W") ) ) list.append( "'" + item->text() + "'" ); else list.append( item->text() ); item = item->next(); } diff --git a/quanta/components/csseditor/shorthandformer.cpp b/quanta/components/csseditor/shorthandformer.cpp index 4843986c..95b06d99 100644 --- a/quanta/components/csseditor/shorthandformer.cpp +++ b/quanta/components/csseditor/shorthandformer.cpp @@ -52,167 +52,167 @@ static const TQStringList backgroundRepeatValueList = TQStringList::split(",",ba ShorthandFormer::ShorthandFormer( TQMap m){ m_properties = m; - if(m_properties.tqcontains("cue-after")){ + if(m_properties.contains("cue-after")){ cue_after= m_properties["cue-after"]; m_properties.remove("cue-after"); } - if(m_properties.tqcontains("cue-before")){ + if(m_properties.contains("cue-before")){ cue_before = m_properties["cue-before"]; m_properties.remove("cue-before"); } - if(m_properties.tqcontains("pause-before")){ + if(m_properties.contains("pause-before")){ pause_before= m_properties["pause-before"]; m_properties.remove("pause-before"); } - if(m_properties.tqcontains("pause-after")){ + if(m_properties.contains("pause-after")){ pause_after = m_properties["pause-after"]; m_properties.remove("pause-after"); } - if(m_properties.tqcontains("background-color")){ + if(m_properties.contains("background-color")){ background_color = m_properties["background-color"]; m_properties.remove("background-color"); } - if(m_properties.tqcontains("background-image")){ + if(m_properties.contains("background-image")){ background_image = m_properties["background-image"]; m_properties.remove("background-image"); } - if(m_properties.tqcontains("background-repeat")){ + if(m_properties.contains("background-repeat")){ background_repeat = m_properties["background-repeat"]; m_properties.remove("background-repeat"); } - if(m_properties.tqcontains("background-attachment")){ + if(m_properties.contains("background-attachment")){ background_attachment = m_properties["background-attachment"]; m_properties.remove("background-attachment"); } - if(m_properties.tqcontains("background-position")){ + if(m_properties.contains("background-position")){ background_position = m_properties["background-position"]; m_properties.remove("background-position"); } - if(m_properties.tqcontains("border-top-style")){ + if(m_properties.contains("border-top-style")){ border_top_style = m_properties["border-top-style"]; m_properties.remove("border-top-style"); } - if(m_properties.tqcontains("border-top-color")){ + if(m_properties.contains("border-top-color")){ border_top_color = m_properties["border-top-color"]; m_properties.remove("border-top-color"); } - if(m_properties.tqcontains("border-top-width")){ + if(m_properties.contains("border-top-width")){ border_top_width = m_properties["border-top-width"]; m_properties.remove("border-top-width"); } - if(m_properties.tqcontains("border-left-style")){ + if(m_properties.contains("border-left-style")){ border_left_style = m_properties["border-left-style"]; m_properties.remove("border-left-style"); } - if(m_properties.tqcontains("border-left-color")){ + if(m_properties.contains("border-left-color")){ border_left_color = m_properties["border-left-color"]; m_properties.remove("border-left-color"); } - if(m_properties.tqcontains("border-left-width")){ + if(m_properties.contains("border-left-width")){ border_left_width = m_properties["border-left-width"]; m_properties.remove("border-left-width"); } - if(m_properties.tqcontains("border-right-style")){ + if(m_properties.contains("border-right-style")){ border_right_style = m_properties["border-right-style"]; m_properties.remove("border-right-style"); } - if(m_properties.tqcontains("border-right-color")){ + if(m_properties.contains("border-right-color")){ border_right_color = m_properties["border-right-color"]; m_properties.remove("border-right-color"); } - if(m_properties.tqcontains("border-right-width")){ + if(m_properties.contains("border-right-width")){ border_right_width= m_properties["border-right-width"]; m_properties.remove("border-right-width"); } - if(m_properties.tqcontains("border-bottom-style")){ + if(m_properties.contains("border-bottom-style")){ border_bottom_style = m_properties["border-bottom-style"]; m_properties.remove("border-bottom-style"); } - if(m_properties.tqcontains("border-bottom-color")){ + if(m_properties.contains("border-bottom-color")){ border_bottom_color = m_properties["border-bottom-color"]; m_properties.remove("border-bottom-color"); } - if(m_properties.tqcontains("border-bottom-width")){ + if(m_properties.contains("border-bottom-width")){ border_bottom_width = m_properties["border-bottom-width"]; m_properties.remove("border-bottom-width"); } - if(m_properties.tqcontains("outline-style")){ + if(m_properties.contains("outline-style")){ outline_style = m_properties["outline-style"]; m_properties.remove("outline-style"); } - if(m_properties.tqcontains("outline-color")){ + if(m_properties.contains("outline-color")){ outline_color = m_properties["outline-color"]; m_properties.remove("outline-color"); } - if(m_properties.tqcontains("outline-width")){ + if(m_properties.contains("outline-width")){ outline_width = m_properties["outline-width"]; m_properties.remove("outline-width"); } - if(m_properties.tqcontains("list-style-type")){ + if(m_properties.contains("list-style-type")){ list_style_type= m_properties["list-style-type"]; m_properties.remove("list-style-type"); } - if(m_properties.tqcontains("list-style-image")){ + if(m_properties.contains("list-style-image")){ list_style_image = m_properties["list-style-image"]; m_properties.remove("list-style-image"); } - if(m_properties.tqcontains("list-style-position")){ + if(m_properties.contains("list-style-position")){ list_style_position = m_properties["list-style-position"]; m_properties.remove("list-style-position"); } - if(m_properties.tqcontains("font-style")){ + if(m_properties.contains("font-style")){ font_style = m_properties["font-style"]; m_properties.remove("font-style"); } - if(m_properties.tqcontains("font-variant")){ + if(m_properties.contains("font-variant")){ font_variant = m_properties["font-variant"]; m_properties.remove("font-variant"); } - if(m_properties.tqcontains("font-weight")){ + if(m_properties.contains("font-weight")){ font_weight = m_properties["font-weight"]; m_properties.remove("font-weight"); } - if(m_properties.tqcontains("font-size")){ + if(m_properties.contains("font-size")){ font_size = m_properties["font-size"]; m_properties.remove("font-size"); } - if(m_properties.tqcontains("line-height")){ + if(m_properties.contains("line-height")){ line_height= m_properties["line-height"]; m_properties.remove("line-height"); } - if(m_properties.tqcontains("font-family")){ + if(m_properties.contains("font-family")){ font_family = m_properties["font-family"]; m_properties.remove("font-family"); } - if(m_properties.tqcontains("margin-top")){ + if(m_properties.contains("margin-top")){ margin_top = m_properties["margin-top"]; m_properties.remove("margin-top"); } - if(m_properties.tqcontains("margin-bottom")){ + if(m_properties.contains("margin-bottom")){ margin_bottom = m_properties["margin-bottom"]; m_properties.remove("margin-bottom"); } - if(m_properties.tqcontains("margin-left")){ + if(m_properties.contains("margin-left")){ margin_left = m_properties["margin-left"]; m_properties.remove("margin-left"); } - if(m_properties.tqcontains("margin-right")){ + if(m_properties.contains("margin-right")){ margin_right = m_properties["margin-right"]; m_properties.remove("margin-right"); } - if(m_properties.tqcontains("padding-top")){ + if(m_properties.contains("padding-top")){ padding_top = m_properties["padding-top"]; m_properties.remove("padding-top"); } - if(m_properties.tqcontains("padding-bottom")){ + if(m_properties.contains("padding-bottom")){ padding_bottom = m_properties["padding-bottom"]; m_properties.remove("padding-bottom"); } - if(m_properties.tqcontains("padding-left")){ + if(m_properties.contains("padding-left")){ padding_left = m_properties["padding-left"]; m_properties.remove("padding-left"); } - if(m_properties.tqcontains("padding-right")){ + if(m_properties.contains("padding-right")){ padding_right = m_properties["padding-right"]; m_properties.remove("padding-right"); } @@ -517,11 +517,11 @@ TQMap ShorthandFormer::expandBackgroundProp(const TQStringLi while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( (*it).tqcontains("url(") || temp == "none" || temp == "inherit" ){ + if( (*it).contains("url(") || temp == "none" || temp == "inherit" ){ expandedProps["background-image"] = (*it); } else - if( backgroundRepeatValueList.tqcontains(temp)!=0 ) { + if( backgroundRepeatValueList.contains(temp)!=0 ) { expandedProps["background-repeat"] = (*it); } else @@ -529,12 +529,12 @@ TQMap ShorthandFormer::expandBackgroundProp(const TQStringLi expandedProps["background-attachment"] = (*it); } else - if( (*it).tqcontains("rgb(") || (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit" ){ + if( (*it).contains("rgb(") || (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit" ){ expandedProps["background-color"] = (*it); } else - if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).tqcontains(globalPercentagePattern) || (*it).tqcontains(globalLengthPattern) || temp == "inherit"){ - if( expandedProps.tqcontains("background-position") ) + if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).contains(globalPercentagePattern) || (*it).contains(globalLengthPattern) || temp == "inherit"){ + if( expandedProps.contains("background-position") ) expandedProps["background-position"] = ( expandedProps["background-position"] + " " + (*it) ); else expandedProps["background-position"] = (*it); @@ -590,7 +590,7 @@ TQMap ShorthandFormer::expandFontProp(const TQStringList& l) fontPseudoSHFormValues.append("message-box"); fontPseudoSHFormValues.append("small-caption"); fontPseudoSHFormValues.append("status-bar"); - if( l.count()==1 && fontPseudoSHFormValues.tqcontains(l[0]) != 0) { + if( l.count()==1 && fontPseudoSHFormValues.contains(l[0]) != 0) { expandedProps["font"] = l[0]; return expandedProps; } @@ -599,18 +599,18 @@ TQMap ShorthandFormer::expandFontProp(const TQStringList& l) while ( it != l.end() ) { TQString currentIt = (*it); TQString temp(currentIt.stripWhiteSpace()); - if( fontStyleValueList.tqcontains(temp)!=0 ) expandedProps["font-style"] = (*it); + if( fontStyleValueList.contains(temp)!=0 ) expandedProps["font-style"] = (*it); else - if( fontVariantValueList.tqcontains(temp)!=0 ) expandedProps["font-variant"] = currentIt ; + if( fontVariantValueList.contains(temp)!=0 ) expandedProps["font-variant"] = currentIt ; else - if( fontWeightValueList.tqcontains(temp)!=0) expandedProps["font-weight"] = currentIt; + if( fontWeightValueList.contains(temp)!=0) expandedProps["font-weight"] = currentIt; else - if( (fontSizeValueList.tqcontains(temp)!=0 || currentIt.tqcontains(globalPercentagePattern)!=0 || currentIt.tqcontains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() ) + if( (fontSizeValueList.contains(temp)!=0 || currentIt.contains(globalPercentagePattern)!=0 || currentIt.contains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() ) { expandedProps["font-size"] = currentIt; } else - if( currentIt.tqcontains(percentagePattern)!=0 || currentIt.tqcontains(numberPattern)!=0 || currentIt.tqcontains(lengthPattern)!=0 || temp == "/normal" || temp == "/inherit" ) + if( currentIt.contains(percentagePattern)!=0 || currentIt.contains(numberPattern)!=0 || currentIt.contains(lengthPattern)!=0 || temp == "/normal" || temp == "/inherit" ) { expandedProps["line-height"] = (currentIt.remove('/')); } @@ -640,7 +640,7 @@ TQMap ShorthandFormer::expandListstyleProp( const TQStringLis TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( listTypeValueList.tqcontains(temp)!=0) { + if( listTypeValueList.contains(temp)!=0) { expandedProps["list-style-type"] = (*it) ; } else @@ -648,7 +648,7 @@ TQMap ShorthandFormer::expandListstyleProp( const TQStringLis expandedProps["list-style-position"] = (*it); } else - if( (*it).tqcontains("url(") || temp == "none" || temp == "inherit" ) + if( (*it).contains("url(") || temp == "none" || temp == "inherit" ) expandedProps["list-style-image"] = (*it); ++it; @@ -661,12 +661,12 @@ TQMap ShorthandFormer::expandOutlineProp( const TQStringList TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( borderStyleValueList.tqcontains(temp)!=0 ) expandedProps["outline-style"] = (*it); + if( borderStyleValueList.contains(temp)!=0 ) expandedProps["outline-style"] = (*it); else - if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "invert" || temp == "inherit") + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "invert" || temp == "inherit") expandedProps["outline-color"] = (*it) ; else - if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0) + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0) expandedProps["outline-width"] = (*it); ++it; } @@ -679,12 +679,12 @@ TQMap ShorthandFormer::expandBoxSide(const TQString& subProp TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( borderStyleValueList.tqcontains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it); + if( borderStyleValueList.contains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it); else - if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit") + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit") expandedProps[subPropName + "-color"] = (*it) ; else - if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0) + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0) expandedProps[subPropName + "-width"] = (*it); ++it; } @@ -696,21 +696,21 @@ TQMap ShorthandFormer::expandBorderProp(const TQStringList& TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( borderStyleValueList.tqcontains(temp)!=0 ){ + if( borderStyleValueList.contains(temp)!=0 ){ expandedProps["border-top-style"] = (*it); expandedProps["border-left-style"] = (*it); expandedProps["border-right-style"] = (*it); expandedProps["border-bottom-style"] = (*it); } else - if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit"){ + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit"){ expandedProps["border-top-color"] = (*it); expandedProps["border-left-color"] = (*it); expandedProps["border-right-color"] = (*it); expandedProps["border-bottom-color"] = (*it); } else - if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0){ + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0){ expandedProps["border-top-width"] = (*it); expandedProps["border-left-width"] = (*it); expandedProps["border-right-width"] = (*it); diff --git a/quanta/components/csseditor/stylesheetparser.cpp b/quanta/components/csseditor/stylesheetparser.cpp index 06e7600a..0a573925 100644 --- a/quanta/components/csseditor/stylesheetparser.cpp +++ b/quanta/components/csseditor/stylesheetparser.cpp @@ -151,21 +151,21 @@ void stylesheetParser::parseSelector(){ int closingParentheses = 1, openingParentheses = 0; while(true){ - openingParentheses = numberOfParenthesisInAParenthesisBlock(closed,m_styleSheet.left(closingParenthesisPos+1)); //m_styleSheet.left(closingParenthesisPos+1).tqcontains("{"); + openingParentheses = numberOfParenthesisInAParenthesisBlock(closed,m_styleSheet.left(closingParenthesisPos+1)); //m_styleSheet.left(closingParenthesisPos+1).contains("{"); if(openingParentheses==closingParentheses){ - TQString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.tqfind("{")*/).stripWhiteSpace(), - selectorValue=m_styleSheet.mid(findParanthesis(m_styleSheet, '{')/*m_styleSheet.tqfind("{")*/+1, closingParenthesisPos - m_styleSheet.tqfind("{") -1); + TQString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/).stripWhiteSpace(), + selectorValue=m_styleSheet.mid(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/+1, closingParenthesisPos - m_styleSheet.find("{") -1); selectorName.remove("\n").remove("\t"); selectorValue.remove("\n").remove("\t"); TQPair tmp(selectorValue,++m_orderNumber); - if (m_stylesheetStructure.tqcontains(selectorName)) + if (m_stylesheetStructure.contains(selectorName)) { uint i = 2; TQString s = selectorName + TQString("-v%1").tqarg(i); - while (m_stylesheetStructure.tqcontains(s)) + while (m_stylesheetStructure.contains(s)) { i++; s = selectorName + TQString("-v%1").tqarg(i); @@ -176,7 +176,7 @@ void stylesheetParser::parseSelector(){ break; } else { - closingParenthesisPos = findParanthesis(m_styleSheet, '{',closingParenthesisPos+1)/*m_styleSheet.tqfind("}",closingParenthesisPos+1)*/; + closingParenthesisPos = findParanthesis(m_styleSheet, '{',closingParenthesisPos+1)/*m_styleSheet.find("}",closingParenthesisPos+1)*/; closingParentheses++; } } @@ -188,13 +188,13 @@ void stylesheetParser::parseSelector(){ void stylesheetParser::parseAtRules1(){ //TODO this needs to be fixed : in case the at rule is not properly closed the parser hangs - if(m_styleSheet.tqfind("{") == -1) { + if(m_styleSheet.find("{") == -1) { m_stopProcessing = true; emit errorOccurred(m_styleSheet.mid(0,20) + "...\n " + msg2); return; } - int closingParenthesisPos = m_styleSheet.tqfind("}"), + int closingParenthesisPos = m_styleSheet.find("}"), closingParentheses = 0; if(closingParenthesisPos==-1) return; @@ -202,12 +202,12 @@ void stylesheetParser::parseAtRules1(){ int openingParentheses=0; while(true){ - openingParentheses = m_styleSheet.left(closingParenthesisPos+1).tqcontains("{"); + openingParentheses = m_styleSheet.left(closingParenthesisPos+1).contains("{"); if(openingParentheses==closingParentheses) break; else { - closingParenthesisPos = m_styleSheet.tqfind("}",closingParenthesisPos+1); + closingParenthesisPos = m_styleSheet.find("}",closingParenthesisPos+1); if( closingParenthesisPos!= -1 ) closingParentheses++; else { @@ -227,7 +227,7 @@ void stylesheetParser::parseAtRules1(){ void stylesheetParser::parseAtRules2(){ //TODO this needs to be fixed : in case the at rule is not properly closed the parser hangs - int semicolonPos = m_styleSheet.tqfind(";"); + int semicolonPos = m_styleSheet.find(";"); if(semicolonPos==-1) { m_stopProcessing = true; diff --git a/quanta/components/debugger/conditionalbreakpointdialog.cpp b/quanta/components/debugger/conditionalbreakpointdialog.cpp index 9dfeb5a6..055512da 100644 --- a/quanta/components/debugger/conditionalbreakpointdialog.cpp +++ b/quanta/components/debugger/conditionalbreakpointdialog.cpp @@ -56,7 +56,7 @@ ConditionalBreakpointDialog::~ConditionalBreakpointDialog() void ConditionalBreakpointDialog::slotExpressionChanged() { - if(comboExpression->currentText().tqfind( TQRegExp("[^=!]=[^=]"), 0 ) >= 0) + if(comboExpression->currentText().find( TQRegExp("[^=!]=[^=]"), 0 ) >= 0) ledWarning->on(); else ledWarning->off(); diff --git a/quanta/components/debugger/dbgp/dbgpnetwork.cpp b/quanta/components/debugger/dbgp/dbgpnetwork.cpp index d5ce7b86..584e71f0 100644 --- a/quanta/components/debugger/dbgp/dbgpnetwork.cpp +++ b/quanta/components/debugger/dbgp/dbgpnetwork.cpp @@ -262,7 +262,7 @@ void DBGpNetwork::slotReadyRead() // If datalen == -1, we didnt read the size yet, otherwise we're reading data. if(m_datalen == -1) { - bytes = m_fifo.tqfind('\0'); + bytes = m_fifo.find('\0'); if(bytes < 0) break; diff --git a/quanta/components/debugger/dbgp/dbgpsettings.cpp b/quanta/components/debugger/dbgp/dbgpsettings.cpp index c76e00c2..e9bbc249 100644 --- a/quanta/components/debugger/dbgp/dbgpsettings.cpp +++ b/quanta/components/debugger/dbgp/dbgpsettings.cpp @@ -23,7 +23,7 @@ DBGpSettings::DBGpSettings(const TQString &protocolversion) : DBGpSettingsS(0, "DBGpSettings", false, 0) { - textAbout->setText(textAbout->text().tqreplace("%PROTOCOLVERSION%", protocolversion)); + textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); connect(checkLocalProject, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotLocalProjectToggle(bool))); } diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp index 6a52ac39..578fedb9 100644 --- a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp @@ -38,7 +38,7 @@ TQString TQByteArrayFifo::retrieve( ) for(size_t cnt = 0; cnt < m_size; cnt++) m_array[cnt] = m_array[cnt + size]; - // Resize array, needed for tqfind() to work + // Resize array, needed for find() to work m_array.resize(m_size); return str; @@ -60,13 +60,13 @@ bool TQByteArrayFifo::append(const char * chars, size_t size ) return true; } -long TQByteArrayFifo::tqfind( char character ) +long TQByteArrayFifo::find( char character ) { - // If size is 0, tqfind() outputs a warning for some reason + // If size is 0, find() outputs a warning for some reason if(m_size == 0) return -1; - return m_array.tqfind(character); + return m_array.find(character); } TQString TQByteArrayFifo::base64Encoded() diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.h b/quanta/components/debugger/dbgp/qbytearrayfifo.h index 2f46df76..9672c619 100644 --- a/quanta/components/debugger/dbgp/qbytearrayfifo.h +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.h @@ -31,7 +31,7 @@ class TQByteArrayFifo bool append(const char * chars, size_t size); TQString retrieve(); TQString base64Encoded(); - long tqfind(char character); + long find(char character); size_t length() { return m_size; } private: diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp index ac3793bd..44071116 100644 --- a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp @@ -384,7 +384,7 @@ void QuantaDebuggerDBGp::stackShow(const TQDomNode&node) // Type isnt currently correct with xdebug // type = (attribute(child, "type") == "file" ? File : Eval); typestr = attribute(child, "filename"); - if(typestr.tqfind(TQRegExp(".*%28[0-9]+%29%20%3A%20eval")) >= 0) + if(typestr.find(TQRegExp(".*%28[0-9]+%29%20%3A%20eval")) >= 0) type = Eval; else type = File; @@ -573,15 +573,15 @@ void QuantaDebuggerDBGp::fileOpened(const TQString&) // Watch a variable void QuantaDebuggerDBGp::addWatch(const TQString & variable) { - if(m_watchlist.tqfind(variable) == m_watchlist.end()) + if(m_watchlist.find(variable) == m_watchlist.end()) m_watchlist.append(variable); m_network.sendCommand("property_get", "-n " + variable); } // Remove watch void QuantaDebuggerDBGp::removeWatch(DebuggerVariable *variable) { - if(m_watchlist.tqfind(variable->name()) != m_watchlist.end()) - m_watchlist.remove(m_watchlist.tqfind(variable->name())); + if(m_watchlist.find(variable->name()) != m_watchlist.end()) + m_watchlist.remove(m_watchlist.find(variable->name())); } // Show conditional breakpoint state @@ -850,8 +850,8 @@ void QuantaDebuggerDBGp::profilerOpen() void QuantaDebuggerDBGp::profilerOpen(bool forceopen) { TQString profileroutput = m_profilerFilename; - profileroutput.tqreplace("%a", m_appid); - profileroutput.tqreplace("%c", m_initialscript); + profileroutput.replace("%a", m_appid); + profileroutput.replace("%c", m_initialscript); if(m_profilerMapFilename) profileroutput = mapServerPathToLocal( profileroutput); diff --git a/quanta/components/debugger/debuggerbreakpointlist.cpp b/quanta/components/debugger/debuggerbreakpointlist.cpp index 2d18309f..6a47d296 100644 --- a/quanta/components/debugger/debuggerbreakpointlist.cpp +++ b/quanta/components/debugger/debuggerbreakpointlist.cpp @@ -50,7 +50,7 @@ void DebuggerBreakpointList::add(DebuggerBreakpoint* bp) void DebuggerBreakpointList::remove(DebuggerBreakpoint* bp) { - BreakpointList_t::iterator it = tqfind(*bp); + BreakpointList_t::iterator it = find(*bp); if(it == m_breakpointList->end()) return; @@ -113,7 +113,7 @@ void DebuggerBreakpointList::clear() bool DebuggerBreakpointList::exists(DebuggerBreakpoint* bp) { - BreakpointList_t::iterator it = tqfind(*bp); + BreakpointList_t::iterator it = find(*bp); if(it == m_breakpointList->end()) return false; @@ -124,7 +124,7 @@ bool DebuggerBreakpointList::exists(DebuggerBreakpoint* bp) } -BreakpointList_t::iterator DebuggerBreakpointList::tqfind(const DebuggerBreakpoint &bp) +BreakpointList_t::iterator DebuggerBreakpointList::find(const DebuggerBreakpoint &bp) { BreakpointList_t::iterator it; @@ -180,7 +180,7 @@ void DebuggerBreakpointList::updateBreakpointKey( const DebuggerBreakpoint & bp, { //DebuggerBreakpoint *bpp = new DebuggerBreakpoint(bp); BreakpointList_t::iterator it; - it = tqfind(bp); + it = find(bp); if(it != m_breakpointList->end()) { (*it)->setKey(newkey); diff --git a/quanta/components/debugger/debuggerbreakpointlist.h b/quanta/components/debugger/debuggerbreakpointlist.h index ef9233bc..aa6cd803 100644 --- a/quanta/components/debugger/debuggerbreakpointlist.h +++ b/quanta/components/debugger/debuggerbreakpointlist.h @@ -31,7 +31,7 @@ class DebuggerBreakpointList private: BreakpointList_t* m_breakpointList; BreakpointList_t::iterator m_current; - BreakpointList_t::iterator tqfind(const DebuggerBreakpoint &bp); + BreakpointList_t::iterator find(const DebuggerBreakpoint &bp); public: DebuggerBreakpointList(); diff --git a/quanta/components/debugger/gubed/gubedsettings.cpp b/quanta/components/debugger/gubed/gubedsettings.cpp index b6df9b25..9464dc81 100644 --- a/quanta/components/debugger/gubed/gubedsettings.cpp +++ b/quanta/components/debugger/gubed/gubedsettings.cpp @@ -22,7 +22,7 @@ GubedSettings::GubedSettings(const TQString &protocolversion) : GubedSettingsS(0, "GubedSettings", false, 0) { - textAbout->setText(textAbout->text().tqreplace("%PROTOCOLVERSION%", protocolversion)); + textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); } GubedSettings::~GubedSettings() diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.cpp b/quanta/components/debugger/gubed/quantadebuggergubed.cpp index e14ca894..7b84380d 100644 --- a/quanta/components/debugger/gubed/quantadebuggergubed.cpp +++ b/quanta/components/debugger/gubed/quantadebuggergubed.cpp @@ -383,13 +383,13 @@ void QuantaDebuggerGubed::slotReadyRead() // If datalen == -1, we didnt read the command yet, otherwise were reading data. if(m_datalen == -1) { - bytes = m_buffer.tqfind(";"); + bytes = m_buffer.find(";"); if(bytes < 0) break; data = m_buffer.left(bytes); m_buffer.remove(0, bytes + 1); - bytes = data.tqfind(":"); + bytes = data.find(":"); m_command = data.left(bytes); data.remove(0, bytes + 1); m_datalen = data.toLong(); @@ -445,7 +445,7 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) long argcnt = args["args"].toLong(); TQString msg = i18n(args["message"].ascii()); // How will we get these messages throught to the translators? for(int cnt = 1; cnt <= argcnt; cnt++) - msg.tqreplace("%" + TQString("%1").tqarg(cnt) + "%", args[TQString("arg%1").tqarg(cnt)]); + msg.replace("%" + TQString("%1").tqarg(cnt) + "%", args[TQString("arg%1").tqarg(cnt)]); debuggerInterface()->showtqStatus(msg, false); } @@ -768,15 +768,15 @@ void QuantaDebuggerGubed::fileOpened(const TQString&) // Watch a variable void QuantaDebuggerGubed::addWatch(const TQString &variable) { - if(m_watchlist.tqfind(variable) == m_watchlist.end()) + if(m_watchlist.find(variable) == m_watchlist.end()) m_watchlist.append(variable); sendCommand("getwatch", "variable", variable.ascii(), (char*)0L); } // Remove watch void QuantaDebuggerGubed::removeWatch(DebuggerVariable *variable) { - if(m_watchlist.tqfind(variable->name()) != m_watchlist.end()) - m_watchlist.remove(m_watchlist.tqfind(variable->name())); + if(m_watchlist.find(variable->name()) != m_watchlist.end()) + m_watchlist.remove(m_watchlist.find(variable->name())); //sendCommand("unwatchvariable", var->name()); } @@ -1038,13 +1038,13 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) return ca; } - cnt = args.mid(2, args.tqfind("{") - 3).toLong(); - TQString data = args.mid(args.tqfind("{") + 1); + cnt = args.mid(2, args.find("{") - 3).toLong(); + TQString data = args.mid(args.find("{") + 1); TQString tmp, func; while(cnt > 0) { - tmp = data.left(data.tqfind("\"")); + tmp = data.left(data.find("\"")); length = tmp.mid(2, tmp.length() - 3).toLong(); func = data.mid(tmp.length() + 1, length); @@ -1053,8 +1053,8 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) if(data.left(1) == "i") { // Integer data - tmp = data.mid(data.tqfind(":") + 1); - tmp = tmp.left(tmp.tqfind(";")); + tmp = data.mid(data.find(":") + 1); + tmp = tmp.left(tmp.find(";")); ca[func] = tmp; data = data.mid(tmp.length() + 3); // kdDebug(24002) << k_funcinfo << "**i " << func << ": " << ca[func] << endl; @@ -1062,7 +1062,7 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) else { // String data - tmp = data.left(data.tqfind("\"")); + tmp = data.left(data.find("\"")); length = tmp.mid(2, tmp.length() - 3).toLong(); ca[func] = data.mid(tmp.length() + 1, length); @@ -1098,8 +1098,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) if(type == "s") { // Get length of key - tempstring = str.left(str.tqfind(':')); - str.remove(0, str.tqfind(':') + 1); + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 1); length = tempstring.toUInt(); key = str.left(length + 1); @@ -1108,8 +1108,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) } else if(type == "i") { - key = str.left(str.tqfind(';')); - str.remove(0, str.tqfind(';') + 1); + key = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); } @@ -1122,8 +1122,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:4:"$row";i:6; */ - data = str.left(str.tqfind(';')); - str.remove(0, str.tqfind(';') + 1); + data = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Integer); } @@ -1132,9 +1132,9 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:8:"$boolvar";b:1; */ - data = str.left(str.tqfind(';')); + data = str.left(str.find(';')); data = (data == "0" ? i18n("False"): i18n("True")); - str.remove(0, str.tqfind(';') + 1); + str.remove(0, str.find(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Boolean); } else if(type == "N") @@ -1151,8 +1151,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of string - tempstring = str.left(str.tqfind(':')); - str.remove(0, str.tqfind(':') + 1); + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 1); length = tempstring.toUInt(); data = str.left(length + 1); @@ -1168,8 +1168,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of array - tempstring = str.left(str.tqfind(':')); - str.remove(0, str.tqfind(':') + 2); + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 2); length = tempstring.toUInt(); TQPtrList vars ; @@ -1193,13 +1193,13 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of array - tempstring = str.left(str.tqfind(':')); - str.remove(0, str.tqfind(':') + 2); - tempstring = str.mid(str.tqfind(':') + 1); - tempstring = tempstring.left(tempstring.tqfind(':')); + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 2); + tempstring = str.mid(str.find(':') + 1); + tempstring = tempstring.left(tempstring.find(':')); length = tempstring.toUInt(); - str.remove(0, str.tqfind('{') + 1); + str.remove(0, str.find('{') + 1); TQPtrList vars ; while(length > 0) @@ -1220,8 +1220,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:9:"$floatvar";d:12.5600000000000004973799150320701301097869873046875;" */ - data = str.left(str.tqfind(';')); - str.remove(0, str.tqfind(';') + 1); + data = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Float); } diff --git a/quanta/components/debugger/quantadebuggerinterface.cpp b/quanta/components/debugger/quantadebuggerinterface.cpp index be930d17..83eb582c 100644 --- a/quanta/components/debugger/quantadebuggerinterface.cpp +++ b/quanta/components/debugger/quantadebuggerinterface.cpp @@ -86,20 +86,20 @@ const TQString QuantaDebuggerInterface::activeFileParts(const TQString & str) // n/d/p = name/dir/path // Filename, filedir and filepath - newstr.tqreplace("%afn", ViewManager::ref()->activeDocument()->url().fileName()); - newstr.tqreplace("%afd", ViewManager::ref()->activeDocument()->url().directory()); - newstr.tqreplace("%afp", ViewManager::ref()->activeDocument()->url().path()); + newstr.replace("%afn", ViewManager::ref()->activeDocument()->url().fileName()); + newstr.replace("%afd", ViewManager::ref()->activeDocument()->url().directory()); + newstr.replace("%afp", ViewManager::ref()->activeDocument()->url().path()); // filedir and filepath relative to project root - newstr.tqreplace("%rfpp", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().path())); - newstr.tqreplace("%rfpd", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().directory())); + newstr.replace("%rfpp", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().path())); + newstr.replace("%rfpd", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().directory())); // filedir and filepath relative to document root - newstr.tqreplace("%rfdp", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().path())); - newstr.tqreplace("%rfdd", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().directory())); + newstr.replace("%rfdp", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().path())); + newstr.replace("%rfdd", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().directory())); - newstr.tqreplace("%apd", Project::ref()->projectBaseURL().path()); - newstr.tqreplace("%add", Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory()); + newstr.replace("%apd", Project::ref()->projectBaseURL().path()); + newstr.replace("%add", Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory()); kdDebug(24002) << k_funcinfo << ", BaseURL " << Project::ref()->projectBaseURL().path() << ", active doc : " << ViewManager::ref()->activeDocument()->url().path() << ", documentFolderForURL" << Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()) << ", newstr" << newstr << endl; diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp index ecf42bf8..592d33d5 100644 --- a/quanta/components/framewizard/treenode.cpp +++ b/quanta/components/framewizard/treenode.cpp @@ -98,7 +98,7 @@ void tree::refreshGeometries(treeNode *n){ treeNode* tree::findNode(const TQString &l){ if(l==m_root->label()) return m_root; - return m_nodeList.tqfind(l); + return m_nodeList.find(l); } TQString tree::addChildNode(const TQString &l){ diff --git a/quanta/components/framewizard/treenode.h b/quanta/components/framewizard/treenode.h index a1d568a6..428a381f 100644 --- a/quanta/components/framewizard/treenode.h +++ b/quanta/components/framewizard/treenode.h @@ -46,7 +46,7 @@ class treeNode { void setLabel(const TQString &l) { m_label = l; } void removeChildren() { m_tqchildrenList.clear(); } void setParentLabel(const TQString &s){ m_parentLabel = s;} - int childPosition(treeNode* n){ return m_tqchildrenList.tqfind(n); } + int childPosition(treeNode* n){ return m_tqchildrenList.find(n); } bool insertChild(unsigned int pos, treeNode* n) { return m_tqchildrenList.insert( pos, n); } TQString label() const { return m_label; } TQString parentLabel() const { return m_parentLabel; } diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp index 3795a3ce..215bdf63 100644 --- a/quanta/components/framewizard/visualframeeditor.cpp +++ b/quanta/components/framewizard/visualframeeditor.cpp @@ -109,9 +109,9 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ // then every asterisk must be assigned a percentage of 10% so the real percentage // notation is cols="40%,50%,10%" for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - if(!(*it).tqcontains("%") && !(*it).tqcontains("*")) leftPercentage -= ( (*it).toInt()*100 )/d; - if((*it).tqcontains("%")) leftPercentage -= (*it).section("%",0,0).toInt(); - if((*it).tqcontains("*")) { + if(!(*it).contains("%") && !(*it).contains("*")) leftPercentage -= ( (*it).toInt()*100 )/d; + if((*it).contains("%")) leftPercentage -= (*it).section("%",0,0).toInt(); + if((*it).contains("*")) { int weight= (*it).section("*",0,0).toInt(); if( weight==0 ) weight=1; weightAsteriskCounter += weight; @@ -125,7 +125,7 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ // a quelli effettivamente generati dal metodo build che opera un'altra normalizzazione. // In genere la differenza �dell' 1% for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - if((*it).tqcontains("*")){ + if((*it).contains("*")){ int weight= (*it).section("*",0,0).toInt(); if(weight==0) weight=1; int newPercentage = weight*leftPercentageDistributedAmongAsterisks; @@ -138,9 +138,9 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ TQString line = m_existingStructure.first(); - if(line.tqcontains("findNode(tqparent)->atts()->tqgeometry(); TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.height()); - int dummyDimension=dummy.height()-cancelledPixels(line.tqcontains(",")+1); + int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1); TQPtrList list=m_internalTree->findNode(tqparent)->tqchildrenList(); TQPtrListIterator it( list ); @@ -157,7 +157,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ ++it; TQRect newGeometry(dummy); double newDimension; - if(percentages.first().tqcontains("%")) + if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; else newDimension=(double)percentages.first().toInt(); newGeometry.setHeight( proxInt(newDimension) ); @@ -166,15 +166,15 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ } } else - if(line.tqcontains("cols")) { - split(tqparent,(line.tqcontains(",")+1),VERTICAL); + if(line.contains("cols")) { + split(tqparent,(line.contains(",")+1),VERTICAL); TQRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\""); pattern.search(line); TQRect dummy=m_internalTree->findNode(tqparent)->atts()->tqgeometry(); TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.width()); - int dummyDimension=dummy.width()-cancelledPixels(line.tqcontains(",")+1); + int dummyDimension=dummy.width()-cancelledPixels(line.contains(",")+1); TQPtrList list=m_internalTree->findNode(tqparent)->tqchildrenList(); TQPtrListIterator it( list ); @@ -183,7 +183,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ ++it; TQRect newGeometry(dummy); double newDimension; - if(percentages.first().tqcontains("%")) + if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; else newDimension=(double)percentages.first().toInt(); newGeometry.setWidth( proxInt(newDimension) ); @@ -201,7 +201,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ } else { TQMap attributeMap; - if( line.tqcontains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; + if( line.contains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; else attributeMap["noresize"] = TQString(); TQRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files @@ -287,7 +287,7 @@ void VisualFrameEditor::drawGUI(treeNode *n, TQWidget* tqparent){ if(n->hasChildren()) { TQString splitterName("splitter"+TQString::number(++splitterIdNumber,10)); TQSplitter *splitter = new TQSplitter(tqparent,splitterName.ascii()); - if(SIZES.tqcontains(splitterName)) splitter->setSizes( SIZES[splitterName] ); + if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] ); switch( n->splitType() ){ case VERTICAL : splitter->setOrientation(Qt::Horizontal);break; case HORIZONTAL : splitter->setOrientation(Qt::Vertical);break; @@ -421,9 +421,9 @@ TQString VisualFrameEditor::formatStructure(){ TQString s; int tabNum = 0; for ( TQStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) { - if((*it).tqcontains("")) { + if((*it).contains("")) { tabNum--; s.truncate(s.length()-1); } @@ -441,9 +441,9 @@ TQString VisualFrameEditor::framesetStructure() { } void VisualFrameEditor::setMarkupLanguage(const TQString& s){ - if( s.tqcontains("xhtml",false)!=0 ) m_markupLanguage = XHTML; + if( s.contains("xhtml",false)!=0 ) m_markupLanguage = XHTML; else - if( s.tqcontains("html",false)!=0 ) m_markupLanguage = HTML; + if( s.contains("html",false)!=0 ) m_markupLanguage = HTML; } #include "visualframeeditor.moc" diff --git a/quanta/components/tableeditor/tableeditor.cpp b/quanta/components/tableeditor/tableeditor.cpp index e9475242..c49d2be0 100644 --- a/quanta/components/tableeditor/tableeditor.cpp +++ b/quanta/components/tableeditor/tableeditor.cpp @@ -152,7 +152,7 @@ void TableEditor::slotContextMenuRequested( int row, int col, const TQPoint & po TQTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); TQRect rect(TQPoint(selection.topRow(), selection.leftCol()) , TQPoint(selection.bottomRow(), selection.rightCol())); - if (rect.isValid() && (rect.width() > 1 || rect.height() > 1) && rect.tqcontains(m_row, m_col)) { + if (rect.isValid() && (rect.width() > 1 || rect.height() > 1) && rect.contains(m_row, m_col)) { m_popup->setItemVisible(m_mergeCellsId, true); m_popup->setItemVisible(m_mergeSeparatorId, true); } @@ -919,7 +919,7 @@ void TableEditor::slotRemoveRow() if ((*it3).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it3).mergedRow][(*it3).mergedCol]); - if (mainTableNode->node && !updatedMainNodes.tqcontains(mainTableNode)) + if (mainTableNode->node && !updatedMainNodes.contains(mainTableNode)) { int rowspan = mainTableNode->node->tag->attributeValue("rowspan", true).toInt(); rowspan--; @@ -970,7 +970,7 @@ void TableEditor::slotRemoveCol() if ((*it2).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it2).mergedRow][(*it2).mergedCol]); - if (mainTableNode->node && !updatedMainNodes.tqcontains(mainTableNode)) + if (mainTableNode->node && !updatedMainNodes.contains(mainTableNode)) { int colspan = mainTableNode->node->tag->attributeValue("colspan", true).toInt(); colspan--; @@ -1163,7 +1163,7 @@ void TableEditor::slotEditChildTable() table = *it; if (table.row == m_row && table.col == m_col) { TQString cellData = m_dataTable->text(table.row, table.col); - int pos = cellData.tqfind(table.nestedData); + int pos = cellData.find(table.nestedData); if (pos == -1) { KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); error = true; @@ -1182,9 +1182,9 @@ void TableEditor::slotEditChildTable() baseNode = localParser->parse(w); tempDocCreated = true; //try to find the child table position - int pos2 = tableData.tqfind(cellData); + int pos2 = tableData.find(cellData); if (pos2 != -1) - pos2 = tableData.tqfind(table.nestedData, pos2); + pos2 = tableData.find(table.nestedData, pos2); else { KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); error = true; @@ -1192,8 +1192,8 @@ void TableEditor::slotEditChildTable() break; } tableData = tableData.left(pos2); - table.bLine = tableData.tqcontains('\n'); - pos2 = tableData.tqfindRev('\n'); + table.bLine = tableData.contains('\n'); + pos2 = tableData.findRev('\n'); if (pos2 != -1) { table.bCol = tableData.length() - pos2; } else { @@ -1214,7 +1214,7 @@ void TableEditor::slotEditChildTable() if (editor.exec()) { int length = table.nestedData.length(); (*it).nestedData = editor.readModifiedTable(); - cellData.tqreplace(pos, length, (*it).nestedData); + cellData.replace(pos, length, (*it).nestedData); setCellText(m_dataTable, table.row, table.col, cellData); } //cleanup on success diff --git a/quanta/dialogs/actionconfigdialog.cpp b/quanta/dialogs/actionconfigdialog.cpp index 0ac7ede2..562d74ed 100644 --- a/quanta/dialogs/actionconfigdialog.cpp +++ b/quanta/dialogs/actionconfigdialog.cpp @@ -89,7 +89,7 @@ ActionConfigDialog::ActionConfigDialog(const TQDict &toolbarList, for (int i = 0; i < tb->count(); i++) { toolbarName = tb->label(i); - toolbarName.tqreplace(r, ""); + toolbarName.replace(r, ""); item = new KListViewItem(actionTreeView, oldItem, i18n(toolbarName.utf8())); actionTreeView->insertItem(item); @@ -106,13 +106,13 @@ ActionConfigDialog::ActionConfigDialog(const TQDict &toolbarList, action = ac->action(node.toElement().attribute("name").ascii()); if (action) { - oldActionItem = new KListViewItem(item, oldActionItem, action->text().tqreplace(r,""), action->shortcut().toString(), action->name()); + oldActionItem = new KListViewItem(item, oldActionItem, action->text().replace(r,""), action->shortcut().toString(), action->name()); oldActionItem->setPixmap(0, SmallIcon(action->icon()) ); } } node = node.nextSibling(); } - if (tb->label(tb->currentPageIndex()).tqreplace(r, "") == toolbarName) + if (tb->label(tb->currentPageIndex()).replace(r, "") == toolbarName) { item->setOpen(true); if (item->firstChild()) @@ -142,7 +142,7 @@ ActionConfigDialog::ActionConfigDialog(const TQDict &toolbarList, for (uint i = 0; i < acCount; i++) { action = ac->action(i); - item = new KListViewItem(allActionsItem, action->text().tqreplace(r, ""), action->shortcut().toString(), action->name()); + item = new KListViewItem(allActionsItem, action->text().replace(r, ""), action->shortcut().toString(), action->name()); item->setPixmap(0, SmallIcon(action->icon()) ); } allActionsItem->sortChildItems(0, true); @@ -168,7 +168,7 @@ void ActionConfigDialog::slotAddToolbar() for (int i = 0; i < tb->count(); i++) { toolbarName = tb->label(i); - if (!actionTreeView->tqfindItem(toolbarName, 0)) + if (!actionTreeView->findItem(toolbarName, 0)) { item = actionTreeView->lastItem(); if (item->tqparent()) @@ -231,7 +231,7 @@ void ActionConfigDialog::slotEditToolbar() ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; if (p_toolbar) { - oldItem = actionTreeView->tqfindItem(toolbarName, 0); + oldItem = actionTreeView->findItem(toolbarName, 0); item = new KListViewItem(actionTreeView, oldItem, toolbarName); item->setOpen(oldItem->isOpen()); delete oldItem; @@ -243,7 +243,7 @@ void ActionConfigDialog::slotEditToolbar() action = ac->action(node.toElement().attribute("name").ascii()); if (action) { - oldItem = new KListViewItem(item, oldItem, action->text().tqreplace(TQRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); + oldItem = new KListViewItem(item, oldItem, action->text().replace(TQRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); oldItem->setPixmap(0, SmallIcon(action->icon())); } } @@ -309,7 +309,7 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) actionIcon->setIcon(s); } TQString actionText = el.attribute("text"); - actionText.tqreplace(TQRegExp("\\&(?!\\&)"),""); + actionText.replace(TQRegExp("\\&(?!\\&)"),""); lineText->setText(actionText); lineToolTip->setText( el.attribute("tooltip") ); selectedShortcut = action->shortcut(); @@ -406,7 +406,7 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) { outputBox->setCurrentItem(2); } else - if (s == "tqreplace") + if (s == "replace") { outputBox->setCurrentItem(3); } else @@ -431,7 +431,7 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) { errorBox->setCurrentItem(2); } else - if (s == "tqreplace") + if (s == "replace") { errorBox->setCurrentItem(3); } else @@ -472,7 +472,7 @@ void ActionConfigDialog::saveCurrentAction() currentAction->setIcon(s); TQString oldText = el.attribute("text"); s = lineText->text(); - s.tqreplace('&', "&&"); + s.replace('&', "&&"); el.setAttribute("text", s); currentAction->setText(s); s = lineToolTip->text(); @@ -549,7 +549,7 @@ void ActionConfigDialog::saveCurrentAction() case 2:{ item.setAttribute("output", "selection"); break; } - case 3:{ item.setAttribute("output", "tqreplace"); + case 3:{ item.setAttribute("output", "replace"); break; } case 4:{ item.setAttribute("output", "new"); @@ -570,7 +570,7 @@ void ActionConfigDialog::saveCurrentAction() case 2:{ item.setAttribute("error", "selection"); break; } - case 3:{ item.setAttribute("error", "tqreplace"); + case 3:{ item.setAttribute("error", "replace"); break; } case 4:{ item.setAttribute("error", "new"); @@ -618,7 +618,7 @@ void ActionConfigDialog::saveCurrentAction() if (p_toolbar) { TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); - bool placeOnToolbar = toolbarListBox->tqfindItem(toolbarName, TQt::ExactMatch); + bool placeOnToolbar = toolbarListBox->findItem(toolbarName, TQt::ExactMatch); while (!node.isNull()) { if (node.nodeName() == "Action" && @@ -658,7 +658,7 @@ void ActionConfigDialog::saveCurrentAction() item.setAttribute("name",el.attribute("name")); p_toolbar->guiClient->domDocument().firstChild().firstChild().appendChild(item); //put it also in the treeview - listItem = actionTreeView->tqfindItem(toolbarName, 0); + listItem = actionTreeView->findItem(toolbarName, 0); if (listItem) { TQListViewItem *after = listItem->firstChild(); @@ -698,29 +698,29 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) { TQString shortcutText = shortcut.toString(); TQString shortcutText2; - int pos = shortcutText.tqfind(';'); + int pos = shortcutText.find(';'); if (pos != -1) { shortcutText2 = shortcutText.mid(pos + 1); shortcutText = shortcutText.left(pos); } TQString s = shortcutText; - s.tqreplace('+', "\\+"); + s.replace('+', "\\+"); TQRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";"); s = shortcutText2; - s.tqreplace('+', "\\+"); + s.replace('+', "\\+"); TQRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";"); TQString global; //check for conflicting global shortcuts TQMap::Iterator it; for ( it = globalShortcuts.begin(); it != globalShortcuts.end(); ++it ) { - if (it.data().tqcontains(shortcutRx)) + if (it.data().contains(shortcutRx)) { global = it.key(); break; } - if (!shortcutText2.isEmpty() && it.data().tqcontains(shortcutRx2)) + if (!shortcutText2.isEmpty() && it.data().contains(shortcutRx2)) { shortcutText = shortcutText2; global = it.key(); @@ -737,12 +737,12 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) for (uint i = 0; i < ac->count(); i++) { KAction *action = ac->action(i); - if (action != currentAction && action->shortcut().toString().tqcontains(shortcutRx)) + if (action != currentAction && action->shortcut().toString().contains(shortcutRx)) { global = action->text(); break; } - if (!shortcutText2.isEmpty() && action != currentAction && action->shortcut().toString().tqcontains(shortcutRx)) + if (!shortcutText2.isEmpty() && action != currentAction && action->shortcut().toString().contains(shortcutRx)) { shortcutText = shortcutText2; global = action->text(); @@ -761,7 +761,7 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) selectedShortcut = shortcut; } else { - global.tqreplace('&',""); + global.replace('&',""); TQString s = i18n("The '%1' key combination has already been allocated " "to the \"%2\" action.\n" "Please choose a unique key combination."). @@ -876,7 +876,7 @@ void ActionConfigDialog::slotAddContainerToolbar() TQStringList lst; for (i = 0; i < tb->count(); i++) { - if (!toolbarListBox->tqfindItem(tb->label(i), TQt::ExactMatch)) + if (!toolbarListBox->findItem(tb->label(i), TQt::ExactMatch)) lst << tb->label(i); } diff --git a/quanta/dialogs/dtepeditdlg.cpp b/quanta/dialogs/dtepeditdlg.cpp index 88201b3d..7a6120e4 100644 --- a/quanta/dialogs/dtepeditdlg.cpp +++ b/quanta/dialogs/dtepeditdlg.cpp @@ -94,7 +94,7 @@ void DTEPEditDlg::readGeneral() TQString inherits = m_config->readEntry("Inherits"); TQStringList lst(DTDs::ref()->nameList()); inheritsCombo->insertStringList(lst); - int idx = lst.tqfindIndex(inherits); + int idx = lst.findIndex(inherits); if (idx == -1) inheritsCombo->insertItem(inherits, 0); else diff --git a/quanta/dialogs/dtepeditdlgs.ui b/quanta/dialogs/dtepeditdlgs.ui index 1167f46e..8c223417 100644 --- a/quanta/dialogs/dtepeditdlgs.ui +++ b/quanta/dialogs/dtepeditdlgs.ui @@ -1302,7 +1302,7 @@ Example: <b>Tags=style(type[text/css])</b> means that both <b> Comma separated list of the local scope defining keywords - Comma separated list of the local scope defining keywords. Other structure group elements found under a structure node that was created based on a keyword from this list are treated as local elements. For example if this list tqcontains <b>function</b>, it means that elements, like variables found under a <b>function</b> are local, relative to the node that holds the <b>function</b>. + Comma separated list of the local scope defining keywords. Other structure group elements found under a structure node that was created based on a keyword from this list are treated as local elements. For example if this list contains <b>function</b>, it means that elements, like variables found under a <b>function</b> are local, relative to the node that holds the <b>function</b>. @@ -1313,7 +1313,7 @@ Example: <b>Tags=style(type[text/css])</b> means that both <b> Comma separated list of the local scope defining keywords - Comma separated list of the local scope defining keywords. Other structure group elements found under a structure node that was created based on a keyword from this list are treated as local elements. For example if this list tqcontains <b>function</b>, it means that elements, like variables found under a <b>function</b> are local, relative to the node that holds the <b>function</b>. + Comma separated list of the local scope defining keywords. Other structure group elements found under a structure node that was created based on a keyword from this list are treated as local elements. For example if this list contains <b>function</b>, it means that elements, like variables found under a <b>function</b> are local, relative to the node that holds the <b>function</b>. diff --git a/quanta/dialogs/dtepstructureeditdlgs.ui b/quanta/dialogs/dtepstructureeditdlgs.ui index b7813f8d..bcec6363 100644 --- a/quanta/dialogs/dtepstructureeditdlgs.ui +++ b/quanta/dialogs/dtepstructureeditdlgs.ui @@ -250,7 +250,7 @@ Example (simplified):<br> <b>DefinitionRx=\$+([a-zA-Z]+)=new\\s[a-zA-Z]+;<br> TypeRx=new\\s([a-zA-Z]+);</b><br><br> -This will match strings like <b>$fooObj=new foo;</b>. Now this string is searched and it will tqfind <b>new foo;</b>, where <b>foo</b> is the first captured text (the regular expression matching <b>foo</b> is between brackets).<br> +This will match strings like <b>$fooObj=new foo;</b>. Now this string is searched and it will find <b>new foo;</b>, where <b>foo</b> is the first captured text (the regular expression matching <b>foo</b> is between brackets).<br> So the type of <b>$fooObj</b> is <b>foo</b>. @@ -298,7 +298,7 @@ Example 3:<br> Example (simplified):<br> <b>DefinitionRx=\$+([a-zA-Z]+)=new\\s[a-zA-Z]+;<br> TypeRx=new\\s([a-zA-Z]+);</b><br><br> -This will match strings like <b>$fooObj=new foo;</b>. Now this string is searched and it will tqfind <b>new foo;</b>, where <b>foo</b> is the first captured text (the regular expression matching <b>foo</b> is between brackets).<br> +This will match strings like <b>$fooObj=new foo;</b>. Now this string is searched and it will find <b>new foo;</b>, where <b>foo</b> is the first captured text (the regular expression matching <b>foo</b> is between brackets).<br> So the type of <b>$fooObj</b> is <b>foo</b>. diff --git a/quanta/dialogs/settings/abbreviation.cpp b/quanta/dialogs/settings/abbreviation.cpp index 1f1728ae..f41a98a1 100644 --- a/quanta/dialogs/settings/abbreviation.cpp +++ b/quanta/dialogs/settings/abbreviation.cpp @@ -76,8 +76,8 @@ void AbbreviationDlg::slotGroupChanged(const TQString& newGroupName) for ( it = m_currentAbbrev->abbreviations.constBegin(); it != m_currentAbbrev->abbreviations.constEnd(); ++it ) { templateStr = it.key(); - templateName = templateStr.mid(templateStr.tqfind(' ') + 1); - templateStr = templateStr.left(templateStr.tqfind(' ')); + templateName = templateStr.mid(templateStr.find(' ') + 1); + templateStr = templateStr.left(templateStr.find(' ')); new KListViewItem(templatesList, templateStr, templateName); } for ( TQStringList::ConstIterator dtepit = m_currentAbbrev->dteps.constBegin(); dtepit != m_currentAbbrev->dteps.constEnd(); ++dtepit ) @@ -95,7 +95,7 @@ void AbbreviationDlg::slotNewGroup() TQString groupName = KInputDialog::getText(i18n("New Abbreviation Group"), i18n("Group name:"), "", &ok, this); if (ok && !groupName.isEmpty()) { - if (qConfig.abbreviations.tqcontains(groupName)) + if (qConfig.abbreviations.contains(groupName)) { KMessageBox::error(this, i18n("There is already an abbreviation group called %1. Choose an unique name for the new group.").tqarg(groupName), i18n("Group already exists")); TQTimer::singleShot(0, this, TQT_SLOT(slotNewGroup())); @@ -248,7 +248,7 @@ void AbbreviationDlg::saveTemplates() el.setAttribute("code", it.data()); s = it.key(); s2 = ""; - pos = s.tqfind(' '); + pos = s.find(' '); if (pos != -1) { s2 = s.mid(pos+1); diff --git a/quanta/dialogs/settings/filemasks.cpp b/quanta/dialogs/settings/filemasks.cpp index 04593921..58a601e8 100644 --- a/quanta/dialogs/settings/filemasks.cpp +++ b/quanta/dialogs/settings/filemasks.cpp @@ -43,12 +43,12 @@ void FileMasks::setToDefault() for ( it = list.begin(); it != list.end(); ++it ) { name = (*it)->name(); - if (name.tqcontains("text")) + if (name.contains("text")) { - if (!markup.tqcontains(name) && !script.tqcontains(name)) + if (!markup.contains(name) && !script.contains(name)) text += name+"; "; } - if (name.tqcontains("image")) + if (name.contains("image")) { image += name +"; "; } diff --git a/quanta/dialogs/specialchardialog.cpp b/quanta/dialogs/specialchardialog.cpp index 2caa497e..f8697123 100644 --- a/quanta/dialogs/specialchardialog.cpp +++ b/quanta/dialogs/specialchardialog.cpp @@ -52,7 +52,7 @@ void SpecialCharDialog::filterChars(const TQString& filter) CharsListBox->insertStringList(charList); else { for (TQStringList::ConstIterator it = charList.begin(); it != charList.end(); ++it) - if ( (*it).tqcontains(filter, false) ) + if ( (*it).contains(filter, false) ) CharsListBox->insertItem(*it); } if (CharsListBox->currentItem() == -1 && CharsListBox->count()) @@ -67,8 +67,8 @@ TQString SpecialCharDialog::selection() void SpecialCharDialog::insertCode() { TQString selected = CharsListBox->text(CharsListBox->currentItem()); - int begin = selected.tqfind("(&")+1; - int length = selected.tqfind(";)") - begin + 1; + int begin = selected.find("(&")+1; + int length = selected.find(";)") - begin + 1; m_selection = selected.mid(begin, length); done(TQDialog::Accepted); } diff --git a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp index f45eea8f..815ecdf2 100644 --- a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp +++ b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp @@ -48,13 +48,13 @@ void CoreWidgetDlg::writeAttributes( TQDict *d ) dict = d; TQString *t; // value of attr. - if (( t=d->tqfind("id") )) setValue(*t, lineId); - if (( t=d->tqfind("class") )) setValue(*t, lineClass); - if (( t=d->tqfind("style") )) setValue(*t, lineStyle); - if (( t=d->tqfind("title") )) setValue(*t, lineTitle); + if (( t=d->find("id") )) setValue(*t, lineId); + if (( t=d->find("class") )) setValue(*t, lineClass); + if (( t=d->find("style") )) setValue(*t, lineStyle); + if (( t=d->find("title") )) setValue(*t, lineTitle); - if (( t=d->tqfind("lang") )) setValue(*t, lineLang); - if (( t=d->tqfind("dir") )) setValue(*t, lineDir); + if (( t=d->find("lang") )) setValue(*t, lineLang); + if (( t=d->find("dir") )) setValue(*t, lineDir); } diff --git a/quanta/dialogs/tagdialogs/tagattr.cpp b/quanta/dialogs/tagdialogs/tagattr.cpp index 1ab0bdde..be05c44f 100644 --- a/quanta/dialogs/tagdialogs/tagattr.cpp +++ b/quanta/dialogs/tagdialogs/tagattr.cpp @@ -50,7 +50,7 @@ Attr_list::Attr_list( TQDomElement const& el, TQWidget *w, TQTag *dtdTag ) TQString method = el.attribute("method"); TQString interface = el.attribute("interface", "QuantaIf"); TQString arguments = el.attribute("arguments"); - arguments.tqreplace("%tagname%", m_dtdTag->name()); + arguments.replace("%tagname%", m_dtdTag->name()); DCOPReply reply = QuantaCommon::callDCOPMethod(interface, method, arguments); if (reply.isValid()) { @@ -87,7 +87,7 @@ void Attr_list::setValue(const TQString &value) } -TQDomNode tqfindChild( TQDomNode &tqparent, const TQString &name ) +TQDomNode findChild( TQDomNode &tqparent, const TQString &name ) { for ( TQDomNode n = tqparent.firstChild(); !n.isNull(); n = n.nextSibling() ) if ( n.nodeName() == name ) diff --git a/quanta/dialogs/tagdialogs/tagattr.h b/quanta/dialogs/tagdialogs/tagattr.h index c9567eda..2206f896 100644 --- a/quanta/dialogs/tagdialogs/tagattr.h +++ b/quanta/dialogs/tagdialogs/tagattr.h @@ -37,7 +37,7 @@ class TQWidget; class TQTag; -TQDomNode tqfindChild( TQDomNode &tqparent, const TQString &name ); +TQDomNode findChild( TQDomNode &tqparent, const TQString &name ); class Attr diff --git a/quanta/dialogs/tagdialogs/tagdialog.cpp b/quanta/dialogs/tagdialogs/tagdialog.cpp index 7a7ea593..ac9c8ffc 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.cpp +++ b/quanta/dialogs/tagdialogs/tagdialog.cpp @@ -226,7 +226,7 @@ void TagDialog::parseTag() { TQDomNode node = nodeList.item(j); TQString nodeTagName = node.toElement().attribute("name"); - if (groupList.tqcontains(nodeTagName) && dtdTag->commonGroups.tqcontains(nodeTagName)) //add the attributes of this common tag to a new tab + if (groupList.contains(nodeTagName) && dtdTag->commonGroups.contains(nodeTagName)) //add the attributes of this common tag to a new tab { TQString s; TQTextStream str(&s, IO_ReadWrite); @@ -325,11 +325,11 @@ TQString TagDialog::getAttributeString() TQString TagDialog::getAttribute(const TQString& attr) { TQString attrStr = getAttributeString()+" "; - int pos = attrStr.upper().tqfind(attr.upper()); + int pos = attrStr.upper().find(attr.upper()); if (pos != -1) { - pos = attrStr.tqfind("=",pos+1) + 1; - return attrStr.mid(pos, attrStr.tqfind(" ",pos) - pos); + pos = attrStr.find("=",pos+1) + 1; + return attrStr.mid(pos, attrStr.find(" ",pos) - pos); } else { diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.cpp b/quanta/dialogs/tagdialogs/tagimgdlg.cpp index b52d3be9..95c41e4e 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlg.cpp @@ -145,7 +145,7 @@ void TagImgDlg::writeAttributes( TQDict *d ) dict = d; TQString *t; // value of attr. - if (( t=d->tqfind("src") )) + if (( t=d->find("src") )) { lineImgSource->setText(*t); KURL url = baseURL; @@ -153,18 +153,18 @@ void TagImgDlg::writeAttributes( TQDict *d ) url = QExtFileInfo::toAbsolute(url, baseURL); slotImageSet( url ); } - if ( (t=d->tqfind("alt")) ) + if ( (t=d->find("alt")) ) setValue(*t, lineAltText); - if ( (t=d->tqfind("width")) && lineWidth ) + if ( (t=d->find("width")) && lineWidth ) setValue(*t, lineWidth); - if ( (t=d->tqfind("height")) && lineHeight ) + if ( (t=d->find("height")) && lineHeight ) setValue(*t, lineHeight); - if ( (t=d->tqfind("hspace")) && lineHSpace) + if ( (t=d->find("hspace")) && lineHSpace) setValue(*t, lineHSpace); - if ( (t=d->tqfind("vspace")) && lineVSpace ) + if ( (t=d->find("vspace")) && lineVSpace ) setValue(*t, lineVSpace); - if ( (t=d->tqfind("align")) && comboAlign ) + if ( (t=d->find("align")) && comboAlign ) setValue(*t, comboAlign); - if ( (t=d->tqfind("border")) && spinBorder ) + if ( (t=d->find("border")) && spinBorder ) setValue(*t, spinBorder); } diff --git a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp index 07a44394..a761d62c 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp @@ -34,7 +34,7 @@ void TagImgDlg::initDialog(){ buttonImgSource->setText(i18n("...")); grid->addMultiCellWidget(buttonImgSource, 0, 0, 4, 4); - TQTag *imgTag = m_dtd->tagsList->tqfind("img"); + TQTag *imgTag = m_dtd->tagsList->find("img"); if (!imgTag) return; diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.cpp b/quanta/dialogs/tagdialogs/tagmaildlg.cpp index 0aa689d2..96cef91e 100644 --- a/quanta/dialogs/tagdialogs/tagmaildlg.cpp +++ b/quanta/dialogs/tagdialogs/tagmaildlg.cpp @@ -68,18 +68,18 @@ void TagMailDlg::slotSelectAddress() n = n.simplifyWhiteSpace(); for( unsigned int i = 0; i < emails.count(); ++i ) { if (!emails[i].isEmpty()) { - if (n.isEmpty() || (emails[i].tqfind( "<" ) != -1)) + if (n.isEmpty() || (emails[i].find( "<" ) != -1)) addr = ""; else { /* do we really need quotes around this name ? */ - if (n.tqfind(TQRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) + if (n.find(TQRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) addr = qConfig.attrValueQuotation + n + qConfig.attrValueQuotation + " "; else addr = n + " "; } email = emails[i]; - if (!addr.isEmpty() && (email.tqfind( "<" ) == -1) - && (email.tqfind( ">" ) == -1) - && (email.tqfind( "," ) == -1)) + if (!addr.isEmpty() && (email.find( "<" ) == -1) + && (email.find( ">" ) == -1) + && (email.find( "," ) == -1)) addr += "<" + email + ">"; else addr += email; diff --git a/quanta/dialogs/tagdialogs/tagwidget.cpp b/quanta/dialogs/tagdialogs/tagwidget.cpp index 4eb79f24..f461e3a9 100644 --- a/quanta/dialogs/tagdialogs/tagwidget.cpp +++ b/quanta/dialogs/tagdialogs/tagwidget.cpp @@ -47,7 +47,7 @@ void TagWidget::updateDict(const TQString &attr, TQComboBox *combo ) delete s; } else - dict->tqreplace(attr, s); + dict->replace(attr, s); } void TagWidget::setValue(const TQString &val, TQComboBox *combo) @@ -92,7 +92,7 @@ void TagWidget::updateDict(const TQString &attr, TQLineEdit *line ) delete s; } else - dict->tqreplace(attr, s); + dict->replace(attr, s); } void TagWidget::updateDict(const TQString &attr, TQSpinBox *spin ) @@ -104,7 +104,7 @@ void TagWidget::updateDict(const TQString &attr, TQSpinBox *spin ) delete s; } else - dict->tqreplace(attr, s); + dict->replace(attr, s); } void TagWidget::updateDict(const TQString &attr, TQCheckBox *check ) @@ -113,7 +113,7 @@ void TagWidget::updateDict(const TQString &attr, TQCheckBox *check ) dict->remove(attr); else { - if (!dict->tqfind(attr)) + if (!dict->find(attr)) dict->insert(attr, new TQString("")); } } diff --git a/quanta/dialogs/tagdialogs/tagxml.cpp b/quanta/dialogs/tagdialogs/tagxml.cpp index a8428b20..0015c35e 100644 --- a/quanta/dialogs/tagdialogs/tagxml.cpp +++ b/quanta/dialogs/tagdialogs/tagxml.cpp @@ -56,7 +56,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) //parse the tag XML file, in order to build up the dialog for ( TQDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) { - TQDomNode location = tqfindChild(n,"location"); + TQDomNode location = findChild(n,"location"); if ( location.isNull() ) continue; @@ -69,7 +69,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) int colspan = el.attribute("colspan","1").toInt()-1; int rowspan = el.attribute("rowspan","1").toInt()-1; - location = tqfindChild(n,"textlocation"); + location = findChild(n,"textlocation"); el = location.toElement(); int textrow = el.attribute("row","0").toInt(); int textcol = el.attribute("col","0").toInt(); @@ -79,7 +79,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) // qDebug("%s col:%d row:%d cs:%d, rs:%d", n.nodeName().data(), col,row,colspan,rowspan ); TQString tip; - TQDomNode tooltip = tqfindChild( n ,"tooltip" ); + TQDomNode tooltip = findChild( n ,"tooltip" ); if ( !tooltip.isNull() ) { if ( tooltip.firstChild().isText() ) { TQDomText text = tooltip.firstChild().toText(); @@ -87,7 +87,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) } } TQString whatsThis; - TQDomNode what = tqfindChild( n ,"whatsthis" ); + TQDomNode what = findChild( n ,"whatsthis" ); if ( !what.isNull() ) { if ( what.firstChild().isText() ) { TQDomText text = what.firstChild().toText(); @@ -98,7 +98,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) if ( n.nodeName() == "label" ) //a static label { TQLabel *label = new TQLabel(this); - TQDomElement ltext = tqfindChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); @@ -116,7 +116,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) TQDomElement el(n.toElement()); TQString type = el.attribute("type","input"); - TQDomElement ltext = tqfindChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() && (type != "check") ) //if there is a text label for the attribute { TQLabel *label = new TQLabel(this); @@ -152,7 +152,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) TQCheckBox *w = new TQCheckBox(this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); - TQDomElement ltext = tqfindChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) w->setText( ltext.text() ); if ( !tip.isNull() ) @@ -270,10 +270,10 @@ void Tagxml::readAttributes( TQDict *d ) { if (m_dtd->booleanAttributes == "simple") { - d->tqreplace(name, new TQString("") ); + d->replace(name, new TQString("") ); } else { - d->tqreplace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all + d->replace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all } } else @@ -283,16 +283,16 @@ void Tagxml::readAttributes( TQDict *d ) /* } else { value = (value == "checked")?m_dtd->booleanTrue:m_dtd->booleanFalse; - d->tqreplace(name, new TQString(value)); + d->replace(name, new TQString(value)); } */ } else if (dynamic_cast(attr)) { // value = KURL::encode_string(value); - d->tqreplace(name, new TQString(value)); + d->replace(name, new TQString(value)); } else { - value.tqreplace(TQRegExp("&(?!amp;)"), "&"); - d->tqreplace(name, new TQString(value) ); + value.replace(TQRegExp("&(?!amp;)"), "&"); + d->replace(name, new TQString(value) ); } } @@ -313,9 +313,9 @@ void Tagxml::writeAttributes( TQDict *d ) name = attr->attrName(); - TQString *v = d->tqfind(name); + TQString *v = d->find(name); if ( v ) { - v->tqreplace("&","&"); + v->replace("&","&"); if ( dynamic_cast(attr) ) // checkbox value = "checked"; else diff --git a/quanta/messages/annotationoutput.cpp b/quanta/messages/annotationoutput.cpp index 0bca2cf2..57a8e84c 100644 --- a/quanta/messages/annotationoutput.cpp +++ b/quanta/messages/annotationoutput.cpp @@ -85,7 +85,7 @@ void AnnotationOutput::insertAnnotation(uint line, const TQString& fileName, con { line++; TQString s = i18n("Line %1: %2").tqarg(line).tqarg(annotation.first); - s.tqreplace('\n', ' '); + s.replace('\n', ' '); m_currentFileAnnotations->showMessage(line, 1, fileName, s); } @@ -148,13 +148,13 @@ void AnnotationOutput::readAnnotations() KURL u = baseURL; QuantaCommon::setUrl(u, fileName); u = QExtFileInfo::toAbsolute(u, baseURL); - if (Project::ref()->tqcontains(u)) + if (Project::ref()->contains(u)) { bool ok; int line = el.attribute("line").toInt(&ok, 10); TQString text = el.attribute("text"); TQString receiver = el.attribute("receiver"); - text.tqreplace('\n',' '); + text.replace('\n',' '); TQString lineText = TQString("%1").tqarg(line); if (lineText.length() < 20) { @@ -170,12 +170,12 @@ void AnnotationOutput::readAnnotations() m_fileNames[fileIt] = u.url(); } KListViewItem *it = new KListViewItem(fileIt, fileIt, text, lineText); - if (openedItems.tqcontains(fileName)) + if (openedItems.contains(fileName)) fileIt->setOpen(true); m_fileNames[it] = u.url(); m_lines[it] = line; - if (!yourself.isEmpty() && (receiver == yourself || roles.tqcontains(receiver))) + if (!yourself.isEmpty() && (receiver == yourself || roles.contains(receiver))) { m_yourAnnotationsNum++; KListViewItem *fileIt = m_yourFileItems[fileName]; @@ -186,7 +186,7 @@ void AnnotationOutput::readAnnotations() m_yourFileNames[fileIt] = u.url(); } KListViewItem *it = new KListViewItem(fileIt, fileIt, text, lineText); - if (yourOpenedItems.tqcontains(fileName)) + if (yourOpenedItems.contains(fileName)) fileIt->setOpen(true); m_yourFileNames[it] = u.url(); m_yourLines[it] = line; @@ -234,7 +234,7 @@ void AnnotationOutput::writeAnnotations(const TQString &fileName, const TQMapsetLine(line); diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp index 2783acca..5008dcff 100644 --- a/quanta/parsers/dtd/dtd.cpp +++ b/quanta/parsers/dtd/dtd.cpp @@ -51,7 +51,7 @@ TQStringList DTD::getTags() AttributeList* DTD::getTagAttributes(TQString tag) { - return tagAttributes.tqfind(tag); + return tagAttributes.find(tag); } @@ -195,14 +195,14 @@ void DTD::parseDTDEntity(TQString line) { TQString name; TQString *value; - line.tqreplace("\\end", " "); + line.replace("\\end", " "); name = line.mid(11); - int firstSpace = name.tqfind(' '); + int firstSpace = name.find(' '); name = name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(11+firstSpace)); - value->remove(0, value->tqfind("\"")+1); - value->remove(value->tqfindRev("\""), value->length()); + value->remove(0, value->find("\"")+1); + value->remove(value->findRev("\""), value->length()); parseDTDReplace(value); stripSpaces(value); @@ -217,14 +217,14 @@ void DTD::parseDTDElement(const TQString &l) { TQString *value; TQString line = l; - line.tqreplace("\\end", " "); + line.replace("\\end", " "); name = line.mid(10); - int firstSpace = name.tqfind(' '); + int firstSpace = name.find(' '); name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(10+firstSpace)); - //value->remove(0, value->tqfind("\"")+1); - value->remove(value->tqfind(">"), 10000); + //value->remove(0, value->find("\"")+1); + value->remove(value->find(">"), 10000); parseDTDReplace(&name); parseDTDReplace(value); @@ -254,14 +254,14 @@ void DTD::parseDTDAttlist(const TQString &l) { TQString *value; TQString line = l; - line.tqreplace("\\end", " "); + line.replace("\\end", " "); name = line.mid(10); - int firstSpace = name.tqfind(' '); + int firstSpace = name.find(' '); name.remove(firstSpace, name.length()-firstSpace); value = new TQString(line.mid(10+firstSpace)); - //value->remove(0, value->tqfind("\"")+1); - value->remove(value->tqfind(">"), 10000); + //value->remove(0, value->find("\"")+1); + value->remove(value->find(">"), 10000); parseDTDReplace(&name); parseDTDReplace(value); @@ -362,51 +362,51 @@ void DTD::parseTagAttributeValues(const TQString &name, TQString *value) { void DTD::parseDTDReplace(TQString *value) { int begin, end; - begin = value->tqfind("%"); - end = value->tqfind(";"); + begin = value->find("%"); + end = value->find(";"); while (begin != -1 && end != -1) { TQString replaceText = value->mid(begin+1, end-begin-1); - TQString *replaceValue = entities.tqfind(replaceText); + TQString *replaceValue = entities.find(replaceText); if (replaceValue != 0L) { - value->tqreplace(begin, end-begin+1, *replaceValue); + value->replace(begin, end-begin+1, *replaceValue); } else { kdDebug(24000) << "Can not find entity: " << replaceText << endl; return; } - begin = value->tqfind("%"); - end = value->tqfind(";"); + begin = value->find("%"); + end = value->find(";"); } } void DTD::stripSpaces(TQString *value) { int index=-1; - while ( (index=value->tqfind(' ',++index)) != -1 ) { - if ( value->tqfindRev('(',index) != -1 && value->tqfind(')',index) != -1) + while ( (index=value->find(' ',++index)) != -1 ) { + if ( value->findRev('(',index) != -1 && value->find(')',index) != -1) value->remove(index,1); } } void DTD::removeComments(TQString &value) { int begin, end; - begin = value.tqfind("",begin+2); + begin = value.find("",begin+2); while (begin != -1 && end != -1) { value.remove(begin, end-begin+3); - begin = value.tqfind("",begin+2); + begin = value.find("",begin+2); } - begin = value.tqfind("--"); - end = value.tqfind("--",begin+2); + begin = value.find("--"); + end = value.find("--",begin+2); while (begin != -1 && end != -1) { value.remove(begin, end-begin+2); - begin = value.tqfind("--"); - end = value.tqfind("--",begin+2); + begin = value.find("--"); + end = value.find("--",begin+2); } - value.tqreplace(TQRegExp(""), ""); + value.replace(TQRegExp(""), ""); } bool DTD::parseDTD() diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp index 8b4ec503..72e7ea18 100644 --- a/quanta/parsers/dtd/dtdparser.cpp +++ b/quanta/parsers/dtd/dtdparser.cpp @@ -123,8 +123,8 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly) m_name = w.dtdName->text(); m_nickName = w.nickName->text(); m_doctype = w.doctype->text(); - m_doctype.tqreplace(TQRegExp("")); + m_doctype.replace(TQRegExp("")); m_dtdURLLine = w.dtdURL->text(); m_defaultExtension = w.defaultExtension->text(); m_caseSensitive = w.caseSensitive->isChecked(); diff --git a/quanta/parsers/node.cpp b/quanta/parsers/node.cpp index ef7599b8..591b557e 100644 --- a/quanta/parsers/node.cpp +++ b/quanta/parsers/node.cpp @@ -48,7 +48,7 @@ Node::Node(Node *tqparent) m_leafNode = 0L; m_groupElements.clear(); NN++; -// if (nodes.tqcontains(this) == 0) +// if (nodes.contains(this) == 0) nodes[this] = 1; // else // { @@ -60,7 +60,7 @@ bool Node::deleteNode(Node *node) { if (!node) return true; - if (!nodes.tqcontains(node)) + if (!nodes.contains(node)) { kdDebug(24000) << "Trying to delete a node with address " << node << " that was not allocated!" << endl; return false; @@ -71,7 +71,7 @@ bool Node::deleteNode(Node *node) Node::~Node() { -// if (!nodes.tqcontains(this)) +// if (!nodes.contains(this)) // { // kdError(24000) << "No node with this address " << this << " was allocated!" << endl; // return; @@ -520,7 +520,7 @@ void Node::operator =(Node* node) void Node::detachNode() { - if (nodes.tqcontains(this) == 0) + if (nodes.contains(this) == 0) { kdError(24000) << "No node with this address " << this << " was allocated!" << endl; return; diff --git a/quanta/parsers/parser.cpp b/quanta/parsers/parser.cpp index c795f11e..b8e5e619 100644 --- a/quanta/parsers/parser.cpp +++ b/quanta/parsers/parser.cpp @@ -137,8 +137,8 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No nodeFound = false; goUp = false; //find the first "<" and the first special area start definition in this line - tagStartPos = textLine.tqfind('<', col); - specialStartPos = specialAreaCount ? textLine.tqfind(m_dtd->specialAreaStartRx, col): -1; + tagStartPos = textLine.find('<', col); + specialStartPos = specialAreaCount ? textLine.find(m_dtd->specialAreaStartRx, col): -1; //if the special area start definition is before the first "<" it means //that we have found a special area if ( specialStartPos != -1 && @@ -263,7 +263,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No tag->name.truncate(tag->name.length() - 1); } //the tag we found indicates the beginning of a special area, like