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 --- kicker/menuext/kate/katesessionmenu.cpp | 2 +- kicker/menuext/konsole/konsolebookmarkmenu.cpp | 2 +- kicker/menuext/prefmenu/prefmenu.cpp | 12 ++++++------ kicker/menuext/recentdocs/recentdocsmenu.cpp | 8 ++++---- kicker/menuext/remote/remotemenu.cpp | 4 ++-- kicker/menuext/system/systemmenu.cpp | 2 +- kicker/menuext/tom/tom.cc | 14 +++++++------- 7 files changed, 22 insertions(+), 22 deletions(-) (limited to 'kicker/menuext') diff --git a/kicker/menuext/kate/katesessionmenu.cpp b/kicker/menuext/kate/katesessionmenu.cpp index 860f6d04a..7326d8fb0 100644 --- a/kicker/menuext/kate/katesessionmenu.cpp +++ b/kicker/menuext/kate/katesessionmenu.cpp @@ -124,7 +124,7 @@ void KateSessionMenu::slotExec( int id ) "kate_session_button_create_anonymous" ) == KMessageBox::No ) return; - if ( m_sessions.tqcontains( name ) && + if ( m_sessions.contains( name ) && KMessageBox::warningYesNo( 0, i18n("You allready have a session named %1. Do you want to open that session?").arg( name ), i18n("Session exists") ) == KMessageBox::No ) diff --git a/kicker/menuext/konsole/konsolebookmarkmenu.cpp b/kicker/menuext/konsole/konsolebookmarkmenu.cpp index b53899a89..1643195e8 100644 --- a/kicker/menuext/konsole/konsolebookmarkmenu.cpp +++ b/kicker/menuext/konsole/konsolebookmarkmenu.cpp @@ -112,7 +112,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/kicker/menuext/prefmenu/prefmenu.cpp b/kicker/menuext/prefmenu/prefmenu.cpp index 3b68c0529..3f50e5275 100644 --- a/kicker/menuext/prefmenu/prefmenu.cpp +++ b/kicker/menuext/prefmenu/prefmenu.cpp @@ -84,7 +84,7 @@ void PrefMenu::insertMenuItem(KService::Ptr& s, if (KickerSettings::menuEntryFormat() == KickerSettings::NameAndDescription) { if (!suppressGenericNames || - !suppressGenericNames->tqcontains(s->untranslatedGenericName())) + !suppressGenericNames->contains(s->untranslatedGenericName())) { serviceName = TQString("%1 (%2)").arg(serviceName).arg(comment); } @@ -120,7 +120,7 @@ void PrefMenu::insertMenuItem(KService::Ptr& s, // item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - serviceName.tqreplace("&", "&&"); + serviceName.replace("&", "&&"); int newId = insertItem(KickerLib::menuIconSet(s->icon()), serviceName, nId, nIndex); m_entryMap.insert(newId, static_cast(s)); @@ -155,7 +155,7 @@ void PrefMenu::mouseMoveEvent(TQMouseEvent * ev) return; } - if (!m_entryMap.tqcontains(id)) + if (!m_entryMap.contains(id)) { kdDebug(1210) << "Cannot find service with menu id " << id << endl; return; @@ -224,7 +224,7 @@ void PrefMenu::dragEnterEvent(TQDragEnterEvent *event) void PrefMenu::dragLeaveEvent(TQDragLeaveEvent */*event*/) { // see PrefMenu::dragEnterEvent why this is nescessary - if (!TQT_TQRECT_OBJECT(frameGeometry()).tqcontains(TQCursor::pos())) + if (!TQT_TQRECT_OBJECT(frameGeometry()).contains(TQCursor::pos())) { KURLDrag::setTarget(0); } @@ -297,7 +297,7 @@ void PrefMenu::initialize() // Item names may contain ampersands. To avoid them being converted // to accelerators, replace each ampersand with two ampersands. - groupCaption.tqreplace("&", "&&"); + groupCaption.replace("&", "&&"); PrefMenu* m = new PrefMenu(g->name(), g->relPath(), this); m->setCaption(groupCaption); @@ -323,7 +323,7 @@ void PrefMenu::initialize() void PrefMenu::slotExec(int id) { - if (!m_entryMap.tqcontains(id)) + if (!m_entryMap.contains(id)) { return; } diff --git a/kicker/menuext/recentdocs/recentdocsmenu.cpp b/kicker/menuext/recentdocs/recentdocsmenu.cpp index 381ce3fa9..cb26e4cae 100644 --- a/kicker/menuext/recentdocs/recentdocsmenu.cpp +++ b/kicker/menuext/recentdocs/recentdocsmenu.cpp @@ -72,17 +72,17 @@ void RecentDocsMenu::initialize() { // Make sure this entry is not already present in the menu alreadyPresentInMenu = 0; for ( TQStringList::Iterator previt = previousEntries.begin(); previt != previousEntries.end(); ++previt ) { - if (TQString::localeAwareCompare(*previt, f.readName().tqreplace('&', TQString::fromAscii("&&") )) == 0) { + if (TQString::localeAwareCompare(*previt, f.readName().replace('&', TQString::fromAscii("&&") )) == 0) { alreadyPresentInMenu = 1; } } if (alreadyPresentInMenu == 0) { // Add item to menu - insertItem(SmallIconSet(f.readIcon()), f.readName().tqreplace('&', TQString::fromAscii("&&") ), id++); + insertItem(SmallIconSet(f.readIcon()), f.readName().replace('&', TQString::fromAscii("&&") ), id++); // Append to duplicate checking list - previousEntries.append(f.readName().tqreplace('&', TQString::fromAscii("&&") )); + previousEntries.append(f.readName().replace('&', TQString::fromAscii("&&") )); } } @@ -114,7 +114,7 @@ void RecentDocsMenu::mouseMoveEvent(TQMouseEvent* e) { if (!(e->state() & Qt::LeftButton)) return; - if (!TQT_TQRECT_OBJECT(rect()).tqcontains(_mouseDown)) + if (!TQT_TQRECT_OBJECT(rect()).contains(_mouseDown)) return; int dragLength = (e->pos() - _mouseDown).manhattanLength(); diff --git a/kicker/menuext/remote/remotemenu.cpp b/kicker/menuext/remote/remotemenu.cpp index 3547e3f9b..c09f9a825 100644 --- a/kicker/menuext/remote/remotemenu.cpp +++ b/kicker/menuext/remote/remotemenu.cpp @@ -93,7 +93,7 @@ void RemoteMenu::initialize() for(; name!=endf; ++name) { - if (!names_found.tqcontains(*name)) + if (!names_found.contains(*name)) { names_found.append(*name); TQString filename = *dirpath+*name; @@ -124,7 +124,7 @@ void RemoteMenu::openRemoteDir() void RemoteMenu::slotExec(int id) { - if (m_desktopMap.tqcontains(id)) + if (m_desktopMap.contains(id)) { new KRun(m_desktopMap[id]); } diff --git a/kicker/menuext/system/systemmenu.cpp b/kicker/menuext/system/systemmenu.cpp index 33eba2558..12ec087d8 100644 --- a/kicker/menuext/system/systemmenu.cpp +++ b/kicker/menuext/system/systemmenu.cpp @@ -77,7 +77,7 @@ void SystemMenu::initialize() void SystemMenu::slotExec(int id) { - if(!m_urlMap.tqcontains(id)) return; + if(!m_urlMap.contains(id)) return; new KRun(m_urlMap[id]); // will delete itself } diff --git a/kicker/menuext/tom/tom.cc b/kicker/menuext/tom/tom.cc index 24ab027a8..f2689bc1f 100644 --- a/kicker/menuext/tom/tom.cc +++ b/kicker/menuext/tom/tom.cc @@ -239,7 +239,7 @@ void TOM::initializeRecentDocs() KDesktopFile f(*it, true /* read only */); m_recentDocsMenu->insertItem(DesktopIcon(f.readIcon(), KIcon::SizeMedium), - f.readName().tqreplace('&', "&&"), id); + f.readName().replace('&', "&&"), id); ++id; } } @@ -302,7 +302,7 @@ int TOM::appendTaskGroup(KConfig& config, bool inSubMenu) TQString name = config.readEntry("Name"); // in case the name contains an ampersand, double 'em up - name.tqreplace("&", "&&"); + name.replace("&", "&&"); TQString desktopfile = config.readPathEntry("DesktopFile"); KService::Ptr pService = KService::serviceByDesktopPath(desktopfile); @@ -551,10 +551,10 @@ void TOM::initialize() if (userInfo) { username = TQString::fromLocal8Bit(userInfo->pw_gecos); - if (username.tqfind(',') != -1) + if (username.find(',') != -1) { // Remove everything from and including first comma - username.truncate(username.tqfind(',')); + username.truncate(username.find(',')); } if (username.isEmpty()) @@ -583,7 +583,7 @@ void TOM::contextualizeRMBmenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxM ctxMenu->removeItem(contextMenuTitleID); TQString text = menu->text(menuItem); - int parens = text.tqfind('(') - 1; + int parens = text.find('(') - 1; if (parens > 0) { text = text.left(parens); @@ -775,7 +775,7 @@ TQMouseEvent TOM::translateMouseEvent( TQMouseEvent* e ) { TQRect side = sideImageRect(); - if ( !side.tqcontains( e->pos() ) ) + if ( !side.contains( e->pos() ) ) return *e; TQPoint newpos( e->pos() ); @@ -824,7 +824,7 @@ void TOM::runCommand() void TOM::runTask(int id) { - if (!m_tasks.tqcontains(id)) return; + if (!m_tasks.contains(id)) return; kapp->propagateSessionManager(); KApplication::startServiceByDesktopPath(m_tasks[id]->desktopEntryPath(), -- cgit v1.2.3