From 2a99db3ebc4c211e436f95fde24b5ac6826d0267 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/applications/ktorrent@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- apps/ktorrent/fileselectdlg.cpp | 2 +- apps/ktorrent/filterbar.cpp | 2 +- apps/ktorrent/groups/groupmanager.cpp | 10 +++++----- apps/ktorrent/groups/groupview.cpp | 20 ++++++++++---------- apps/ktorrent/ipfilterwidget.cpp | 2 +- apps/ktorrent/ktorrent.cpp | 6 +++--- apps/ktorrent/ktorrent.h | 4 ++-- apps/ktorrent/ktorrentcore.cpp | 2 +- apps/ktorrent/ktorrentview.cpp | 2 +- apps/ktorrent/newui/button.cpp | 6 +++--- apps/ktorrent/newui/buttonbar.cpp | 6 +++--- apps/ktorrent/newui/ddockwindow.cpp | 2 +- apps/ktorrent/newui/dmainwindow.cpp | 20 ++++++++++---------- apps/ktorrent/pref.cpp | 2 +- apps/ktorrent/trayicon.cpp | 2 +- 15 files changed, 44 insertions(+), 44 deletions(-) (limited to 'apps') diff --git a/apps/ktorrent/fileselectdlg.cpp b/apps/ktorrent/fileselectdlg.cpp index 0030f37..c84bcc9 100644 --- a/apps/ktorrent/fileselectdlg.cpp +++ b/apps/ktorrent/fileselectdlg.cpp @@ -161,7 +161,7 @@ void FileSelectDlg::accept() { TQString groupName = m_cmbGroups->currentText(); - Group* group = m_gman->tqfind(groupName); + Group* group = m_gman->find(groupName); if(group) { group->addTorrent(tc); diff --git a/apps/ktorrent/filterbar.cpp b/apps/ktorrent/filterbar.cpp index 936cc61..dc59945 100644 --- a/apps/ktorrent/filterbar.cpp +++ b/apps/ktorrent/filterbar.cpp @@ -97,7 +97,7 @@ bool FilterBar::matchesFilter(kt::TorrentInterface* tc) if (m_name_filter.length() == 0) return true; else - return tc->getStats().torrent_name.tqcontains(m_name_filter,cs); + return tc->getStats().torrent_name.contains(m_name_filter,cs); } void FilterBar::slotChangeFilter(const TQString& nameFilter) diff --git a/apps/ktorrent/groups/groupmanager.cpp b/apps/ktorrent/groups/groupmanager.cpp index 8e78003..6cfd193 100644 --- a/apps/ktorrent/groups/groupmanager.cpp +++ b/apps/ktorrent/groups/groupmanager.cpp @@ -99,7 +99,7 @@ namespace kt Group* GroupManager::newGroup(const TQString & name) { - if (tqfind(name)) + if (find(name)) return 0; Group* g = new TorrentGroup(name); @@ -109,7 +109,7 @@ namespace kt bool GroupManager::canRemove(const Group* g) const { - return default_groups.tqfind(g->groupName()) == 0; + return default_groups.find(g->groupName()) == 0; } @@ -180,7 +180,7 @@ namespace kt throw; } - if (!tqfind(g->groupName())) + if (!find(g->groupName())) insert(g->groupName(),g); else delete g; @@ -203,7 +203,7 @@ namespace kt void GroupManager::renameGroup(const TQString & old_name,const TQString & new_name) { - Group* g = tqfind(old_name); + Group* g = find(old_name); if (!g) return; @@ -216,6 +216,6 @@ namespace kt Group* GroupManager::findDefault(const TQString & name) { - return default_groups.tqfind(name); + return default_groups.find(name); } } diff --git a/apps/ktorrent/groups/groupview.cpp b/apps/ktorrent/groups/groupview.cpp index af33316..1918de6 100644 --- a/apps/ktorrent/groups/groupview.cpp +++ b/apps/ktorrent/groups/groupview.cpp @@ -161,7 +161,7 @@ namespace kt if (name.isNull() || name.length() == 0) return; - if (gman->tqfind(name)) + if (gman->find(name)) { KMessageBox::error(this,i18n("The group %1 already exists.").tqarg(name)); return; @@ -177,7 +177,7 @@ namespace kt if (!current_item) return; - Group* g = groups.tqfind(current_item); + Group* g = groups.find(current_item); if (!g) return; @@ -200,7 +200,7 @@ namespace kt if (!current_item) return; - Group* g = groups.tqfind(current_item); + Group* g = groups.find(current_item); if (!g) return; @@ -212,7 +212,7 @@ namespace kt if (g->groupName() == name) return; - if (gman->tqfind(name)) + if (gman->find(name)) { KMessageBox::error(this,i18n("The group %1 already exists.").tqarg(name)); } @@ -252,7 +252,7 @@ namespace kt Group* g = 0; if (current_item) - g = groups.tqfind(current_item); + g = groups.find(current_item); if (!g ||!gman->canRemove(g)) { @@ -278,7 +278,7 @@ namespace kt if (!li) return; - Group* g = groups.tqfind(li); + Group* g = groups.find(li); if (g) { current = g; @@ -292,7 +292,7 @@ namespace kt if (!li) return; - TorrentGroup* g = dynamic_cast(groups.tqfind(li)); + TorrentGroup* g = dynamic_cast(groups.find(li)); if (g) { TQValueList sel; @@ -329,7 +329,7 @@ namespace kt void GroupView::onGroupsSubMenuItemActivated(KTorrentView* v,const TQString & group) { - Group* g = gman->tqfind(group); + Group* g = gman->find(group); if (g) { v->addSelectionToGroup(g); @@ -339,7 +339,7 @@ namespace kt const Group* GroupView::findGroup(const TQString & name) const { - Group* g = gman->tqfind(name); + Group* g = gman->find(name); if (!g) g = gman->findDefault(name); @@ -351,7 +351,7 @@ namespace kt if (!current_item) return; - Group* g = groups.tqfind(current_item); + Group* g = groups.find(current_item); if (g) openNewTab(g); } diff --git a/apps/ktorrent/ipfilterwidget.cpp b/apps/ktorrent/ipfilterwidget.cpp index 8914f5a..b15c035 100644 --- a/apps/ktorrent/ipfilterwidget.cpp +++ b/apps/ktorrent/ipfilterwidget.cpp @@ -65,7 +65,7 @@ void IPFilterWidget::btnAdd_clicked() if(v.validate( ip, var ) == TQValidator::Acceptable) { - if(lstPeers->tqfindItem(ip, 0) == 0) + if(lstPeers->findItem(ip, 0) == 0) new KListViewItem(lstPeers, ip); } else diff --git a/apps/ktorrent/ktorrent.cpp b/apps/ktorrent/ktorrent.cpp index 51c945b..46da5c3 100644 --- a/apps/ktorrent/ktorrent.cpp +++ b/apps/ktorrent/ktorrent.cpp @@ -363,7 +363,7 @@ void KTorrent::addTabPage(TQWidget* page,const TQPixmap & icon, void KTorrent::removeTabPage(TQWidget* page) { - if (!m_tab_map.tqcontains(page)) + if (!m_tab_map.contains(page)) return; m_tab_map.erase(page); @@ -558,7 +558,7 @@ void KTorrent::setupActions() i18n("Check Data Integrity"), TQString(),0,m_view_man,TQT_SLOT(checkDataIntegrity()),actionCollection(),"check_data"); - m_tqfind = KStdAction::find(TQT_TQOBJECT(this),TQT_SLOT(tqfind()),actionCollection()); + m_find = KStdAction::find(TQT_TQOBJECT(this),TQT_SLOT(find()),actionCollection()); //Plug actions to systemtray context menu m_startall_systray->plug(m_systray_icon->contextMenu()); @@ -1006,7 +1006,7 @@ void KTorrent::statusBarMsgExpired() m_statusInfo->clear(); } -void KTorrent::tqfind() +void KTorrent::find() { KTorrentView* v = m_view_man->getCurrentView(); if (v) diff --git a/apps/ktorrent/ktorrent.h b/apps/ktorrent/ktorrent.h index 1213452..6ac7bee 100644 --- a/apps/ktorrent/ktorrent.h +++ b/apps/ktorrent/ktorrent.h @@ -182,7 +182,7 @@ private slots: void currentTabChanged(TQWidget* w); void openDefaultView(); void statusBarMsgExpired(); - void tqfind(); + void find(); private: void setupAccel(); @@ -231,7 +231,7 @@ private: KAction* m_queueaction; KAction* m_datacheck; KAction* m_ipfilter; - KAction* m_tqfind; + KAction* m_find; KProgress* m_status_prog; }; diff --git a/apps/ktorrent/ktorrentcore.cpp b/apps/ktorrent/ktorrentcore.cpp index 7839a5a..e97dc84 100644 --- a/apps/ktorrent/ktorrentcore.cpp +++ b/apps/ktorrent/ktorrentcore.cpp @@ -347,7 +347,7 @@ void KTorrentCore::downloadFinishedSilently(KIO::Job *job) else { TQString dir; - if (custom_save_locations.tqcontains(j)) + if (custom_save_locations.contains(j)) { // we have a custom save location so save to that dir = custom_save_locations[j].path(); diff --git a/apps/ktorrent/ktorrentview.cpp b/apps/ktorrent/ktorrentview.cpp index 9cc96a4..6c963bf 100644 --- a/apps/ktorrent/ktorrentview.cpp +++ b/apps/ktorrent/ktorrentview.cpp @@ -485,7 +485,7 @@ void KTorrentView::addTorrent(TorrentInterface* tc) void KTorrentView::removeTorrent(TorrentInterface* tc) { - TQMap::iterator i = items.tqfind(tc); + TQMap::iterator i = items.find(tc); if (i != items.end()) { KTorrentViewItem* tvi = i.data(); diff --git a/apps/ktorrent/newui/button.cpp b/apps/ktorrent/newui/button.cpp index 7a99f86..e24b359 100644 --- a/apps/ktorrent/newui/button.cpp +++ b/apps/ktorrent/newui/button.cpp @@ -78,7 +78,7 @@ Button::~Button() if (r.search(m_realText) > -1) { TQString text = m_realText; - if (text.tqcontains(r2)) + if (text.contains(r2)) text.remove(r2); config->writeEntry(TQString("button_%1").tqarg(text), r.cap(1)); } @@ -304,7 +304,7 @@ void Button::contextMenuEvent(TQContextMenuEvent *e) /* TQPopupMenu menu; m_assignAccelAction->plug(&menu); - if (m_realText.tqcontains(TQRegExp("^&[0-9]\\s"))) + if (m_realText.contains(TQRegExp("^&[0-9]\\s"))) m_clearAccelAction->plug(&menu); emit contextMenu( &menu ); @@ -341,7 +341,7 @@ TQString Button::realTextWithoutAccel() const { TQString text = m_realText; TQRegExp r("^&[0-9]\\s"); - if (text.tqcontains(r)) + if (text.contains(r)) text.remove(r); return text; } diff --git a/apps/ktorrent/newui/buttonbar.cpp b/apps/ktorrent/newui/buttonbar.cpp index 0118358..8d043f5 100644 --- a/apps/ktorrent/newui/buttonbar.cpp +++ b/apps/ktorrent/newui/buttonbar.cpp @@ -249,7 +249,7 @@ void ButtonBar::deshrink(int preferredDimension, int actualDimension) int i = 0; for (TQValueList::iterator it = texts.begin(); it != texts.end(); ++it, i++) { - if (m_buttons[i]->text().tqcontains("...")) + if (m_buttons[i]->text().contains("...")) (*it)++; newTextLength += *it; } @@ -309,7 +309,7 @@ Button *ButtonBar::firstButton() Button *ButtonBar::nextTo(Button *button) { - ButtonList::iterator it = m_buttons.tqfind(button); + ButtonList::iterator it = m_buttons.find(button); Button *next = 0; if ((*it) == m_buttons.last()) next = m_buttons.first(); @@ -326,7 +326,7 @@ Button *ButtonBar::nextTo(Button *button) Button *ButtonBar::prevTo(Button *button) { - ButtonList::iterator it = m_buttons.tqfind(button); + ButtonList::iterator it = m_buttons.find(button); Button *prev = 0; if (it == m_buttons.begin()) prev = m_buttons.last(); diff --git a/apps/ktorrent/newui/ddockwindow.cpp b/apps/ktorrent/newui/ddockwindow.cpp index 1dbd7c7..2d473f6 100644 --- a/apps/ktorrent/newui/ddockwindow.cpp +++ b/apps/ktorrent/newui/ddockwindow.cpp @@ -404,7 +404,7 @@ void DDockWindow::moveToDockBottom() void DDockWindow::moveToDock(DDockWindow::Position position ) { - if ( m_widgets.tqcontains( m_lastContextMenuButton ) ) + if ( m_widgets.contains( m_lastContextMenuButton ) ) { mainWindow()->moveWidget( position, m_widgets[ m_lastContextMenuButton ], m_lastContextMenuButton->realTextWithoutAccel() ); } diff --git a/apps/ktorrent/newui/dmainwindow.cpp b/apps/ktorrent/newui/dmainwindow.cpp index bf039d6..ba1d7e6 100644 --- a/apps/ktorrent/newui/dmainwindow.cpp +++ b/apps/ktorrent/newui/dmainwindow.cpp @@ -121,10 +121,10 @@ void DMainWindow::addWidget(DTabWidget *tab, TQWidget *widget, const TQString &t void DMainWindow::removeWidget(TQWidget *widget) { - if (!m_widgets.tqcontains(widget)) + if (!m_widgets.contains(widget)) return; //not a widget in main window - if (m_widgetTabs.tqcontains(widget)) + if (m_widgetTabs.contains(widget)) { DTabWidget *tab = m_widgetTabs[widget]; if (tab->indexOf(widget) >= 0) @@ -193,12 +193,12 @@ void DMainWindow::invalidateActiveTabWidget() kdDebug(9000) << "tqinvalidate: " << focused << endl; if (focused == 0) return; - if (!m_widgets.tqcontains(focused)) + if (!m_widgets.contains(focused)) { kdDebug(9000) << " focused is not in m_widgets" << endl; return; } - if (m_widgetTabs.tqcontains(focused)) + if (m_widgetTabs.contains(focused)) { kdDebug(9000) << " focused is in m_widgets and m_widgetTabs" << endl; DTabWidget *tab = m_widgetTabs[focused]; @@ -223,7 +223,7 @@ DTabWidget *DMainWindow::createTab() bool DMainWindow::eventFilter(TQObject *obj, TQEvent *ev) { TQWidget *w = (TQWidget*)obj; - if (!m_widgets.tqcontains(w)) + if (!m_widgets.contains(w)) return KParts::MainWindow::eventFilter(obj, ev); if ((m_currentWidget != w) && (ev->type() == TQEvent::FocusIn)) @@ -233,7 +233,7 @@ bool DMainWindow::eventFilter(TQObject *obj, TQEvent *ev) } else if (ev->type() == TQEvent::IconChange) { - if (m_widgetTabs.tqcontains(w)) + if (m_widgetTabs.contains(w)) { DTabWidget *tab = m_widgetTabs[w]; tab->setTabIconSet(w, w->icon() ? (*(w->icon())) : TQPixmap()); @@ -266,7 +266,7 @@ void DMainWindow::closeTab(TQWidget *) void DMainWindow::moveWidget(DDockWindow::Position position, TQWidget * view, const TQString & title) { - if (m_docks.tqcontains(view)) + if (m_docks.contains(view)) { toolWindow(m_docks[view])->removeWidget(view); @@ -296,7 +296,7 @@ void DMainWindow::removeDockWidget(TQWidget *view) bool DMainWindow::hasDockWidget(TQWidget *view) { - return m_docks.tqcontains(view); + return m_docks.contains(view); } DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view) @@ -308,7 +308,7 @@ void DMainWindow::widgetDestroyed() { TQWidget *w = TQT_TQWIDGET(const_cast(sender())); - if (m_docks.tqcontains(w)) + if (m_docks.contains(w)) { kdError() << "Widget destroyed before being removed from UI!" << endl; m_docks.remove(w); @@ -317,4 +317,4 @@ void DMainWindow::widgetDestroyed() #include "dmainwindow.moc" -// kate: space-indent on; indent-width 4; tab-width 4; tqreplace-tabs on +// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on diff --git a/apps/ktorrent/pref.cpp b/apps/ktorrent/pref.cpp index 7bfdfbd..bd92ba8 100644 --- a/apps/ktorrent/pref.cpp +++ b/apps/ktorrent/pref.cpp @@ -130,7 +130,7 @@ void KTorrentPreferences::addPrefPage(kt::PrefPageInterface* prefInterface) void KTorrentPreferences::removePrefPage(kt::PrefPageInterface* pp) { - if (!pages.tqcontains(pp)) + if (!pages.contains(pp)) return; TQFrame* fr = pages[pp]; diff --git a/apps/ktorrent/trayicon.cpp b/apps/ktorrent/trayicon.cpp index f629268..5c5d813 100644 --- a/apps/ktorrent/trayicon.cpp +++ b/apps/ktorrent/trayicon.cpp @@ -356,7 +356,7 @@ void SetMaxRate::rateSelected(int id) { int rate; TQString ratestr = text(id).remove('&'); - if (ratestr.tqcontains(i18n("Unlimited"))) + if (ratestr.contains(i18n("Unlimited"))) rate = 0; else rate = ratestr.toInt(); -- cgit v1.2.1