summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit2a99db3ebc4c211e436f95fde24b5ac6826d0267 (patch)
treece2e122a017c12f803ea428a299c7e3cec52c8fe
parent100dcb6968ca22bfa52836ad55eb4f01225791db (diff)
downloadktorrent-2a99db3ebc4c211e436f95fde24b5ac6826d0267.tar.gz
ktorrent-2a99db3ebc4c211e436f95fde24b5ac6826d0267.zip
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
-rw-r--r--apps/ktorrent/fileselectdlg.cpp2
-rw-r--r--apps/ktorrent/filterbar.cpp2
-rw-r--r--apps/ktorrent/groups/groupmanager.cpp10
-rw-r--r--apps/ktorrent/groups/groupview.cpp20
-rw-r--r--apps/ktorrent/ipfilterwidget.cpp2
-rw-r--r--apps/ktorrent/ktorrent.cpp6
-rw-r--r--apps/ktorrent/ktorrent.h4
-rw-r--r--apps/ktorrent/ktorrentcore.cpp2
-rw-r--r--apps/ktorrent/ktorrentview.cpp2
-rw-r--r--apps/ktorrent/newui/button.cpp6
-rw-r--r--apps/ktorrent/newui/buttonbar.cpp6
-rw-r--r--apps/ktorrent/newui/ddockwindow.cpp2
-rw-r--r--apps/ktorrent/newui/dmainwindow.cpp20
-rw-r--r--apps/ktorrent/pref.cpp2
-rw-r--r--apps/ktorrent/trayicon.cpp2
-rw-r--r--libktorrent/interfaces/filetreediritem.cpp4
-rw-r--r--libktorrent/kademlia/announcetask.cpp8
-rw-r--r--libktorrent/kademlia/database.cpp12
-rw-r--r--libktorrent/kademlia/database.h2
-rw-r--r--libktorrent/kademlia/dht.cpp2
-rw-r--r--libktorrent/kademlia/kbucket.cpp10
-rw-r--r--libktorrent/kademlia/kbucket.h2
-rw-r--r--libktorrent/kademlia/node.h2
-rw-r--r--libktorrent/kademlia/nodelookup.cpp4
-rw-r--r--libktorrent/kademlia/rpcserver.cpp12
-rw-r--r--libktorrent/net/downloadthread.cpp4
-rw-r--r--libktorrent/net/networkthread.cpp4
-rw-r--r--libktorrent/net/portlist.cpp2
-rw-r--r--libktorrent/net/uploadthread.cpp4
-rw-r--r--libktorrent/pluginmanager.cpp8
-rw-r--r--libktorrent/torrent/advancedchokealgorithm.cpp2
-rw-r--r--libktorrent/torrent/announcelist.cpp4
-rw-r--r--libktorrent/torrent/cachefile.cpp2
-rw-r--r--libktorrent/torrent/chunkdownload.cpp20
-rw-r--r--libktorrent/torrent/chunkdownload.h2
-rw-r--r--libktorrent/torrent/downloader.cpp8
-rw-r--r--libktorrent/torrent/httptracker.cpp2
-rw-r--r--libktorrent/torrent/ipblocklist.cpp6
-rw-r--r--libktorrent/torrent/multifilecache.cpp24
-rw-r--r--libktorrent/torrent/peerdownloader.cpp10
-rw-r--r--libktorrent/torrent/peerid.cpp4
-rw-r--r--libktorrent/torrent/peermanager.cpp2
-rw-r--r--libktorrent/torrent/peersourcemanager.cpp10
-rw-r--r--libktorrent/torrent/queuemanager.cpp2
-rw-r--r--libktorrent/torrent/singlefilecache.cpp2
-rw-r--r--libktorrent/torrent/statsfile.cpp2
-rw-r--r--libktorrent/torrent/statsfile.h2
-rw-r--r--libktorrent/torrent/torrent.cpp2
-rw-r--r--libktorrent/torrent/torrentcontrol.cpp8
-rw-r--r--libktorrent/torrent/udptrackersocket.cpp8
-rw-r--r--libktorrent/util/httprequest.cpp6
-rw-r--r--libktorrent/util/ptrmap.h6
-rw-r--r--plugins/infowidget/chunkdownloadview.cpp2
-rw-r--r--plugins/infowidget/flagdb.cpp2
-rw-r--r--plugins/infowidget/peerview.cpp2
-rw-r--r--plugins/partfileimport/importdialog.cpp4
-rw-r--r--plugins/rssfeed/rss/tools_p.cpp8
-rw-r--r--plugins/rssfeed/rssfeed.cpp4
-rw-r--r--plugins/rssfeed/rssfeedmanager.cpp10
-rw-r--r--plugins/rssfeed/rssfilter.cpp4
-rw-r--r--plugins/rssfeed/rsslinkdownloader.cpp6
-rw-r--r--plugins/scanfolder/scanfolder.cpp2
-rw-r--r--plugins/search/searchenginelist.cpp6
-rw-r--r--plugins/search/searchplugin.cpp4
-rw-r--r--plugins/search/searchprefpage.cpp10
-rw-r--r--plugins/search/searchwidget.cpp2
-rw-r--r--plugins/stats/ChartDrawer.cc4
-rw-r--r--plugins/stats/PeerMonitor.cc4
-rw-r--r--plugins/upnp/upnpmcastsocket.cpp18
-rw-r--r--plugins/upnp/upnpmcastsocket.h2
-rw-r--r--plugins/upnp/upnpprefwidget.cpp2
-rw-r--r--plugins/webinterface/httpserver.cpp12
-rw-r--r--plugins/webinterface/php_handler.cpp4
-rw-r--r--plugins/webinterface/php_interface.cpp8
-rw-r--r--plugins/webinterface/www/coldmilk/rest.php2
-rw-r--r--plugins/webinterface/www/default/interface.php2
-rw-r--r--plugins/zeroconf/zeroconfplugin.cpp4
77 files changed, 215 insertions, 215 deletions
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<TorrentGroup*>(groups.tqfind(li));
+ TorrentGroup* g = dynamic_cast<TorrentGroup*>(groups.find(li));
if (g)
{
TQValueList<TorrentInterface*> 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<kt::TorrentInterface*,KTorrentViewItem*>::iterator i = items.tqfind(tc);
+ TQMap<kt::TorrentInterface*,KTorrentViewItem*>::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<uint>::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<TQT_BASE_OBJECT_NAME*>(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();
diff --git a/libktorrent/interfaces/filetreediritem.cpp b/libktorrent/interfaces/filetreediritem.cpp
index 54c1953..7cb78ca 100644
--- a/libktorrent/interfaces/filetreediritem.cpp
+++ b/libktorrent/interfaces/filetreediritem.cpp
@@ -70,7 +70,7 @@ namespace kt
{
size += file.getSize();
setText(1,BytesToString(size));
- int p = path.tqfind(bt::DirSeparator());
+ int p = path.find(bt::DirSeparator());
if (p == -1)
{
tqchildren.insert(path,newFileTreeItem(path,file));
@@ -78,7 +78,7 @@ namespace kt
else
{
TQString subdir = path.left(p);
- FileTreeDirItem* sd = subdirs.tqfind(subdir);
+ FileTreeDirItem* sd = subdirs.find(subdir);
if (!sd)
{
sd = newFileTreeDirItem(subdir);
diff --git a/libktorrent/kademlia/announcetask.cpp b/libktorrent/kademlia/announcetask.cpp
index 5e5b925..95f4020 100644
--- a/libktorrent/kademlia/announcetask.cpp
+++ b/libktorrent/kademlia/announcetask.cpp
@@ -58,7 +58,7 @@ namespace dht
{
// add node to todo list
KBucketEntry e = UnpackBucketEntry(n,i*26);
- if (!todo.tqcontains(e) && !visited.tqcontains(e) &&
+ if (!todo.contains(e) && !visited.contains(e) &&
todo.count() < 100)
{
todo.append(e);
@@ -78,7 +78,7 @@ namespace dht
// add the peer who responded to the answered list, so we can do an announce
KBucketEntry e(rsp->getOrigin(),rsp->getID());
- if (!answered.tqcontains(KBucketEntryAndToken(e,gpr->getToken())) && !answered_visited.tqcontains(e))
+ if (!answered.contains(KBucketEntryAndToken(e,gpr->getToken())) && !answered_visited.contains(e))
{
answered.append(KBucketEntryAndToken(e,gpr->getToken()));
}
@@ -101,7 +101,7 @@ namespace dht
while (!answered.empty() && canDoRequest())
{
KBucketEntryAndToken & e = answered.first();
- if (!answered_visited.tqcontains(e))
+ if (!answered_visited.contains(e))
{
AnnounceReq* anr = new AnnounceReq(node->getOurID(),info_hash,port,e.getToken());
anr->setOrigin(e.getAddress());
@@ -117,7 +117,7 @@ namespace dht
{
KBucketEntry e = todo.first();
// onLy send a findNode if we haven't allrready visited the node
- if (!visited.tqcontains(e))
+ if (!visited.contains(e))
{
// send a findNode to the node
GetPeersReq* gpr = new GetPeersReq(node->getOurID(),info_hash);
diff --git a/libktorrent/kademlia/database.cpp b/libktorrent/kademlia/database.cpp
index c4b34fd..447975f 100644
--- a/libktorrent/kademlia/database.cpp
+++ b/libktorrent/kademlia/database.cpp
@@ -72,7 +72,7 @@ namespace dht
void Database::store(const dht::Key & key,const DBItem & dbi)
{
- DBItemList* dbl = items.tqfind(key);
+ DBItemList* dbl = items.find(key);
if (!dbl)
{
dbl = new DBItemList();
@@ -83,7 +83,7 @@ namespace dht
void Database::sample(const dht::Key & key,DBItemList & tdbl,bt::Uint32 max_entries)
{
- DBItemList* dbl = items.tqfind(key);
+ DBItemList* dbl = items.find(key);
if (!dbl)
return;
@@ -144,7 +144,7 @@ namespace dht
bool Database::checkToken(const dht::Key & token,Uint32 ip,Uint16 port)
{
// the token must be in the map
- if (!tokens.tqcontains(token))
+ if (!tokens.contains(token))
{
Out(SYS_DHT|LOG_DEBUG) << "Unknown token" << endl;
return false;
@@ -169,14 +169,14 @@ namespace dht
return true;
}
- bool Database::tqcontains(const dht::Key & key) const
+ bool Database::contains(const dht::Key & key) const
{
- return items.tqfind(key) != 0;
+ return items.find(key) != 0;
}
void Database::insert(const dht::Key & key)
{
- DBItemList* dbl = items.tqfind(key);
+ DBItemList* dbl = items.find(key);
if (!dbl)
{
dbl = new DBItemList();
diff --git a/libktorrent/kademlia/database.h b/libktorrent/kademlia/database.h
index 12e8373..365f6bb 100644
--- a/libktorrent/kademlia/database.h
+++ b/libktorrent/kademlia/database.h
@@ -118,7 +118,7 @@ namespace dht
bool checkToken(const dht::Key & token,bt::Uint32 ip,bt::Uint16 port);
/// Test wether or not the DB contains a key
- bool tqcontains(const dht::Key & key) const;
+ bool contains(const dht::Key & key) const;
/// Insert an empty item (only if it isn't already in the DB)
void insert(const dht::Key & key);
diff --git a/libktorrent/kademlia/dht.cpp b/libktorrent/kademlia/dht.cpp
index 3eecd7c..f11c1cf 100644
--- a/libktorrent/kademlia/dht.cpp
+++ b/libktorrent/kademlia/dht.cpp
@@ -264,7 +264,7 @@ namespace dht
AnnounceTask* at = new AnnounceTask(db,srv,node,info_hash,port);
at->start(kns,!canStartTask());
tman->addTask(at);
- if (!db->tqcontains(info_hash))
+ if (!db->contains(info_hash))
db->insert(info_hash);
return at;
}
diff --git a/libktorrent/kademlia/kbucket.cpp b/libktorrent/kademlia/kbucket.cpp
index 76986b9..31148ba 100644
--- a/libktorrent/kademlia/kbucket.cpp
+++ b/libktorrent/kademlia/kbucket.cpp
@@ -119,7 +119,7 @@ namespace dht
void KBucket::insert(const KBucketEntry & entry)
{
- TQValueList<KBucketEntry>::iterator i = entries.tqfind(entry);
+ TQValueList<KBucketEntry>::iterator i = entries.find(entry);
// If in the list, move it to the end
if (i != entries.end())
@@ -149,7 +149,7 @@ namespace dht
{
last_modified = bt::GetCurrentTime();
- if (!pending_entries_busy_pinging.tqcontains(c))
+ if (!pending_entries_busy_pinging.contains(c))
return;
KBucketEntry entry = pending_entries_busy_pinging[c];
@@ -166,7 +166,7 @@ namespace dht
void KBucket::onTimeout(RPCCall* c)
{
- if (!pending_entries_busy_pinging.tqcontains(c))
+ if (!pending_entries_busy_pinging.contains(c))
return;
KBucketEntry entry = pending_entries_busy_pinging[c];
@@ -244,9 +244,9 @@ namespace dht
return false;
}
- bool KBucket::tqcontains(const KBucketEntry & entry) const
+ bool KBucket::contains(const KBucketEntry & entry) const
{
- return entries.tqcontains(entry);
+ return entries.contains(entry);
}
void KBucket::findKClosestNodes(KClosestNodesSearch & kns)
diff --git a/libktorrent/kademlia/kbucket.h b/libktorrent/kademlia/kbucket.h
index cfd932d..6930c9d 100644
--- a/libktorrent/kademlia/kbucket.h
+++ b/libktorrent/kademlia/kbucket.h
@@ -169,7 +169,7 @@ namespace dht
Uint32 getNumEntries() const {return entries.count();}
/// See if this bucket contains an entry
- bool tqcontains(const KBucketEntry & entry) const;
+ bool contains(const KBucketEntry & entry) const;
/**
* Find the K closest entries to a key and store them in the KClosestNodesSearch
diff --git a/libktorrent/kademlia/node.h b/libktorrent/kademlia/node.h
index 7d871e0..abc7782 100644
--- a/libktorrent/kademlia/node.h
+++ b/libktorrent/kademlia/node.h
@@ -37,7 +37,7 @@ namespace dht
/**
* @author Joris Guisson
*
- * A Node represents us in the kademlia network. It tqcontains
+ * A Node represents us in the kademlia network. It contains
* our id and 160 KBucket's.
* A KBucketEntry is in node i, when the difference between our id and
* the KBucketEntry's id is between 2 to the power i and 2 to the power i+1.
diff --git a/libktorrent/kademlia/nodelookup.cpp b/libktorrent/kademlia/nodelookup.cpp
index 9175f7d..d1544b6 100644
--- a/libktorrent/kademlia/nodelookup.cpp
+++ b/libktorrent/kademlia/nodelookup.cpp
@@ -56,7 +56,7 @@ namespace dht
// unpack an entry and add it to the todo list
KBucketEntry e = UnpackBucketEntry(nodes,j*26);
// lets not talk to ourself
- if (e.getID() != node->getOurID() && !todo.tqcontains(e) && !visited.tqcontains(e))
+ if (e.getID() != node->getOurID() && !todo.contains(e) && !visited.contains(e))
todo.append(e);
}
num_nodes_rsp++;
@@ -78,7 +78,7 @@ namespace dht
{
KBucketEntry e = todo.first();
// only send a findNode if we haven't allrready visited the node
- if (!visited.tqcontains(e))
+ if (!visited.contains(e))
{
// send a findNode to the node
FindNodeReq* fnr = new FindNodeReq(node->getOurID(),node_id);
diff --git a/libktorrent/kademlia/rpcserver.cpp b/libktorrent/kademlia/rpcserver.cpp
index 9f65b95..0be22a8 100644
--- a/libktorrent/kademlia/rpcserver.cpp
+++ b/libktorrent/kademlia/rpcserver.cpp
@@ -134,10 +134,10 @@ namespace dht
msg->setOrigin(pck.address());
msg->apply(dh_table);
// erase an existing call
- if (msg->getType() == RSP_MSG && calls.tqcontains(msg->getMTID()))
+ if (msg->getType() == RSP_MSG && calls.contains(msg->getMTID()))
{
// delete the call, but first notify it off the response
- RPCCall* c = calls.tqfind(msg->getMTID());
+ RPCCall* c = calls.find(msg->getMTID());
c->response(msg);
calls.erase(msg->getMTID());
c->deleteLater();
@@ -165,7 +165,7 @@ namespace dht
RPCCall* RPCServer::doCall(MsgBase* msg)
{
Uint8 start = next_mtid;
- while (calls.tqcontains(next_mtid))
+ while (calls.contains(next_mtid))
{
next_mtid++;
if (next_mtid == start) // if this happens we cannot do any calls
@@ -197,7 +197,7 @@ namespace dht
void RPCServer::timedOut(Uint8 mtid)
{
// delete the call
- RPCCall* c = calls.tqfind(mtid);
+ RPCCall* c = calls.find(mtid);
if (c)
{
dh_table->timeout(c->getRequest());
@@ -214,7 +214,7 @@ namespace dht
RPCCall* c = call_queue.first();
call_queue.removeFirst();
- while (calls.tqcontains(next_mtid))
+ while (calls.contains(next_mtid))
next_mtid++;
MsgBase* msg = c->getRequest();
@@ -227,7 +227,7 @@ namespace dht
const RPCCall* RPCServer::findCall(Uint8 mtid) const
{
- return calls.tqfind(mtid);
+ return calls.find(mtid);
}
void RPCServer::ping(const dht::Key & our_id,const KNetwork::KSocketAddress & addr)
diff --git a/libktorrent/net/downloadthread.cpp b/libktorrent/net/downloadthread.cpp
index 2adf1a8..ae0f0b9 100644
--- a/libktorrent/net/downloadthread.cpp
+++ b/libktorrent/net/downloadthread.cpp
@@ -61,9 +61,9 @@ namespace net
{
// add to the correct group
Uint32 gid = s->downloadGroupID();
- SocketGroup* g = groups.tqfind(gid);
+ SocketGroup* g = groups.find(gid);
if (!g)
- g = groups.tqfind(0);
+ g = groups.find(0);
g->add(s);
num_ready++;
diff --git a/libktorrent/net/networkthread.cpp b/libktorrent/net/networkthread.cpp
index 0a48af9..40791c9 100644
--- a/libktorrent/net/networkthread.cpp
+++ b/libktorrent/net/networkthread.cpp
@@ -51,7 +51,7 @@ namespace net
void NetworkThread::addGroup(Uint32 gid,Uint32 limit)
{
// if group already exists, just change the limit
- SocketGroup* g = groups.tqfind(gid);
+ SocketGroup* g = groups.find(gid);
if (g)
{
g->setLimit(limit);
@@ -72,7 +72,7 @@ namespace net
void NetworkThread::setGroupLimit(Uint32 gid,Uint32 limit)
{
- SocketGroup* g = groups.tqfind(gid);
+ SocketGroup* g = groups.find(gid);
if (g)
{
g->setLimit(limit);
diff --git a/libktorrent/net/portlist.cpp b/libktorrent/net/portlist.cpp
index 6fa4f6a..56076ed 100644
--- a/libktorrent/net/portlist.cpp
+++ b/libktorrent/net/portlist.cpp
@@ -58,7 +58,7 @@ namespace net
void PortList::removePort(bt::Uint16 number,Protocol proto)
{
- PortList::iterator itr = tqfind(Port(number,proto,false));
+ PortList::iterator itr = find(Port(number,proto,false));
if (itr == end())
return;
diff --git a/libktorrent/net/uploadthread.cpp b/libktorrent/net/uploadthread.cpp
index 3d2fa0a..0023cf6 100644
--- a/libktorrent/net/uploadthread.cpp
+++ b/libktorrent/net/uploadthread.cpp
@@ -52,9 +52,9 @@ namespace net
BufferedSocket* s = *itr;
if (s && s->ok() && s->bytesReadyToWrite())
{
- SocketGroup* g = groups.tqfind(s->uploadGroupID());
+ SocketGroup* g = groups.find(s->uploadGroupID());
if (!g)
- g = groups.tqfind(0);
+ g = groups.find(0);
g->add(s);
num_ready++;
diff --git a/libktorrent/pluginmanager.cpp b/libktorrent/pluginmanager.cpp
index 2389162..3ea1282 100644
--- a/libktorrent/pluginmanager.cpp
+++ b/libktorrent/pluginmanager.cpp
@@ -80,7 +80,7 @@ namespace kt
}
unloaded.insert(plugin->getName(),plugin);
- if (pltoload.tqcontains(plugin->getName()))
+ if (pltoload.contains(plugin->getName()))
load(plugin->getName());
}
@@ -95,7 +95,7 @@ namespace kt
void PluginManager::load(const TQString & name)
{
- Plugin* p = unloaded.tqfind(name);
+ Plugin* p = unloaded.find(name);
if (!p)
return;
@@ -114,7 +114,7 @@ namespace kt
void PluginManager::unload(const TQString & name)
{
- Plugin* p = plugins.tqfind(name);
+ Plugin* p = plugins.find(name);
if (!p)
return;
@@ -236,7 +236,7 @@ namespace kt
bool PluginManager::isLoaded(const TQString & name) const
{
- const Plugin* p = plugins.tqfind(name);
+ const Plugin* p = plugins.find(name);
return p != 0;
}
diff --git a/libktorrent/torrent/advancedchokealgorithm.cpp b/libktorrent/torrent/advancedchokealgorithm.cpp
index f6c807f..7ca0578 100644
--- a/libktorrent/torrent/advancedchokealgorithm.cpp
+++ b/libktorrent/torrent/advancedchokealgorithm.cpp
@@ -234,7 +234,7 @@ namespace bt
while (i != start)
{
Peer* p = pman.getPeer(i);
- if (p && p->isChoked() && p->isInterested() && !p->isSeeder() && ppl.tqcontains(p))
+ if (p && p->isChoked() && p->isInterested() && !p->isSeeder() && ppl.contains(p))
return p->getID();
i = (i + 1) % num_peers;
}
diff --git a/libktorrent/torrent/announcelist.cpp b/libktorrent/torrent/announcelist.cpp
index 7eebf19..4d3d4fa 100644
--- a/libktorrent/torrent/announcelist.cpp
+++ b/libktorrent/torrent/announcelist.cpp
@@ -87,7 +87,7 @@ namespace bt
bool AnnounceList::removeTracker(KURL url)
{
- KURL::List::iterator i = custom_trackers.tqfind(url);
+ KURL::List::iterator i = custom_trackers.find(url);
if(i != custom_trackers.end())
{
custom_trackers.remove(i);
@@ -187,7 +187,7 @@ namespace bt
for (Uint32 i = 0;i < al->getNumTrackerURLs();i++)
{
KURL url = *al->trackers.at(i);
- if (!trackers.tqcontains(url) && !custom_trackers.tqcontains(url))
+ if (!trackers.contains(url) && !custom_trackers.contains(url))
custom_trackers.append(url);
}
}
diff --git a/libktorrent/torrent/cachefile.cpp b/libktorrent/torrent/cachefile.cpp
index 4196016..da5ecae 100644
--- a/libktorrent/torrent/cachefile.cpp
+++ b/libktorrent/torrent/cachefile.cpp
@@ -262,7 +262,7 @@ namespace bt
int ret = 0;
TQMutexLocker lock(&mutex);
// see if it wasn't an offsetted mapping
- if (mappings.tqcontains(ptr))
+ if (mappings.contains(ptr))
{
CacheFile::Entry & e = mappings[ptr];
#if HAVE_MUNMAP64
diff --git a/libktorrent/torrent/chunkdownload.cpp b/libktorrent/torrent/chunkdownload.cpp
index fe095a7..04eb87f 100644
--- a/libktorrent/torrent/chunkdownload.cpp
+++ b/libktorrent/torrent/chunkdownload.cpp
@@ -59,7 +59,7 @@ namespace bt
erase(p);
}
- bool tqcontains(Uint32 p)
+ bool contains(Uint32 p)
{
return count(p) > 0;
}
@@ -111,7 +111,7 @@ namespace bt
return false;
- DownloadtqStatus* ds = dstatus.tqfind(p.getPeer());
+ DownloadtqStatus* ds = dstatus.find(p.getPeer());
if (ds)
ds->remove(pp);
@@ -164,7 +164,7 @@ namespace bt
bool ChunkDownload::assignPeer(PeerDownloader* pd)
{
- if (!pd || pdown.tqcontains(pd))
+ if (!pd || pdown.contains(pd))
return false;
pd->grab();
@@ -179,7 +179,7 @@ namespace bt
void ChunkDownload::notDownloaded(const Request & r,bool reject)
{
// find the peer
- DownloadtqStatus* ds = dstatus.tqfind(r.getPeer());
+ DownloadtqStatus* ds = dstatus.find(r.getPeer());
if (ds)
{
// Out() << "ds != 0" << endl;
@@ -216,7 +216,7 @@ namespace bt
void ChunkDownload::sendRequests(PeerDownloader* pd)
{
timer.update();
- DownloadtqStatus* ds = dstatus.tqfind(pd->getPeer()->getID());
+ DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID());
if (!ds)
return;
@@ -229,7 +229,7 @@ namespace bt
{
// get the first one in the queue
Uint32 i = piece_queue.first();
- if (!ds->tqcontains(i))
+ if (!ds->contains(i))
{
// send request
pd->download(
@@ -262,7 +262,7 @@ namespace bt
void ChunkDownload::sendCancels(PeerDownloader* pd)
{
- DownloadtqStatus* ds = dstatus.tqfind(pd->getPeer()->getID());
+ DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID());
if (!ds)
return;
@@ -287,9 +287,9 @@ namespace bt
while (i != pdown.end())
{
PeerDownloader* pd = *i;
- DownloadtqStatus* ds = dstatus.tqfind(pd->getPeer()->getID());
+ DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID());
Uint32 pp = p.getOffset() / MAX_PIECE_LEN;
- if (ds && ds->tqcontains(pp))
+ if (ds && ds->contains(pp))
{
pd->cancel(Request(p));
ds->remove(pp);
@@ -300,7 +300,7 @@ namespace bt
void ChunkDownload::peerKilled(PeerDownloader* pd)
{
- if (!pdown.tqcontains(pd))
+ if (!pdown.contains(pd))
return;
dstatus.erase(pd->getPeer()->getID());
diff --git a/libktorrent/torrent/chunkdownload.h b/libktorrent/torrent/chunkdownload.h
index c1960f0..c8bd2ae 100644
--- a/libktorrent/torrent/chunkdownload.h
+++ b/libktorrent/torrent/chunkdownload.h
@@ -153,7 +153,7 @@ namespace bt
bool getOnlyDownloader(Uint32 & pid);
/// See if a PeerDownloader is assigned to this chunk
- bool containsPeer(PeerDownloader *pd) {return pdown.tqcontains(pd);}
+ bool containsPeer(PeerDownloader *pd) {return pdown.contains(pd);}
/// See if the download is choked (i.e. all downloaders are choked)
bool isChoked() const;
diff --git a/libktorrent/torrent/downloader.cpp b/libktorrent/torrent/downloader.cpp
index b566ad7..a63163e 100644
--- a/libktorrent/torrent/downloader.cpp
+++ b/libktorrent/torrent/downloader.cpp
@@ -354,7 +354,7 @@ namespace bt
bool Downloader::areWeDownloading(Uint32 chunk) const
{
- return current_chunks.tqfind(chunk) != 0;
+ return current_chunks.find(chunk) != 0;
}
void Downloader::onNewPeer(Peer* peer)
@@ -531,7 +531,7 @@ namespace bt
return;
}
- if (!cman.getChunk(hdr.index) || current_chunks.tqcontains(hdr.index))
+ if (!cman.getChunk(hdr.index) || current_chunks.contains(hdr.index))
{
Out() << "Illegal chunk " << hdr.index << endl;
return;
@@ -628,7 +628,7 @@ namespace bt
{
for (Uint32 i = from;i <= to;i++)
{
- ChunkDownload* cd = current_chunks.tqfind(i);
+ ChunkDownload* cd = current_chunks.find(i);
// let only seed chunks finish
if (!cd || cman.getChunk(i)->getPriority() == ONLY_SEED_PRIORITY)
continue;
@@ -664,7 +664,7 @@ namespace bt
{
for (Uint32 i = 0;i < ok_chunks.getNumBits();i++)
{
- ChunkDownload* cd = current_chunks.tqfind(i);
+ ChunkDownload* cd = current_chunks.find(i);
if (ok_chunks.get(i) && cd)
{
// we have a chunk and we are downloading it so kill it
diff --git a/libktorrent/torrent/httptracker.cpp b/libktorrent/torrent/httptracker.cpp
index ad4bd79..e64f8ce 100644
--- a/libktorrent/torrent/httptracker.cpp
+++ b/libktorrent/torrent/httptracker.cpp
@@ -105,7 +105,7 @@ namespace bt
}
KURL scrape_url = url;
- scrape_url.setFileName(url.fileName(false).tqreplace("announce","scrape"));
+ scrape_url.setFileName(url.fileName(false).replace("announce","scrape"));
TQString epq = scrape_url.encodedPathAndQuery();
const SHA1Hash & info_hash = tor->getInfoHash();
diff --git a/libktorrent/torrent/ipblocklist.cpp b/libktorrent/torrent/ipblocklist.cpp
index 04afe26..632f42c 100644
--- a/libktorrent/torrent/ipblocklist.cpp
+++ b/libktorrent/torrent/ipblocklist.cpp
@@ -147,7 +147,7 @@ namespace bt
{
// Out() << "Blocked range: " << key.m_ip << " - " << key.m_tqmask << endl;
TQMap<IPKey, int>::iterator it;
- if ((it = m_peers.tqfind(key)) != m_peers.end())
+ if ((it = m_peers.find(key)) != m_peers.end())
{
if(it.key().m_tqmask != key.m_tqmask)
@@ -224,7 +224,7 @@ namespace bt
IPKey key(addr, tqmask);
- TQMap<IPKey, int>::iterator it = m_peers.tqfind(key);
+ TQMap<IPKey, int>::iterator it = m_peers.find(key);
if (it == m_peers.end())
return;
@@ -264,7 +264,7 @@ namespace bt
IPKey key(ipi);
TQMap<IPKey, int>::iterator it;
- it = m_peers.tqfind(key);
+ it = m_peers.find(key);
if (it==m_peers.end())
return false;
diff --git a/libktorrent/torrent/multifilecache.cpp b/libktorrent/torrent/multifilecache.cpp
index 88f6d69..b7dae26 100644
--- a/libktorrent/torrent/multifilecache.cpp
+++ b/libktorrent/torrent/multifilecache.cpp
@@ -114,7 +114,7 @@ namespace bt
{
if (!tf.doNotDownload())
{
- if (files.tqcontains(i))
+ if (files.contains(i))
files.erase(i);
fd = new CacheFile();
@@ -123,7 +123,7 @@ namespace bt
}
else
{
- if (dnd_files.tqcontains(i))
+ if (dnd_files.contains(i))
dnd_files.erase(i);
dfd = new DNDFile(dnd_dir + tf.getPath() + ".dnd");
@@ -155,13 +155,13 @@ namespace bt
TorrentFile & tf = tor.getFile(i);
if (tf.doNotDownload())
{
- DNDFile* dfd = dnd_files.tqfind(i);
+ DNDFile* dfd = dnd_files.find(i);
if (dfd)
dfd->changePath(dnd_dir + tf.getPath() + ".dnd");
}
else
{
- CacheFile* fd = files.tqfind(i);
+ CacheFile* fd = files.find(i);
if (fd)
fd->changePath(cache_dir + tf.getPath());
}
@@ -332,7 +332,7 @@ namespace bt
if (tflist.count() == 1)
{
const TorrentFile & f = tor.getFile(tflist.first());
- CacheFile* fd = files.tqfind(tflist.first());
+ CacheFile* fd = files.find(tflist.first());
if (!fd)
return;
@@ -357,8 +357,8 @@ namespace bt
for (Uint32 i = 0;i < tflist.count();i++)
{
const TorrentFile & f = tor.getFile(tflist[i]);
- CacheFile* fd = files.tqfind(tflist[i]);
- DNDFile* dfd = dnd_files.tqfind(tflist[i]);
+ CacheFile* fd = files.find(tflist[i]);
+ DNDFile* dfd = dnd_files.find(tflist[i]);
// first calculate offset into file
// only the first file can have an offset
@@ -412,7 +412,7 @@ namespace bt
{
// in one so just mmap it
Uint64 off = FileOffset(c,tor.getFile(tflist.first()),tor.getChunkSize());
- CacheFile* fd = files.tqfind(tflist.first());
+ CacheFile* fd = files.find(tflist.first());
Uint8* buf = 0;
if (fd && Cache::mappedModeAllowed() && mmap_failures < 3)
{
@@ -449,7 +449,7 @@ namespace bt
if (c->gettqStatus() == Chunk::MMAPPED)
{
// mapped chunks are easy
- CacheFile* fd = files.tqfind(tflist[0]);
+ CacheFile* fd = files.find(tflist[0]);
if (!fd)
return;
@@ -464,8 +464,8 @@ namespace bt
for (Uint32 i = 0;i < tflist.count();i++)
{
const TorrentFile & f = tor.getFile(tflist[i]);
- CacheFile* fd = files.tqfind(tflist[i]);
- DNDFile* dfd = dnd_files.tqfind(tflist[i]);
+ CacheFile* fd = files.find(tflist[i]);
+ DNDFile* dfd = dnd_files.find(tflist[i]);
// first calculate offset into file
// only the first file can have an offset
@@ -828,7 +828,7 @@ namespace bt
try
{
- CacheFile* cf = files.tqfind(i);
+ CacheFile* cf = files.find(i);
if (cf)
{
sum += cf->diskUsage();
diff --git a/libktorrent/torrent/peerdownloader.cpp b/libktorrent/torrent/peerdownloader.cpp
index 00e0b7a..6f0738f 100644
--- a/libktorrent/torrent/peerdownloader.cpp
+++ b/libktorrent/torrent/peerdownloader.cpp
@@ -126,11 +126,11 @@ namespace bt
if (!peer)
return;
- if (wait_queue.tqcontains(req))
+ if (wait_queue.contains(req))
{
wait_queue.remove(req);
}
- else if (reqs.tqcontains(req))
+ else if (reqs.contains(req))
{
reqs.remove(req);
peer->getPacketWriter().sendCancel(req);
@@ -144,7 +144,7 @@ namespace bt
// Out(SYS_CON|LOG_DEBUG) << "Rejected : " << req.getIndex() << " "
// << req.getOffset() << " " << req.getLength() << endl;
- if (reqs.tqcontains(req))
+ if (reqs.contains(req))
{
reqs.remove(req);
rejected(req);
@@ -171,9 +171,9 @@ namespace bt
void PeerDownloader::piece(const Piece & p)
{
Request r(p);
- if (wait_queue.tqcontains(r))
+ if (wait_queue.contains(r))
wait_queue.remove(r);
- else if (reqs.tqcontains(r))
+ else if (reqs.contains(r))
reqs.remove(r);
downloaded(p);
diff --git a/libktorrent/torrent/peerid.cpp b/libktorrent/torrent/peerid.cpp
index b1741d2..09b4bff 100644
--- a/libktorrent/torrent/peerid.cpp
+++ b/libktorrent/torrent/peerid.cpp
@@ -206,7 +206,7 @@ namespace bt
peer_id.tqat(2).isLetter() ) //AZ style
{
TQString ID(peer_id.mid(1,2));
- if (Map.tqcontains(ID))
+ if (Map.contains(ID))
name = Map[ID] + " " + peer_id.tqat(3) + "." + peer_id.tqat(4) + "."
+ peer_id.tqat(5) + "." + peer_id.tqat(6);
}
@@ -215,7 +215,7 @@ namespace bt
peer_id.tqat(2).isDigit() ) //Shadow's style
{
TQString ID = TQString(peer_id.tqat(0));
- if (Map.tqcontains(ID))
+ if (Map.contains(ID))
name = Map[ID] + " " + peer_id.tqat(1) + "." +
peer_id.tqat(2) + "." + peer_id.tqat(3);
}
diff --git a/libktorrent/torrent/peermanager.cpp b/libktorrent/torrent/peermanager.cpp
index c85ebd4..adacbae 100644
--- a/libktorrent/torrent/peermanager.cpp
+++ b/libktorrent/torrent/peermanager.cpp
@@ -509,7 +509,7 @@ namespace bt
Peer* PeerManager::findPeer(Uint32 peer_id)
{
- return peer_map.tqfind(peer_id);
+ return peer_map.find(peer_id);
}
void PeerManager::onRerunChoker()
diff --git a/libktorrent/torrent/peersourcemanager.cpp b/libktorrent/torrent/peersourcemanager.cpp
index 80af240..44303c4 100644
--- a/libktorrent/torrent/peersourcemanager.cpp
+++ b/libktorrent/torrent/peersourcemanager.cpp
@@ -207,7 +207,7 @@ namespace bt
void PeerSourceManager::addTracker(KURL url, bool custom,int tier)
{
- if (trackers.tqcontains(url))
+ if (trackers.contains(url))
return;
Tracker* trk = 0;
@@ -227,11 +227,11 @@ namespace bt
bool PeerSourceManager::removeTracker(KURL url)
{
- if (!custom_trackers.tqcontains(url))
+ if (!custom_trackers.contains(url))
return false;
custom_trackers.remove(url);
- Tracker* trk = trackers.tqfind(url);
+ Tracker* trk = trackers.find(url);
if (curr == trk)
{
// do a timed delete on the tracker, so the stop signal
@@ -260,7 +260,7 @@ namespace bt
void PeerSourceManager::setTracker(KURL url)
{
- Tracker* trk = trackers.tqfind(url);
+ Tracker* trk = trackers.find(url);
if (!trk)
return;
@@ -279,7 +279,7 @@ namespace bt
KURL::List::iterator i = custom_trackers.begin();
while (i != custom_trackers.end())
{
- Tracker* t = trackers.tqfind(*i);
+ Tracker* t = trackers.find(*i);
if (t)
{
if (curr == t)
diff --git a/libktorrent/torrent/queuemanager.cpp b/libktorrent/torrent/queuemanager.cpp
index 1199179..affedf5 100644
--- a/libktorrent/torrent/queuemanager.cpp
+++ b/libktorrent/torrent/queuemanager.cpp
@@ -68,7 +68,7 @@ namespace bt
{
paused_torrents.erase(tc);
- int index = downloads.tqfindRef(tc);
+ int index = downloads.findRef(tc);
if (index != -1)
downloads.remove(index);
diff --git a/libktorrent/torrent/singlefilecache.cpp b/libktorrent/torrent/singlefilecache.cpp
index 7ad0fd6..4843c1f 100644
--- a/libktorrent/torrent/singlefilecache.cpp
+++ b/libktorrent/torrent/singlefilecache.cpp
@@ -65,7 +65,7 @@ namespace bt
{
bt::Delete(cache_file);
output_file = outputpath;
- datadir = output_file.left(output_file.tqfindRev(bt::DirSeparator()));
+ datadir = output_file.left(output_file.findRev(bt::DirSeparator()));
bt::SymLink(output_file, cache_file);
}
diff --git a/libktorrent/torrent/statsfile.cpp b/libktorrent/torrent/statsfile.cpp
index 54033aa..772f6be 100644
--- a/libktorrent/torrent/statsfile.cpp
+++ b/libktorrent/torrent/statsfile.cpp
@@ -97,7 +97,7 @@ namespace bt
while (!in.atEnd())
{
TQString line = in.readLine();
- TQString tmp = line.left(line.tqfind('='));
+ TQString tmp = line.left(line.find('='));
m_values.insert(tmp, line.mid(tmp.length()+1));
}
close();
diff --git a/libktorrent/torrent/statsfile.h b/libktorrent/torrent/statsfile.h
index c37018f..3b3decb 100644
--- a/libktorrent/torrent/statsfile.h
+++ b/libktorrent/torrent/statsfile.h
@@ -78,7 +78,7 @@ namespace bt
* @param key The key
* @return true if key is in the stats file
*/
- bool hasKey(const TQString & key) const {return m_values.tqcontains(key);}
+ bool hasKey(const TQString & key) const {return m_values.contains(key);}
private:
TQString m_filename;
diff --git a/libktorrent/torrent/torrent.cpp b/libktorrent/torrent/torrent.cpp
index e02af51..c5d8459 100644
--- a/libktorrent/torrent/torrent.cpp
+++ b/libktorrent/torrent/torrent.cpp
@@ -444,6 +444,6 @@ namespace bt
bool Torrent::checkPathForDirectoryTraversal(const TQString & p)
{
TQStringList sl = TQStringList::split(bt::DirSeparator(),p);
- return !sl.tqcontains("..");
+ return !sl.contains("..");
}
}
diff --git a/libktorrent/torrent/torrentcontrol.cpp b/libktorrent/torrent/torrentcontrol.cpp
index ba51092..a586356 100644
--- a/libktorrent/torrent/torrentcontrol.cpp
+++ b/libktorrent/torrent/torrentcontrol.cpp
@@ -785,7 +785,7 @@ namespace bt
bool TorrentControl::changeDataDir(const TQString & new_dir)
{
- int pos = datadir.tqfindRev(bt::DirSeparator(),-2);
+ int pos = datadir.findRev(bt::DirSeparator(),-2);
if (pos == -1)
{
Out(SYS_GEN|LOG_DEBUG) << "Could not find torX part in " << datadir << endl;
@@ -833,7 +833,7 @@ namespace bt
TQString nd;
if (istats.custom_output_name)
{
- int slash_pos = stats.output_path.tqfindRev(bt::DirSeparator(),-2);
+ int slash_pos = stats.output_path.findRev(bt::DirSeparator(),-2);
nd = new_dir + stats.output_path.mid(slash_pos + 1);
}
else
@@ -1255,10 +1255,10 @@ namespace bt
{
// in case of error copy torX dir to migrate-failed-tor
TQString dd = datadir;
- int pos = dd.tqfindRev("tor");
+ int pos = dd.findRev("tor");
if (pos != - 1)
{
- dd = dd.tqreplace(pos,3,"migrate-failed-tor");
+ dd = dd.replace(pos,3,"migrate-failed-tor");
Out() << "Copying " << datadir << " to " << dd << endl;
bt::CopyDir(datadir,dd,true);
}
diff --git a/libktorrent/torrent/udptrackersocket.cpp b/libktorrent/torrent/udptrackersocket.cpp
index 79e9c5c..e440e3c 100644
--- a/libktorrent/torrent/udptrackersocket.cpp
+++ b/libktorrent/torrent/udptrackersocket.cpp
@@ -105,7 +105,7 @@ namespace bt
// Read the transaction_id and check it
Int32 tid = ReadInt32(buf,4);
- TQMap<Int32,Action>::iterator i = transactions.tqfind(tid);
+ TQMap<Int32,Action>::iterator i = transactions.find(tid);
// if we can't find the transaction, just return
if (i == transactions.end())
{
@@ -131,7 +131,7 @@ namespace bt
// Read the transaction_id and check it
Int32 tid = ReadInt32(buf,4);
- TQMap<Int32,Action>::iterator i = transactions.tqfind(tid);
+ TQMap<Int32,Action>::iterator i = transactions.find(tid);
// if we can't find the transaction, just return
if (i == transactions.end())
return;
@@ -154,7 +154,7 @@ namespace bt
const Uint8* buf = (const Uint8*)data.data();
// Read the transaction_id and check it
Int32 tid = ReadInt32(buf,4);
- TQMap<Int32,Action>::iterator it = transactions.tqfind(tid);
+ TQMap<Int32,Action>::iterator it = transactions.find(tid);
// if we can't find the transaction, just return
if (it == transactions.end())
return;
@@ -203,7 +203,7 @@ namespace bt
Int32 UDPTrackerSocket::newTransactionID()
{
Int32 transaction_id = rand() * time(0);
- while (transactions.tqcontains(transaction_id))
+ while (transactions.contains(transaction_id))
transaction_id++;
return transaction_id;
}
diff --git a/libktorrent/util/httprequest.cpp b/libktorrent/util/httprequest.cpp
index ed7d980..a52788e 100644
--- a/libktorrent/util/httprequest.cpp
+++ b/libktorrent/util/httprequest.cpp
@@ -55,8 +55,8 @@ namespace bt
void HTTPRequest::onConnect(const KResolverEntry&)
{
- payload = payload.tqreplace("$LOCAL_IP",sock->localAddress().nodeName());
- hdr = hdr.tqreplace("$CONTENT_LENGTH",TQString::number(payload.length()));
+ payload = payload.replace("$LOCAL_IP",sock->localAddress().nodeName());
+ hdr = hdr.replace("$CONTENT_LENGTH",TQString::number(payload.length()));
TQString req = hdr + payload;
if (verbose)
@@ -88,7 +88,7 @@ namespace bt
Out(SYS_PNP|LOG_DEBUG) << strdata << endl;
}
- if (sl.first().tqcontains("HTTP") && sl.first().tqcontains("200"))
+ if (sl.first().contains("HTTP") && sl.first().contains("200"))
{
// emit reply OK
replyOK(this,sl.last());
diff --git a/libktorrent/util/ptrmap.h b/libktorrent/util/ptrmap.h
index 9474db1..36e1c20 100644
--- a/libktorrent/util/ptrmap.h
+++ b/libktorrent/util/ptrmap.h
@@ -129,7 +129,7 @@ namespace bt
* @param k The key
* @return The data of the key, 0 if the key isn't in the map
*/
- Data* tqfind(const Key & k)
+ Data* find(const Key & k)
{
iterator i = pmap.find(k);
return (i == pmap.end()) ? 0 : i->second;
@@ -140,7 +140,7 @@ namespace bt
* @param k The key
* @return The data of the key, 0 if the key isn't in the map
*/
- const Data* tqfind(const Key & k) const
+ const Data* find(const Key & k) const
{
const_iterator i = pmap.find(k);
return (i == pmap.end()) ? 0 : i->second;
@@ -151,7 +151,7 @@ namespace bt
* @param k The key
* @return true if it is part of the map
*/
- bool tqcontains(const Key & k) const
+ bool contains(const Key & k) const
{
const_iterator i = pmap.find(k);
return i != pmap.end();
diff --git a/plugins/infowidget/chunkdownloadview.cpp b/plugins/infowidget/chunkdownloadview.cpp
index 3258441..cec3386 100644
--- a/plugins/infowidget/chunkdownloadview.cpp
+++ b/plugins/infowidget/chunkdownloadview.cpp
@@ -95,7 +95,7 @@ namespace kt
void ChunkDownloadView::removeDownload(kt::ChunkDownloadInterface* cd)
{
- if (!items.tqcontains(cd))
+ if (!items.contains(cd))
return;
ChunkDownloadViewItem* it = items[cd];
diff --git a/plugins/infowidget/flagdb.cpp b/plugins/infowidget/flagdb.cpp
index ceea6fc..c7ec520 100644
--- a/plugins/infowidget/flagdb.cpp
+++ b/plugins/infowidget/flagdb.cpp
@@ -92,7 +92,7 @@ bool kt::FlagDB::isFlagAvailable(const TQString& country)
const TQPixmap& kt::FlagDB::getFlag(const TQString& country)
{
const TQString& c = country.lower();
- if (!db.tqcontains(c)) {
+ if (!db.contains(c)) {
TQImage img;
TQPixmap pixmap;
for (TQValueList<FlagDBSource>::const_iterator it = sources.constBegin(); it != sources.constEnd(); it++) {
diff --git a/plugins/infowidget/peerview.cpp b/plugins/infowidget/peerview.cpp
index a3876c6..a6b0675 100644
--- a/plugins/infowidget/peerview.cpp
+++ b/plugins/infowidget/peerview.cpp
@@ -267,7 +267,7 @@ namespace kt
void PeerView::removePeer(kt::PeerInterface* peer)
{
- TQMap<kt::PeerInterface*,PeerViewItem*>::iterator it = items.tqfind(peer);
+ TQMap<kt::PeerInterface*,PeerViewItem*>::iterator it = items.find(peer);
if (it == items.end())
{
return;
diff --git a/plugins/partfileimport/importdialog.cpp b/plugins/partfileimport/importdialog.cpp
index 158b4f8..5ca35c4 100644
--- a/plugins/partfileimport/importdialog.cpp
+++ b/plugins/partfileimport/importdialog.cpp
@@ -146,7 +146,7 @@ namespace kt
TQString durl = data_url.path();
if (durl.endsWith(bt::DirSeparator()))
durl = durl.left(durl.length() - 1);
- int ds = durl.tqfindRev(bt::DirSeparator());
+ int ds = durl.findRev(bt::DirSeparator());
if (durl.mid(ds+1) == tor.getNameSuggestion())
{
durl = durl.left(ds);
@@ -163,7 +163,7 @@ namespace kt
// single file, just symlink the data_url to tor_dir/cache
bt::SymLink(data_url.path(),tor_dir + "cache");
TQString durl = data_url.path();
- int ds = durl.tqfindRev(bt::DirSeparator());
+ int ds = durl.findRev(bt::DirSeparator());
durl = durl.left(ds);
saveStats(tor_dir + "stats",durl,imported,false);
}
diff --git a/plugins/rssfeed/rss/tools_p.cpp b/plugins/rssfeed/rss/tools_p.cpp
index 51fcbf5..fb161e8 100644
--- a/plugins/rssfeed/rss/tools_p.cpp
+++ b/plugins/rssfeed/rss/tools_p.cpp
@@ -20,7 +20,7 @@ time_t RSS::parseISO8601Date(const TQString &s)
return 0; // error
// FIXME: imho this is done in KRFCDate::parseDateISO8601() automatically, so we could omit it? -fo
- if (s.tqfind('T') != -1)
+ if (s.find('T') != -1)
return KRFCDate::parseDateISO8601(s);
else
return KRFCDate::parseDateISO8601(s + "T12:00:00");
@@ -35,10 +35,10 @@ TQString RSS::extractNode(const TQDomNode &tqparent, const TQString &elemName, b
TQString result = node.toElement().text();
- bool hasPre = result.tqcontains("<pre>",false);
- bool hasHtml = hasPre || result.tqcontains("<"); // FIXME: test if we have html, should be more clever -> regexp
+ bool hasPre = result.contains("<pre>",false);
+ bool hasHtml = hasPre || result.contains("<"); // FIXME: test if we have html, should be more clever -> regexp
if(!isInlined && !hasHtml) // perform nl2br if not a inline elt and it has no html elts
- result = result = result.tqreplace(TQChar('\n'), "<br />");
+ result = result = result.replace(TQChar('\n'), "<br />");
if(!hasPre) // strip white spaces if no <pre>
result = result.simplifyWhiteSpace();
diff --git a/plugins/rssfeed/rssfeed.cpp b/plugins/rssfeed/rssfeed.cpp
index f5b4c64..ef81495 100644
--- a/plugins/rssfeed/rssfeed.cpp
+++ b/plugins/rssfeed/rssfeed.cpp
@@ -182,7 +182,7 @@ namespace kt
{
TQDir directory;
directory.mkdir(KGlobal::dirs()->saveLocation("data","ktorrent") + "rssfeeds");
- return KGlobal::dirs()->saveLocation("data","ktorrent") + "rssfeeds/" + m_feedUrl.prettyURL(-1).tqreplace("/", "_").tqreplace(":", "_") + ".ktr";
+ return KGlobal::dirs()->saveLocation("data","ktorrent") + "rssfeeds/" + m_feedUrl.prettyURL(-1).replace("/", "_").replace(":", "_") + ".ktr";
}
@@ -290,7 +290,7 @@ namespace kt
for (int i=doc.articles().count()-1; i>=0; i--)
{
curArticle = doc.articles()[i];
- if (curArticle.pubDate().daysTo(TQDateTime::tqcurrentDateTime()) < m_articleAge && !m_articles.tqcontains(curArticle))
+ if (curArticle.pubDate().daysTo(TQDateTime::tqcurrentDateTime()) < m_articleAge && !m_articles.contains(curArticle))
{
m_articles.prepend(curArticle);
emit scanRssArticle(curArticle);
diff --git a/plugins/rssfeed/rssfeedmanager.cpp b/plugins/rssfeed/rssfeedmanager.cpp
index 6646f06..f9d0a2f 100644
--- a/plugins/rssfeed/rssfeedmanager.cpp
+++ b/plugins/rssfeed/rssfeedmanager.cpp
@@ -138,7 +138,7 @@ namespace kt
void RssFeedManager::clearArticles()
{
- int pos = feeds.tqfind((RssFeed *)sender());
+ int pos = feeds.find((RssFeed *)sender());
if (pos >= 0)
{
@@ -606,7 +606,7 @@ namespace kt
if (item < 0)
{
//let's check which one sent the signal - if we can't figure it all then update them all
- int pos = feeds.tqfind((RssFeed *)sender());
+ int pos = feeds.find((RssFeed *)sender());
if (pos < 0)
{
@@ -639,7 +639,7 @@ namespace kt
if (item < 0)
{
//let's check which one sent the signal - if we can't figure it all then update them all
- int pos = acceptFilters.tqfind((RssFilter *)sender());
+ int pos = acceptFilters.find((RssFilter *)sender());
if (pos < 0)
{
@@ -672,7 +672,7 @@ namespace kt
if (item < 0)
{
//let's check which one sent the signal - if we can't figure it all then update them all
- int pos = rejectFilters.tqfind((RssFilter *)sender());
+ int pos = rejectFilters.find((RssFilter *)sender());
if (pos < 0)
{
@@ -1254,7 +1254,7 @@ namespace kt
void RssFeedManager::rescanFilter()
{
- int pos = acceptFilters.tqfind((RssFilter *)sender());
+ int pos = acceptFilters.find((RssFilter *)sender());
if (pos >= 0)
{
diff --git a/plugins/rssfeed/rssfilter.cpp b/plugins/rssfeed/rssfilter.cpp
index e7c4925..8210bcc 100644
--- a/plugins/rssfeed/rssfilter.cpp
+++ b/plugins/rssfeed/rssfilter.cpp
@@ -276,14 +276,14 @@ namespace kt
if (!invert)
{
- if (!article.title().tqcontains(regEx) && !article.link().prettyURL().tqcontains(regEx) && !article.description().tqcontains(regEx) )
+ if (!article.title().contains(regEx) && !article.link().prettyURL().contains(regEx) && !article.description().contains(regEx) )
{
return false;
}
}
else
{
- if (article.title().tqcontains(regEx) || article.link().prettyURL().tqcontains(regEx) || article.description().tqcontains(regEx) )
+ if (article.title().contains(regEx) || article.link().prettyURL().contains(regEx) || article.description().contains(regEx) )
{
return false;
}
diff --git a/plugins/rssfeed/rsslinkdownloader.cpp b/plugins/rssfeed/rsslinkdownloader.cpp
index 467055e..dd754e5 100644
--- a/plugins/rssfeed/rsslinkdownloader.cpp
+++ b/plugins/rssfeed/rsslinkdownloader.cpp
@@ -83,7 +83,7 @@ namespace kt
hrefTags.setMinimal(true);
int matchPos = 0;
- while (htmlline.tqfind(hrefTags, matchPos) >= 0)
+ while (htmlline.find(hrefTags, matchPos) >= 0)
{
matchPos += hrefTags.matchedLength();
//we're found an <a href tag - let's check it if contains download
@@ -100,7 +100,7 @@ namespace kt
hrefText = TQString("HREF=\"?([^\">< ]*)[\" ]");
hrefText.setCaseSensitive(false);
- hrefTags.tqcapturedTexts()[0].tqfind(hrefText);
+ hrefTags.tqcapturedTexts()[0].find(hrefText);
//lets get the captured
TQString hrefLink = hrefText.capturedTexts()[1];
@@ -110,7 +110,7 @@ namespace kt
}
else if (!hrefLink.tqstartsWith("http://", false))
{
- hrefLink = url.url().left(url.url().tqfindRev("/")+1) + hrefLink;
+ hrefLink = url.url().left(url.url().findRev("/")+1) + hrefLink;
}
subLinks.append(hrefLink);
diff --git a/plugins/scanfolder/scanfolder.cpp b/plugins/scanfolder/scanfolder.cpp
index 36b1ce2..fbac691 100644
--- a/plugins/scanfolder/scanfolder.cpp
+++ b/plugins/scanfolder/scanfolder.cpp
@@ -132,7 +132,7 @@ namespace kt
return;
//search for entry
- TQValueList<KURL>::iterator it = m_pendingURLs.tqfind(url);
+ TQValueList<KURL>::iterator it = m_pendingURLs.find(url);
//if no entry is found than this torrent was not started by this plugin so - quit
if(it == m_pendingURLs.end())
diff --git a/plugins/search/searchenginelist.cpp b/plugins/search/searchenginelist.cpp
index 9e22990..a117f79 100644
--- a/plugins/search/searchenginelist.cpp
+++ b/plugins/search/searchenginelist.cpp
@@ -51,9 +51,9 @@ namespace kt
// replace spaces by %20
TQString name = e.name;
- name = name.tqreplace(" ","%20");
+ name = name.replace(" ","%20");
TQString u = e.url.prettyURL();
- u = u.tqreplace(" ","%20");
+ u = u.replace(" ","%20");
out << name << " " << u << ::endl;
i++;
}
@@ -85,7 +85,7 @@ namespace kt
SearchEngine se;
se.name = tokens[0];
- se.name = se.name.tqreplace("%20"," ");
+ se.name = se.name.replace("%20"," ");
se.url = KURL::fromPathOrURL(tokens[1]);
for(Uint32 i=2; i<tokens.count(); ++i)
diff --git a/plugins/search/searchplugin.cpp b/plugins/search/searchplugin.cpp
index 8638dfe..9b13680 100644
--- a/plugins/search/searchplugin.cpp
+++ b/plugins/search/searchplugin.cpp
@@ -102,7 +102,7 @@ namespace kt
engine = 0;
TQString s_url = sl.getSearchURL(engine).prettyURL();
- s_url.tqreplace("FOOBAR", KURL::encode_string(text), true);
+ s_url.replace("FOOBAR", KURL::encode_string(text), true);
KURL url = KURL::fromPathOrURL(s_url);
if(SearchPluginSettings::useDefaultBrowser())
@@ -141,7 +141,7 @@ namespace kt
void SearchPlugin::tabCloseRequest(kt::GUIInterface* gui,TQWidget* tab)
{
- if (searches.tqcontains((SearchWidget*)tab))
+ if (searches.contains((SearchWidget*)tab))
{
searches.remove((SearchWidget*)tab);
gui->removeTabPage(tab);
diff --git a/plugins/search/searchprefpage.cpp b/plugins/search/searchprefpage.cpp
index e7ee9c3..197dd0f 100644
--- a/plugins/search/searchprefpage.cpp
+++ b/plugins/search/searchprefpage.cpp
@@ -112,7 +112,7 @@ namespace kt
TQListViewItem* item = itr.current();
TQString u = item->text(1);
TQString name = item->text(0);
- out << name.tqreplace(" ","%20") << " " << u.tqreplace(" ","%20") << endl;
+ out << name.replace(" ","%20") << " " << u.replace(" ","%20") << endl;
itr++;
}
}
@@ -123,7 +123,7 @@ namespace kt
{
KMessageBox::error(this, i18n("You must enter the search engine's name and URL"));
}
- else if ( m_engine_url->text().tqcontains("FOOBAR") )
+ else if ( m_engine_url->text().contains("FOOBAR") )
{
KURL url = KURL::fromPathOrURL(m_engine_url->text());
if ( !url.isValid() )
@@ -132,7 +132,7 @@ namespace kt
return;
}
- if (m_engines->tqfindItem(m_engine_name->text(), 0))
+ if (m_engines->findItem(m_engine_name->text(), 0))
{
KMessageBox::error(this, i18n("A search engine with the same name already exists. Please use a different name.")); return;
}
@@ -217,7 +217,7 @@ namespace kt
TQStringList tokens = TQStringList::split(" ", line);
TQString name = tokens[0];
- name = name.tqreplace("%20"," ");
+ name = name.replace("%20"," ");
KURL url = KURL::fromPathOrURL(tokens[1]);
for(Uint32 i=2; i<tokens.count(); ++i)
@@ -229,7 +229,7 @@ namespace kt
TQMap<TQString,KURL>::iterator i = engines.begin();
while (i != engines.end())
{
- TQListViewItem* item = m_engines->tqfindItem(i.key(),0);
+ TQListViewItem* item = m_engines->findItem(i.key(),0);
// if we have found the item, replace it if not make a new one
if (item)
item->setText(1, i.data().prettyURL());
diff --git a/plugins/search/searchwidget.cpp b/plugins/search/searchwidget.cpp
index b7e2627..abe1f39 100644
--- a/plugins/search/searchwidget.cpp
+++ b/plugins/search/searchwidget.cpp
@@ -172,7 +172,7 @@ namespace kt
engine = sbar->m_search_engine->currentItem();
TQString s_url = sl.getSearchURL(engine).prettyURL();
- s_url.tqreplace("FOOBAR", KURL::encode_string(text), true);
+ s_url.replace("FOOBAR", KURL::encode_string(text), true);
KURL url = KURL::fromPathOrURL(s_url);
statusBarMsg(i18n("Searching for %1...").tqarg(text));
diff --git a/plugins/stats/ChartDrawer.cc b/plugins/stats/ChartDrawer.cc
index 5824684..4c7c1d3 100644
--- a/plugins/stats/ChartDrawer.cc
+++ b/plugins/stats/ChartDrawer.cc
@@ -433,8 +433,8 @@ void ChartDrawer::MakeLegendTooltip()
img[i].setPixel(15, px, 0); //r
}
- factory->setImage(mEls[i].GetName().tqreplace(' ', '_') + "-" + TQString::number(i), img[i]);
- helpstr += TQString("<img src='%1'>&nbsp;&nbsp;-&nbsp;&nbsp;%2<br>").tqarg(mEls[i].GetName().tqreplace(" ", "_") + "-" + TQString::number(i)).tqarg( mEls[i].GetName() );
+ factory->setImage(mEls[i].GetName().replace(' ', '_') + "-" + TQString::number(i), img[i]);
+ helpstr += TQString("<img src='%1'>&nbsp;&nbsp;-&nbsp;&nbsp;%2<br>").tqarg(mEls[i].GetName().replace(" ", "_") + "-" + TQString::number(i)).tqarg( mEls[i].GetName() );
}
TQToolTip::add(this, helpstr);
diff --git a/plugins/stats/PeerMonitor.cc b/plugins/stats/PeerMonitor.cc
index 8a903c3..083e158 100644
--- a/plugins/stats/PeerMonitor.cc
+++ b/plugins/stats/PeerMonitor.cc
@@ -43,7 +43,7 @@ void PeerMonitor::peerRemoved (kt::PeerInterface *peer)
TQMutexLocker lock(&mtx);
- data_t::iterator it = std::tqfind(mPeers.begin(), mPeers.end(), peer);
+ data_t::iterator it = std::find(mPeers.begin(), mPeers.end(), peer);
if(it != mPeers.end())
{
@@ -73,7 +73,7 @@ void PeerMonitor::stopped ()
void PeerMonitor::destroyed ()
{
- if(pmPeerMMgr -> tqfind(pmTorIface -> getInfoHash()) != pmPeerMMgr -> end() )
+ if(pmPeerMMgr -> find(pmTorIface -> getInfoHash()) != pmPeerMMgr -> end() )
{
pmTorIface -> setMonitor(0);
pmPeerMMgr -> erase(pmTorIface -> getInfoHash());
diff --git a/plugins/upnp/upnpmcastsocket.cpp b/plugins/upnp/upnpmcastsocket.cpp
index 6395752..facf207 100644
--- a/plugins/upnp/upnpmcastsocket.cpp
+++ b/plugins/upnp/upnpmcastsocket.cpp
@@ -103,7 +103,7 @@ namespace kt
else
{
// add it to the list and emit the signal
- if (!routers.tqcontains(r->getServer()))
+ if (!routers.contains(r->getServer()))
{
routers.insert(r->getServer(),r);
discovered(r);
@@ -164,13 +164,13 @@ namespace kt
// first read first line and see if contains a HTTP 200 OK message
TQString line = lines.first();
- if (!line.tqcontains("HTTP"))
+ if (!line.contains("HTTP"))
{
// it is either a 200 OK or a NOTIFY
- if (!line.tqcontains("NOTIFY") && !line.tqcontains("200"))
+ if (!line.contains("NOTIFY") && !line.contains("200"))
return 0;
}
- else if (line.tqcontains("M-SEARCH")) // ignore M-SEARCH
+ else if (line.contains("M-SEARCH")) // ignore M-SEARCH
return 0;
// quick check that the response being parsed is valid
@@ -178,7 +178,7 @@ namespace kt
for (Uint32 idx = 0;idx < lines.count() && !validDevice; idx++)
{
line = lines[idx];
- if ((line.tqcontains("ST:") || line.tqcontains("NT:")) && line.tqcontains("InternetGatewayDevice"))
+ if ((line.contains("ST:") || line.contains("NT:")) && line.contains("InternetGatewayDevice"))
{
validDevice = true;
}
@@ -195,20 +195,20 @@ namespace kt
line = lines[i];
if (line.startsWith("Location") || line.startsWith("LOCATION") || line.startsWith("location"))
{
- location = line.mid(line.tqfind(':') + 1).stripWhiteSpace();
+ location = line.mid(line.find(':') + 1).stripWhiteSpace();
if (!location.isValid())
return 0;
}
else if (line.startsWith("Server") || line.startsWith("server") || line.startsWith("SERVER"))
{
- server = line.mid(line.tqfind(':') + 1).stripWhiteSpace();
+ server = line.mid(line.find(':') + 1).stripWhiteSpace();
if (server.length() == 0)
return 0;
}
}
- if (routers.tqcontains(server))
+ if (routers.contains(server))
{
return 0;
}
@@ -265,7 +265,7 @@ namespace kt
TQString server, location;
server = fin.readLine();
location = fin.readLine();
- if (!routers.tqcontains(server))
+ if (!routers.contains(server))
{
UPnPRouter* r = new UPnPRouter(server,location);
// download it's xml file
diff --git a/plugins/upnp/upnpmcastsocket.h b/plugins/upnp/upnpmcastsocket.h
index 86688a2..cc7a134 100644
--- a/plugins/upnp/upnpmcastsocket.h
+++ b/plugins/upnp/upnpmcastsocket.h
@@ -49,7 +49,7 @@ namespace kt
Uint32 getNumDevicesDiscovered() const {return routers.count();}
/// Find a router using it's server name
- UPnPRouter* findDevice(const TQString & name) {return routers.tqfind(name);}
+ UPnPRouter* findDevice(const TQString & name) {return routers.find(name);}
/// Save all routers to a file (for convenience at startup)
void saveRouters(const TQString & file);
diff --git a/plugins/upnp/upnpprefwidget.cpp b/plugins/upnp/upnpprefwidget.cpp
index bd4e593..bc05ad4 100644
--- a/plugins/upnp/upnpprefwidget.cpp
+++ b/plugins/upnp/upnpprefwidget.cpp
@@ -201,7 +201,7 @@ namespace kt
msg += TQString::number(f.port.number) + " (";
TQString prot = (f.port.proto == net::UDP ? "UDP" : "TCP");
msg += prot + ")";
- if (f.service->servicetype.tqcontains("WANPPPConnection"))
+ if (f.service->servicetype.contains("WANPPPConnection"))
services += "PPP";
else
services += "IP";
diff --git a/plugins/webinterface/httpserver.cpp b/plugins/webinterface/httpserver.cpp
index 06d8d34..d04449b 100644
--- a/plugins/webinterface/httpserver.cpp
+++ b/plugins/webinterface/httpserver.cpp
@@ -88,7 +88,7 @@ namespace kt
void HttpServer::slotSocketReadyToRead()
{
TQSocket* client = (TQSocket*)sender();
- HttpClientHandler* handler = clients.tqfind(client);
+ HttpClientHandler* handler = clients.find(client);
if (!handler)
{
client->deleteLater();
@@ -112,7 +112,7 @@ namespace kt
Uint8 h = (a.latin1() - (a.isNumber() ? '0' : 'a')) << 4;
Uint8 l = (b.latin1() - (b.isNumber() ? '0' : 'a'));
char r = (char) h | l; // combine them and cast to a char
- password.tqreplace(idx,3,r);
+ password.replace(idx,3,r);
return idx + 1;
}
@@ -134,7 +134,7 @@ namespace kt
// check for passwords with url encoded stuff in them and decode them if necessary
int idx = 0;
- while ((idx = password.tqfind('%',idx)) > 0)
+ while ((idx = password.find('%',idx)) > 0)
{
if (idx + 2 < password.length())
{
@@ -170,7 +170,7 @@ namespace kt
if (hdr.hasKey("Cookie"))
{
TQString cookie = hdr.value("Cookie");
- int idx = cookie.tqfind("KT_SESSID=");
+ int idx = cookie.find("KT_SESSID=");
if (idx == -1)
return false;
@@ -432,7 +432,7 @@ namespace kt
{
const char* ptr = data.data();
Uint32 len = data.size();
- int pos = TQString(data).tqfind("\r\n\r\n");
+ int pos = TQString(data).find("\r\n\r\n");
if (pos == -1 || pos + 4 >= len || ptr[pos + 4] != 'd')
{
@@ -540,7 +540,7 @@ namespace kt
bt::MMapFile* HttpServer::cacheLookup(const TQString & name)
{
- return cache.tqfind(name);
+ return cache.find(name);
}
void HttpServer::insertIntoCache(const TQString & name,bt::MMapFile* file)
diff --git a/plugins/webinterface/php_handler.cpp b/plugins/webinterface/php_handler.cpp
index 852f1fd..87c8acd 100644
--- a/plugins/webinterface/php_handler.cpp
+++ b/plugins/webinterface/php_handler.cpp
@@ -48,7 +48,7 @@ namespace kt
bool PhpHandler::executeScript(const TQString & path,const TQMap<TQString,TQString> & args)
{
TQByteArray php_s;
- if (!scripts.tqcontains(path))
+ if (!scripts.contains(path))
{
TQFile fptr(path);
if (!fptr.open(IO_ReadOnly))
@@ -66,7 +66,7 @@ namespace kt
output.resize(0);
- int firstphptag = TQCString(php_s).tqfind("<?php");
+ int firstphptag = TQCString(php_s).find("<?php");
if (firstphptag == -1)
return false;
diff --git a/plugins/webinterface/php_interface.cpp b/plugins/webinterface/php_interface.cpp
index 4206caa..fe98c00 100644
--- a/plugins/webinterface/php_interface.cpp
+++ b/plugins/webinterface/php_interface.cpp
@@ -114,13 +114,13 @@ namespace kt
out << TQString("\"leechers_connected_to\" => %1,\n").tqarg(stats.leechers_connected_to);
out << TQString("\"status\" => %1,\n").tqarg(stats.status);
out << TQString("\"running\" => %1,\n").tqarg(stats.running);
- out << TQString("\"trackerstatus\" => \"%1\",\n").tqarg(stats.trackerstatus.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
+ out << TQString("\"trackerstatus\" => \"%1\",\n").tqarg(stats.trackerstatus.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
out << TQString("\"session_bytes_downloaded\" => %1,\n").tqarg(stats.session_bytes_downloaded);
out << TQString("\"session_bytes_uploaded\" => %1,\n").tqarg(stats.session_bytes_uploaded);
out << TQString("\"trk_bytes_downloaded\" => %1,\n").tqarg(stats.trk_bytes_downloaded);
out << TQString("\"trk_bytes_uploaded\" => %1,\n").tqarg(stats.trk_bytes_uploaded);
- out << TQString("\"torrent_name\" => \"%1\",\n").tqarg(stats.torrent_name.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
- out << TQString("\"output_path\" => \"%1\",\n").tqarg(stats.output_path.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
+ out << TQString("\"torrent_name\" => \"%1\",\n").tqarg(stats.torrent_name.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
+ out << TQString("\"output_path\" => \"%1\",\n").tqarg(stats.output_path.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
out << TQString("\"stopped_by_error\" => \"%1\",\n").tqarg(stats.stopped_by_error);
out << TQString("\"completed\" => \"%1\",\n").tqarg(stats.completed);
out << TQString("\"user_controlled\" => \"%1\",\n").tqarg(stats.user_controlled);
@@ -263,7 +263,7 @@ namespace kt
break;
case 'f':
//parse argument into torrent number and file number
- separator_loc=it.data().tqfind('-');
+ separator_loc=it.data().find('-');
parse=it.data();
torrent_num.append(parse.left(separator_loc));
file_num.append(parse.right(parse.length()-(separator_loc+1)));
diff --git a/plugins/webinterface/www/coldmilk/rest.php b/plugins/webinterface/www/coldmilk/rest.php
index a61cbfe..91b67a7 100644
--- a/plugins/webinterface/www/coldmilk/rest.php
+++ b/plugins/webinterface/www/coldmilk/rest.php
@@ -174,7 +174,7 @@ class RestInterface {
// Truncate long torrent name, and HTML escape it.
// This is a helper function for download_status.
private function _clean_name($name) {
- $name = str_tqreplace("'", "\'", $name);
+ $name = str_replace("'", "\'", $name);
if (strlen($name) > 30) {
$name = substr($name, 0, 27);
$name .= "...";
diff --git a/plugins/webinterface/www/default/interface.php b/plugins/webinterface/www/default/interface.php
index 929bd94..f34e651 100644
--- a/plugins/webinterface/www/default/interface.php
+++ b/plugins/webinterface/www/default/interface.php
@@ -118,7 +118,7 @@ function generate_button_code($img, $alt, $href='')
foreach ($stats as $torrent) {
echo "\t\t".'<tr>'."\n\t\t\t";
- $torrent_name = str_tqreplace("'", "\'", $torrent['torrent_name']);
+ $torrent_name = str_replace("'", "\'", $torrent['torrent_name']);
if($torrent['total_bytes_to_download']!=0) $perc = round(100.0 - ($torrent['bytes_left_to_download'] / $torrent['total_bytes_to_download']) * 100.0, 2);
else $perc = 0;
if(strlen($torrent['torrent_name'])>30) $display_name=substr($torrent['torrent_name'], 0, 30)." ...";
diff --git a/plugins/zeroconf/zeroconfplugin.cpp b/plugins/zeroconf/zeroconfplugin.cpp
index 462b6a0..3427900 100644
--- a/plugins/zeroconf/zeroconfplugin.cpp
+++ b/plugins/zeroconf/zeroconfplugin.cpp
@@ -84,7 +84,7 @@ namespace kt
void ZeroConfPlugin::torrentAdded(kt::TorrentInterface* tc)
{
- if (services.tqcontains(tc))
+ if (services.contains(tc))
return;
bt::Uint16 port = bt::Globals::instance().getServer().getPortInUse();
@@ -100,7 +100,7 @@ namespace kt
void ZeroConfPlugin::torrentRemoved(kt::TorrentInterface* tc)
{
- AvahiService* av = services.tqfind(tc);
+ AvahiService* av = services.find(tc);
if (!av)
return;
Out(SYS_ZCO|LOG_NOTICE) << "ZeroConf service removed for "