diff --git a/src/kile/codecompletion.cpp b/src/kile/codecompletion.cpp index 9cdc703..f8225f2 100644 --- a/src/kile/codecompletion.cpp +++ b/src/kile/codecompletion.cpp @@ -87,9 +87,9 @@ namespace KileDocument CodeCompletion::Type CodeCompletion::getType( const TQString &text ) { - if ( text.tqfind( reRef ) != -1 ) + if ( text.find( reRef ) != -1 ) return CodeCompletion::ctReference; - else if ( text.tqfind( reCite ) != -1 ) + else if ( text.find( reCite ) != -1 ) return CodeCompletion::ctCitation; else return CodeCompletion::ctNone; @@ -106,39 +106,39 @@ namespace KileDocument { uint column = m_view->cursorColumnReal(); TQString currentline = m_view->getDoc()->textLine(m_view->cursorLine()).left(column); - int pos = currentline.tqfindRev('\\'); + int pos = currentline.findRev('\\'); if ( pos >= 0 ) { TQString command = currentline.mid(pos,column-pos); KILE_DEBUG() << "pos=" << pos << ",column=" << column << ",currentline=" << currentline << ",command=" << command << endl; - if( command.tqfind(reRefExt) != -1 ){ + if( command.find(reRefExt) != -1 ){ KILE_DEBUG() << "reRefExt" << endl; startpattern = command.right(command.length()-reRefExt.cap(0).length()); KILE_DEBUG() << "startpattern=" << startpattern << endl; - if ( startpattern.tqfind(reNotRefChars) == -1 ){ + if ( startpattern.find(reNotRefChars) == -1 ){ return CodeCompletion::ctReference ; } } - else if ( command.tqfind(reRef) != -1 ){ + else if ( command.find(reRef) != -1 ){ startpattern = command.right(command.length()-reRef.cap(0).length()); KILE_DEBUG() << "startpattern=" << startpattern << endl; - if ( startpattern.tqfind(reNotRefChars) == -1 ){ + if ( startpattern.find(reNotRefChars) == -1 ){ return CodeCompletion::ctReference ; } } - else if( command.tqfind(reCiteExt) != -1 ){ + else if( command.find(reCiteExt) != -1 ){ KILE_DEBUG() << "reCiteExt" << endl; startpattern = command.right(command.length()-reCiteExt.cap(0).length()); KILE_DEBUG() << "startpattern=" << startpattern << endl; - if ( startpattern.tqfind(reNotCiteChars) == -1 ){ + if ( startpattern.find(reNotCiteChars) == -1 ){ return CodeCompletion::ctCitation; } } - else if ( command.tqfind(reCite) != -1 ){ + else if ( command.find(reCite) != -1 ){ startpattern = command.right(command.length()-reCite.cap(0).length()); KILE_DEBUG() << "startpattern=" << startpattern << endl; - if ( startpattern.tqfind(reNotCiteChars) == -1 ){ + if ( startpattern.find(reNotCiteChars) == -1 ){ return CodeCompletion::ctCitation; } } @@ -219,13 +219,13 @@ namespace KileDocument { // build list of references TQString references = getCommandList(KileDocument::CmdAttrReference); - references.tqreplace("*","\\*"); + references.replace("*","\\*"); reRef.setPattern("^\\\\(" + references + ")\\{"); reRefExt.setPattern("^\\\\(" + references + ")\\{[^\\{\\}\\\\]+,"); // build list of citations TQString citations = getCommandList(KileDocument::CmdAttrCitations); - citations.tqreplace("*","\\*"); + citations.replace("*","\\*"); reCite.setPattern("^\\\\(((c|C|noc)(ite|itep|itet|itealt|itealp|iteauthor|iteyear|iteyearpar|itetext))" + citations + ")\\{"); reCiteExt.setPattern("^\\\\(((c|C|noc)(ite|itep|itet|itealt|itealp|iteauthor|iteyear|iteyearpar|itetext))" + citations + ")\\{[^\\{\\}\\\\]+,"); } @@ -376,7 +376,7 @@ namespace KileDocument // switch to cmLatex mode, if cmLabel is chosen without any entries if ( mode==cmLabel && m_labellist.count()==0 ) { TQString s = doc->textLine(m_ycursor); - int pos = s.tqfindRev("\\",m_xcursor); + int pos = s.findRev("\\",m_xcursor); if (pos < 0) { KILE_DEBUG() << "\tfound no backslash! s=" << s << endl; return; @@ -561,7 +561,7 @@ namespace KileDocument { case cmLatex: s = buildLatexText( text, m_yoffset, m_xoffset ); - if ( m_autobrackets && textline.at(col)=='}' && m_text.tqfind('{')>=0 ) + if ( m_autobrackets && textline.at(col)=='}' && m_text.find('{')>=0 ) { doc->removeText(row,col,row,col+1); } @@ -580,7 +580,7 @@ namespace KileDocument } } s = buildEnvironmentText( text, type, prefix, m_yoffset, m_xoffset ); - if ( m_autobrackets && textline.at(col)=='}' && (textline[m_xstart]!='\\' || m_text.tqfind('{')>=0 ) ) + if ( m_autobrackets && textline.at(col)=='}' && (textline[m_xstart]!='\\' || m_text.find('{')>=0 ) ) { doc->removeText(row,col,row,col+1); } @@ -695,7 +695,7 @@ namespace KileDocument { TQString s; - int index = text.tqfind( '=' ); + int index = text.find( '=' ); if ( index >= 0 ) { // determine text to insert @@ -929,7 +929,7 @@ namespace KileDocument e.type = ""; // add new entry - if ( list->tqfindIndex(e) == -1 ) + if ( list->findIndex(e) == -1 ) list->append(e); } } @@ -967,7 +967,7 @@ namespace KileDocument s[j] = 52; } // don't allow duplicate entries - if ( ! map.tqcontains(s) ) + if ( ! map.contains(s) ) { map[s] = wordlist[i]; keylist.append(s); @@ -1036,7 +1036,7 @@ namespace KileDocument for ( it=m_abbrevlist.begin(); it!=m_abbrevlist.end(); ++it ) { TQString s = (*it).text; - int index = s.tqfind("="); + int index = s.find("="); if ( index>=0 && s.left(index)==abbrev ) return s.right( s.length()-index-1 ); } @@ -1284,7 +1284,7 @@ namespace KileDocument TQString textline = m_view->getDoc()->textLine( row ); // search the current reference string - int pos = textline.tqfindRev(reNotRefChars,col-1); + int pos = textline.findRev(reNotRefChars,col-1); if ( pos < 0 ) pos = 0; @@ -1313,7 +1313,7 @@ namespace KileDocument while ( pos >= 0 ) { pos = reg.search(s,pos); if ( pos >= 0 ) { - if ( reg.cap(1).at(0)!='\\' && text!=reg.cap(1) && !seen.tqfind(reg.cap(1)) ) { + if ( reg.cap(1).at(0)!='\\' && text!=reg.cap(1) && !seen.find(reg.cap(1)) ) { e.text = reg.cap(1); // normal entry e.type = ""; list.append( e ); diff --git a/src/kile/configcodecompletion.cpp b/src/kile/configcodecompletion.cpp index ad400f2..df10be6 100644 --- a/src/kile/configcodecompletion.cpp +++ b/src/kile/configcodecompletion.cpp @@ -433,7 +433,7 @@ void ConfigCodeCompletion::getCwlFiles(TQMap &map, TQStringLi for ( TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it ) { TQString filename = TQFileInfo(*it).fileName(); - if ( ! map.tqcontains(filename) ) + if ( ! map.contains(filename) ) { map[filename] = dir + '/' + (*it); list << filename; diff --git a/src/kile/configstructure.cpp b/src/kile/configstructure.cpp index 31e23c7..45899cf 100644 --- a/src/kile/configstructure.cpp +++ b/src/kile/configstructure.cpp @@ -245,14 +245,14 @@ void ConfigStructure::clickedTable(KileTable *table,int row, int col) void ConfigStructure::spinboxChanged(int) { - if ( m_docclasses.tqcontains( comboclasses->currentText() ) ) { + if ( m_docclasses.contains( comboclasses->currentText() ) ) { changeSectioning(m_docclasses[comboclasses->currentText()]); } } void ConfigStructure::comboboxChanged(const TQString &name) { - if ( m_docclasses.tqcontains(name) ) { + if ( m_docclasses.contains(name) ) { showSectioning(m_docclasses[name]); remove->setEnabled( name != "latex" ); } diff --git a/src/kile/configtester.cpp b/src/kile/configtester.cpp index a68cfe3..b4ec619 100644 --- a/src/kile/configtester.cpp +++ b/src/kile/configtester.cpp @@ -76,7 +76,7 @@ TQString ConfigTest::resultText() const if ( m_name == "binary" ) { str += " (" + m_altArg + " => " + m_arg + ')'; - if ( status()==Failure && s_msgFailure.tqcontains(m_altArg) ) + if ( status()==Failure && s_msgFailure.contains(m_altArg) ) str += TQString("
(%1)").tqarg( s_msgFailure[m_altArg] ); return str; } @@ -98,25 +98,25 @@ void ConfigTest::addCriticalMessage(const TQString &test, const TQString &msg) { TQString ConfigTest::prettyName(const TQString &test) { - if ( s_prettyName.tqcontains(test) ) return s_prettyName[test]; + if ( s_prettyName.contains(test) ) return s_prettyName[test]; else return test; } TQString ConfigTest::successMessage(const TQString &test) { - if ( s_msgSuccess.tqcontains(test) ) return s_msgSuccess[test]; + if ( s_msgSuccess.contains(test) ) return s_msgSuccess[test]; else return i18n("Passed"); } TQString ConfigTest::failureMessage(const TQString &test) { - if ( s_msgFailure.tqcontains(test) ) return s_msgFailure[test]; + if ( s_msgFailure.contains(test) ) return s_msgFailure[test]; else return i18n("Failed"); } TQString ConfigTest::criticalMessage(const TQString &test) { - if ( s_msgCritical.tqcontains(test) ) return s_msgCritical[test]; + if ( s_msgCritical.contains(test) ) return s_msgCritical[test]; else return i18n("Critical failure"); } @@ -231,11 +231,11 @@ void Tester::processTool(KConfig *config, const TQString &tool) //Did we find the executable? TQValueList tests; - tests << ConfigTest("binary", criticaltests.tqcontains("where"), config->readEntry("where"), config->readEntry("executable")); - if (config->hasKey("version") ) tests << ConfigTest("version", criticaltests.tqcontains("version"), config->readEntry("version")); - if (config->hasKey("basic") ) tests << ConfigTest("basic", criticaltests.tqcontains("basic"), config->readEntry("basic")); - if (config->hasKey("src") ) tests << ConfigTest("src", criticaltests.tqcontains("src"), config->readEntry("src")); - if (config->hasKey("kile") ) tests << ConfigTest("kile", criticaltests.tqcontains("kile"), config->readEntry("kile")); + tests << ConfigTest("binary", criticaltests.contains("where"), config->readEntry("where"), config->readEntry("executable")); + if (config->hasKey("version") ) tests << ConfigTest("version", criticaltests.contains("version"), config->readEntry("version")); + if (config->hasKey("basic") ) tests << ConfigTest("basic", criticaltests.contains("basic"), config->readEntry("basic")); + if (config->hasKey("src") ) tests << ConfigTest("src", criticaltests.contains("src"), config->readEntry("src")); + if (config->hasKey("kile") ) tests << ConfigTest("kile", criticaltests.contains("kile"), config->readEntry("kile")); addResult(tool, tests); } diff --git a/src/kile/convert.cpp b/src/kile/convert.cpp index 2572ab4..c40cdb2 100644 --- a/src/kile/convert.cpp +++ b/src/kile/convert.cpp @@ -122,7 +122,7 @@ bool ConvertMap::load() while ( !stream.atEnd() ) { //parse the line - if ( stream.readLine().tqfind(reMap) != -1) + if ( stream.readLine().find(reMap) != -1) addPair(reMap.cap(1)[0], reMap.cap(2)); } qf.close(); diff --git a/src/kile/convert.h b/src/kile/convert.h index 0e2b372..38575a7 100644 --- a/src/kile/convert.h +++ b/src/kile/convert.h @@ -38,8 +38,8 @@ public: void addPair(TQChar c, const TQString & enc); - bool canDecode(const TQChar & c) { return ( m_toASCII.tqcontains(c) > 0 ); } - bool canEncode(const TQString & enc) { return ( m_toEncoding.tqcontains(enc) > 0 ); } + bool canDecode(const TQChar & c) { return ( m_toASCII.contains(c) > 0 ); } + bool canEncode(const TQString & enc) { return ( m_toEncoding.contains(enc) > 0 ); } bool load(); diff --git a/src/kile/editorkeysequencemanager.cpp b/src/kile/editorkeysequencemanager.cpp index 213b959..c50e5bf 100644 --- a/src/kile/editorkeysequencemanager.cpp +++ b/src/kile/editorkeysequencemanager.cpp @@ -33,7 +33,7 @@ namespace KileEditorKeySequence { if(seq.isEmpty()) { return; } - if(m_actionMap.tqfind(seq) == m_actionMap.end()) { + if(m_actionMap.find(seq) == m_actionMap.end()) { m_actionMap[seq] = action; m_watchedKeySequencesList.push_back(seq); emit watchedKeySequencesChanged(); @@ -45,7 +45,7 @@ namespace KileEditorKeySequence { if(seq.isEmpty()) { return; } - TQMap::iterator it = m_actionMap.tqfind(seq); + TQMap::iterator it = m_actionMap.find(seq); if(it != m_actionMap.end()) { delete (it.data()); m_actionMap.remove(it); @@ -60,7 +60,7 @@ namespace KileEditorKeySequence { if((*i).isEmpty()) { continue; } - TQMap::iterator it = m_actionMap.tqfind(*i); + TQMap::iterator it = m_actionMap.find(*i); if(it != m_actionMap.end()) { delete (it.data()); m_actionMap.remove(it); @@ -99,7 +99,7 @@ namespace KileEditorKeySequence { } Action* Manager::getAction(const TQString& seq) { - TQMap::iterator i = m_actionMap.tqfind(seq); + TQMap::iterator i = m_actionMap.find(seq); return (i == m_actionMap.end()) ? 0L : (*i); } @@ -180,7 +180,7 @@ bool Recorder::eventFilter(TQObject* /* o */, TQEvent *e) { bool Recorder::seekForKeySequence(const TQString& s) { for(uint i = 0; i < s.length(); ++i) { TQString toCheck = s.right(s.length() - i); - if(m_watchedKeySequencesList.tqcontains(toCheck) > 0) { + if(m_watchedKeySequencesList.contains(toCheck) > 0) { m_view->getDoc()->removeText(m_oldLine, m_oldCol-(s.length() - i - 1), m_oldLine, m_oldCol); m_typedSequence = TQString(); // clean m_typedSequence to avoid wrong action triggering if one presses keys without printable character emit detectedTypedKeySequence(toCheck); diff --git a/src/kile/floatdialog.cpp b/src/kile/floatdialog.cpp index 3bac29e..4b49c3c 100644 --- a/src/kile/floatdialog.cpp +++ b/src/kile/floatdialog.cpp @@ -184,7 +184,7 @@ void FloatEnvironmentDialog::slotEnvironmentClicked() setCaption(caption); TQString s = m_edLabel->text(); - s.tqreplace( TQRegExp(oldprefix),m_prefix); + s.replace( TQRegExp(oldprefix),m_prefix); m_edLabel->setText(s); } diff --git a/src/kile/kile.cpp b/src/kile/kile.cpp index 322f42e..1141a72 100644 --- a/src/kile/kile.cpp +++ b/src/kile/kile.cpp @@ -747,7 +747,7 @@ void Kile::cleanUpActionList(TQPtrList &list, const TQStringList & tool { for ( KAction *act = list.first(); act; act = list.next() ) { - if ( action(act->name()) != 0L && !tools.tqcontains(TQString(act->name()).mid(5)) ) + if ( action(act->name()) != 0L && !tools.contains(TQString(act->name()).mid(5)) ) { list.remove(act); if ( act->isPlugged(toolBar("toolsToolBar")) ) act->unplug(toolBar("toolsToolBar")); @@ -912,7 +912,7 @@ void Kile::updateModetqStatus() KILE_DEBUG() << "==Kile::updateModetqStatus()==========" << endl; KileProject *project = docManager()->activeProject(); TQString shortName = m_masterName; - int pos = shortName.tqfindRev('/'); + int pos = shortName.findRev('/'); shortName.remove(0,pos+1); if (project) @@ -1266,7 +1266,7 @@ void Kile::activePartGUI(KParts::Part * part) //kghostview (which has the print action defined in //a KParts::BrowserExtension) KParts::BrowserExtension *ext = KParts::BrowserExtension::childObject(part); - if (ext && ext->tqmetaObject()->slotNames().tqcontains( "print()" ) ) //part is a BrowserExtension, connect printAction() + if (ext && ext->tqmetaObject()->slotNames().contains( "print()" ) ) //part is a BrowserExtension, connect printAction() { connect(m_paPrint, TQT_SIGNAL(activated()), ext, TQT_SLOT(print())); m_paPrint->plug(toolBar("mainToolBar"),3); //plug this action into its default location @@ -1352,7 +1352,7 @@ void Kile::enableKileGUI(bool enable) TQMenuBar *menubar = menuBar(); for (uint i=0; icount(); ++i) { id = menubar->idAt(i); - TQPopupMenu *popup = menubar->tqfindItem(id)->popup(); + TQPopupMenu *popup = menubar->findItem(id)->popup(); if ( popup ) { text = popup->name(); if ( text == "menu_build" || @@ -1514,15 +1514,15 @@ void Kile::updateMenu() TQMenuBar *menubar = menuBar(); for ( uint i=0; icount(); ++i ) { int menu_id = menubar->idAt(i); - TQPopupMenu *menu = menubar->tqfindItem(menu_id)->popup(); + TQPopupMenu *menu = menubar->findItem(menu_id)->popup(); if ( menu ) { TQString menu_name = menu->name(); for ( uint j=0; jcount(); ++j ) { int sub_id = menu->idAt(j); - TQPopupMenu *submenu = menu->tqfindItem(sub_id)->popup(); + TQPopupMenu *submenu = menu->findItem(sub_id)->popup(); if ( submenu ) { TQString submenu_name = submenu->name(); - if ( m_dictMenuFile.tqcontains(submenu_name) ) { + if ( m_dictMenuFile.contains(submenu_name) ) { // if ( m_menuFileList.findIndex( submenu_name ) >= 0 ) { menu->setItemEnabled(sub_id, file_open); } @@ -1536,7 +1536,7 @@ void Kile::updateMenu() KActionPtrList::Iterator itact; for ( itact=actions.begin(); itact!=actions.end(); ++itact ) { - if ( m_dictMenuAction.tqcontains( (*itact)->name() ) ) + if ( m_dictMenuAction.contains( (*itact)->name() ) ) (*itact)->setEnabled(file_open); } @@ -1577,7 +1577,7 @@ void Kile::runTool() { focusLog(); TQString name = TQT_TQOBJECT(const_cast(sender()))->name(); - name.tqreplace(TQRegExp("^.*tool_"), ""); + name.replace(TQRegExp("^.*tool_"), ""); m_manager->run(name); } @@ -1648,7 +1648,7 @@ void Kile::insertTag(const KileAction::TagData& data,const TQStringList &pkgs) TQStringList warnPkgs; for ( it = pkgs.begin() ; it != pkgs.end() ; it++ ) - if( !(*packagelist).tqcontains(*it) ) + if( !(*packagelist).contains(*it) ) warnPkgs.append(*it); if( warnPkgs.count() > 0 ) @@ -2023,7 +2023,7 @@ void Kile::toggleMode() TQString shortName = m_masterName; int pos; - while ( (pos = (int)shortName.tqfind('/')) != -1 ) + while ( (pos = (int)shortName.find('/')) != -1 ) shortName.remove(0,pos+1); ModeAction->setText(i18n("Normal mode (current master document: %1)").tqarg(shortName)); @@ -2196,7 +2196,7 @@ void Kile::cleanBib() for ( i=0; i < view->getDoc()->numLines() ; i++ ) { j = i+1; - if ( j < view->getDoc()->numLines() && view->getDoc()->textLine(j).tqcontains( TQRegExp("^\\s*\\}\\s*$") ) ) + if ( j < view->getDoc()->numLines() && view->getDoc()->textLine(j).contains( TQRegExp("^\\s*\\}\\s*$") ) ) { s = view->getDoc()->textLine( i ); view->getDoc()->removeLine( i ); @@ -2275,7 +2275,7 @@ void Kile::citeViewBib() const TQCString viewBibFnc = "cite()"; remoteApps = client->registeredApplications(); - if( !remoteApps.tqcontains(viewBibApp) ) + if( !remoteApps.contains(viewBibApp) ) { m_logWidget->printMsg(KileTool::Warning, i18n("No ViewBib tool running, trying to start it now"), @@ -2289,7 +2289,7 @@ void Kile::citeViewBib() } remoteObjs = client->remoteObjects(viewBibApp); - if( !remoteObjs.tqcontains(viewBibObj) ) + if( !remoteObjs.contains(viewBibObj) ) { m_logWidget->printMsg(KileTool::Warning, i18n("The ViewBib tool does not have the correct interface"), @@ -2298,7 +2298,7 @@ void Kile::citeViewBib() } functions = client->remoteFunctions(viewBibApp,viewBibObj); - if( !functions.tqcontains(viewBibFncDef) ) + if( !functions.contains(viewBibFncDef) ) { m_logWidget->printMsg(KileTool::Warning, i18n("The ViewBib tool does not have the correct definition of the cite function"), diff --git a/src/kile/kileabbrevview.cpp b/src/kile/kileabbrevview.cpp index 5711dff..3f03ef5 100644 --- a/src/kile/kileabbrevview.cpp +++ b/src/kile/kileabbrevview.cpp @@ -75,7 +75,7 @@ void KileAbbrevView::addWordlist(const TQStringList *wordlist, bool global) TQStringList::ConstIterator it; for ( it=wordlist->begin(); it!=wordlist->end(); ++it ) { - int index = (*it).tqfind( '=' ); + int index = (*it).find( '=' ); if ( index >= 0 ) { insertItem( new KListViewItem(this,(*it).left(index),type,(*it).right( (*it).length()-index-1 )) ); diff --git a/src/kile/kileactions.cpp b/src/kile/kileactions.cpp index 057d7a3..41b10f7 100644 --- a/src/kile/kileactions.cpp +++ b/src/kile/kileactions.cpp @@ -154,12 +154,12 @@ void InputTag::emitData() TagData td(m_data); - td.tagBegin.tqreplace("%R",dlg->tag()); - td.tagEnd.tqreplace("%R",dlg->tag()); + td.tagBegin.replace("%R",dlg->tag()); + td.tagEnd.replace("%R",dlg->tag()); TQString alt = dlg->useAlternative() ? "*" : ""; - td.tagBegin.tqreplace("%A", alt); - td.tagEnd.tqreplace("%A", alt); + td.tagBegin.replace("%A", alt); + td.tagEnd.replace("%A", alt); if ( dlg->useLabel() ) { diff --git a/src/kile/kiledocmanager.cpp b/src/kile/kiledocmanager.cpp index b57bb7c..36fee28 100644 --- a/src/kile/kiledocmanager.cpp +++ b/src/kile/kiledocmanager.cpp @@ -274,7 +274,7 @@ KileProjectItem* Manager::itemFor(const KURL &url, KileProject *project /*=0L*/) while ( it.current() ) { KILE_DEBUG() << "looking in project " << (*it)->name() << endl; - if ((*it)->tqcontains(url)) + if ((*it)->contains(url)) { KILE_DEBUG() << "\t\tfound!" << endl; return (*it)->item(url); @@ -285,7 +285,7 @@ KileProjectItem* Manager::itemFor(const KURL &url, KileProject *project /*=0L*/) } else { - if ( project->tqcontains(url) ) + if ( project->contains(url) ) return project->item(url); } @@ -312,9 +312,9 @@ KileProjectItemList* Manager::itemsFor(Info *docinfo) const while ( it.current() ) { KILE_DEBUG() << "\tproject: " << (*it)->name() << endl; - if ((*it)->tqcontains(docinfo)) + if ((*it)->contains(docinfo)) { - KILE_DEBUG() << "\t\ttqcontains" << endl; + KILE_DEBUG() << "\t\tcontains" << endl; list->append((*it)->item(docinfo)); } ++it; @@ -337,7 +337,7 @@ KileProject* Manager::activeProject() { for (uint i=0; i < m_projects.count(); ++i) { - if (m_projects.at(i)->tqcontains(doc->url()) ) + if (m_projects.at(i)->contains(doc->url()) ) { curpr = m_projects.at(i); break; @@ -616,10 +616,10 @@ Kate::View* Manager::createNewLaTeXDocument() void Manager::replaceTemplateVariables(TQString &line) { - line=line.tqreplace("$$AUTHOR$$", KileConfig::author()); - line=line.tqreplace("$$DOCUMENTCLASSOPTIONS$$", KileConfig::documentClassOptions()); - if (!KileConfig::templateEncoding().isEmpty()) { line=line.tqreplace("$$INPUTENCODING$$", "\\usepackage["+ KileConfig::templateEncoding() +"]{inputenc}");} - else { line = line.tqreplace("$$INPUTENCODING$$","");} + line=line.replace("$$AUTHOR$$", KileConfig::author()); + line=line.replace("$$DOCUMENTCLASSOPTIONS$$", KileConfig::documentClassOptions()); + if (!KileConfig::templateEncoding().isEmpty()) { line=line.replace("$$INPUTENCODING$$", "\\usepackage["+ KileConfig::templateEncoding() +"]{inputenc}");} + else { line = line.replace("$$INPUTENCODING$$","");} } void Manager::createTemplate() @@ -775,7 +775,7 @@ void Manager::fileSaveAll(bool amAutoSaving, bool disUntitled ) { if( !fi.isWritable() ) { - if ( autosaveWarnings.tqcontains(url.path()) ) + if ( autosaveWarnings.contains(url.path()) ) { KILE_DEBUG() << "File " << url.prettyURL() << " is not writeable (again), trying next file" << endl; continue; @@ -1222,7 +1222,7 @@ void Manager::addToProject(KileProject* project, const KURL & url) const KURL realurl = symlinkFreeURL(url); TQFileInfo fi(realurl.path()); - if (project->tqcontains(realurl)) + if (project->contains(realurl)) { emit printMsg(KileTool::Info,i18n("The file %1 is already member of the project %2").tqarg(realurl.filename()).tqarg(project->name()),i18n("Add to Project")); return; @@ -1775,7 +1775,7 @@ void Manager::projectShow() TQStringList extlist = TQStringList::split(" ",m_ki->extensions()->latexDocuments() + ' ' + m_ki->extensions()->latexPackages()); for ( TQStringList::Iterator it=extlist.begin(); it!=extlist.end(); ++it ) { - if ( itempath.tqfind( (*it), -(*it).length() ) >= 0 ) + if ( itempath.find( (*it), -(*it).length() ) >= 0 ) { if ( m_ki->isOpen(item->url()) ) { @@ -1920,7 +1920,7 @@ KileProjectItem* Manager::selectProjectFileItem(const TQString &label) if ( dlg->exec() ) { if ( dlg->currentItem() >= 0 ) { TQString name = filelist[dlg->currentItem()]; - if ( map.tqcontains(name) ) + if ( map.contains(name) ) item = map[name]; else KMessageBox::error(m_ki->parentWidget(), i18n("Could not determine the selected file."),i18n( "Project Error")); @@ -1954,7 +1954,7 @@ KileProjectItemList* Manager::selectProjectFileItems(const TQString &label) if ( dlg->currentItem() >= 0 ) { selectedfiles = dlg->selected(); for ( TQStringList::Iterator it = selectedfiles.begin(); it != selectedfiles.end(); ++it ){ - if ( map.tqcontains(*it) ) + if ( map.contains(*it) ) items->append( map[(*it)] ); else KMessageBox::error(m_ki->parentWidget(), i18n("Could not determine the selected file."),i18n( "Project Error")); diff --git a/src/kile/kiledocumentinfo.cpp b/src/kile/kiledocumentinfo.cpp index 2689496..c886a47 100644 --- a/src/kile/kiledocumentinfo.cpp +++ b/src/kile/kiledocumentinfo.cpp @@ -87,7 +87,7 @@ namespace KileDocument bool Info::containsInvalidCharacters(const KURL& url) { TQString filename = url.fileName(); - return filename.tqcontains(" ") || filename.tqcontains("~") || filename.tqcontains("$") || filename.tqcontains("#"); + return filename.contains(" ") || filename.contains("~") || filename.contains("$") || filename.contains("#"); } KURL Info::repairInvalidCharacters(const KURL& url, bool checkForFileExistence /* = true */) @@ -133,7 +133,7 @@ KURL Info::repairExtension(const KURL& url, bool checkForFileExistence /* = true KURL ret(url); TQString filename = url.fileName(); - if(filename.tqcontains(".") && filename[0] != '.') // There already is an extension + if(filename.contains(".") && filename[0] != '.') // There already is an extension return ret; if(KMessageBox::Yes == KMessageBox::questionYesNo(NULL, @@ -343,7 +343,7 @@ void Info::count(const TQString line, long *stat) break; - case stComment : // if we get a selection the line possibly tqcontains \n and so the comment is only valid till \n and not necessarily till line.length() + case stComment : // if we get a selection the line possibly contains \n and so the comment is only valid till \n and not necessarily till line.length() if ( c == '\n') { ++stat[2]; // \n was counted as punctuation in the old implementation @@ -600,10 +600,10 @@ TQString TextInfo::getTextline(uint line, TodoResult &todo) else { //remove escaped \ characters - s.tqreplace("\\\\", " "); + s.replace("\\\\", " "); //remove comments - int pos = s.tqfind(reComments); + int pos = s.find(reComments); if ( pos != -1 ) { searchTodoComment(s,pos,todo); @@ -618,7 +618,7 @@ void TextInfo::searchTodoComment(const TQString &s, uint startpos, TodoResult &t { static TQRegExp reTodoComment("\\b(TODO|FIXME)\\b(:|\\s)?\\s*(.*)"); - if ( s.tqfind(reTodoComment,startpos) != -1 ) + if ( s.find(reTodoComment,startpos) != -1 ) { todo.type = ( reTodoComment.cap(1) == "TODO" ) ? KileStruct::ToDo : KileStruct::FixMe; todo.colTag = reTodoComment.pos(1); @@ -836,7 +836,7 @@ BracketResult LaTeXInfo::matchBracket(uint &l, uint &pos) int p = 0; while ( l < m_doc->numLines() ) { - if ( (p = getTextline(l,todo).tqfind('{', pos)) != -1 ) + if ( (p = getTextline(l,todo).find('{', pos)) != -1 ) { pos = p; break; @@ -911,12 +911,12 @@ void LaTeXInfo::updateStruct() continue; //ignore renewcommands - s.tqreplace(reReNewCommand, ""); + s.replace(reReNewCommand, ""); //find all commands in this line while (tagStart != -1) { - if ( (!foundBD) && ( (bd = s.tqfind(reBD, tagEnd)) != -1)) + if ( (!foundBD) && ( (bd = s.find(reBD, tagEnd)) != -1)) { KILE_DEBUG() << "\tfound \\begin{document}" << endl; foundBD = true; @@ -924,7 +924,7 @@ void LaTeXInfo::updateStruct() else m_preamble = m_doc->text(0, 0, i, bd); } - if ((!foundBD) && (s.tqfind(reRoot, tagEnd) != -1)) + if ((!foundBD) && (s.find(reRoot, tagEnd) != -1)) { KILE_DEBUG() << "\tsetting m_bIsRoot to true" << endl; tagEnd += reRoot.cap(0).length(); @@ -940,7 +940,7 @@ void LaTeXInfo::updateStruct() tagEnd = tagStart + reCommand.cap(0).length()-1; //look up the command in the dictionary - it = m_dictStructLevel.tqfind(reCommand.cap(1)); + it = m_dictStructLevel.find(reCommand.cap(1)); //if it is was a structure element, find the title (or label) if (it != m_dictStructLevel.end()) @@ -987,17 +987,17 @@ void LaTeXInfo::updateStruct() { if ( m=="figure" || m=="figure*" || m=="table" ) { - it = m_dictStructLevel.tqfind("\\begin{" + m +'}'); + it = m_dictStructLevel.find("\\begin{" + m +'}'); } else if ( m == "frame" ) { - it = m_dictStructLevel.tqfind("\\begin{frame}"); + it = m_dictStructLevel.find("\\begin{frame}"); m = i18n("Frame"); } else if ( m=="block" || m=="exampleblock" || m=="alertblock") { const TQString untitledBlockDisplayName = i18n("Untitled Block"); - it = m_dictStructLevel.tqfind("\\begin{block}"); + it = m_dictStructLevel.find("\\begin{block}"); if ( s.at(tagEnd+1) == '{' ) { tagEnd++; @@ -1019,11 +1019,11 @@ void LaTeXInfo::updateStruct() { if ( m=="figure" || m== "figure*" || m=="table") { - it = m_dictStructLevel.tqfind("\\end{float}"); + it = m_dictStructLevel.find("\\end{float}"); } else if ( m == "frame" ) { - it = m_dictStructLevel.tqfind("\\end{frame}"); + it = m_dictStructLevel.find("\\end{frame}"); } else fireSuspended = true; // only floats, no other environments @@ -1134,14 +1134,14 @@ void LaTeXInfo::updateStruct() TQString optArg, mandArgs; //find how many parameters this command takes - if ( s.tqfind(reNumOfParams, tagEnd + 1) != -1 ) + if ( s.find(reNumOfParams, tagEnd + 1) != -1 ) { bool ok; int noo = reNumOfParams.cap(1).toInt(&ok); if ( ok ) { - if(s.tqfind(reNumOfOptParams, tagEnd + 1) != -1) + if(s.find(reNumOfOptParams, tagEnd + 1) != -1) { KILE_DEBUG() << "Opt param is " << reNumOfOptParams.cap(2) << "%EOL" << endl; noo--; // if we have an opt argument, we have one mandatory argument less, and noo=0 can't occur because then latex complains (and we don't macht them with reNumOfParams either) @@ -1232,7 +1232,7 @@ void BibInfo::updateStruct() for(uint i = 0; i < m_doc->numLines(); ++i) { s = m_doc->textLine(i); - if ( (s.tqfind(reItem) != -1) && !reSpecial.exactMatch(reItem.cap(2).lower()) ) + if ( (s.find(reItem) != -1) && !reSpecial.exactMatch(reItem.cap(2).lower()) ) { KILE_DEBUG() << "found: " << reItem.cap(2) << endl; //start looking for key diff --git a/src/kile/kileedit.cpp b/src/kile/kileedit.cpp index c56d7fb..a9203d3 100644 --- a/src/kile/kileedit.cpp +++ b/src/kile/kileedit.cpp @@ -108,8 +108,8 @@ void EditorExtension::insertTag(const KileAction::TagData& data, Kate::View *vie bool wrap = ( (!data.tagEnd.isNull()) && doc->hasSelection()); //%C before or after the selection - bool before = data.tagBegin.tqcontains("%C"); - bool after = data.tagEnd.tqcontains("%C"); + bool before = data.tagBegin.contains("%C"); + bool after = data.tagEnd.contains("%C"); //save current cursor position int para=view->cursorLine(); @@ -123,7 +123,7 @@ void EditorExtension::insertTag(const KileAction::TagData& data, Kate::View *vie int dxIndentEnv = 0; // environment tag - bool envtag = data.tagBegin.tqcontains("%E") || data.tagEnd.tqcontains("%E"); + bool envtag = data.tagBegin.contains("%E") || data.tagEnd.contains("%E"); TQString whitespace = getWhiteSpace( doc->textLine(para).left(index) ); //if there is a selection act as if cursor is at the beginning of selection @@ -157,7 +157,7 @@ void EditorExtension::insertTag(const KileAction::TagData& data, Kate::View *vie // strip one of two consecutive line ends int len = sel.length(); - if ( tagEnd.at(0)=='\n' && len>0 && sel.tqfind('\n',-1)==len-1 ) + if ( tagEnd.at(0)=='\n' && len>0 && sel.find('\n',-1)==len-1 ) sel.truncate( len-1 ); // now add the selection @@ -172,19 +172,19 @@ void EditorExtension::insertTag(const KileAction::TagData& data, Kate::View *vie } else if ( envtag ) { - ins.tqreplace("%E",whitespace+m_envAutoIndent); - tagEnd.tqreplace("%E",whitespace+m_envAutoIndent); + ins.replace("%E",whitespace+m_envAutoIndent); + tagEnd.replace("%E",whitespace+m_envAutoIndent); if ( data.dy > 0 ) dxIndentEnv = whitespace.length() + m_envAutoIndent.length(); } - tagEnd.tqreplace("\\end{",whitespace+"\\end{"); + tagEnd.replace("\\end{",whitespace+"\\end{"); ins += tagEnd + trailing; //do some replacements TQFileInfo fi( doc->url().path()); - ins.tqreplace("%S", fi.baseName(true)); - ins.tqreplace("%B", s_bullet); + ins.replace("%S", fi.baseName(true)); + ins.replace("%B", s_bullet); //insert first part of tag at cursor position doc->insertText(para,index,ins); @@ -192,13 +192,13 @@ void EditorExtension::insertTag(const KileAction::TagData& data, Kate::View *vie //move cursor to the new position if ( before || after ) { - int n = data.tagBegin.tqcontains("\n")+ data.tagEnd.tqcontains("\n"); + int n = data.tagBegin.contains("\n")+ data.tagEnd.contains("\n"); if (wrap) n += para_end > para ? para_end-para : para-para_end; for (int line = para_begin; line <= para_begin+n; ++line) { - if (doc->textLine(line).tqcontains("%C")) + if (doc->textLine(line).contains("%C")) { - int i=doc->textLine(line).tqfind("%C"); + int i=doc->textLine(line).find("%C"); para_cursor = line; index_cursor = i; doc->removeText(line,i,line,i+2); break; @@ -1348,7 +1348,7 @@ bool EditorExtension::isEnvironmentPosition(Kate::Document *doc, uint row, uint int startcol = ( textline[col] == '\\' ) ? col - 1 : col; if ( startcol >= 1 ) { - int pos = textline.tqfindRev(m_reg,startcol); + int pos = textline.findRev(m_reg,startcol); env.len = m_reg.matchedLength(); if ( pos!=-1 && (uint)pos 0 ) { reg.setPattern(pattern1); - pos = textline.tqfindRev(reg,col-1); + pos = textline.findRev(reg,col-1); if ( pos != -1 ) { // found an illegal character x1 = pos + 1; if ( mode == smTex ) { @@ -2019,7 +2019,7 @@ bool EditorExtension::getCurrentWord(Kate::Document *doc, uint row, uint col, Ed // search at the current position reg.setPattern(pattern2); - pos = textline.tqfind(reg,col); + pos = textline.find(reg,col); if ( pos!=-1 && (uint)pos==col ) { x2 = pos + reg.matchedLength(); @@ -2365,7 +2365,7 @@ bool EditorExtension::insertDoubleQuotes() bool openfound = false; if ( iface->searchText(row,col,reg,&r,&c,&l,true) ) { - openfound = ( doc->textLine(r).tqfind(m_leftDblQuote,c) == (int)c ); + openfound = ( doc->textLine(r).find(m_leftDblQuote,c) == (int)c ); //KILE_DEBUG() << "pattern=" << reg.pattern() << " " << reg.cap(1) << " r=" << r << " c=" << c << " open=" << openfound<< endl; } @@ -2378,7 +2378,7 @@ bool EditorExtension::insertDoubleQuotes() // insert a language specific doublequote close int startcol = col - m_leftDblQuote.length(); //KILE_DEBUG() << "startcol=" << startcol << " col=" << col << endl; - if ( startcol>=0 && textline.tqfind(m_leftDblQuote,startcol) == (int)startcol ) + if ( startcol>=0 && textline.find(m_leftDblQuote,startcol) == (int)startcol ) { doc->removeText(row,startcol,row,startcol+m_leftDblQuote.length()); doc->insertText(row,startcol,"\""); @@ -2395,7 +2395,7 @@ bool EditorExtension::insertDoubleQuotes() // insert a language specific doublequote open int startcol = col - m_rightDblQuote.length(); //KILE_DEBUG() << "startcol=" << startcol << " col=" << col << endl; - if ( startcol>=0 && textline.tqfind(m_rightDblQuote,startcol) == (int)startcol ) + if ( startcol>=0 && textline.find(m_rightDblQuote,startcol) == (int)startcol ) { doc->removeText(row,startcol,row,startcol+m_rightDblQuote.length()); doc->insertText(row,startcol,"\""); @@ -2428,7 +2428,7 @@ void EditorExtension::insertIntelligentTabulator() // try to align tabulator with textline above if ( currentRow >= 1 ) { - int tabpos = view->getDoc()->textLine(currentRow-1).tqfind('&',currentCol); + int tabpos = view->getDoc()->textLine(currentRow-1).find('&',currentCol); if ( tabpos >= 0 ) { currentCol = tabpos; @@ -2476,7 +2476,7 @@ bool EditorExtension::eventInsertEnvironment(Kate::View *view) else { envname = m_regexpEnter.cap(4); - endenv = m_regexpEnter.cap(2).tqreplace("\\begin","\\end") + '\n'; + endenv = m_regexpEnter.cap(2).replace("\\begin","\\end") + '\n'; } if ( shouldCompleteEnv(envname, view) ) @@ -2515,8 +2515,8 @@ bool EditorExtension::shouldCompleteEnv(const TQString &env, Kate::View *view) view->cursorPositionReal(&realLine, &realColumn); for ( int i = realLine; i < num; ++i) { - numBeginsFound += view->getDoc()->textLine(i).tqcontains(reTestBegin); - numEndsFound += view->getDoc()->textLine(i).tqcontains(reTestEnd); + numBeginsFound += view->getDoc()->textLine(i).contains(reTestBegin); + numEndsFound += view->getDoc()->textLine(i).contains(reTestEnd); KILE_DEBUG() << "line is " << i << " numBeginsFound = " << numBeginsFound << " , " << "numEndsFound = " << numEndsFound << endl; if ( numEndsFound >= numBeginsFound ) return false; @@ -2570,11 +2570,11 @@ bool EditorExtension::insideVerb(Kate::View *view) TQRegExp reg("\\\\verb(\\*?)(.)"); while ( true ) { - int pos = textline.tqfind(reg,startpos); + int pos = textline.find(reg,startpos); if ( pos<0 || col<(uint)pos+6+reg.cap(1).length() ) return false; - pos = textline.tqfind(reg.cap(2),pos+6+reg.cap(1).length()); + pos = textline.find(reg.cap(2),pos+6+reg.cap(1).length()); if ( pos<0 || col<=(uint)pos ) return true; @@ -2711,7 +2711,7 @@ bool EditorExtension::findEndOfDocument(Kate::Document *doc, uint row, uint col, while ( iface->searchText(row,col,"\\end{document}",&rowFound,&colFound,&lenFound) ) { textline = getTextLineReal(doc,rowFound); - if ( textline.tqfind("\\end{document}",colFound) == (int)colFound ) + if ( textline.find("\\end{document}",colFound) == (int)colFound ) return true; row = rowFound; diff --git a/src/kile/kileerrorhandler.cpp b/src/kile/kileerrorhandler.cpp index 6a5c60b..a97be0f 100644 --- a/src/kile/kileerrorhandler.cpp +++ b/src/kile/kileerrorhandler.cpp @@ -59,7 +59,7 @@ void KileErrorHandler::ViewLog() if ( m_ki->outputFilter()->source() != cn ) { m_ki->outputFilter()->setSource(cn); - m_ki->outputFilter()->Run(cn.tqreplace(TQRegExp("\\..*$"),".log")); + m_ki->outputFilter()->Run(cn.replace(TQRegExp("\\..*$"),".log")); } TQString log = m_ki->outputFilter()->log(); diff --git a/src/kile/kileextensions.cpp b/src/kile/kileextensions.cpp index 7010399..b843900 100644 --- a/src/kile/kileextensions.cpp +++ b/src/kile/kileextensions.cpp @@ -80,7 +80,7 @@ TQString Extensions::fileFilter(uint type) return TQString(); } - ext.tqreplace(".","*."); + ext.replace(".","*."); return ext + '|' + text; } diff --git a/src/kile/kilefileselect.cpp b/src/kile/kilefileselect.cpp index 89c0a41..2a35719 100644 --- a/src/kile/kilefileselect.cpp +++ b/src/kile/kilefileselect.cpp @@ -61,7 +61,7 @@ KileFileSelect::KileFileSelect(KileDocument::Extensions *extensions, TQWidget *t + ' ' + extensions->latexPackages() + ' ' + extensions->bibtex() + ' ' + extensions->metapost(); - filter.tqreplace(".","*."); + filter.replace(".","*."); dir->setNameFilter(filter); KActionCollection *coll = dir->actionCollection(); diff --git a/src/kile/kilegrepdialog.cpp b/src/kile/kilegrepdialog.cpp index bfb4695..24beb0d 100644 --- a/src/kile/kilegrepdialog.cpp +++ b/src/kile/kilegrepdialog.cpp @@ -458,11 +458,11 @@ void KileGrepDialog::slotItemSelected(const TQString& item) TQString filename, linenumber; TQString str = item; - if ( (pos = str.tqfind(':')) != -1) + if ( (pos = str.find(':')) != -1) { filename = str.left(pos); str = str.right(str.length()-1-pos); - if ( (pos = str.tqfind(':')) != -1) + if ( (pos = str.find(':')) != -1) { linenumber = str.left(pos); if ( m_mode == KileGrep::Project ) @@ -508,14 +508,14 @@ void KileGrepDialog::startGrep() void KileGrepDialog::processOutput() { int pos; - while ( (pos = buf.tqfind('\n')) != -1) + while ( (pos = buf.find('\n')) != -1) { TQString item = buf.left(pos); if ( ! item.isEmpty() ) { if ( m_mode == KileGrep::Project ) { - if ( item.tqfind(m_projectdir + '/') == 0 ) + if ( item.find(m_projectdir + '/') == 0 ) resultbox->insertItem( item.mid(m_projectdir.length()+1) ); else resultbox->insertItem(item); @@ -602,7 +602,7 @@ TQString KileGrepDialog::getPattern() if ( pattern.isEmpty() ) pattern = pattern_combo->currentText(); else - pattern.tqreplace("%s", pattern_combo->currentText()); + pattern.replace("%s", pattern_combo->currentText()); } else { @@ -617,7 +617,7 @@ TQString KileGrepDialog::getPattern() TQString KileGrepDialog::getShellPattern() { TQString pattern = getPattern(); - pattern.tqreplace("'", "'\\''"); + pattern.replace("'", "'\\''"); return '\'' + pattern + '\''; //return KProcess::quote(pattern); } @@ -647,7 +647,7 @@ TQString KileGrepDialog::buildFilesCommand() files = files + " -o -name " + '\'' + (*it) + '\''; TQString shell_command; - shell_command += "tqfind "; + shell_command += "find "; shell_command += KProcess::quote(dir_combo->url()); shell_command += " \\( -name "; shell_command += files; diff --git a/src/kile/kilehelp.cpp b/src/kile/kilehelp.cpp index 3e89b34..127fbff 100644 --- a/src/kile/kilehelp.cpp +++ b/src/kile/kilehelp.cpp @@ -270,7 +270,7 @@ namespace KileHelp { TQString word = getKeyword(view); KILE_DEBUG() << "keyword: " << word << endl; - if ( !word.isNull() && m_dictHelpTex.tqcontains(word) ) + if ( !word.isNull() && m_dictHelpTex.contains(word) ) { KILE_DEBUG() << "about to show help for " << word << " (section " << m_dictHelpTex[word] << " )" << endl; showHelpFile( m_texdocPath + m_texReference + m_dictHelpTex[word] ); @@ -286,8 +286,8 @@ namespace KileHelp if ( ! kilehelp.isEmpty() ) { TQString word = getKeyword(view); - KILE_DEBUG() << "word = " << word << " " << m_dictHelpKile.tqcontains(word) << endl; - if ( !word.isNull() && m_dictHelpKile.tqcontains(word) ) + KILE_DEBUG() << "word = " << word << " " << m_dictHelpKile.contains(word) << endl; + if ( !word.isNull() && m_dictHelpKile.contains(word) ) { showHelpFile( kilehelp + '#' + m_dictHelpKile[word] ); } diff --git a/src/kile/kileinfo.cpp b/src/kile/kileinfo.cpp index fe9d133..edc2a82 100644 --- a/src/kile/kileinfo.cpp +++ b/src/kile/kileinfo.cpp @@ -360,8 +360,8 @@ TQString KileInfo::expandEnvironmentVars(const TQString &str) static TQRegExp reEnvVars("\\$(\\w+)"); TQString result = str; int index = -1; - while ( (index = str.tqfind(reEnvVars, index + 1)) != -1 ) - result.tqreplace(reEnvVars.cap(0),getenv(reEnvVars.cap(1).local8Bit())); + while ( (index = str.find(reEnvVars, index + 1)) != -1 ) + result.replace(reEnvVars.cap(0),getenv(reEnvVars.cap(1).local8Bit())); return result; } diff --git a/src/kile/kilejscript.cpp b/src/kile/kilejscript.cpp index e478d6c..f8b62f3 100644 --- a/src/kile/kilejscript.cpp +++ b/src/kile/kilejscript.cpp @@ -538,7 +538,7 @@ m_kileInfo->viewManager()->currentView()->down(); m_kileInfo->viewManager()->currentView()->down();*/ TQString code = script->getCode(); TQRegExp endOfLineExp("(\r\n)|\n|\r"); - int i = code.tqfind(endOfLineExp); + int i = code.find(endOfLineExp); TQString firstLine = (i >= 0 ? code.left(i) : code); TQRegExp requiredVersionTagExp("(kile-version:\\s*)(\\d+\\.\\d+(.\\d+)?)"); if(requiredVersionTagExp.search(firstLine) != -1) { @@ -552,14 +552,14 @@ m_kileInfo->viewManager()->currentView()->down();*/ } void Manager::executeJScript(unsigned int id) { - TQMap::iterator i = m_idScriptMap.tqfind(id); + TQMap::iterator i = m_idScriptMap.find(id); if(i != m_idScriptMap.end()) { executeJScript(*i); } } const JScript* Manager::getScript(unsigned int id) { - TQMap::iterator i = m_idScriptMap.tqfind(id); + TQMap::iterator i = m_idScriptMap.find(id); return ((i != m_idScriptMap.end()) ? (*i) : NULL); } @@ -622,7 +622,7 @@ m_kileInfo->viewManager()->currentView()->down();*/ void Manager::registerScript(const TQString& fileName, TQMap& pathIDMap, TQMap& takenIDMap, unsigned int &maxID) { unsigned int id; - TQMap::iterator it = pathIDMap.tqfind(fileName); + TQMap::iterator it = pathIDMap.find(fileName); if(it != pathIDMap.end()) { id = *it; } @@ -734,7 +734,7 @@ m_kileInfo->viewManager()->currentView()->down();*/ } // maxID should have a real meaning now for(unsigned int i = 0; i < maxID; ++i) { - if(takenIDMap.tqfind(i) == takenIDMap.end()) { + if(takenIDMap.find(i) == takenIDMap.end()) { return i; } } diff --git a/src/kile/kilelyxserver.cpp b/src/kile/kilelyxserver.cpp index 395ebb0..e1a0b0e 100644 --- a/src/kile/kilelyxserver.cpp +++ b/src/kile/kilelyxserver.cpp @@ -206,11 +206,11 @@ void KileLyxServer::processLine(const TQString &line) TQRegExp reBibtexdbadd(":bibtex-database-add:(.*)$"); TQRegExp rePaste(":paste:(.*)$"); - if( line.tqfind(reCite) != -1 ) + if( line.find(reCite) != -1 ) emit(insert(KileAction::TagData(i18n("Cite"), "\\cite{"+reCite.cap(1)+'}'))); - else if( line.tqfind(reBibtexdbadd) != -1 ) + else if( line.find(reBibtexdbadd) != -1 ) emit(insert(KileAction::TagData(i18n("BibTeX db add"), "\\bibliography{"+ reBibtexdbadd.cap(1) + '}'))); - else if( line.tqfind(rePaste) != -1) + else if( line.find(rePaste) != -1) emit(insert(KileAction::TagData(i18n("Paste"), rePaste.cap(1)))); } diff --git a/src/kile/kilemultitabbar.cpp b/src/kile/kilemultitabbar.cpp index 0c86c3e..59f08fa 100644 --- a/src/kile/kilemultitabbar.cpp +++ b/src/kile/kilemultitabbar.cpp @@ -436,7 +436,7 @@ int KileMultiTabBarButton::id() const{ void KileMultiTabBarButton::setText(const TQString& text) { TQString s = text; - s = s.tqreplace("&", TQString()); // we do not allow accelerators to be set + s = s.replace("&", TQString()); // we do not allow accelerators to be set // This is a little hack to avoid KAcceleratorManager // provide us with accelerators as the class name of the // widget is no longer KMultiTabBar. @@ -623,8 +623,8 @@ void KileMultiTabBarTab::updateState() int KileMultiTabBarTab::neededSize() { TQString text = m_text; - text = text.tqreplace(TQRegExp("&(?=[^&])"), TQString()); - text = text.tqreplace("&&", "&"); + text = text.replace(TQRegExp("&(?=[^&])"), TQString()); + text = text.replace("&&", "&"); return (((m_style!=KileMultiTabBar::KDEV3)?24:0)+TQFontMetrics(TQFont()).width(text)+6); } diff --git a/src/kile/kileoutputwidget.cpp b/src/kile/kileoutputwidget.cpp index 55cf8e6..b556f57 100644 --- a/src/kile/kileoutputwidget.cpp +++ b/src/kile/kileoutputwidget.cpp @@ -33,12 +33,12 @@ namespace KileWidget //find newline symbol //only output if we have receive one or more //full lines of text - int newLineAt = str.tqfindRev('\n'); + int newLineAt = str.findRev('\n'); if ( newLineAt != -1 ) { line += str.left(newLineAt); //don't copy the newline char - line.tqreplace('<',"<"); - line.tqreplace('>',">"); + line.replace('<',"<"); + line.replace('>',">"); append(line); line = str.mid(newLineAt + 1); } diff --git a/src/kile/kileproject.cpp b/src/kile/kileproject.cpp index 87711aa..9004be2 100644 --- a/src/kile/kileproject.cpp +++ b/src/kile/kileproject.cpp @@ -261,7 +261,7 @@ void KileProject::setExtensions(KileProjectItem::Type type, const TQString & ext // now we build a regular expression for all extensions // (used to search for a filename with a valid extension) TQString pattern = standardExtList.join("|"); - pattern.tqreplace(".","\\."); + pattern.replace(".","\\."); pattern = '('+ pattern +")$"; // and save it @@ -700,7 +700,7 @@ TQString KileProject::findRelativePath(const KURL &url) return path; } -bool KileProject::tqcontains(const KURL &url) +bool KileProject::contains(const KURL &url) { for (uint i=0; i < m_projectitems.count(); ++i) { @@ -711,7 +711,7 @@ bool KileProject::tqcontains(const KURL &url) return false; } -bool KileProject::tqcontains(const KileDocument::Info *info) +bool KileProject::contains(const KileDocument::Info *info) { TQPtrListIterator it(m_projectitems); KileProjectItem *current; diff --git a/src/kile/kileproject.h b/src/kile/kileproject.h index fb3aefe..8d4351b 100644 --- a/src/kile/kileproject.h +++ b/src/kile/kileproject.h @@ -180,8 +180,8 @@ public: KSimpleConfig *config() { return m_config; } - bool tqcontains(const KURL&); - bool tqcontains(const KileDocument::Info *info); + bool contains(const KURL&); + bool contains(const KileDocument::Info *info); KileProjectItem *rootItem(KileProjectItem *) const; const TQPtrList* rootItems() const {return &m_rootItems;} bool isInvalid(){ return m_invalid;} diff --git a/src/kile/kileprojectdlgs.cpp b/src/kile/kileprojectdlgs.cpp index e906003..3abc84b 100644 --- a/src/kile/kileprojectdlgs.cpp +++ b/src/kile/kileprojectdlgs.cpp @@ -309,7 +309,7 @@ void KileNewProjectDlg::clickedCreateNewFileCb() TQString KileNewProjectDlg::bare() { - return projectTitle().lower().stripWhiteSpace().tqreplace(TQRegExp("\\s*"),"")+".kilepr"; + return projectTitle().lower().stripWhiteSpace().replace(TQRegExp("\\s*"),"")+".kilepr"; } void KileNewProjectDlg::browseLocation() @@ -344,7 +344,7 @@ void KileNewProjectDlg::slotOk() if ( ! acceptUserExtensions() ) return; - //tqreplace ~ and environment variables in the paths + //replace ~ and environment variables in the paths KURLCompletion uc; uc.setReplaceEnv(true); uc.setReplaceHome(true); diff --git a/src/kile/kilesidebar.cpp b/src/kile/kilesidebar.cpp index 3bb6f72..14dd02e 100644 --- a/src/kile/kilesidebar.cpp +++ b/src/kile/kilesidebar.cpp @@ -163,7 +163,7 @@ int KileSideBar::findNextShownTab(int i) void KileSideBar::removePage(TQWidget *w) { - TQMap::iterator it = m_widgetToIndex.tqfind(w); + TQMap::iterator it = m_widgetToIndex.find(w); if(it == m_widgetToIndex.end()) { return; @@ -181,7 +181,7 @@ void KileSideBar::removePage(TQWidget *w) } void KileSideBar::setPageVisible(TQWidget *w, bool b) { - TQMap::iterator it = m_widgetToIndex.tqfind(w); + TQMap::iterator it = m_widgetToIndex.find(w); if(it == m_widgetToIndex.end()) { return; @@ -200,7 +200,7 @@ void KileSideBar::setPageVisible(TQWidget *w, bool b) { void KileSideBar::showPage(TQWidget *widget) { - if ( m_widgetToIndex.tqcontains(widget) ) + if ( m_widgetToIndex.contains(widget) ) switchToTab(m_widgetToIndex[widget]); } diff --git a/src/kile/kilestatsdlg.cpp b/src/kile/kilestatsdlg.cpp index e02a427..fd5c9b9 100644 --- a/src/kile/kilestatsdlg.cpp +++ b/src/kile/kilestatsdlg.cpp @@ -139,7 +139,7 @@ widget->updateColumns(); void KileStatsDlg::slotUser1() // Copy { KILE_DEBUG() << "Copy Button was clicked" << endl; - KILE_DEBUG() << "Open tab is " << activePageIndex() << ' ' + ( m_pagetoname.tqcontains(activePageIndex()) ? m_pagetoname[activePageIndex()] : "No such entry" )<< endl; + KILE_DEBUG() << "Open tab is " << activePageIndex() << ' ' + ( m_pagetoname.contains(activePageIndex()) ? m_pagetoname[activePageIndex()] : "No such entry" )<< endl; TQClipboard *clip = KApplication::tqclipboard(); TQString text; @@ -150,7 +150,7 @@ void KileStatsDlg::slotUser1() // Copy void KileStatsDlg::slotUser2() // CopyAsLaTeX { KILE_DEBUG() << "CopyAsLateX Button was clicked" << endl; - KILE_DEBUG() << "Open tab is " << activePageIndex() << ' ' + ( m_pagetoname.tqcontains(activePageIndex()) ? m_pagetoname[activePageIndex()] : "No such entry" )<< endl; + KILE_DEBUG() << "Open tab is " << activePageIndex() << ' ' + ( m_pagetoname.contains(activePageIndex()) ? m_pagetoname[activePageIndex()] : "No such entry" )<< endl; TQClipboard *clip = KApplication::tqclipboard(); TQString text; diff --git a/src/kile/kilestdtools.cpp b/src/kile/kilestdtools.cpp index 5dfa9e6..c4c9429 100644 --- a/src/kile/kilestdtools.cpp +++ b/src/kile/kilestdtools.cpp @@ -111,7 +111,7 @@ namespace KileTool if ( docinfo ) { const TQStringList *pckgs = manager()->info()->allPackages(); - if ( pckgs->tqcontains("makeidx") ) + if ( pckgs->contains("makeidx") ) return needsUpdate ( baseDir() + '/' + S() + ".ind", manager()->info()->lastModifiedFile(docinfo) ); } @@ -125,13 +125,13 @@ namespace KileTool { const TQStringList *pckgs = manager()->info()->allPackages(); - if ( pckgs->tqcontains("asymptote") ) + if ( pckgs->contains("asymptote") ) { static TQRegExp msg("File " + TQRegExp::escape(S()) + "_?\\d+_?.(?:eps|pdf|tex) does not exist"); int sz = manager()->info()->outputInfo()->size(); for (int i = 0; i < sz; ++i ) { - if( (*manager()->info()->outputInfo())[i].message().tqcontains(msg) ) + if( (*manager()->info()->outputInfo())[i].message().contains(msg) ) return true; } } @@ -192,7 +192,7 @@ namespace KileTool for (int i = 0; i < sz; ++i ) { if ( (*manager()->info()->outputInfo())[i].type() == LatexOutputInfo::itmWarning - && (*manager()->info()->outputInfo())[i].message().tqcontains("Rerun") ) + && (*manager()->info()->outputInfo())[i].message().contains("Rerun") ) { reRan = true; break; @@ -382,7 +382,7 @@ namespace KileTool if ( !read1 && !read2 ) { - sendMessage(Error, i18n("Unable to tqfind %1 or %2; if you are trying to view some other HTML file, go to Settings->Configure Kile->Tools->ViewHTML->Advanced.").tqarg(file1.absFilePath()).tqarg(file2.absFilePath())); + sendMessage(Error, i18n("Unable to find %1 or %2; if you are trying to view some other HTML file, go to Settings->Configure Kile->Tools->ViewHTML->Advanced.").tqarg(file1.absFilePath()).tqarg(file2.absFilePath())); return false; } diff --git a/src/kile/kilestructurewidget.cpp b/src/kile/kilestructurewidget.cpp index b95375a..e920d30 100644 --- a/src/kile/kilestructurewidget.cpp +++ b/src/kile/kilestructurewidget.cpp @@ -256,7 +256,7 @@ namespace KileWidget { //we don't accept duplicate entries in the map, remove this item alltogether //and rely on the openByLine map instead - if ( m_openByTitle.tqcontains ( item->title() ) ) + if ( m_openByTitle.contains ( item->title() ) ) m_openByTitle.remove ( item->title() ); else m_openByTitle [ item->title() ] = item->isOpen(); @@ -266,15 +266,15 @@ namespace KileWidget ++it; } - if ( m_folders.tqcontains("labels") ) + if ( m_folders.contains("labels") ) m_openByFolders["labels"] = m_folders["labels"]->isOpen(); - if ( m_folders.tqcontains("refs") ) + if ( m_folders.contains("refs") ) m_openByFolders["refs"] = m_folders["refs"]->isOpen(); - if ( m_folders.tqcontains("bibs") ) + if ( m_folders.contains("bibs") ) m_openByFolders["bibs"] = m_folders["bibs"]->isOpen(); - if ( m_folders.tqcontains("todo") ) + if ( m_folders.contains("todo") ) m_openByFolders["todo"] = m_folders["todo"]->isOpen(); - if ( m_folders.tqcontains("fixme") ) + if ( m_folders.contains("fixme") ) m_openByFolders["fixme"] = m_folders["fixme"]->isOpen(); } @@ -284,36 +284,36 @@ namespace KileWidget return true; if ( folder == "labels" ) { - if ( m_openByFolders.tqcontains("labels") ) + if ( m_openByFolders.contains("labels") ) return m_openByFolders["labels"]; else return m_openStructureLabels; } else if ( folder == "refs" ) { - if ( m_openByFolders.tqcontains("refs") ) + if ( m_openByFolders.contains("refs") ) return m_openByFolders["refs"]; else return m_openStructureReferences; } else if ( folder == "bibs" ) { - if ( m_openByFolders.tqcontains("bibs") ) + if ( m_openByFolders.contains("bibs") ) return m_openByFolders["bibs"]; else return m_openStructureBibitems; } else if ( folder=="todo" || folder=="fixme" ) { - if ( m_openByFolders.tqcontains(folder) ) + if ( m_openByFolders.contains(folder) ) return m_openByFolders[folder]; else return m_openStructureTodo; } - if ( m_openByTitle.tqcontains(item->title()) ) + if ( m_openByTitle.contains(item->title()) ) return m_openByTitle [ item->title() ]; - else if ( m_openByLine.tqcontains(item->line()) ) + else if ( m_openByLine.contains(item->line()) ) return m_openByLine [ item->line() ]; //TODO check surrounding lines as well else return ((folder == "root") && level <= m_stack->level()); @@ -559,7 +559,7 @@ namespace KileWidget void StructureList::showReferences(KileInfo *ki) { // remove old listview item for references, if it exists - if ( m_folders.tqcontains("refs") ) + if ( m_folders.contains("refs") ) { KileListViewItem *refitem = m_folders["refs"]; m_root->takeItem(refitem); @@ -586,7 +586,7 @@ namespace KileWidget TQValueListConstIterator it; for ( it=m_references.begin(); it!=m_references.end(); ++it ) { - if ( ! labelmap.tqcontains((*it).name()) ) + if ( ! labelmap.contains((*it).name()) ) { KileListViewItem *refitem = folder("refs"); refitem->setOpen( shouldBeOpen(refitem,"refs",0) ); @@ -659,7 +659,7 @@ namespace KileWidget { TQString fname = item->title(); - if(fname.tqfind(suffix) != -1) // check if we have a suffix, if not add standard suffixes + if(fname.find(suffix) != -1) // check if we have a suffix, if not add standard suffixes { KILE_DEBUG() << "Suffix found: " << suffix.cap(0) << endl; } @@ -864,13 +864,13 @@ namespace KileWidget { if ( info == 0L ) return false; else - return m_map.tqcontains(info); + return m_map.contains(info); } void Structure::closeDocumentInfo(KileDocument::Info *docinfo) { m_docinfo = 0L; - if ( m_map.tqcontains(docinfo) ) + if ( m_map.contains(docinfo) ) { StructureList *data = m_map[docinfo]; m_map.remove(docinfo); diff --git a/src/kile/kiletool.cpp b/src/kile/kiletool.cpp index e7eb843..c3d6551 100644 --- a/src/kile/kiletool.cpp +++ b/src/kile/kiletool.cpp @@ -100,7 +100,7 @@ namespace KileTool for( it.toFirst() ; it.current(); ++it ) { // KILE_DEBUG() << "translate " << str << " /// key=" << it.currentKey() << " value=" << *(it.current()) << endl; - str.tqreplace(it.currentKey(), *( it.current() ) ); + str.replace(it.currentKey(), *( it.current() ) ); } } @@ -257,7 +257,7 @@ namespace KileTool { TQString src = source; if ( (m_from.length() > 0) && (info.extension(false).length() > 0) ) - src.tqreplace(TQRegExp(info.extension(false) + '$'), m_from); + src.replace(TQRegExp(info.extension(false) + '$'), m_from); info.setFile(src); } @@ -482,8 +482,8 @@ namespace KileTool bool Base::addDict(const TQString & key, const TQString & value) { - bool e = (paramDict()->tqfind(key) == 0); - paramDict()->tqreplace(key, &value); + bool e = (paramDict()->find(key) == 0); + paramDict()->replace(key, &value); return e; } diff --git a/src/kile/kiletoolconfigwidget.cpp b/src/kile/kiletoolconfigwidget.cpp index 7594716..5e0a94f 100644 --- a/src/kile/kiletoolconfigwidget.cpp +++ b/src/kile/kiletoolconfigwidget.cpp @@ -139,7 +139,7 @@ namespace KileWidget if ( state.isEmpty() ) state = "Editor"; m_configWidget->m_cbState->setCurrentText(state); - int index = m_classes.tqfindIndex(m_map["class"]); + int index = m_classes.findIndex(m_map["class"]); if ( index == -1 ) index = m_classes.count()-1; m_configWidget->m_cbClass->setCurrentItem(index); m_configWidget->m_ckClose->setChecked(m_map["close"] == "yes"); @@ -287,7 +287,7 @@ namespace KileWidget int ToolConfig::indexQuickBuild() { - int index = m_configWidget->m_lstbTools->index( m_configWidget->m_lstbTools->tqfindItem("QuickBuild",TQt::ExactMatch) ); + int index = m_configWidget->m_lstbTools->index( m_configWidget->m_lstbTools->findItem("QuickBuild",TQt::ExactMatch) ); return ( index >= 0 ) ? index : 0; } diff --git a/src/kile/latexcmd.cpp b/src/kile/latexcmd.cpp index 928234f..aa01076 100644 --- a/src/kile/latexcmd.cpp +++ b/src/kile/latexcmd.cpp @@ -167,7 +167,7 @@ void LatexCommands::insert(const TQStringList &list) TQStringList::ConstIterator it; for ( it=list.begin(); it!=list.end(); ++it ) { - int pos = (*it).tqfind(','); + int pos = (*it).find(','); if ( pos >= 0 ) { TQString key = (*it).left(pos); @@ -192,8 +192,8 @@ void LatexCommands::insert(const TQStringList &list) TQString LatexCommands::getValue(const TQString &name) { - TQString key = ( name.tqfind('*',-1) >= 0 ) ? name.left(name.length()-1) : name; - return ( m_latexCommands.tqcontains(key) ) ? m_latexCommands[key] : TQString(); + TQString key = ( name.find('*',-1) >= 0 ) ? name.left(name.length()-1) : name; + return ( m_latexCommands.contains(key) ) ? m_latexCommands[key] : TQString(); } //////////////////// internal functions //////////////////// @@ -218,7 +218,7 @@ bool LatexCommands::isUserDefined(const TQString &name) bool LatexCommands::isType(const TQString &name, TQChar ch) { - if ( name.tqfind('*',-1) >= 0 ) + if ( name.find('*',-1) >= 0 ) { TQString envname = name.left( name.length()-1 ); return ( getValue(envname).at(2)==ch && isStarredEnv(envname) ); @@ -319,7 +319,7 @@ bool LatexCommands::needsMathMode(const TQString &name) TQString LatexCommands::getTabulator(const TQString &name) { TQString tab = getAttrAt(name,5); - return ( tab.tqfind('&') >= 0 ) ? tab : TQString(); + return ( tab.find('&') >= 0 ) ? tab : TQString(); } //////////////////// environments and commands //////////////////// diff --git a/src/kile/latexcmddialog.cpp b/src/kile/latexcmddialog.cpp index fe37e76..45fceba 100644 --- a/src/kile/latexcmddialog.cpp +++ b/src/kile/latexcmddialog.cpp @@ -285,7 +285,7 @@ void NewLatexCommand::slotOk() if ( m_envmode==false && name.at(0)!='\\' ) name.prepend('\\'); - if ( m_addmode && m_dict->tqcontains(name) ) { + if ( m_addmode && m_dict->contains(name) ) { TQString msg = ( m_envmode ) ? i18n("This environment already exists.") : i18n("This command already exists."); KMessageBox::error( this,msg ); @@ -558,7 +558,7 @@ void LatexCommandsDialog::getEntry(KListViewItem *item,KileDocument::LatexCmdAtt bool LatexCommandsDialog::isUserDefined(const TQString &name) { - return ( m_dictCommands.tqcontains(name) && m_dictCommands[name]==false ); + return ( m_dictCommands.contains(name) && m_dictCommands[name]==false ); } // look for user defined environment or commands in this listview diff --git a/src/kile/main.cpp b/src/kile/main.cpp index 4b73474..70621da 100644 --- a/src/kile/main.cpp +++ b/src/kile/main.cpp @@ -63,7 +63,7 @@ TQString completePath(const TQString &path) url.setFileName(completePath(url.path())); fullpath = url.url(); } - else if ( path.tqfind(TQRegExp("^[a-z]+:")) == -1 ) + else if ( path.find(TQRegExp("^[a-z]+:")) == -1 ) fullpath = TQDir::currentDirPath() + '/' + path; } @@ -104,7 +104,7 @@ int main( int argc, char ** argv ) for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).tqcontains ("kile") > 0) + if ((*it).contains ("kile") > 0) { appID = (*it); running = true; diff --git a/src/kile/managetemplatesdialog.cpp b/src/kile/managetemplatesdialog.cpp index d73a435..61b8c5f 100644 --- a/src/kile/managetemplatesdialog.cpp +++ b/src/kile/managetemplatesdialog.cpp @@ -64,7 +64,7 @@ ManageTemplatesDialog::ManageTemplatesDialog(KileTemplate::Manager *templateMana TQString fileName = m_sourceURL.fileName(); //remove the extension - int dotPos = fileName.tqfindRev('.'); + int dotPos = fileName.findRev('.'); if(dotPos >= 0) { fileName = fileName.mid(0, dotPos); } @@ -235,7 +235,7 @@ void ManageTemplatesDialog::addTemplate() { reject(); return; } - returnValue = m_templateManager->tqreplace(templateInfo, m_sourceURL, templateName, iconURL); + returnValue = m_templateManager->replace(templateInfo, m_sourceURL, templateName, iconURL); } else { returnValue = m_templateManager->add(m_sourceURL, templateName, iconURL); diff --git a/src/kile/mathenvdialog.cpp b/src/kile/mathenvdialog.cpp index a6df529..85523f3 100644 --- a/src/kile/mathenvdialog.cpp +++ b/src/kile/mathenvdialog.cpp @@ -151,7 +151,7 @@ bool MathEnvironmentDialog::isGroupsParameterEnv() bool MathEnvironmentDialog::isParameterEnv() { - return ( m_parameter.tqfind("{") >= 0 ); + return ( m_parameter.find("{") >= 0 ); } ////////////////////////////// determine the whole tag ////////////////////////////// @@ -267,8 +267,8 @@ void MathEnvironmentDialog::slotOk() // normal tabulator TQString tab = m_coTabulator->currentText(); - tab.tqreplace("<=","\\le"); - tab.tqreplace(">=","\\ge"); + tab.replace("<=","\\le"); + tab.replace(">=","\\ge"); TQString tabulator = bullet + ' ' + tab + ' '; // number of rows diff --git a/src/kile/newfilewizard.cpp b/src/kile/newfilewizard.cpp index ac62ef8..9aab906 100644 --- a/src/kile/newfilewizard.cpp +++ b/src/kile/newfilewizard.cpp @@ -126,7 +126,7 @@ void NewFileWizard::storeSelectedIcon() void NewFileWizard::restoreSelectedIcon() { TQString selectedIconName = m_config->readEntry(getConfigKey(m_currentlyDisplayedType), DEFAULT_EMPTY_CAPTION); - TQIconViewItem *item = m_newDocumentWidget->templateIconView->tqfindItem(selectedIconName); + TQIconViewItem *item = m_newDocumentWidget->templateIconView->findItem(selectedIconName); if(item) { m_newDocumentWidget->templateIconView->setSelected(item, true); } diff --git a/src/kile/newtoolwizard.ui.h b/src/kile/newtoolwizard.ui.h index 9137bac..aa4ac9c 100644 --- a/src/kile/newtoolwizard.ui.h +++ b/src/kile/newtoolwizard.ui.h @@ -54,17 +54,17 @@ void NewToolWizard::nameChanged(const TQString &name) static TQRegExp reBracket = TQRegExp("\\(|\\)|\\[|\\]"); bool ok = true; - if (m_toolList.tqcontains(name)) + if (m_toolList.contains(name)) { m_lbWarning->setText(i18n( "Error: A tool by this name already exists." )); ok = false; } - else if (name.tqfind("/") != -1) + else if (name.find("/") != -1) { m_lbWarning->setText(i18n( "Error: The name may not contain a slash '/'." )); ok = false; } - else if ( name.tqfind(reBracket) != -1 ) + else if ( name.find(reBracket) != -1 ) { m_lbWarning->setText(i18n("Error: The name may not contain a (,),[ or ].")); ok = false; diff --git a/src/kile/plaintolatexconverter.cpp b/src/kile/plaintolatexconverter.cpp index 489438b..e5d6c9c 100644 --- a/src/kile/plaintolatexconverter.cpp +++ b/src/kile/plaintolatexconverter.cpp @@ -49,10 +49,10 @@ TQString PlainToLaTeXConverter::ConvertToLaTeX(const TQString& toConv) const TQMapConstIterator mapEnd = m_replaceMap.end(); for(uint i = 0 ; i < sSize ; ++i) { - TQMapConstIterator it = m_replaceMap.tqfind(result.at(i)); + TQMapConstIterator it = m_replaceMap.find(result.at(i)); if(it != mapEnd) { // The character must be replaced - result.tqreplace(i, 1, *it); + result.replace(i, 1, *it); uint len = (*it).length(); if(1 < len) { i += len - 1; diff --git a/src/kile/postscriptdialog.cpp b/src/kile/postscriptdialog.cpp index e9d3608..95c26bf 100644 --- a/src/kile/postscriptdialog.cpp +++ b/src/kile/postscriptdialog.cpp @@ -60,7 +60,7 @@ PostscriptDialog::PostscriptDialog(TQWidget *tqparent, TQStringList extlist = TQStringList::split( " ", latexextensions ); for ( TQStringList::Iterator it=extlist.begin(); it!=extlist.end(); ++it ) { - if ( texfilename.tqfind( (*it), -(*it).length() ) >= 0 ) + if ( texfilename.find( (*it), -(*it).length() ) >= 0 ) { psfilename = texfilename.left(texfilename.length()-(*it).length()) + ".ps"; if ( ! TQFileInfo(psfilename).exists() ) diff --git a/src/kile/quickdocumentdialog.cpp b/src/kile/quickdocumentdialog.cpp index 4a862fa..f893439 100644 --- a/src/kile/quickdocumentdialog.cpp +++ b/src/kile/quickdocumentdialog.cpp @@ -786,19 +786,19 @@ void QuickDocument::initStandardOptions(const TQString &classname,TQStringList & // check for a standard class bool QuickDocument::isStandardClass(const TQString &classname) { - return m_dictStandardClasses.tqcontains(classname); + return m_dictStandardClasses.contains(classname); } // check for a default option bool QuickDocument::isDefaultClassOption(const TQString &option) { - return m_currentDefaultOptions.tqcontains(option); + return m_currentDefaultOptions.contains(option); } // check for an user option bool QuickDocument::isSelectedClassOption(const TQString &option) { - return m_currentSelectedOptions.tqcontains(option); + return m_currentSelectedOptions.contains(option); } // insert all default options of the current class into the defaultOptions-dictionary @@ -970,7 +970,7 @@ bool QuickDocument::addComboboxEntries(KComboBox *combo, const TQString &title,c for ( uint i=0; ireadEntry(*it)) ) { @@ -1200,7 +1200,7 @@ bool QuickDocument::readPackagesListview() KILE_DEBUG() << "\twrong config entry for package " << cli->text(0) << endl; } } else { // child entry - cli = dynamic_cast(m_lvPackages->tqfindItem((*it).left(pos), 0)); + cli = dynamic_cast(m_lvPackages->findItem((*it).left(pos), 0)); if ( cli ) { TQCheckListItem *clichild; if ( reg.exactMatch(m_config->readEntry(*it)) ) { @@ -1276,9 +1276,9 @@ void QuickDocument::writePackagesConfig() optionentry = "0,"; // look, if this child is editable - if ( clichild && m_dictPackagesEditable.tqcontains(option) ) { + if ( clichild && m_dictPackagesEditable.contains(option) ) { optionentry += "1,"; - if ( m_dictPackagesDefaultvalues.tqcontains(option) ) + if ( m_dictPackagesDefaultvalues.contains(option) ) optionentry += m_dictPackagesDefaultvalues[option] + ','; else optionentry += ','; @@ -1341,7 +1341,7 @@ TQCheckListItem *QuickDocument::insertEditableListview(TQCheckListItem *tqparent void QuickDocument::setPackagesValue(TQListViewItem *item,const TQString &option,const TQString &val) { - TQString defaultvalue = ( m_dictPackagesDefaultvalues.tqcontains(option) ) + TQString defaultvalue = ( m_dictPackagesDefaultvalues.contains(option) ) ? m_dictPackagesDefaultvalues[option] : TQString(); TQString value = ( ! val.isEmpty() ) ? val : TQString(); @@ -1388,7 +1388,7 @@ bool QuickDocument::isListviewChild(TQListView *listview,const TQString &entry, TQString QuickDocument::addPackageDefault(const TQString &option,const TQString &description) { - return ( m_dictPackagesDefaultvalues.tqcontains(option) ) + return ( m_dictPackagesDefaultvalues.contains(option) ) ? description + " [" + m_dictPackagesDefaultvalues[option] + ']' : description + " [ ]"; } @@ -1404,7 +1404,7 @@ TQString QuickDocument::stripPackageDefault(const TQString &option,const TQStrin return description; return ( reg.cap(2).isEmpty() || - ( m_dictPackagesDefaultvalues.tqcontains(option) && m_dictPackagesDefaultvalues[option]==reg.cap(2) ) + ( m_dictPackagesDefaultvalues.contains(option) && m_dictPackagesDefaultvalues[option]==reg.cap(2) ) ) ? reg.cap(1) : description; } @@ -1427,7 +1427,7 @@ void QuickDocument::initHyperref() bool QuickDocument::isHyperrefDriver(const TQString &name) { - return m_dictHyperrefDriver.tqcontains(name); + return m_dictHyperrefDriver.contains(name); } ////////////////////////////// check for existing exntries ////////////////////////////// @@ -1494,7 +1494,7 @@ void QuickDocument::printTemplate() TQString enc = m_cbEncoding->currentText(); if (!enc.isEmpty()) { - if( enc.tqfind("utf") != -1 ) + if( enc.find("utf") != -1 ) m_td.tagBegin += "\\usepackage{ucs}\n"; m_td.tagBegin += "\\usepackage[" + enc + "]{inputenc}\n"; } @@ -1557,7 +1557,7 @@ void QuickDocument::printPackages() TQCheckListItem *clichild = dynamic_cast(curchild); if (clichild && clichild->isOn()) { TQString optiontext; - if ( m_dictPackagesEditable.tqcontains(cur->text(0) + '!' + curchild->text(0)) ) { + if ( m_dictPackagesEditable.contains(cur->text(0) + '!' + curchild->text(0)) ) { TQString value = curchild->text(1); if ( value != i18n("") ) optiontext = curchild->text(0) + '=' + getPackagesValue(curchild->text(1)); @@ -1709,7 +1709,7 @@ void QuickDocument::slotDocumentClassDelete() m_dictDocumentClasses.remove(documentclass); // mark this document class for deleting from config file (only with OK-Button) - if ( m_deleteDocumentClasses.tqfindIndex(documentclass) == -1 ) + if ( m_deleteDocumentClasses.findIndex(documentclass) == -1 ) m_deleteDocumentClasses.append(documentclass); // remove it from the list of userclasses @@ -1980,7 +1980,7 @@ void QuickDocument::slotPackageEdit() caption = i18n("Edit Option"); labelText = i18n("Op&tion:") + " (" + i18n("package:") + ' ' + cur->tqparent()->text(0) + ')'; optionname = cur->tqparent()->text(0) + '!' + cur->text(0); - editableOption = m_dictPackagesEditable.tqcontains(optionname); + editableOption = m_dictPackagesEditable.contains(optionname); } else { // checkmode = qd_CheckPackage; caption = i18n("Edit Package"); @@ -1993,7 +1993,7 @@ void QuickDocument::slotPackageEdit() TQStringList list; list << caption; if ( editableOption ) { - TQString defaultvalue = ( m_dictPackagesDefaultvalues.tqcontains(optionname) ) + TQString defaultvalue = ( m_dictPackagesDefaultvalues.contains(optionname) ) ? m_dictPackagesDefaultvalues[optionname] : TQString(); TQString value = ( cur->text(1) == i18n("") ) @@ -2064,9 +2064,9 @@ void QuickDocument::slotPackageDelete() delete cur; // also delete entries for editable package option - if ( packageoption && m_dictPackagesEditable.tqcontains(optionname) ) { + if ( packageoption && m_dictPackagesEditable.contains(optionname) ) { m_dictPackagesEditable.remove(optionname); - if ( m_dictPackagesDefaultvalues.tqcontains(optionname) ) + if ( m_dictPackagesDefaultvalues.contains(optionname) ) m_dictPackagesDefaultvalues.remove(optionname); } } @@ -2098,7 +2098,7 @@ void QuickDocument::slotPackageDoubleClicked(TQListViewItem *listViewItem,const if ( listViewItem && listViewItem->tqparent() ) { TQCheckListItem *parentitem = dynamic_cast(listViewItem->tqparent()); TQString option = parentitem->text(0) + '!' + listViewItem->text(0); - if ( m_dictPackagesEditable.tqcontains(option) ) + if ( m_dictPackagesEditable.contains(option) ) slotPackageEdit(); } } diff --git a/src/kile/quickpreview.cpp b/src/kile/quickpreview.cpp index ae1328d..8152ee0 100644 --- a/src/kile/quickpreview.cpp +++ b/src/kile/quickpreview.cpp @@ -177,7 +177,7 @@ bool QuickPreview::run(const TQString &text,const TQString &textfilename,int sta map[m_taskList[6]] = "PreviewPDFLaTeX,,,ViewPDF,KPDF,pdf"; TQString previewtask = KileConfig::previewTask(); - if ( ! map.tqcontains(previewtask) ) + if ( ! map.contains(previewtask) ) { showError(TQString(i18n("Could not run QuickPreview:\nunknown task '%1'").tqarg(previewtask))); return false; @@ -364,7 +364,7 @@ int QuickPreview::createTempfile(const TQString &text) while ( ! preamble.eof() ) { textline = preamble.readLine(); - if ( textline.tqfind("\\begin{document}") >= 0 ) + if ( textline.find("\\begin{document}") >= 0 ) { begindocumentFound = true; break; diff --git a/src/kile/symbols/gesymb.cpp b/src/kile/symbols/gesymb.cpp index 4254145..0b10d58 100644 --- a/src/kile/symbols/gesymb.cpp +++ b/src/kile/symbols/gesymb.cpp @@ -77,7 +77,7 @@ cmdpkgs.setMinimal(true); while( (line = t.readLine()) != 0L) { - if( line.tqfind(comment) != -1 ) + if( line.find(comment) != -1 ) continue; if(env) { @@ -90,7 +90,7 @@ while( (line = t.readLine()) != 0L) pkgsarg=""; } - if ( line.tqfind(beginenvpkgs) != -1) + if ( line.find(beginenvpkgs) != -1) { env=true; pkgs=beginenvpkgs.cap(2); @@ -98,12 +98,12 @@ while( (line = t.readLine()) != 0L) savepkgs=pkgs; savepkgsarg=pkgsarg; } - else if( line.tqfind(cmdpkgs) != -1) + else if( line.find(cmdpkgs) != -1) { pkgs=cmdpkgs.cap(2); pkgsarg=cmdpkgs.cap(1); } - else if( line.tqfind(endenvpkgs) != -1) + else if( line.find(endenvpkgs) != -1) { env=false; savepkgs=""; @@ -115,9 +115,9 @@ while( (line = t.readLine()) != 0L) cout << "line is " << line.latin1(); cout << "; pkgs=" << pkgs.latin1() << " ,pkgsarg=" << pkgsarg.latin1() << " ,savepkgs=" << savepkgs.latin1() << " ,savepkgsarg=" << savepkgsarg.latin1() << "\n"; - if ( line.tqfind(optarg) != -1) + if ( line.find(optarg) != -1) writeComment(optarg.cap(1),pkgs,pkgsarg,type,number++); - else if(line.tqfind(arg) != -1) + else if(line.find(arg) != -1) writeComment(arg.cap(1),pkgs,pkgsarg,type,number++); } diff --git a/src/kile/symbolview.cpp b/src/kile/symbolview.cpp index 60f4a03..8fdac37 100644 --- a/src/kile/symbolview.cpp +++ b/src/kile/symbolview.cpp @@ -96,7 +96,7 @@ void SymbolView::extract(const TQString& key, int& refCnt, TQString &cmd, TQStri cmd = key.section('%',1,1); TQString text = key.section('%',2,2); - if( text.tqfind(rePkgs) != -1 ) + if( text.find(rePkgs) != -1 ) { args = TQStringList::split(",",rePkgs.cap(1)); pkgs = TQStringList::split(",",rePkgs.cap(2)); @@ -230,7 +230,7 @@ void SymbolView::contentsMousePressEvent(TQMouseEvent *e) int count; bool math=false, bracket=false; - if( (e->button() & Qt::LeftButton) == Qt::LeftButton && ( item = tqfindItem( e->pos() ) ) ) + if( (e->button() & Qt::LeftButton) == Qt::LeftButton && ( item = findItem( e->pos() ) ) ) { bracket = (e->state() & TQt::ControlButton) == TQt::ControlButton; math = (e->state() & TQt::ShiftButton) == TQt::ShiftButton; @@ -372,7 +372,7 @@ void SymbolView::slotAddToList(const TQIconViewItem *item) extract(tmpItem->key(),refCnt); TQString key = tmpItem->key(); - key.tqreplace(reCnt,TQString::number(refCnt+1)); + key.replace(reCnt,TQString::number(refCnt+1)); tmpItem->setKey(key); } else diff --git a/src/kile/tabulardialog.cpp b/src/kile/tabulardialog.cpp index b75d0c3..bc3acda 100644 --- a/src/kile/tabulardialog.cpp +++ b/src/kile/tabulardialog.cpp @@ -205,13 +205,13 @@ void TabCellFrame::mousePressEvent(TQMouseEvent *event) //KILE_DEBUG() << "left mouse button: x=" << x << " y=" << endl; int state = 0; - if ( m_left.tqcontains(x,y) ) + if ( m_left.contains(x,y) ) state = TabularCell::cbLeft; - else if ( m_top.tqcontains(x,y) ) + else if ( m_top.contains(x,y) ) state = TabularCell::cbTop; - else if ( m_right.tqcontains(x,y) ) + else if ( m_right.contains(x,y) ) state = TabularCell::cbRight; - else if ( m_bottom.tqcontains(x,y) ) + else if ( m_bottom.contains(x,y) ) state = TabularCell::cbBottom; if ( state > 0 ) @@ -513,7 +513,7 @@ TQString TabCellDialog::header() if ( m_cbPre->isChecked() ) s += ">{} "; - s += m_coHeader->currentText().tqreplace("{w}","{}"); + s += m_coHeader->currentText().replace("{w}","{}"); if ( m_cbPost->isChecked() ) s += " <{}"; @@ -554,27 +554,27 @@ void TabCellDialog::initWidgets() { TQString s = m_headerlabel.remove(' '); - bool state = ( s.tqfind("@{}") >= 0 ); + bool state = ( s.find("@{}") >= 0 ); if ( state ) s = s.remove("@{}"); m_cbAt->setChecked(state); - state = ( s.tqfind("!{}") >= 0 ); + state = ( s.find("!{}") >= 0 ); if ( state ) s = s.remove("!{}"); m_cbSep->setChecked(state); - state = ( s.tqfind(">{}") >= 0 ); + state = ( s.find(">{}") >= 0 ); if ( state ) s = s.remove(">{}"); m_cbPre->setChecked(state); - state = ( s.tqfind("<{}") >= 0 ); + state = ( s.find("<{}") >= 0 ); if ( state ) s = s.remove("<{}"); m_cbPost->setChecked(state); - int pos = m_preamblelist.tqfindIndex(s); + int pos = m_preamblelist.findIndex(s); if ( pos < 0 ) pos = 0; m_coHeader->setCurrentItem(pos); @@ -912,9 +912,9 @@ bool TabularTable::updateCell(int row,int col) } // when editing is finished, we check, if the TQTableItem is still needed -void TabularTable::endEdit(int row,int col,bool accept,bool tqreplace) +void TabularTable::endEdit(int row,int col,bool accept,bool replace) { - TQTable::endEdit(row,col,accept,tqreplace); + TQTable::endEdit(row,col,accept,replace); //updateCell(row,col); } @@ -1126,11 +1126,11 @@ void TabularTable::insertPopupAlign(TQPopupMenu *popup,bool header) if ( header && m_x1==m_x2 ) { TQString label = horizontalHeader()->label(m_x1); - if ( label.tqfind('l') < 0 ) + if ( label.find('l') < 0 ) align += 1; - if ( label.tqfind('c') < 0 ) + if ( label.find('c') < 0 ) align += 2; - if ( label.tqfind('r') < 0 ) + if ( label.find('r') < 0 ) align += 4; } else { @@ -1475,9 +1475,9 @@ void TabularTable::updateHeaderAlignment(int col1,int col2,TQChar alignchar) TQString label = horizontalHeader()->label(col); for ( uint i=0; i= 0 ) + if ( label.find(list[i]) >= 0 ) { - horizontalHeader()->setLabel( col,label.tqreplace(list[i],alignchar) ); + horizontalHeader()->setLabel( col,label.replace(list[i],alignchar) ); break; } } @@ -1745,11 +1745,11 @@ TabularCell::Count TabularTable::countCells(int x1,int y1,int x2,int y2) TQString whitename = TQt::white.name(); colors[whitename] = 0; - itw = colors.tqfind(whitename); + itw = colors.find(whitename); TQString blackname = TQt::black.name(); textcolors[blackname] = 0; - itb = textcolors.tqfind(blackname); + itb = textcolors.find(blackname); // initialize result TabularCell::Count count = { 0,0,0,0,0, whitename,blackname }; @@ -1776,7 +1776,7 @@ TabularCell::Count TabularTable::countCells(int x1,int y1,int x2,int y2) // check backgroundcolor TQString name = cellitem->m_data.bgcolor.name(); - it = colors.tqfind(name); + it = colors.find(name); if ( it != colors.end() ) (*it)++; else @@ -1784,7 +1784,7 @@ TabularCell::Count TabularTable::countCells(int x1,int y1,int x2,int y2) // check textcolor name = cellitem->m_data.textcolor.name(); - it = textcolors.tqfind(name); + it = textcolors.find(name); if ( it != textcolors.end() ) (*it)++; else @@ -1977,7 +1977,7 @@ void TabularDialog::slotEnvironmentChanged(const TQString &env) m_cbStarred->setEnabled( attr.starred ); // option - if ( attr.option.tqfind('[') == 0 ) + if ( attr.option.find('[') == 0 ) { TQStringList optionlist = TQStringList::split("",attr.option); if ( optionlist.count() > 2 ) @@ -2092,7 +2092,7 @@ char TabularDialog::defineColor(const TQString &name, TQMap &colo // look for current color TQMapIterator it; - it = colors.tqfind(name); + it = colors.find(name); if ( it != colors.end() ) return (*it); @@ -2216,11 +2216,11 @@ void TabularDialog::slotOk() { // get current header s = hor->label(col).remove(' '); - if ( s.tqfind('>') || s.tqfind('<') || s.tqfind('!') || s.tqfind('m') || s.tqfind('b')) + if ( s.find('>') || s.find('<') || s.find('!') || s.find('m') || s.find('b')) pkgArray = true; // look for @{} and !{} substrings - bool separator = ( s.tqfind('@')>=0 || s.tqfind('!')>=0 ); + bool separator = ( s.find('@')>=0 || s.find('!')>=0 ); if ( !separator ) { lines = m_table->countVLines(col,true); @@ -2247,21 +2247,21 @@ void TabularDialog::slotOk() } if ( ! colorcommand.isEmpty() ) { - if ( s.tqfind('>') >= 0 ) - s = s.tqreplace(">{}",TQString(">{%1}").tqarg(colorcommand)); + if ( s.find('>') >= 0 ) + s = s.replace(">{}",TQString(">{%1}").tqarg(colorcommand)); else preamble += TQString(">{%1}").tqarg(colorcommand); pkgArray = true; } // Alignment: default is left, we look only for center or right - if ( s.tqfind('c') >= 0 ) + if ( s.find('c') >= 0 ) colinfo[col].align = TQt::AlignHCenter; - else if ( s.tqfind('r') >= 0 ) + else if ( s.find('r') >= 0 ) colinfo[col].align = TQt::AlignRight; // pre >{} and post <{} commands can stay, but perhaps bullets are wanted - preamble += ( m_cbBullets->isChecked() ) ? s.tqreplace("{}", '{' + s_bullet + '}') : s; + preamble += ( m_cbBullets->isChecked() ) ? s.replace("{}", '{' + s_bullet + '}') : s; } // search for right vline in last column lines = m_table->countVLines( numcols-1,false ); @@ -2435,7 +2435,7 @@ void TabularDialog::slotOk() if ( envname=="tabularx" || envname=="longtable" || envname=="supertabular" ) packagelist += ',' + envname; if ( ! packagelist.isEmpty() ) { - packagelist = packagelist.tqreplace(0,1,"% use packages: ") + '\n'; + packagelist = packagelist.replace(0,1,"% use packages: ") + '\n'; } // get environment names @@ -2493,18 +2493,18 @@ void TabularDialog::slotOk() // set cursor to first bullet position if ( m_cbBullets->isChecked() ) { - int pos = m_td.tagBegin.tqfind(bullet); + int pos = m_td.tagBegin.find(bullet); if ( pos >= 0 ) { - m_td.tagBegin = m_td.tagBegin.tqreplace(pos,1,"%C"); + m_td.tagBegin = m_td.tagBegin.replace(pos,1,"%C"); setcursor = false; } else { - pos = m_td.tagEnd.tqfind(bullet); + pos = m_td.tagEnd.find(bullet); if ( pos >= 0 ) { - m_td.tagEnd = m_td.tagEnd.tqreplace(pos,1,"%C"); + m_td.tagEnd = m_td.tagEnd.replace(pos,1,"%C"); setcursor = false; } else diff --git a/src/kile/tabulardialog.h b/src/kile/tabulardialog.h index 4b7b939..d11ca0e 100644 --- a/src/kile/tabulardialog.h +++ b/src/kile/tabulardialog.h @@ -188,7 +188,7 @@ public: TabularCell::CountLines countVLines(int col, bool left); protected: - void endEdit(int row,int col,bool accept,bool tqreplace); + void endEdit(int row,int col,bool accept,bool replace); void activateNextCell(); private: diff --git a/src/kile/templates.cpp b/src/kile/templates.cpp index c82af0b..0de6035 100644 --- a/src/kile/templates.cpp +++ b/src/kile/templates.cpp @@ -117,7 +117,7 @@ bool Manager::remove(Info ti) { return removeAppData(ti.path) && removeAppData(ti.icon); } -bool Manager::tqreplace(const KileTemplate::Info& toBeReplaced, const KURL& newTemplateSourceURL, const TQString& newName, const KURL& newIcon) { +bool Manager::replace(const KileTemplate::Info& toBeReplaced, const KURL& newTemplateSourceURL, const TQString& newName, const KURL& newIcon) { KileDocument::Type type = m_kileInfo->extensions()->determineDocumentType(newTemplateSourceURL); //start by copying the files that belong to the new template to a safe place @@ -168,7 +168,7 @@ void Manager::scanForTemplates() { ti.name = fileInfo.baseName(true).mid(9); //remove "template_", do it this way to avoid problems with user input! ti.type = extensions->determineDocumentType(KURL::fromPathOrURL(ti.path)); ti.icon = KGlobal::dirs()->findResource("appdata","pics/type_" + ti.name + extensions->defaultExtensionForDocumentType(ti.type) + ".kileicon"); - if (m_TemplateList.tqcontains(ti)) + if (m_TemplateList.contains(ti)) { KILE_DEBUG() << "\tignoring: " << ti.path << endl; } @@ -356,7 +356,7 @@ void TemplateIconView::addTemplateIcons(KileDocument::Type type) { KileTemplate::Info info = *i; TQString classname = info.name; - if ( !map.tqcontains(classname) || map[classname]==true ) + if ( !map.contains(classname) || map[classname]==true ) { new TemplateItem(this, info); } diff --git a/src/kile/templates.h b/src/kile/templates.h index 1daa18f..76a7121 100644 --- a/src/kile/templates.h +++ b/src/kile/templates.h @@ -91,7 +91,7 @@ class Manager : public TQObject { bool remove(KileTemplate::Info ti); //replaces a template - bool tqreplace(const KileTemplate::Info& toBeReplaced, const KURL& newTemplateSourceURL, const TQString& newName, const KURL& newIcon); + bool replace(const KileTemplate::Info& toBeReplaced, const KURL& newTemplateSourceURL, const TQString& newName, const KURL& newIcon); protected: KileInfo* m_kileInfo; diff --git a/src/kile/texdocdialog.cpp b/src/kile/texdocdialog.cpp index c685aca..4ce4a12 100644 --- a/src/kile/texdocdialog.cpp +++ b/src/kile/texdocdialog.cpp @@ -227,7 +227,7 @@ void TexDocDialog::showToc(const TQString &caption,const TQStringList &doclist, // search for special keywords TQRegExp reg( "^\\s*(-\\d-)" ); - if ( keylist[3].tqfind(reg,0) == 0 ) + if ( keylist[3].find(reg,0) == 0 ) { m_dictStyleCodes[keylist[0]] = reg.cap(1); } @@ -370,7 +370,7 @@ void TexDocDialog::showStyleFile(const TQString &filename,const TQString &stylec while ( ! sty.eof() ) { textline = sty.readLine(); - if ( textline.tqfind("%%%%") == 0 ) + if ( textline.find("%%%%") == 0 ) break; stream << textline << "\n"; } @@ -381,7 +381,7 @@ void TexDocDialog::showStyleFile(const TQString &filename,const TQString &stylec while ( ! sty.eof() ) { textline = sty.readLine().stripWhiteSpace(); - if ( textline.tqfind("\\endinput") == 0 ) + if ( textline.find("\\endinput") == 0 ) break; } while ( ! sty.eof() ) @@ -437,7 +437,7 @@ void TexDocDialog::slotListViewDoubleClicked(TQListViewItem *item,const TQPoint TQString package = item->text(1); KILE_DEBUG() << "\tselect child: " << item->text(0) << endl << "\tis package: " << package << endl; - if ( ! m_dictDocuments.tqcontains( package ) ) + if ( ! m_dictDocuments.contains( package ) ) return; TQString texdocfile = m_dictDocuments[package]; @@ -451,7 +451,7 @@ void TexDocDialog::slotListViewDoubleClicked(TQListViewItem *item,const TQPoint filename = searchFile(texdocfile,m_texmfPath,"tex"); if ( filename.isEmpty() ) { - KMessageBox::error(this,i18n("Could not tqfind '%1'").tqarg(filename)); + KMessageBox::error(this,i18n("Could not find '%1'").tqarg(filename)); return; } } @@ -463,7 +463,7 @@ void TexDocDialog::slotListViewDoubleClicked(TQListViewItem *item,const TQPoint decompressFile(m_dictDocuments[package],"gzip -cd "+filename); else if ( ext == "bz2" ) decompressFile(m_dictDocuments[package],"bzip2 -cd "+filename); - else if ( ext=="sty" && m_dictStyleCodes.tqcontains(package) ) + else if ( ext=="sty" && m_dictStyleCodes.contains(package) ) showStyleFile(filename,m_dictStyleCodes[package]); else showFile(filename); @@ -494,7 +494,7 @@ void TexDocDialog::slotSearchClicked() section = m_tocList[i]; writesection = true; } - else if ( m_tocSearchList[i].tqfind(keyword,0,false) > -1 ) + else if ( m_tocSearchList[i].find(keyword,0,false) > -1 ) { if ( writesection ) searchlist.append(section); @@ -590,7 +590,7 @@ void TexDocDialog::slotInitToc() KILE_DEBUG() << "\ttexmfdoc path: " << m_texmfdocPath << endl; KILE_DEBUG() << "\ttexmf path: " << m_texmfPath << endl; - if ( m_texdoctkPath.tqfind('\n',-1) > -1 ) + if ( m_texdoctkPath.find('\n',-1) > -1 ) { m_texdoctkPath.truncate(m_texdoctkPath.length()-1); } diff --git a/src/kile/userhelp.cpp b/src/kile/userhelp.cpp index 23b8a4b..69376b2 100644 --- a/src/kile/userhelp.cpp +++ b/src/kile/userhelp.cpp @@ -157,7 +157,7 @@ void UserHelp::setupUserHelpMenu() else { // check for a http file - bool http = ( m_helpfiles[i].tqfind("http://",0) == 0 ); + bool http = ( m_helpfiles[i].find("http://",0) == 0 ); // some file types have an icon TQFileInfo fi(m_helpfiles[i]); @@ -211,7 +211,7 @@ TQPopupMenu *UserHelp::getHelpPopup() break; } } - return ( helpid == 0 ) ? 0 : m_menubar->tqfindItem(helpid)->popup(); + return ( helpid == 0 ) ? 0 : m_menubar->findItem(helpid)->popup(); } int UserHelp::getHelpIndex(TQPopupMenu *popup) @@ -246,7 +246,7 @@ void UserHelp::slotUserHelpActivated(int index) // does the files exist? TQFileInfo fi(filename); - bool http = ( filename.tqfind("http://",0) == 0 ); + bool http = ( filename.find("http://",0) == 0 ); if ( !http && !fi.exists() ) { KMessageBox::error(0,TQString(i18n("File '%1' doesn't exist.")).tqarg(filename)); diff --git a/src/kile/userhelpdialog.cpp b/src/kile/userhelpdialog.cpp index be14da5..80c7fa8 100644 --- a/src/kile/userhelpdialog.cpp +++ b/src/kile/userhelpdialog.cpp @@ -437,7 +437,7 @@ void UserHelpAddDialog::slotOk() return; } - if ( m_menulistbox->tqfindItem(m_leMenuEntry->text(),TQt::ExactMatch) ) + if ( m_menulistbox->findItem(m_leMenuEntry->text(),TQt::ExactMatch) ) { KMessageBox::error(this,i18n("This menuitem already exists.")); return; @@ -450,7 +450,7 @@ void UserHelpAddDialog::slotOk() } TQFileInfo fi(filename); - if ( filename.tqfind("http://",0)!=0 && !fi.exists() ) + if ( filename.find("http://",0)!=0 && !fi.exists() ) { KMessageBox::error(this,TQString(i18n("File '%1' doesn't exist.")).tqarg(filename)); return; diff --git a/src/kile/usermenudialog.cpp b/src/kile/usermenudialog.cpp index 6b49fb9..f4e1a1d 100644 --- a/src/kile/usermenudialog.cpp +++ b/src/kile/usermenudialog.cpp @@ -166,7 +166,7 @@ KileAction::TagData UserTags::splitTag(const TQString & name, const TQString & t int dx = parts[0].length(); if ( parts[1].length() == 0 ) { - int i = parts[0].tqfind(TQRegExp("[\\[\\{\\(]")); + int i = parts[0].find(TQRegExp("[\\[\\{\\(]")); if ( i != -1 ) dx = i + 1; }