From 9a3f0aacd44fb866833ebcb852df3cd31475cb33 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konsole/konsole/TEHistory.cpp | 2 +- konsole/konsole/TEWidget.cpp | 8 ++-- konsole/konsole/TEmulation.cpp | 8 ++-- konsole/konsole/keytrans.cpp | 10 ++-- konsole/konsole/konsole.cpp | 82 ++++++++++++++++----------------- konsole/konsole/konsole_part.cpp | 4 +- konsole/konsole/konsolebookmarkmenu.cpp | 2 +- konsole/konsole/main.cpp | 4 +- konsole/konsole/schema.cpp | 4 +- konsole/konsole/session.cpp | 6 +-- 10 files changed, 65 insertions(+), 65 deletions(-) (limited to 'konsole') diff --git a/konsole/konsole/TEHistory.cpp b/konsole/konsole/TEHistory.cpp index 917fb739e..cbe8b199d 100644 --- a/konsole/konsole/TEHistory.cpp +++ b/konsole/konsole/TEHistory.cpp @@ -457,7 +457,7 @@ void HistoryScrollBlockArray::addCells(ca a[], int count) size_t *pLen = new size_t; *pLen = count; - m_lineLengths.tqreplace(m_blockArray.getCurrent(), pLen); + m_lineLengths.replace(m_blockArray.getCurrent(), pLen); } void HistoryScrollBlockArray::addLine(bool) diff --git a/konsole/konsole/TEWidget.cpp b/konsole/konsole/TEWidget.cpp index 3f47f962b..622bf373a 100644 --- a/konsole/konsole/TEWidget.cpp +++ b/konsole/konsole/TEWidget.cpp @@ -1293,7 +1293,7 @@ void TEWidget::mousePressEvent(TQMouseEvent* ev) return; } - if ( !contentsRect().tqcontains(ev->pos()) ) return; + if ( !contentsRect().contains(ev->pos()) ) return; TQPoint tL = contentsRect().topLeft(); int tLx = tL.x(); int tLy = tL.y(); @@ -1395,7 +1395,7 @@ void TEWidget::setSelectionEnd() void TEWidget::extendSelection( TQPoint pos ) { - //if ( !contentsRect().tqcontains(ev->pos()) ) return; + //if ( !contentsRect().contains(ev->pos()) ) return; TQPoint tL = contentsRect().topLeft(); int tLx = tL.x(); int tLy = tL.y(); @@ -1764,7 +1764,7 @@ int TEWidget::charClass(UINT16 ch) const TQChar qch=TQChar(ch); if ( qch.isSpace() ) return ' '; - if ( qch.isLetterOrNumber() || word_characters.tqcontains(qch, false) ) + if ( qch.isLetterOrNumber() || word_characters.contains(qch, false) ) return 'a'; // Everything else is weird @@ -1807,7 +1807,7 @@ void TEWidget::emitSelection(bool useXselection,bool appendReturn) text.append("\r"); if ( ! text.isEmpty() ) { - text.tqreplace("\n", "\r"); + text.replace("\n", "\r"); TQKeyEvent e(TQEvent::KeyPress, 0,-1,0, text); emit keyPressedSignal(&e); // expose as a big fat keypress event emit clearSelectionSignal(); diff --git a/konsole/konsole/TEmulation.cpp b/konsole/konsole/TEmulation.cpp index af779e0b8..7b7e1c5f4 100644 --- a/konsole/konsole/TEmulation.cpp +++ b/konsole/konsole/TEmulation.cpp @@ -418,9 +418,9 @@ bool TEmulation::findTextNext( const TQString &str, bool forward, bool caseSensi for (int i = (m_findPos==-1?0:m_findPos+1); i<(scr->getHistLines()+scr->getLines()); i++) { string = scr->getHistoryLine(i); if (regExp) - pos = string.tqfind( TQRegExp(str,caseSensitive) ); + pos = string.find( TQRegExp(str,caseSensitive) ); else - pos = string.tqfind(str, 0, caseSensitive); + pos = string.find(str, 0, caseSensitive); if(pos!=-1) { m_findPos=i; if(i>scr->getHistLines()) @@ -436,9 +436,9 @@ bool TEmulation::findTextNext( const TQString &str, bool forward, bool caseSensi for(int i = (m_findPos==-1?(scr->getHistLines()+scr->getLines()):m_findPos-1); i>=0; i--) { string = scr->getHistoryLine(i); if (regExp) - pos = string.tqfind( TQRegExp(str,caseSensitive) ); + pos = string.find( TQRegExp(str,caseSensitive) ); else - pos = string.tqfind(str, 0, caseSensitive); + pos = string.find(str, 0, caseSensitive); if(pos!=-1) { m_findPos=i; if(i>scr->getHistLines()) diff --git a/konsole/konsole/keytrans.cpp b/konsole/konsole/keytrans.cpp index bcf5228c7..da197a695 100644 --- a/konsole/konsole/keytrans.cpp +++ b/konsole/konsole/keytrans.cpp @@ -90,10 +90,10 @@ KeyTrans::KeyTrans(const TQString& path) else { m_id = m_path; - int i = m_id.tqfindRev('/'); + int i = m_id.findRev('/'); if (i > -1) m_id = m_id.mid(i+1); - i = m_id.tqfindRev('.'); + i = m_id.findRev('.'); if (i > -1) m_id = m_id.left(i); } @@ -673,8 +673,8 @@ static TQIntDict * numb2keymap = 0L; KeyTrans* KeyTrans::find(int numb) { - KeyTrans* res = numb2keymap->tqfind(numb); - return res ? res : numb2keymap->tqfind(0); + KeyTrans* res = numb2keymap->find(numb); + return res ? res : numb2keymap->find(0); } KeyTrans* KeyTrans::find(const TQString &id) @@ -686,7 +686,7 @@ KeyTrans* KeyTrans::find(const TQString &id) return it.current(); ++it; } - return numb2keymap->tqfind(0); + return numb2keymap->find(0); } int KeyTrans::count() diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp index c071fb2e9..e47236e63 100644 --- a/konsole/konsole/konsole.cpp +++ b/konsole/konsole/konsole.cpp @@ -548,7 +548,7 @@ void Konsole::makeGUI() m_moveSessionRight->plug(m_view); m_view->insertSeparator(); - KRadioAction *ra = session2action.tqfind(se); + KRadioAction *ra = session2action.find(se); if (ra!=0) ra->plug(m_view); //bookmarks menu @@ -790,7 +790,7 @@ void Konsole::makeGUI() KeyTrans* ktr = kt_map[*it]; assert( ktr ); TQString title=ktr->hdr(); - m_keytab->insertItem(title.tqreplace('&',"&&"),ktr->numb()); + m_keytab->insertItem(title.replace('&',"&&"),ktr->numb()); } applySettingsToGUI(); @@ -1317,7 +1317,7 @@ void Konsole::slotTabContextMenu(TQWidget* _te, const TQPoint & pos) int counter=0; for (TESession *ses = sessions.first(); ses; ses = sessions.next()) { TQString title=ses->Title(); - m_tabPopupTabsMenu->insertItem(SmallIcon(ses->IconName()),title.tqreplace('&',"&&"),counter++); + m_tabPopupTabsMenu->insertItem(SmallIcon(ses->IconName()),title.replace('&',"&&"),counter++); } m_tabPopupMenu->popup( pos ); @@ -1383,7 +1383,7 @@ void Konsole::slotTabSetViewOptions(int mode) else title = sessions.tqat(i)->Title(); - title=title.tqreplace('&',"&&"); + title=title.replace('&',"&&"); switch(mode) { case ShowIconAndText: tabwidget->changeTab(page, icon, title); @@ -1875,7 +1875,7 @@ void Konsole::updateSchemaMenu() ColorSchema* s = (ColorSchema*)colors->tqat(i); assert( s ); TQString title=s->title(); - m_schema->insertItem(title.tqreplace('&',"&&"),s->numb(),0); + m_schema->insertItem(title.replace('&',"&&"),s->numb(),0); } if (te && se) @@ -2219,13 +2219,13 @@ void Konsole::updateTitle(TESession* _se) } tabwidget->setTabIconSet(_se->widget(), iconSetForSession(_se)); TQString icon = _se->IconName(); - KRadioAction *ra = session2action.tqfind(_se); + KRadioAction *ra = session2action.find(_se); if (ra && (ra->icon() != icon)) ra->setIcon(icon); if (m_tabViewMode == ShowIconOnly) tabwidget->changeTab( _se->widget(), TQString::null ); else if (b_matchTabWinTitle) - tabwidget->setTabLabel( _se->widget(), _se->fullTitle().tqreplace('&',"&&")); + tabwidget->setTabLabel( _se->widget(), _se->fullTitle().replace('&',"&&")); } void Konsole::initSessionFont(TQFont font) { @@ -2363,7 +2363,7 @@ void Konsole::enterURL(const TQString& URL, const TQString&) KRun::shellQuote(newtext); te->emitText("cd "+newtext+"\r"); } - else if (URL.tqcontains("://", true)) { + else if (URL.contains("://", true)) { KURL u(URL); newtext = u.protocol(); bool isSSH = (newtext == "ssh"); @@ -2410,7 +2410,7 @@ void Konsole::sendSignal(int sn) void Konsole::runSession(TESession* s) { - KRadioAction *ra = session2action.tqfind(s); + KRadioAction *ra = session2action.find(s); ra->setChecked(true); activateSession(s); @@ -2446,7 +2446,7 @@ void Konsole::addSession(TESession* s) s->setTitle(newTitle); // create an action for the session - KRadioAction *ra = new KRadioAction(newTitle.tqreplace('&',"&&"), + KRadioAction *ra = new KRadioAction(newTitle.replace('&',"&&"), s->IconName(), 0, TQT_TQOBJECT(this), @@ -2497,7 +2497,7 @@ void Konsole::listSessions() m_sessionList->setKeyboardShortcutsEnabled(true); for (TESession *ses = sessions.first(); ses; ses = sessions.next()) { TQString title=ses->Title(); - m_sessionList->insertItem(SmallIcon(ses->IconName()),title.tqreplace('&',"&&"),counter++); + m_sessionList->insertItem(SmallIcon(ses->IconName()),title.replace('&',"&&"),counter++); } m_sessionList->adjustSize(); m_sessionList->popup(mapToGlobal(TQPoint((width()/2)-(m_sessionList->width()/2),(height()/2)-(m_sessionList->height()/2)))); @@ -2562,7 +2562,7 @@ void Konsole::activateSession(TESession *s) se->setListenToKeyPress(true); notifySessionState(se,NOTIFYNORMAL); // Delete the session if isn't in the session list any longer. - if (sessions.tqfind(se) == -1) + if (sessions.find(se) == -1) delete se; } if (se != s) @@ -2582,10 +2582,10 @@ void Konsole::activateSession(TESession *s) // only 2 sessions opened, 2nd session viewable, right-click on 1st tab and // select 'Detach', close original Konsole window... crash // s is not set properly on original Konsole window - KRadioAction *ra = session2action.tqfind(se); + KRadioAction *ra = session2action.find(se); if (!ra) { se=sessions.first(); // Get new/correct TESession - ra = session2action.tqfind(se); + ra = session2action.find(se); } ra->setChecked(true); @@ -2617,7 +2617,7 @@ void Konsole::activateSession(TESession *s) if (monitorActivity) monitorActivity->setChecked( se->isMonitorActivity() ); if (monitorSilence) monitorSilence->setChecked( se->isMonitorSilence() ); masterMode->setChecked( se->isMasterMode() ); - sessions.tqfind(se); + sessions.find(se); uint position=sessions.tqat(); if (m_moveSessionLeft) m_moveSessionLeft->setEnabled(position>0); if (m_moveSessionRight) m_moveSessionRight->setEnabled(positionunplug(m_view); tabwidget->removePage( s->widget() ); if (rootxpms[s->widget()]) { @@ -3034,7 +3034,7 @@ void Konsole::doneSession(TESession* s) m_removeSessionButton->setEnabled(tabwidget->count()>1); session2action.remove(s); action2session.remove(ra); - int sessionIndex = sessions.tqfindRef(s); + int sessionIndex = sessions.findRef(s); sessions.remove(s); delete ra; // will the toolbar die? @@ -3051,7 +3051,7 @@ void Konsole::doneSession(TESession* s) { se = sessions.tqat(sessionIndex ? sessionIndex - 1 : 0); - session2action.tqfind(se)->setChecked(true); + session2action.find(se)->setChecked(true); //FIXME: this Timer stupidity originated from the connected // design of Emulations. By this the newly activated // session might get a Ctrl(D) if the session has be @@ -3066,7 +3066,7 @@ void Konsole::doneSession(TESession* s) close(); } else { - sessions.tqfind(se); + sessions.find(se); uint position=sessions.tqat(); m_moveSessionLeft->setEnabled(position>0); m_moveSessionRight->setEnabled(position 1) activateSession(sessions.current()); @@ -3092,7 +3092,7 @@ void Konsole::prevSession() void Konsole::nextSession() { - sessions.tqfind(se); sessions.next(); + sessions.find(se); sessions.next(); if (!sessions.current()) sessions.first(); if (sessions.current() && sessions.count() > 1) activateSession(sessions.current()); @@ -3105,7 +3105,7 @@ void Konsole::slotMovedTab(int from, int to) sessions.remove(_se); sessions.insert(to,_se); - KRadioAction *ra = session2action.tqfind(_se); + KRadioAction *ra = session2action.find(_se); ra->unplug(m_view); ra->plug(m_view,(m_view->count()-sessions.count()+1)+to); @@ -3120,7 +3120,7 @@ void Konsole::slotMovedTab(int from, int to) /* Move session forward in session list if possible */ void Konsole::moveSessionLeft() { - sessions.tqfind(se); + sessions.find(se); uint position=sessions.tqat(); if (position==0) return; @@ -3128,7 +3128,7 @@ void Konsole::moveSessionLeft() sessions.remove(position); sessions.insert(position-1,se); - KRadioAction *ra = session2action.tqfind(se); + KRadioAction *ra = session2action.find(se); ra->unplug(m_view); ra->plug(m_view,(m_view->count()-sessions.count()+1)+position-1); @@ -3139,7 +3139,7 @@ void Konsole::moveSessionLeft() tabwidget->blockSignals(false); TQString title = se->Title(); createSessionTab(se->widget(), iconSetForSession(se), - title.tqreplace('&', "&&"), position-1); + title.replace('&', "&&"), position-1); tabwidget->showPage(se->widget()); tabwidget->setTabColor(se->widget(),oldcolor); @@ -3152,7 +3152,7 @@ void Konsole::moveSessionLeft() /* Move session back in session list if possible */ void Konsole::moveSessionRight() { - sessions.tqfind(se); + sessions.find(se); uint position=sessions.tqat(); if (position==sessions.count()-1) @@ -3161,7 +3161,7 @@ void Konsole::moveSessionRight() sessions.remove(position); sessions.insert(position+1,se); - KRadioAction *ra = session2action.tqfind(se); + KRadioAction *ra = session2action.find(se); ra->unplug(m_view); ra->plug(m_view,(m_view->count()-sessions.count()+1)+position+1); @@ -3172,7 +3172,7 @@ void Konsole::moveSessionRight() tabwidget->blockSignals(false); TQString title = se->Title(); createSessionTab(se->widget(), iconSetForSession(se), - title.tqreplace('&', "&&"), position+1); + title.replace('&', "&&"), position+1); tabwidget->showPage(se->widget()); tabwidget->setTabColor(se->widget(),oldcolor); @@ -3384,7 +3384,7 @@ void Konsole::addSessionCommand(const TQString &path) TQString name = comment; name.prepend("SSC_"); // Allows easy searching for Session ShortCuts - name.tqreplace(" ", "_"); + name.replace(" ", "_"); sl_sessionShortCuts << name; // Is there already this shortcut? @@ -3434,13 +3434,13 @@ void Konsole::createSessionMenus() TQString txt = cfg->readEntry("Name"); TQString icon = cfg->readEntry("Icon", "konsole"); insertItemSorted(m_tabbarSessionsCommands, SmallIconSet(icon), - txt.tqreplace('&',"&&"), SESSION_NEW_SHELL_ID ); + txt.replace('&',"&&"), SESSION_NEW_SHELL_ID ); TQString comment = cfg->readEntry("Comment"); if (comment.isEmpty()) comment=txt.prepend(i18n("New ")); insertItemSorted(m_session, SmallIconSet(icon), - comment.tqreplace('&',"&&"), SESSION_NEW_SHELL_ID); + comment.replace('&',"&&"), SESSION_NEW_SHELL_ID); m_session->insertItem(SmallIconSet("window_new"), i18n("New &Window"), SESSION_NEW_WINDOW_ID); m_tabbarSessionsCommands->insertItem(SmallIconSet("window_new"), @@ -3456,12 +3456,12 @@ void Konsole::createSessionMenus() TQString txt = (*it).readEntry("Name"); TQString icon = (*it).readEntry("Icon", "konsole"); insertItemSorted(m_tabbarSessionsCommands, SmallIconSet(icon), - txt.tqreplace('&',"&&"), it.currentKey() ); + txt.replace('&',"&&"), it.currentKey() ); TQString comment = (*it).readEntry("Comment"); if (comment.isEmpty()) comment=txt.prepend(i18n("New ")); insertItemSorted(m_session, SmallIconSet(icon), - comment.tqreplace('&',"&&"), it.currentKey()); + comment.replace('&',"&&"), it.currentKey()); } if (m_bookmarksSession) @@ -3646,12 +3646,12 @@ void Konsole::slotDetachSession() void Konsole::detachSession(TESession* _se) { if (!_se) _se=se; - KRadioAction *ra = session2action.tqfind(_se); + KRadioAction *ra = session2action.find(_se); ra->unplug(m_view); TEWidget* se_widget = _se->widget(); session2action.remove(_se); action2session.remove(ra); - int sessionIndex = sessions.tqfindRef(_se); + int sessionIndex = sessions.findRef(_se); sessions.remove(_se); delete ra; @@ -3705,7 +3705,7 @@ void Konsole::detachSession(TESession* _se) { se = se_previous; else se = sessions.tqat(sessionIndex ? sessionIndex - 1 : 0); - session2action.tqfind(se)->setChecked(true); + session2action.find(se)->setChecked(true); TQTimer::singleShot(1,this,TQT_SLOT(activateSession())); } @@ -3750,7 +3750,7 @@ void Konsole::attachSession(TESession* session) } TQString title=session->Title(); - KRadioAction *ra = new KRadioAction(title.tqreplace('&',"&&"), session->IconName(), + KRadioAction *ra = new KRadioAction(title.replace('&',"&&"), session->IconName(), 0, TQT_TQOBJECT(this), TQT_SLOT(activateSession()), m_shortcuts); ra->setExclusiveGroup("sessions"); @@ -3810,9 +3810,9 @@ void Konsole::slotRenameSession() { void Konsole::slotRenameSession(TESession* ses, const TQString &name) { - KRadioAction *ra = session2action.tqfind(ses); + KRadioAction *ra = session2action.find(ses); TQString title=name; - title=title.tqreplace('&',"&&"); + title=title.replace('&',"&&"); ra->setText(title); ra->setIcon( ses->IconName() ); // I don't know why it is needed here if (m_tabViewMode!=ShowIconOnly) diff --git a/konsole/konsole/konsole_part.cpp b/konsole/konsole/konsole_part.cpp index 3bf2daaee..1887d7373 100644 --- a/konsole/konsole/konsole_part.cpp +++ b/konsole/konsole/konsole_part.cpp @@ -197,7 +197,7 @@ konsolePart::konsolePart(TQWidget *_parentWidget, const char *widgetName, TQObje KeyTrans* ktr = kt_map[*it]; assert( ktr ); TQString title=ktr->hdr(); - m_keytab->insertItem(title.tqreplace('&',"&&"),ktr->numb()); + m_keytab->insertItem(title.replace('&',"&&"),ktr->numb()); } } @@ -733,7 +733,7 @@ void konsolePart::updateSchemaMenu() for (int i = 0; i < (int) colors->count(); i++) { ColorSchema* s = (ColorSchema*)colors->tqat(i); TQString title=s->title(); - m_schema->insertItem(title.tqreplace('&',"&&"),s->numb(),0); + m_schema->insertItem(title.replace('&',"&&"),s->numb(),0); } if (te && se) { diff --git a/konsole/konsole/konsolebookmarkmenu.cpp b/konsole/konsole/konsolebookmarkmenu.cpp index d9cea8293..fd2cc9f1b 100644 --- a/konsole/konsole/konsolebookmarkmenu.cpp +++ b/konsole/konsole/konsolebookmarkmenu.cpp @@ -97,7 +97,7 @@ void KonsoleBookmarkMenu::fillBookmarkMenu() bm = parentBookmark.next(bm) ) { TQString text = bm.text(); - text.tqreplace( '&', "&&" ); + text.replace( '&', "&&" ); if ( !separatorInserted && m_bIsRoot) { // inserted before the first konq bookmark, to avoid the separator if no konq bookmark m_parentMenu->insertSeparator(); separatorInserted = true; diff --git a/konsole/konsole/main.cpp b/konsole/konsole/main.cpp index b5048f90a..5b391a5e5 100644 --- a/konsole/konsole/main.cpp +++ b/konsole/konsole/main.cpp @@ -375,7 +375,7 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[]) it != types.end(); ++it) { TQString file = *it; - file = file.mid(file.tqfindRev('/')+1); + file = file.mid(file.findRev('/')+1); if (file.endsWith(".desktop")) file = file.left(file.length()-8); printf("%s\n", TQFile::encodeName(file).data()); @@ -437,7 +437,7 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[]) it != profiles.end(); ++it) { TQString file = *it; - file = file.mid(file.tqfindRev('/')+1); + file = file.mid(file.findRev('/')+1); printf("%s\n", TQFile::encodeName(file).data()); } return 0; diff --git a/konsole/konsole/schema.cpp b/konsole/konsole/schema.cpp index 211f99b77..b3bae8eff 100644 --- a/konsole/konsole/schema.cpp +++ b/konsole/konsole/schema.cpp @@ -333,7 +333,7 @@ bool ColorSchema::rereadSchemaFile() continue; TQString qline(line); - m_imagePath = locate("wallpaper", qline.mid( qline.tqfind(" ",7)+1 ) ); + m_imagePath = locate("wallpaper", qline.mid( qline.find(" ",7)+1 ) ); m_tqalignment = attr; } if (!strncmp(line,"transparency",12)) @@ -537,7 +537,7 @@ bool ColorSchemaList::updateAllSchemaTimes(const TQDateTime& now) for (it=list.begin(); it!=list.end(); ++it) { TQString filename=*it; - int j=filename.tqfindRev('/'); + int j=filename.findRev('/'); if (j>-1) filename = filename.mid(8); diff --git a/konsole/konsole/session.cpp b/konsole/konsole/session.cpp index 3534b88c8..cc4293326 100644 --- a/konsole/konsole/session.cpp +++ b/konsole/konsole/session.cpp @@ -232,7 +232,7 @@ void TESession::setUserTitle( int what, const TQString &caption ) renameSession(caption); if (what == 31) { cwd=caption; - cwd=cwd.tqreplace( TQRegExp("^~"), TQDir::homeDirPath() ); + cwd=cwd.replace( TQRegExp("^~"), TQDir::homeDirPath() ); emit openURLRequest(cwd); } if (what == 32) { // change icon via \033]32;Icon\007 @@ -676,8 +676,8 @@ void TESession::zmodemStatus(KProcess *, char *data, int len) TQCString msg(data, len+1); while(!msg.isEmpty()) { - int i = msg.tqfind('\015'); - int j = msg.tqfind('\012'); + int i = msg.find('\015'); + int j = msg.find('\012'); TQCString txt; if ((i != -1) && ((j == -1) || (i < j))) { -- cgit v1.2.3