From 42a9872891eba166e81cf4f8c062261cc77398f8 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:57:16 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit f96f74ffa7040e64ae3352e08c810c383c8a0ba2. --- apps/ktcachecheck/cachechecker.cpp | 4 +- apps/ktcachecheck/multicachechecker.cpp | 4 +- apps/ktcachecheck/singlecachechecker.cpp | 2 +- apps/ktorrent/addpeerwidgetbase.ui | 6 +- apps/ktorrent/advancedpref.ui | 36 +-- apps/ktorrent/downloadpref.ui | 40 ++-- apps/ktorrent/fileselectdlg.cpp | 4 +- apps/ktorrent/fileselectdlgbase.ui | 18 +- apps/ktorrent/filterbar.cpp | 22 +- apps/ktorrent/generalpref.ui | 14 +- apps/ktorrent/groups/groupview.cpp | 4 +- apps/ktorrent/groups/torrentgroup.cpp | 2 +- apps/ktorrent/ipfilterwidget.cpp | 2 +- apps/ktorrent/ipfilterwidgetbase.ui | 14 +- apps/ktorrent/ktorrent.cpp | 10 +- apps/ktorrent/ktorrentcore.cpp | 20 +- apps/ktorrent/ktorrentview.cpp | 28 +-- apps/ktorrent/ktorrentviewitem.cpp | 16 +- apps/ktorrent/leaktrace.cpp | 8 +- apps/ktorrent/main.cpp | 2 +- apps/ktorrent/newui/button.cpp | 40 ++-- apps/ktorrent/newui/button.h | 4 +- apps/ktorrent/newui/buttonbar.cpp | 22 +- apps/ktorrent/newui/buttonbar.h | 8 +- apps/ktorrent/newui/ddockwindow.cpp | 20 +- apps/ktorrent/newui/dmainwindow.cpp | 4 +- apps/ktorrent/newui/docksplitter.cpp | 2 +- apps/ktorrent/newui/dtabwidget.cpp | 4 +- apps/ktorrent/pastedialog.cpp | 4 +- apps/ktorrent/pastedlgbase.ui | 10 +- apps/ktorrent/pref.cpp | 4 +- apps/ktorrent/queuedialog.cpp | 16 +- apps/ktorrent/queuedlg.ui | 28 +-- apps/ktorrent/scandialog.cpp | 4 +- apps/ktorrent/scandlgbase.ui | 18 +- apps/ktorrent/speedlimitsdlg.cpp | 2 +- apps/ktorrent/speedlimitsdlgbase.ui | 12 +- apps/ktorrent/torrentcreatordlg.cpp | 6 +- apps/ktorrent/torrentcreatordlgbase.ui | 18 +- apps/ktorrent/trayhoverpopup.cpp | 6 +- apps/ktorrent/trayicon.cpp | 52 ++-- apps/ktupnptest/mainwidget.ui | 4 +- apps/ktupnptest/upnptestapp.cpp | 2 +- estimation-scripts/enable-logging.diff | 20 +- libktorrent/datachecker/multidatachecker.cpp | 8 +- libktorrent/datachecker/singledatachecker.cpp | 2 +- libktorrent/expandablewidget.cpp | 6 +- libktorrent/interfaces/filetreediritem.cpp | 24 +- libktorrent/interfaces/filetreediritem.h | 2 +- libktorrent/interfaces/functions.cpp | 10 +- libktorrent/interfaces/torrentinterface.h | 6 +- libktorrent/kademlia/dhttrackerbackend.cpp | 2 +- libktorrent/kademlia/rpcmsg.cpp | 20 +- libktorrent/labelview.cpp | 22 +- libktorrent/labelview.h | 2 +- libktorrent/labelviewitembase.ui | 4 +- libktorrent/migrate/ccmigrate.cpp | 4 +- libktorrent/migrate/migrate.cpp | 2 +- libktorrent/mse/functions.cpp | 2 +- libktorrent/net/address.cpp | 8 +- libktorrent/net/socket.cpp | 16 +- libktorrent/pluginmanager.cpp | 4 +- libktorrent/pluginmanagerprefpage.cpp | 6 +- libktorrent/pluginmanagerwidget.ui | 4 +- libktorrent/torrent/announcelist.cpp | 2 +- libktorrent/torrent/bdecoder.cpp | 8 +- libktorrent/torrent/bencoder.cpp | 8 +- libktorrent/torrent/bnode.cpp | 28 +-- libktorrent/torrent/bnode.h | 8 +- libktorrent/torrent/cachefile.cpp | 38 +-- libktorrent/torrent/chunk.cpp | 2 +- libktorrent/torrent/chunk.h | 14 +- libktorrent/torrent/chunkdownload.cpp | 28 +-- libktorrent/torrent/chunkdownload.h | 4 +- libktorrent/torrent/chunkmanager.cpp | 46 ++-- libktorrent/torrent/chunkselector.cpp | 2 +- libktorrent/torrent/dndfile.cpp | 6 +- libktorrent/torrent/downloader.cpp | 16 +- libktorrent/torrent/ipblocklist.cpp | 8 +- libktorrent/torrent/multifilecache.cpp | 18 +- libktorrent/torrent/packet.cpp | 20 +- libktorrent/torrent/packetreader.cpp | 10 +- libktorrent/torrent/packetwriter.cpp | 4 +- libktorrent/torrent/peerid.cpp | 36 +-- libktorrent/torrent/peermanager.cpp | 16 +- libktorrent/torrent/peersourcemanager.cpp | 16 +- libktorrent/torrent/peersourcemanager.h | 2 +- libktorrent/torrent/peeruploader.cpp | 4 +- libktorrent/torrent/queuemanager.cpp | 10 +- libktorrent/torrent/singlefilecache.cpp | 14 +- libktorrent/torrent/statsfile.cpp | 2 +- libktorrent/torrent/torrent.cpp | 4 +- libktorrent/torrent/torrentcontrol.cpp | 44 ++-- libktorrent/torrent/torrentcreator.cpp | 10 +- libktorrent/torrent/udptracker.cpp | 8 +- libktorrent/torrent/udptrackersocket.cpp | 2 +- libktorrent/torrent/value.cpp | 2 +- libktorrent/util/autorotatelogjob.cpp | 4 +- libktorrent/util/file.cpp | 4 +- libktorrent/util/fileops.cpp | 66 +++--- libktorrent/util/log.cpp | 10 +- libktorrent/util/profiler.cpp | 14 +- libktorrent/util/profiler.h | 2 +- plugins/infowidget/chunkbar.cpp | 26 +- plugins/infowidget/chunkdownloadview.cpp | 2 +- plugins/infowidget/chunkdownloadviewbase.ui | 40 ++-- plugins/infowidget/fileview.cpp | 2 +- plugins/infowidget/flagdb.cpp | 4 +- plugins/infowidget/floatspinbox.cpp | 2 +- plugins/infowidget/iwfiletreediritem.cpp | 20 +- plugins/infowidget/iwfiletreeitem.cpp | 2 +- plugins/infowidget/iwpref.ui | 2 +- plugins/infowidget/peerview.cpp | 4 +- plugins/infowidget/statustab.cpp | 8 +- plugins/infowidget/statustabbase.ui | 62 ++--- plugins/infowidget/trackerview.cpp | 4 +- plugins/infowidget/trackerviewbase.ui | 12 +- plugins/ipfilter/antip2p.cpp | 8 +- plugins/ipfilter/convert_dlg.ui | 6 +- plugins/ipfilter/convertdialog.cpp | 2 +- plugins/ipfilter/ipblockingpref.ui | 10 +- plugins/ipfilter/ipblockingprefpage.cpp | 2 +- plugins/logviewer/logprefwidgetbase.ui | 2 +- plugins/logviewer/logviewer.cpp | 2 +- plugins/partfileimport/importdialog.cpp | 12 +- plugins/partfileimport/importdlgbase.ui | 14 +- plugins/rssfeed/rss/article.cpp | 42 ++-- plugins/rssfeed/rss/document.cpp | 300 ++++++++++++------------ plugins/rssfeed/rss/global.h | 2 +- plugins/rssfeed/rss/image.cpp | 12 +- plugins/rssfeed/rss/loader.cpp | 4 +- plugins/rssfeed/rss/loader.h | 10 +- plugins/rssfeed/rss/testlibrss.cpp | 6 +- plugins/rssfeed/rss/testlibrss.h | 4 +- plugins/rssfeed/rss/textinput.cpp | 8 +- plugins/rssfeed/rssfeed.cpp | 14 +- plugins/rssfeed/rssfeed.h | 2 +- plugins/rssfeed/rssfeedmanager.cpp | 2 +- plugins/rssfeed/rssfeedwidget.ui | 40 ++-- plugins/rssfeed/rssfilter.cpp | 12 +- plugins/rssfeed/rssfilter.h | 4 +- plugins/rssfeed/rsslinkdownloader.cpp | 14 +- plugins/rssfeed/rsslinkdownloader.h | 2 +- plugins/scanfolder/scanfolderprefpagewidget.cpp | 6 +- plugins/scanfolder/sfprefwidgetbase.ui | 6 +- plugins/scheduler/bwscheduler.cpp | 12 +- plugins/scheduler/bwspage.ui | 54 ++--- plugins/scheduler/bwsprefpagewidget.cpp | 8 +- plugins/scheduler/schedulerpage.ui | 6 +- plugins/scheduler/schedulerplugin.cpp | 4 +- plugins/search/htmlpart.cpp | 4 +- plugins/search/searchbar.ui | 2 +- plugins/search/searchenginelist.cpp | 2 +- plugins/search/searchplugin.cpp | 2 +- plugins/search/searchpref.ui | 16 +- plugins/search/searchprefpage.cpp | 4 +- plugins/search/searchtab.cpp | 2 +- plugins/search/searchwidget.cpp | 10 +- plugins/stats/ChartDrawer.cc | 4 +- plugins/stats/StatsCon.cc | 12 +- plugins/stats/StatsCon.h | 2 +- plugins/stats/StatsSpd.cc | 18 +- plugins/stats/StatsSpd.h | 2 +- plugins/stats/sprefwgt.ui | 24 +- plugins/stats/statsconwgt.ui | 2 +- plugins/stats/statsspdwgt.ui | 2 +- plugins/upnp/soap.cpp | 6 +- plugins/upnp/upnpdescriptionparser.cpp | 4 +- plugins/upnp/upnpmcastsocket.cpp | 2 +- plugins/upnp/upnprouter.cpp | 6 +- plugins/upnp/upnpwidget.ui | 6 +- plugins/webinterface/httpclienthandler.cpp | 4 +- plugins/webinterface/httpresponseheader.cpp | 4 +- plugins/webinterface/httpserver.cpp | 20 +- plugins/webinterface/php_handler.cpp | 4 +- plugins/webinterface/php_interface.cpp | 116 ++++----- plugins/webinterface/php_interface.h | 2 +- plugins/webinterface/webinterfacepref.ui | 14 +- plugins/webinterface/webinterfaceprefwidget.cpp | 10 +- plugins/webinterface/www/default/details.php | 4 +- plugins/webinterface/www/default/interface.php | 6 +- plugins/webinterface/www/default/wz_tooltip.js | 2 +- plugins/webinterface/www/mobile/interface.php | 2 +- plugins/webinterface/www/mobile/torrent.php | 2 +- plugins/zeroconf/avahiservice.cpp | 6 +- utests/biginttest.cpp | 4 +- 186 files changed, 1207 insertions(+), 1207 deletions(-) diff --git a/apps/ktcachecheck/cachechecker.cpp b/apps/ktcachecheck/cachechecker.cpp index c8371a7..f05fb18 100644 --- a/apps/ktcachecheck/cachechecker.cpp +++ b/apps/ktcachecheck/cachechecker.cpp @@ -44,7 +44,7 @@ namespace ktdebug this->index_file = index_file; File fptr; if (!fptr.open(index_file,"rb")) - throw Error(i18n("Cannot open index file %1 : %2").arg(index_file).arg(fptr.errorString())); + throw Error(i18n("Cannot open index file %1 : %2").tqarg(index_file).tqarg(fptr.errorString())); if (fptr.seek(File::END,0) != 0) { @@ -73,7 +73,7 @@ namespace ktdebug File fptr; if (!fptr.open(index_file,"wb")) - throw Error(i18n("Cannot open index file %1 : %2").arg(index_file).arg(fptr.errorString())); + throw Error(i18n("Cannot open index file %1 : %2").tqarg(index_file).tqarg(fptr.errorString())); std::set::iterator i; // first remove failed chunks from downloaded diff --git a/apps/ktcachecheck/multicachechecker.cpp b/apps/ktcachecheck/multicachechecker.cpp index 53e8fee..3132e12 100644 --- a/apps/ktcachecheck/multicachechecker.cpp +++ b/apps/ktcachecheck/multicachechecker.cpp @@ -79,7 +79,7 @@ namespace ktdebug // we can read the chunk from this file File fptr; if (!fptr.open(cache + tf.getPath(),"rb")) - throw Error(TQString("Cannot open %1 : %2").arg(cache + tf.getPath()).arg(fptr.errorString())); + throw Error(TQString("Cannot open %1 : %2").tqarg(cache + tf.getPath()).tqarg(fptr.errorString())); fptr.seek(File::BEGIN,curr_file_off); fptr.read(buf + bytes_offset,to_read); @@ -94,7 +94,7 @@ namespace ktdebug // Out() << "Partially reading " << to_read << endl; File fptr; if (!fptr.open(cache + tf.getPath(),"rb")) - throw Error(TQString("Cannot open %1 : %2").arg(cache + tf.getPath()).arg(fptr.errorString())); + throw Error(TQString("Cannot open %1 : %2").tqarg(cache + tf.getPath()).tqarg(fptr.errorString())); fptr.seek(File::BEGIN,curr_file_off); fptr.read(buf + bytes_offset,to_read); diff --git a/apps/ktcachecheck/singlecachechecker.cpp b/apps/ktcachecheck/singlecachechecker.cpp index ab64fc3..c311db1 100644 --- a/apps/ktcachecheck/singlecachechecker.cpp +++ b/apps/ktcachecheck/singlecachechecker.cpp @@ -48,7 +48,7 @@ namespace ktdebug if (!fptr.open(cache,"rb")) { throw Error(TQString("Cannot open file : %1 : %2") - .arg(cache).arg( fptr.errorString())); + .tqarg(cache).tqarg( fptr.errorString())); } Uint32 num_ok = 0,num_not_ok = 0,num_not_downloaded = 0,extra_ok = 0; diff --git a/apps/ktorrent/addpeerwidgetbase.ui b/apps/ktorrent/addpeerwidgetbase.ui index d3359a2..3ae532a 100644 --- a/apps/ktorrent/addpeerwidgetbase.ui +++ b/apps/ktorrent/addpeerwidgetbase.ui @@ -21,7 +21,7 @@ - layout10 + tqlayout10 @@ -77,7 +77,7 @@ Expanding - + 20 16 @@ -86,7 +86,7 @@ - layout11 + tqlayout11 diff --git a/apps/ktorrent/advancedpref.ui b/apps/ktorrent/advancedpref.ui index 8a54e29..a144aa6 100644 --- a/apps/ktorrent/advancedpref.ui +++ b/apps/ktorrent/advancedpref.ui @@ -32,7 +32,7 @@ - layout15 + tqlayout15 @@ -108,7 +108,7 @@ Expanding - + 148 20 @@ -127,7 +127,7 @@ - layout25 + tqlayout25 @@ -179,7 +179,7 @@ - layout5 + tqlayout5 @@ -223,7 +223,7 @@ Expanding - + 111 20 @@ -234,7 +234,7 @@ - layout5_2 + tqlayout5_2 @@ -283,7 +283,7 @@ Expanding - + 111 20 @@ -294,7 +294,7 @@ - layout8 + tqlayout8 @@ -359,7 +359,7 @@ - layout7 + tqlayout7 @@ -405,7 +405,7 @@ Expanding - + 20 20 @@ -416,7 +416,7 @@ - layout10 + tqlayout10 @@ -459,7 +459,7 @@ Expanding - + 41 20 @@ -483,7 +483,7 @@ - layout33 + tqlayout33 @@ -491,7 +491,7 @@ - layout32 + tqlayout32 @@ -553,7 +553,7 @@ Expanding - + 383 20 @@ -572,7 +572,7 @@ - layout7 + tqlayout7 @@ -601,7 +601,7 @@ Expanding - + 81 20 @@ -622,7 +622,7 @@ Expanding - + 20 30 diff --git a/apps/ktorrent/downloadpref.ui b/apps/ktorrent/downloadpref.ui index 378cbbc..6315cba 100644 --- a/apps/ktorrent/downloadpref.ui +++ b/apps/ktorrent/downloadpref.ui @@ -29,7 +29,7 @@ - layout49 + tqlayout49 @@ -37,7 +37,7 @@ - layout42 + tqlayout42 @@ -45,7 +45,7 @@ - layout16 + tqlayout16 @@ -69,7 +69,7 @@ Expanding - + 40 20 @@ -106,7 +106,7 @@ - layout46 + tqlayout46 @@ -164,7 +164,7 @@ - layout45 + tqlayout45 @@ -214,7 +214,7 @@ - layout48 + tqlayout48 @@ -222,7 +222,7 @@ - layout14 + tqlayout14 @@ -246,7 +246,7 @@ Expanding - + 10 20 @@ -273,7 +273,7 @@ Expanding - + 191 20 @@ -290,7 +290,7 @@ Expanding - + 207 20 @@ -316,7 +316,7 @@ - layout42 + tqlayout42 @@ -356,7 +356,7 @@ - layout18 + tqlayout18 @@ -380,7 +380,7 @@ Expanding - + 40 20 @@ -425,7 +425,7 @@ - layout41 + tqlayout41 @@ -546,7 +546,7 @@ - layout40 + tqlayout40 @@ -594,7 +594,7 @@ Expanding - + 208 20 @@ -611,7 +611,7 @@ Expanding - + 208 20 @@ -628,7 +628,7 @@ Expanding - + 208 20 @@ -697,7 +697,7 @@ Expanding - + 20 20 diff --git a/apps/ktorrent/fileselectdlg.cpp b/apps/ktorrent/fileselectdlg.cpp index 98d927a..5f0e33d 100644 --- a/apps/ktorrent/fileselectdlg.cpp +++ b/apps/ktorrent/fileselectdlg.cpp @@ -217,9 +217,9 @@ void FileSelectDlg::updateSizeLabels() lblRequired->setText(kt::BytesToString(bytes_to_download)); if (bytes_to_download > bytes_free) - lblStatus->setText("" + kt::BytesToString(-1*(long long)(bytes_free - bytes_to_download)) + i18n(" short!")); + lbltqStatus->setText("" + kt::BytesToString(-1*(long long)(bytes_free - bytes_to_download)) + i18n(" short!")); else - lblStatus->setText(kt::BytesToString(bytes_free - bytes_to_download)); + lbltqStatus->setText(kt::BytesToString(bytes_free - bytes_to_download)); } void FileSelectDlg::treeItemChanged() diff --git a/apps/ktorrent/fileselectdlgbase.ui b/apps/ktorrent/fileselectdlgbase.ui index 546d72c..152c057 100644 --- a/apps/ktorrent/fileselectdlgbase.ui +++ b/apps/ktorrent/fileselectdlgbase.ui @@ -21,7 +21,7 @@ - layout4 + tqlayout4 @@ -44,7 +44,7 @@ - layout6 + tqlayout6 @@ -52,7 +52,7 @@ - layout5 + tqlayout5 @@ -207,7 +207,7 @@ Expanding - + 20 135 @@ -237,7 +237,7 @@ Preferred - + 40 20 @@ -246,7 +246,7 @@ - layout33 + tqlayout33 @@ -280,7 +280,7 @@ - layout34 + tqlayout34 @@ -298,7 +298,7 @@ - lblStatus + lbltqStatus @@ -315,7 +315,7 @@ Expanding - + 220 20 diff --git a/apps/ktorrent/filterbar.cpp b/apps/ktorrent/filterbar.cpp index 2f872f8..0be4049 100644 --- a/apps/ktorrent/filterbar.cpp +++ b/apps/ktorrent/filterbar.cpp @@ -20,7 +20,7 @@ #include "filterbar.h" #include -#include +#include #include #include @@ -42,30 +42,30 @@ FilterBar::FilterBar(TQWidget *parent, const char *name) : TQVBoxLayout* foo = new TQVBoxLayout(this); foo->addSpacing(gap); - TQHBoxLayout* layout = new TQHBoxLayout(foo); - layout->addSpacing(gap); + TQHBoxLayout* tqlayout = new TQHBoxLayout(foo); + tqlayout->addSpacing(gap); m_close = new KToolBarButton("fileclose",0,this); connect(m_close,TQT_SIGNAL(clicked()),this,TQT_SLOT(hide())); - layout->addWidget(m_close); + tqlayout->addWidget(m_close); m_filter = new TQLabel(i18n("Find:"), this); - layout->addWidget(m_filter); - layout->addSpacing(KDialog::spacingHint()); + tqlayout->addWidget(m_filter); + tqlayout->addSpacing(KDialog::spacingHint()); m_filterInput = new KLineEdit(this); - layout->addWidget(m_filterInput); + tqlayout->addWidget(m_filterInput); m_clear = new KPushButton(this); m_clear->setIconSet(SmallIcon("clear_left")); m_clear->setFlat(true); - layout->addWidget(m_clear); - layout->addSpacing(gap); + tqlayout->addWidget(m_clear); + tqlayout->addSpacing(gap); m_case_sensitive = new TQCheckBox(i18n("Case sensitive"),this); m_case_sensitive->setChecked(true); - layout->addWidget(m_case_sensitive); - layout->addItem(new TQSpacerItem(10,10,TQSizePolicy::Expanding)); + tqlayout->addWidget(m_case_sensitive); + tqlayout->addItem(new TQSpacerItem(10,10,TQSizePolicy::Expanding)); connect(m_filterInput, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChangeFilter(const TQString&))); diff --git a/apps/ktorrent/generalpref.ui b/apps/ktorrent/generalpref.ui index 529686f..33eb8f3 100644 --- a/apps/ktorrent/generalpref.ui +++ b/apps/ktorrent/generalpref.ui @@ -29,7 +29,7 @@ Expanding - + 20 50 @@ -104,7 +104,7 @@ - layout7 + tqlayout7 @@ -142,7 +142,7 @@ Expanding - + 40 20 @@ -174,7 +174,7 @@ - layout3 + tqlayout3 @@ -237,7 +237,7 @@ - layout13 + tqlayout13 @@ -310,7 +310,7 @@ - layout24 + tqlayout24 @@ -355,7 +355,7 @@ - layout14 + tqlayout14 diff --git a/apps/ktorrent/groups/groupview.cpp b/apps/ktorrent/groups/groupview.cpp index 92b78c3..11a6aa6 100644 --- a/apps/ktorrent/groups/groupview.cpp +++ b/apps/ktorrent/groups/groupview.cpp @@ -163,7 +163,7 @@ namespace kt if (gman->find(name)) { - KMessageBox::error(this,i18n("The group %1 already exists.").arg(name)); + KMessageBox::error(this,i18n("The group %1 already exists.").tqarg(name)); return; } @@ -214,7 +214,7 @@ namespace kt if (gman->find(name)) { - KMessageBox::error(this,i18n("The group %1 already exists.").arg(name)); + KMessageBox::error(this,i18n("The group %1 already exists.").tqarg(name)); } else { diff --git a/apps/ktorrent/groups/torrentgroup.cpp b/apps/ktorrent/groups/torrentgroup.cpp index d44b744..65fed38 100644 --- a/apps/ktorrent/groups/torrentgroup.cpp +++ b/apps/ktorrent/groups/torrentgroup.cpp @@ -51,7 +51,7 @@ namespace kt if (hashes.count(tor->getInfoHash())) { /* bt::Out(SYS_GEN|LOG_DEBUG) << - TQString("TG %1 : Torrent %2 from hashes list").arg(groupName()).arg(tor->getStats().torrent_name) << endl; + TQString("TG %1 : Torrent %2 from hashes list").tqarg(groupName()).tqarg(tor->getStats().torrent_name) << endl; */ hashes.erase(tor->getInfoHash()); torrents.insert(tor); diff --git a/apps/ktorrent/ipfilterwidget.cpp b/apps/ktorrent/ipfilterwidget.cpp index 152e8c1..76ba43f 100644 --- a/apps/ktorrent/ipfilterwidget.cpp +++ b/apps/ktorrent/ipfilterwidget.cpp @@ -140,7 +140,7 @@ void IPFilterWidget::saveFilter(TQString& fn) if (!fptr.open(IO_WriteOnly)) { - Out(SYS_GEN|LOG_NOTICE) << TQString("Could not open file %1 for writing.").arg(fn) << endl; + Out(SYS_GEN|LOG_NOTICE) << TQString("Could not open file %1 for writing.").tqarg(fn) << endl; return; } diff --git a/apps/ktorrent/ipfilterwidgetbase.ui b/apps/ktorrent/ipfilterwidgetbase.ui index 7d8c383..c02218d 100644 --- a/apps/ktorrent/ipfilterwidgetbase.ui +++ b/apps/ktorrent/ipfilterwidgetbase.ui @@ -29,7 +29,7 @@ Note: Blacklist applies to current session only. Use save/open to save your entries or use IPFilter plugin (PeerGuardian). - + WordBreak|AlignVCenter @@ -73,7 +73,7 @@ Fixed - + 20 20 @@ -82,7 +82,7 @@ - layout8 + tqlayout8 @@ -111,7 +111,7 @@ - layout7 + tqlayout7 @@ -144,7 +144,7 @@ Fixed - + 20 20 @@ -192,7 +192,7 @@ Fixed - + 20 16 @@ -234,7 +234,7 @@ Expanding - + 20 30 diff --git a/apps/ktorrent/ktorrent.cpp b/apps/ktorrent/ktorrent.cpp index a113576..85cb4f0 100644 --- a/apps/ktorrent/ktorrent.cpp +++ b/apps/ktorrent/ktorrent.cpp @@ -791,14 +791,14 @@ void KTorrent::updatedStats() //m_statusInfo->setText(i18n("Some info here e.g. connected/disconnected")); TQString tmp = i18n("Speed down: %1 / up: %2") - .arg(KBytesPerSecToString((double)stats.download_speed/1024.0)) - .arg(KBytesPerSecToString((double)stats.upload_speed/1024.0)); + .tqarg(KBytesPerSecToString((double)stats.download_speed/1024.0)) + .tqarg(KBytesPerSecToString((double)stats.upload_speed/1024.0)); m_statusSpeed->setText(tmp); TQString tmp1 = i18n("Transferred down: %1 / up: %2") - .arg(BytesToString(stats.bytes_downloaded)) - .arg(BytesToString(stats.bytes_uploaded)); + .tqarg(BytesToString(stats.bytes_downloaded)) + .tqarg(BytesToString(stats.bytes_uploaded)); m_statusTransfer->setText(tmp1); if (ServerAuthenticate::isFirewalled() && m_core->getNumTorrentsRunning() > 0) @@ -817,7 +817,7 @@ void KTorrent::updatedStats() { const dht::Stats & s = Globals::instance().getDHT().getStats(); m_statusDHT->setText(i18n("DHT: %1 nodes, %2 tasks") - .arg(s.num_peers).arg(s.num_tasks)); + .tqarg(s.num_peers).tqarg(s.num_tasks)); } else m_statusDHT->setText(i18n("DHT: off")); diff --git a/apps/ktorrent/ktorrentcore.cpp b/apps/ktorrent/ktorrentcore.cpp index de0984a..e97dc84 100644 --- a/apps/ktorrent/ktorrentcore.cpp +++ b/apps/ktorrent/ktorrentcore.cpp @@ -114,7 +114,7 @@ KTorrentCore::KTorrentCore(kt::GUIInterface* gui) : max_downloads(0),keep_seedin KMessageBox::information(0, i18n("Specified port (%1) is unavailable or in" " use by another application. KTorrent is now using port %2.") - .arg(port).arg(port + i - 1)); + .tqarg(port).tqarg(port + i - 1)); Out(SYS_GEN|LOG_NOTICE) << "Bound to port " << (port + i - 1) << endl; } @@ -122,7 +122,7 @@ KTorrentCore::KTorrentCore(kt::GUIInterface* gui) : max_downloads(0),keep_seedin { KMessageBox::error(0, i18n("KTorrent is unable to accept connections because the ports %1 to %2 are " - "already in use by another program.").arg(port).arg(port + i - 1)); + "already in use by another program.").tqarg(port).tqarg(port + i - 1)); Out(SYS_GEN|LOG_IMPORTANT) << "Cannot find free port" << endl; } @@ -465,7 +465,7 @@ TQString KTorrentCore::findNewTorrentDir() const while (true) { TQDir d; - TQString dir = data_dir + TQString("tor%1/").arg(i); + TQString dir = data_dir + TQString("tor%1/").tqarg(i); if (!d.exists(dir)) { return dir; @@ -764,7 +764,7 @@ void KTorrentCore::makeTorrent(const TQString & file,const TQStringList & tracke // Show error message KMessageBox::error(0, - i18n("Cannot create torrent: %1").arg(e.toString()), + i18n("Cannot create torrent: %1").tqarg(e.toString()), i18n("Error")); } } @@ -889,7 +889,7 @@ void KTorrentCore::queue(kt::TorrentInterface* tc) TorrentInterface* KTorrentCore::getTorFromNumber(int tornumber) { - TQString tordir = data_dir + "tor" + TQString("%1").arg(tornumber) + "/"; + TQString tordir = data_dir + "tor" + TQString("%1").tqarg(tornumber) + "/"; Out() << "tordir " << tordir << endl; TQPtrList::iterator i = qman->begin(); while(i != qman->end()) @@ -1025,7 +1025,7 @@ void KTorrentCore::aboutToBeStarted(kt::TorrentInterface* tc,bool & ret) if (tc->getStats().multi_file_torrent) { - TQString msg = i18n("Several data files of the torrent \"%1\" are missing, do you want to recreate them, or do you want to not download them?").arg(tc->getStats().torrent_name); + TQString msg = i18n("Several data files of the torrent \"%1\" are missing, do you want to recreate them, or do you want to not download them?").tqarg(tc->getStats().torrent_name); int ret = KMessageBox::warningYesNoCancelList(0,msg,missing,TQString(), KGuiItem(i18n("Recreate")),KGuiItem(i18n("Do Not Download"))); @@ -1038,7 +1038,7 @@ void KTorrentCore::aboutToBeStarted(kt::TorrentInterface* tc,bool & ret) } catch (bt::Error & e) { - KMessageBox::error(0,i18n("Cannot recreate missing files: %1").arg(e.toString())); + KMessageBox::error(0,i18n("Cannot recreate missing files: %1").tqarg(e.toString())); tc->handleError(i18n("Data files are missing")); ret = false; } @@ -1052,7 +1052,7 @@ void KTorrentCore::aboutToBeStarted(kt::TorrentInterface* tc,bool & ret) } catch (bt::Error & e) { - KMessageBox::error(0,i18n("Cannot deselect missing files: %1").arg(e.toString())); + KMessageBox::error(0,i18n("Cannot deselect missing files: %1").tqarg(e.toString())); tc->handleError(i18n("Data files are missing")); ret = false; } @@ -1065,7 +1065,7 @@ void KTorrentCore::aboutToBeStarted(kt::TorrentInterface* tc,bool & ret) } else { - TQString msg = i18n("The file where the data is saved of the torrent \"%1\" is missing, do you want to recreate it?").arg(tc->getStats().torrent_name); + TQString msg = i18n("The file where the data is saved of the torrent \"%1\" is missing, do you want to recreate it?").tqarg(tc->getStats().torrent_name); int ret = KMessageBox::warningYesNo(0,msg, i18n("Recreate"),KGuiItem(i18n("Recreate")),KGuiItem(i18n("Do Not Recreate"))); if (ret == KMessageBox::Yes) { @@ -1075,7 +1075,7 @@ void KTorrentCore::aboutToBeStarted(kt::TorrentInterface* tc,bool & ret) } catch (bt::Error & e) { - KMessageBox::error(0,i18n("Cannot recreate data file: %1").arg(e.toString())); + KMessageBox::error(0,i18n("Cannot recreate data file: %1").tqarg(e.toString())); tc->handleError(i18n("Data file is missing")); ret = false; } diff --git a/apps/ktorrent/ktorrentview.cpp b/apps/ktorrent/ktorrentview.cpp index a02ef6b..e445fbb 100644 --- a/apps/ktorrent/ktorrentview.cpp +++ b/apps/ktorrent/ktorrentview.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include "ktorrentview.h" #include "ktorrentviewitem.h" @@ -85,8 +85,8 @@ bool TorrentView::eventFilter(TQObject* watched, TQEvent* e) KTorrentView::KTorrentView(TQWidget *parent) : TQWidget(parent),menu(0),current_group(0),running(0),total(0),view(0),filter_bar(0) { - TQVBoxLayout* layout = new TQVBoxLayout(this); - layout->setAutoAdd(true); + TQVBoxLayout* tqlayout = new TQVBoxLayout(this); + tqlayout->setAutoAdd(true); view = new TorrentView(this); filter_bar = new FilterBar(this); filter_bar->setHidden(true); @@ -198,9 +198,9 @@ void KTorrentView::setCurrentGroup(Group* group) } if (current_group) - setCaption(TQString("%1 %2/%3").arg(current_group->groupName()).arg(running).arg(total)); + setCaption(TQString("%1 %2/%3").tqarg(current_group->groupName()).tqarg(running).tqarg(total)); else - setCaption(i18n("All Torrents %1/%2").arg(running).arg(total)); + setCaption(i18n("All Torrents %1/%2").tqarg(running).tqarg(total)); onSelectionChanged(); onExecuted(view->currentItem()); @@ -208,7 +208,7 @@ void KTorrentView::setCurrentGroup(Group* group) void KTorrentView::saveSettings(KConfig* cfg,int idx) { - TQString group = TQString("KTorrentView-%1").arg(idx); + TQString group = TQString("KTorrentView-%1").tqarg(idx); view->saveLayout(cfg,group); cfg->setGroup(group); filter_bar->saveSettings(cfg); @@ -217,7 +217,7 @@ void KTorrentView::saveSettings(KConfig* cfg,int idx) void KTorrentView::loadSettings(KConfig* cfg,int idx) { - TQString group = TQString("KTorrentView-%1").arg(idx); + TQString group = TQString("KTorrentView-%1").tqarg(idx); view->restoreLayout(cfg,group); view->setDragEnabled(true); @@ -373,7 +373,7 @@ void KTorrentView::removeDownloads() if (!s.completed) { TQString msg = i18n("The torrent %1 has not finished downloading, " - "do you want to delete the incomplete data, too?").arg(s.torrent_name); + "do you want to delete the incomplete data, too?").tqarg(s.torrent_name); int ret = KMessageBox::questionYesNoCancel( this,msg,i18n("Remove Download"), i18n("Delete Data"),i18n("Keep Data")); @@ -546,9 +546,9 @@ void KTorrentView::update() total = t; if (current_group) - setCaption(TQString("%1 %2/%3").arg(current_group->groupName()).arg(running).arg(total)); + setCaption(TQString("%1 %2/%3").tqarg(current_group->groupName()).tqarg(running).tqarg(total)); else - setCaption(i18n("All Torrents %1/%2").arg(running).arg(total)); + setCaption(i18n("All Torrents %1/%2").tqarg(running).tqarg(total)); onSelectionChanged(); } @@ -628,7 +628,7 @@ void KTorrentView::checkDataIntegrity() } else { - KMessageBox::error(0,i18n("You are already checking the data of the torrent %1 !").arg(tc->getStats().torrent_name)); + KMessageBox::error(0,i18n("You are already checking the data of the torrent %1 !").tqarg(tc->getStats().torrent_name)); } } @@ -748,7 +748,7 @@ void KTorrentView::setDownloadLocationSlot() if (tc) { TQString dn; - dn = KFileDialog::getExistingDirectory(tc->getStats().output_path, this, i18n("Choose download location for %1").arg(tc->getStats().torrent_name)); + dn = KFileDialog::getExistingDirectory(tc->getStats().output_path, this, i18n("Choose download location for %1").tqarg(tc->getStats().torrent_name)); if(dn.isNull() || dn.isEmpty()) continue; @@ -872,9 +872,9 @@ void KTorrentView::updateCaption() total = t; if (current_group) - setCaption(TQString("%1 %2/%3").arg(current_group->groupName()).arg(running).arg(total)); + setCaption(TQString("%1 %2/%3").tqarg(current_group->groupName()).tqarg(running).tqarg(total)); else - setCaption(i18n("All Torrents %1/%2").arg(running).arg(total)); + setCaption(i18n("All Torrents %1/%2").tqarg(running).tqarg(total)); } } diff --git a/apps/ktorrent/ktorrentviewitem.cpp b/apps/ktorrent/ktorrentviewitem.cpp index a9392bd..1156b88 100644 --- a/apps/ktorrent/ktorrentviewitem.cpp +++ b/apps/ktorrent/ktorrentviewitem.cpp @@ -30,7 +30,7 @@ using namespace bt; using namespace kt; /* -static TQString StatusToString(TorrentInterface* tc,TorrentStatus s) +static TQString StatusToString(TorrentInterface* tc,TorrenttqStatus s) { switch (s) { @@ -55,7 +55,7 @@ static TQString StatusToString(TorrentInterface* tc,TorrentStatus s) } */ -static TQColor StatusToColor(TorrentStatus s,const TQColorGroup & cg) +static TQColor StatusToColor(TorrenttqStatus s,const TQColorGroup & cg) { TQColor green(40,205,40); TQColor yellow(255,174,0); @@ -222,7 +222,7 @@ void KTorrentViewItem::update() Uint32 secs = tc->getETA(); if(secs == -1) { - setText(7,TQString("%1").arg(TQChar(0x221E))); + setText(7,TQString("%1").tqarg(TQChar(0x221E))); eta = -2; } else @@ -233,7 +233,7 @@ void KTorrentViewItem::update() } else { - setText(7,TQString("%1").arg(TQChar(0x221E))); + setText(7,TQString("%1").tqarg(TQChar(0x221E))); eta = -2; } } @@ -242,23 +242,23 @@ void KTorrentViewItem::update() if(m_parent->columnVisible(8)) { - setText(8,TQString("%1 (%2)").arg(TQString::number(s.seeders_connected_to)).arg(TQString::number(s.seeders_total))); + setText(8,TQString("%1 (%2)").tqarg(TQString::number(s.seeders_connected_to)).tqarg(TQString::number(s.seeders_total))); } if(m_parent->columnVisible(9)) { - setText(9,TQString("%1 (%2)").arg(TQString::number(s.leechers_connected_to)).arg(TQString::number(s.leechers_total))); + setText(9,TQString("%1 (%2)").tqarg(TQString::number(s.leechers_connected_to)).tqarg(TQString::number(s.leechers_total))); } if(m_parent->columnVisible(10)) { - setText(10,i18n("%1 %").arg(KGlobal::locale()->formatNumber(Percentage(s),2))); + setText(10,i18n("%1 %").tqarg(KGlobal::locale()->formatNumber(Percentage(s),2))); } if(m_parent->columnVisible(11)) { float ratio = kt::ShareRatio(s); - setText(11,TQString("%1").arg(KGlobal::locale()->formatNumber(ratio,2))); + setText(11,TQString("%1").tqarg(KGlobal::locale()->formatNumber(ratio,2))); } if (m_parent->columnVisible(12)) diff --git a/apps/ktorrent/leaktrace.cpp b/apps/ktorrent/leaktrace.cpp index 76439ce..ae41d3f 100644 --- a/apps/ktorrent/leaktrace.cpp +++ b/apps/ktorrent/leaktrace.cpp @@ -91,7 +91,7 @@ static void WriteLeakReport() fclose(report); } -static void PrintStatus() +static void PrinttqStatus() { if (mtree.count == 0) { @@ -124,7 +124,7 @@ static void RegisterAlloc(void* ptr,Uint32 size) for (Uint32 b = 0;b < SOME_PRIME;b++) mtree.buckets[b] = 0; mtree.num_buckets = SOME_PRIME; - atexit(PrintStatus); + atexit(PrinttqStatus); } // hash the address @@ -180,7 +180,7 @@ static void DeregisterAlloc(void* ptr) if (!p->left && !p->right) { - // no children so just free p + // no tqchildren so just free p if (prev->left == p) { free(prev->left); @@ -214,7 +214,7 @@ static void DeregisterAlloc(void* ptr) } else { - // both children exist + // both tqchildren exist if (prev->left == p) { // attach the left child of p diff --git a/apps/ktorrent/main.cpp b/apps/ktorrent/main.cpp index fa21922..5e9fcb2 100644 --- a/apps/ktorrent/main.cpp +++ b/apps/ktorrent/main.cpp @@ -79,7 +79,7 @@ static const char description[] = bool GrabPIDLock() { // create a lock file in /tmp/ with the user id of the current user included in the name - TQString pid_file = TQString("/tmp/.ktorrent_%1.lock").arg(getuid()); + TQString pid_file = TQString("/tmp/.ktorrent_%1.lock").tqarg(getuid()); int fd = open(TQFile::encodeName(pid_file),O_RDWR|O_CREAT,0640); if (fd < 0) diff --git a/apps/ktorrent/newui/button.cpp b/apps/ktorrent/newui/button.cpp index 4819657..cbbfbed 100644 --- a/apps/ktorrent/newui/button.cpp +++ b/apps/ktorrent/newui/button.cpp @@ -49,8 +49,8 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon, setToggleButton(true); setFocusPolicy(TQ_NoFocus); setDescription(m_description); - setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); - resize(sizeHint()); + tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + resize(tqsizeHint()); fixDimensions(Ideal::Bottom); TQToolTip::add(this, m_realText); @@ -62,9 +62,9 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon, KConfig *config = kapp->config(); config->setGroup("UI"); - TQString accel = config->readEntry(TQString("button_%1").arg(text), ""); + TQString accel = config->readEntry(TQString("button_%1").tqarg(text), ""); if (!accel.isEmpty()) - setRealText(TQString("&%1 %2").arg(accel).arg(m_realText)); + setRealText(TQString("&%1 %2").tqarg(accel).tqarg(m_realText)); } Button::~Button() @@ -80,11 +80,11 @@ Button::~Button() TQString text = m_realText; if (text.contains(r2)) text.remove(r2); - config->writeEntry(TQString("button_%1").arg(text), r.cap(1)); + config->writeEntry(TQString("button_%1").tqarg(text), r.cap(1)); } else { - config->writeEntry(TQString("button_%1").arg(m_realText), ""); + config->writeEntry(TQString("button_%1").tqarg(m_realText), ""); } } @@ -131,11 +131,11 @@ void Button::drawButton(TQPainter *p) pm.fill(eraseColor()); TQPainter p2(&pm); - tqstyle().drawControl(TQStyle::CE_PushButton,&p2,this, TQRect(0,0,pm.width(),pm.height()), colorGroup(),flags); + tqstyle().tqdrawControl(TQStyle::CE_PushButton,&p2,this, TQRect(0,0,pm.width(),pm.height()), tqcolorGroup(),flags); - tqstyle().drawControl(TQStyle::CE_PushButtonLabel, &p2, this, + tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel, &p2, this, TQRect(0,0,pm.width(),pm.height()), - colorGroup(), flags, TQStyleOption()); + tqcolorGroup(), flags, TQStyleOption()); switch (m_place) { @@ -178,7 +178,7 @@ void Button::fixDimensions(Place oldPlace) if ((oldPlace == Ideal::Bottom) || (oldPlace == Ideal::Top)) { setFixedWidth(height()); - setMinimumHeight(sizeHint().width()); + setMinimumHeight(tqsizeHint().width()); setMaximumHeight(32767); } break; @@ -187,19 +187,19 @@ void Button::fixDimensions(Place oldPlace) if ((oldPlace == Ideal::Left) || (oldPlace == Ideal::Right)) { setFixedHeight(width()); - setMinimumWidth(sizeHint().height()); + setMinimumWidth(tqsizeHint().height()); setMaximumWidth(32767); } break; } } -TQSize Button::sizeHint() const +TQSize Button::tqsizeHint() const { - return sizeHint(text()); + return tqsizeHint(text()); } -TQSize Button::sizeHint(const TQString &text) const +TQSize Button::tqsizeHint(const TQString &text) const { constPolish(); int w = 0, h = 0; @@ -211,7 +211,7 @@ TQSize Button::sizeHint(const TQString &text) const h = TQMAX( h, ih ); } if ( isMenuButton() ) - w += tqstyle().pixelMetric(TQStyle::PM_MenuButtonIndicator, this); + w += tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator, this); if ( pixmap() ) { TQPixmap *pm = (TQPixmap *)pixmap(); w += pm->width(); @@ -220,7 +220,7 @@ TQSize Button::sizeHint(const TQString &text) const TQString s( text ); bool empty = s.isEmpty(); if ( empty ) - s = TQString::fromLatin1("XXXX"); + s = TQString::tqfromLatin1("XXXX"); TQFontMetrics fm = fontMetrics(); TQSize sz = fm.size( ShowPrefix, s ); if(!empty || !w) @@ -239,12 +239,12 @@ void Button::updateSize() { case Ideal::Left: case Ideal::Right: - setMinimumHeight(sizeHint().width()); - resize(sizeHint().height(), sizeHint().width()); + setMinimumHeight(tqsizeHint().width()); + resize(tqsizeHint().height(), tqsizeHint().width()); break; case Ideal::Top: case Ideal::Bottom: - resize(sizeHint().width(), sizeHint().height()); + resize(tqsizeHint().width(), tqsizeHint().height()); break; } } @@ -320,7 +320,7 @@ void Button::assignAccel() if (ok) { TQString text = realTextWithoutAccel(); - text = TQString("&%1 %2").arg(num).arg(text); + text = TQString("&%1 %2").tqarg(num).tqarg(text); setRealText(text); } } diff --git a/apps/ktorrent/newui/button.h b/apps/ktorrent/newui/button.h index 18aecd4..fae0b56 100644 --- a/apps/ktorrent/newui/button.h +++ b/apps/ktorrent/newui/button.h @@ -54,8 +54,8 @@ public: /**Sets the mode of a button.*/ void setMode(Ideal::ButtonMode mode); - TQSize sizeHint() const; - TQSize sizeHint(const TQString &text) const; + TQSize tqsizeHint() const; + TQSize tqsizeHint(const TQString &text) const; /**Updates size of a widget. Used after squeezing button's text.*/ void updateSize(); diff --git a/apps/ktorrent/newui/buttonbar.cpp b/apps/ktorrent/newui/buttonbar.cpp index 4d45598..47227a8 100644 --- a/apps/ktorrent/newui/buttonbar.cpp +++ b/apps/ktorrent/newui/buttonbar.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "buttonbar.h" -#include +#include #include #include @@ -37,9 +37,9 @@ ButtonLayout::ButtonLayout(ButtonBar *parent, Direction d, int margin, int spaci { } -TQSize ButtonLayout::minimumSize() const +TQSize ButtonLayout::tqminimumSize() const { - TQSize size = TQBoxLayout::minimumSize(); + TQSize size = TQBoxLayout::tqminimumSize(); if (!m_buttonBar->autoResize()) return size; @@ -54,7 +54,7 @@ TQSize ButtonLayout::minimumSize() const case Ideal::Bottom: return TQSize(0,size.height()); } - return TQBoxLayout::minimumSize(); + return TQBoxLayout::tqminimumSize(); } @@ -128,14 +128,14 @@ void ButtonBar::fixDimensions() { case Ideal::Left: case Ideal::Right: - setFixedWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); + setFixedWidth(tqsizeHint().width()); + setMinimumHeight(tqsizeHint().height()); setMaximumHeight(32767); break; case Ideal::Top: case Ideal::Bottom: - setFixedHeight(sizeHint().height()); - setMinimumWidth(sizeHint().width()); + setFixedHeight(tqsizeHint().height()); + setMinimumWidth(tqsizeHint().width()); setMaximumWidth(32767); break; } @@ -156,13 +156,13 @@ void ButtonBar::resizeEvent(TQResizeEvent *ev) { case Ideal::Left: case Ideal::Right: - preferredDimension = l->TQBoxLayout::minimumSize().height(); + preferredDimension = l->TQBoxLayout::tqminimumSize().height(); actualDimension = size().height(); oldDimension = ev->oldSize().height(); break; case Ideal::Top: case Ideal::Bottom: - preferredDimension = l->TQBoxLayout::minimumSize().width(); + preferredDimension = l->TQBoxLayout::tqminimumSize().width(); actualDimension = size().width(); oldDimension = ev->oldSize().width(); break; @@ -285,7 +285,7 @@ int ButtonBar::originalDimension() int size = 0; for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) { - size += (*it)->sizeHint((*it)->realText()).width(); + size += (*it)->tqsizeHint((*it)->realText()).width(); } return size; } diff --git a/apps/ktorrent/newui/buttonbar.h b/apps/ktorrent/newui/buttonbar.h index ef4c528..a2e8ecc 100644 --- a/apps/ktorrent/newui/buttonbar.h +++ b/apps/ktorrent/newui/buttonbar.h @@ -25,21 +25,21 @@ #include "comdefs.h" -#include +#include namespace Ideal { class Button; class ButtonBar; -/**@short A layout for a ButtonBar class. +/**@short A tqlayout for a ButtonBar class. -Overrides minimumSize method to allow shrinking button bar buttons.*/ +Overrides tqminimumSize method to allow shrinking button bar buttons.*/ class ButtonLayout: public TQBoxLayout{ public: ButtonLayout(ButtonBar *parent, Direction d, int margin = 0, int spacing = -1, const char * name = 0); - virtual TQSize minimumSize() const; + virtual TQSize tqminimumSize() const; private: ButtonBar *m_buttonBar; diff --git a/apps/ktorrent/newui/ddockwindow.cpp b/apps/ktorrent/newui/ddockwindow.cpp index e762e5f..f008e56 100644 --- a/apps/ktorrent/newui/ddockwindow.cpp +++ b/apps/ktorrent/newui/ddockwindow.cpp @@ -20,7 +20,7 @@ #include "ddockwindow.h" #include -#include +#include #include #include #include @@ -104,7 +104,7 @@ void DDockWindow::setVisible(bool v) { //write dock width to the config file KConfig *config = kapp->config(); - TQString group = TQString("%1").arg(m_name); + TQString group = TQString("%1").tqarg(m_name); config->setGroup(group); if (m_visible) @@ -115,13 +115,13 @@ void DDockWindow::setVisible(bool v) v ? m_widgetStack->show() : m_widgetStack->hide(); m_visible = v; - m_internalLayout->invalidate(); + m_internalLayout->tqinvalidate(); if (!m_visible) { if (m_position == DDockWindow::Bottom) - setFixedExtentHeight(m_internalLayout->sizeHint().height()); + setFixedExtentHeight(m_internalLayout->tqsizeHint().height()); else - setFixedExtentWidth(m_internalLayout->sizeHint().width()); + setFixedExtentWidth(m_internalLayout->tqsizeHint().width()); emit hidden(); } else @@ -130,12 +130,12 @@ void DDockWindow::setVisible(bool v) int size = 0; if (m_position == DDockWindow::Bottom) { - size = config->readNumEntry("ViewWidth", m_internalLayout->minimumSize().height()); + size = config->readNumEntry("ViewWidth", m_internalLayout->tqminimumSize().height()); setFixedExtentHeight(size); } else { - size = config->readNumEntry("ViewWidth", m_internalLayout->minimumSize().width()); + size = config->readNumEntry("ViewWidth", m_internalLayout->tqminimumSize().width()); setFixedExtentWidth(size); } } @@ -148,7 +148,7 @@ void DDockWindow::loadSettings() void DDockWindow::saveSettings() { KConfig *config = kapp->config(); - TQString group = TQString("%1").arg(m_name); + TQString group = TQString("%1").tqarg(m_name); int invisibleWidth = 0; config->setGroup(group); if (config->hasKey("ViewWidth")) @@ -200,7 +200,7 @@ void DDockWindow::addWidget(const TQString &title, TQWidget *widget, bool skipAc //if the widget was selected last time the dock is deleted //we need to show it KConfig *config = kapp->config(); - TQString group = TQString("%1").arg(m_name); + TQString group = TQString("%1").tqarg(m_name); config->setGroup(group); if (config->readEntry("ViewLastWidget") == title) { @@ -338,7 +338,7 @@ bool DDockWindow::isActive() { if (m_toggledButton) { - TQWidget *w = tqApp->focusWidget(); + TQWidget *w = tqApp->tqfocusWidget(); if (!w) return false; TQWidget *toolWidget = m_widgets[m_toggledButton]; diff --git a/apps/ktorrent/newui/dmainwindow.cpp b/apps/ktorrent/newui/dmainwindow.cpp index d5edb2f..26186d0 100644 --- a/apps/ktorrent/newui/dmainwindow.cpp +++ b/apps/ktorrent/newui/dmainwindow.cpp @@ -189,8 +189,8 @@ DTabWidget *DMainWindow::splitVertical() void DMainWindow::invalidateActiveTabWidget() { -/* TQWidget *focused = m_central->focusWidget(); - kdDebug(9000) << "invalidate: " << focused << endl; +/* TQWidget *focused = m_central->tqfocusWidget(); + kdDebug(9000) << "tqinvalidate: " << focused << endl; if (focused == 0) return; if (!m_widgets.contains(focused)) diff --git a/apps/ktorrent/newui/docksplitter.cpp b/apps/ktorrent/newui/docksplitter.cpp index 6da580f..4931ad0 100644 --- a/apps/ktorrent/newui/docksplitter.cpp +++ b/apps/ktorrent/newui/docksplitter.cpp @@ -113,7 +113,7 @@ void DockSplitter::removeDock(uint row, uint col, bool alsoDelete) w->hide(); } - m_splitters[row]->setMinimumSize(m_splitters[row]->minimumSizeHint()); + m_splitters[row]->setMinimumSize(m_splitters[row]->tqminimumSizeHint()); if (isRowEmpty(row)) { diff --git a/apps/ktorrent/newui/dtabwidget.cpp b/apps/ktorrent/newui/dtabwidget.cpp index 202396a..fd7fad0 100644 --- a/apps/ktorrent/newui/dtabwidget.cpp +++ b/apps/ktorrent/newui/dtabwidget.cpp @@ -90,7 +90,7 @@ void DTabWidget::insertTab(TQWidget *child, const TQString &label, int index) if (m_closeButton && m_closeButtonShown) m_closeButton->show(); KTabWidget::insertTab(child, label, index); - if (index != -1) tabBar()->repaint(); + if (index != -1) tabBar()->tqrepaint(); } void DTabWidget::insertTab(TQWidget *child, const TQIconSet &iconset, @@ -99,7 +99,7 @@ void DTabWidget::insertTab(TQWidget *child, const TQIconSet &iconset, if (m_closeButton && m_closeButtonShown) m_closeButton->show(); KTabWidget::insertTab(child, iconset, label, index); - if (index != -1) tabBar()->repaint(); + if (index != -1) tabBar()->tqrepaint(); } /*void DTabWidget::updateHistory(TQWidget *w) diff --git a/apps/ktorrent/pastedialog.cpp b/apps/ktorrent/pastedialog.cpp index b562730..7d3bff9 100644 --- a/apps/ktorrent/pastedialog.cpp +++ b/apps/ktorrent/pastedialog.cpp @@ -22,7 +22,7 @@ #include "ktorrentcore.h" #include #include -#include +#include #include #include #include @@ -33,7 +33,7 @@ PasteDialog::PasteDialog(KTorrentCore* core, TQWidget *parent, const char *name) :PasteDlgBase(parent, name) { m_core = core; - TQClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); TQString text = cb->text(TQClipboard::Clipboard); KURL url = KURL::fromPathOrURL(text); if ( url.isValid() ) diff --git a/apps/ktorrent/pastedlgbase.ui b/apps/ktorrent/pastedlgbase.ui index 9121734..6762dfe 100644 --- a/apps/ktorrent/pastedlgbase.ui +++ b/apps/ktorrent/pastedlgbase.ui @@ -20,7 +20,7 @@ 0 - + 0 0 @@ -38,7 +38,7 @@ - layout2 + tqlayout2 @@ -64,7 +64,7 @@ 0 - + 400 0 @@ -75,7 +75,7 @@ - layout4 + tqlayout4 @@ -91,7 +91,7 @@ Expanding - + 297 20 diff --git a/apps/ktorrent/pref.cpp b/apps/ktorrent/pref.cpp index a379c66..4fbc0fd 100644 --- a/apps/ktorrent/pref.cpp +++ b/apps/ktorrent/pref.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -281,7 +281,7 @@ bool GeneralPrefPage::apply() { TQString err = KResolver::errorString(res.error()); TQString msg = i18n("Cannot lookup %1: %2\n" - "Please provide a valid IP address or hostname.").arg(externalIP).arg(err); + "Please provide a valid IP address or hostname.").tqarg(externalIP).tqarg(err); KMessageBox::error(0, msg, i18n("Error")); return false; } diff --git a/apps/ktorrent/queuedialog.cpp b/apps/ktorrent/queuedialog.cpp index 01293cf..508789b 100644 --- a/apps/ktorrent/queuedialog.cpp +++ b/apps/ktorrent/queuedialog.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include @@ -123,7 +123,7 @@ QueueDialog::QueueDialog(bt::QueueManager* qm, TQWidget *parent, const char *nam for( ; it != qman->end(); ++it) { TorrentInterface* tc = *it; - TorrentStatus ts = tc->getStats().status; + TorrenttqStatus ts = tc->getStats().status; if(ts == kt::SEEDING || ts == kt::DOWNLOAD_COMPLETE || ts == kt::SEEDING_COMPLETE || tc->getStats().completed) @@ -288,7 +288,7 @@ void QueueDialog::downloadList_currentChanged(TQListViewItem* item) { if(!item) { - dlStatus->clear(); + dltqStatus->clear(); dlTracker->clear(); dlRatio->clear(); dlDHT->clear(); @@ -298,9 +298,9 @@ void QueueDialog::downloadList_currentChanged(TQListViewItem* item) const TorrentInterface* tc = ((QueueItem*)item)->getTC(); TorrentStats s = tc->getStats(); - dlStatus->setText(tc->statusToString()); + dltqStatus->setText(tc->statusToString()); dlTracker->setText(tc->getTrackersList()->getTrackerURL().prettyURL()); - dlRatio->setText(TQString("%1").arg((float)s.bytes_uploaded / s.bytes_downloaded,0,'f',2)); + dlRatio->setText(TQString("%1").tqarg((float)s.bytes_uploaded / s.bytes_downloaded,0,'f',2)); dlBytes->setText(BytesToString(s.bytes_left_to_download)); dlDHT->setText(s.priv_torrent ? i18n("No (private torrent)") : i18n("Yes")); } @@ -309,7 +309,7 @@ void QueueDialog::seedList_currentChanged(TQListViewItem* item) { if(!item) { - ulStatus->clear(); + ultqStatus->clear(); ulTracker->clear(); ulRatio->clear(); ulDHT->clear(); @@ -319,9 +319,9 @@ void QueueDialog::seedList_currentChanged(TQListViewItem* item) const TorrentInterface* tc = ((QueueItem*)item)->getTC(); TorrentStats s = tc->getStats(); - ulStatus->setText(tc->statusToString()); + ultqStatus->setText(tc->statusToString()); ulTracker->setText(tc->getTrackersList()->getTrackerURL().prettyURL()); - ulRatio->setText(TQString("%1").arg((float)s.bytes_uploaded / s.bytes_downloaded,0,'f',2)); + ulRatio->setText(TQString("%1").tqarg((float)s.bytes_uploaded / s.bytes_downloaded,0,'f',2)); ulBytes->setText(BytesToString(s.bytes_uploaded)); ulDHT->setText(s.priv_torrent ? i18n("No (private torrent)") : i18n("Yes")); } diff --git a/apps/ktorrent/queuedlg.ui b/apps/ktorrent/queuedlg.ui index 00a194f..8517b57 100644 --- a/apps/ktorrent/queuedlg.ui +++ b/apps/ktorrent/queuedlg.ui @@ -47,7 +47,7 @@ - layout25 + tqlayout25 @@ -121,7 +121,7 @@ - layout26 + tqlayout26 @@ -129,7 +129,7 @@ - dlStatus + dltqStatus @@ -263,7 +263,7 @@ - layout15 + tqlayout15 @@ -337,7 +337,7 @@ - layout27 + tqlayout27 @@ -345,7 +345,7 @@ - ulStatus + ultqStatus @@ -392,7 +392,7 @@ - layout7 + tqlayout7 @@ -400,7 +400,7 @@ - layout49 + tqlayout49 @@ -416,7 +416,7 @@ Preferred - + 20 20 @@ -452,7 +452,7 @@ Preferred - + 40 20 @@ -471,7 +471,7 @@ Expanding - + 20 30 @@ -504,7 +504,7 @@ Expanding - + 20 20 @@ -540,7 +540,7 @@ Preferred - + 20 20 @@ -573,7 +573,7 @@ Expanding - + 20 20 diff --git a/apps/ktorrent/scandialog.cpp b/apps/ktorrent/scandialog.cpp index 80fd681..292c1ea 100644 --- a/apps/ktorrent/scandialog.cpp +++ b/apps/ktorrent/scandialog.cpp @@ -67,14 +67,14 @@ void ScanDialog::scan() } catch (bt::Error & err) { - KMessageBox::error(0,i18n("Error scanning data: %1").arg(err.toString())); + KMessageBox::error(0,i18n("Error scanning data: %1").tqarg(err.toString())); } } void ScanDialog::execute(kt::TorrentInterface* tc,bool silently) { - m_torrent_label->setText(i18n("Scanning data of %1 :").arg(tc->getStats().torrent_name)); + m_torrent_label->setText(i18n("Scanning data of %1 :").tqarg(tc->getStats().torrent_name)); adjustSize(); m_cancel->setEnabled(true); this->silently = silently; diff --git a/apps/ktorrent/scandlgbase.ui b/apps/ktorrent/scandlgbase.ui index 18c76f1..89ffb9f 100644 --- a/apps/ktorrent/scandlgbase.ui +++ b/apps/ktorrent/scandlgbase.ui @@ -40,7 +40,7 @@ - layout5 + tqlayout5 @@ -48,7 +48,7 @@ - layout3 + tqlayout3 @@ -74,7 +74,7 @@ - layout4 + tqlayout4 @@ -84,7 +84,7 @@ m_chunks_found - + 100 0 @@ -96,7 +96,7 @@ 0 - + AlignVCenter|AlignRight @@ -104,7 +104,7 @@ m_chunks_failed - + 100 0 @@ -119,7 +119,7 @@ 0 - + AlignVCenter|AlignRight @@ -148,7 +148,7 @@ - layout8 + tqlayout8 @@ -164,7 +164,7 @@ Expanding - + 181 20 diff --git a/apps/ktorrent/speedlimitsdlg.cpp b/apps/ktorrent/speedlimitsdlg.cpp index 69c6a48..5fbe5b4 100644 --- a/apps/ktorrent/speedlimitsdlg.cpp +++ b/apps/ktorrent/speedlimitsdlg.cpp @@ -33,7 +33,7 @@ using namespace kt; SpeedLimitsDlg::SpeedLimitsDlg(kt::TorrentInterface* ti,TQWidget* parent, const char* name) : SpeedLimitsDlgBase(parent,name,true,0),tor(ti) { - m_main_caption->setText(i18n("Speed limits for %1:").arg(tor->getStats().torrent_name)); + m_main_caption->setText(i18n("Speed limits for %1:").tqarg(tor->getStats().torrent_name)); Uint32 up,down; tor->getTrafficLimits(up,down); m_upload_rate->setValue(up / 1024); diff --git a/apps/ktorrent/speedlimitsdlgbase.ui b/apps/ktorrent/speedlimitsdlgbase.ui index 520a705..f4313e2 100644 --- a/apps/ktorrent/speedlimitsdlgbase.ui +++ b/apps/ktorrent/speedlimitsdlgbase.ui @@ -29,7 +29,7 @@ - layout8 + tqlayout8 @@ -37,7 +37,7 @@ - layout7 + tqlayout7 @@ -63,7 +63,7 @@ - layout5 + tqlayout5 @@ -83,7 +83,7 @@ - layout6 + tqlayout6 @@ -125,7 +125,7 @@ - layout3 + tqlayout3 @@ -141,7 +141,7 @@ Expanding - + 121 20 diff --git a/apps/ktorrent/torrentcreatordlg.cpp b/apps/ktorrent/torrentcreatordlg.cpp index 8518de3..d42c06f 100644 --- a/apps/ktorrent/torrentcreatordlg.cpp +++ b/apps/ktorrent/torrentcreatordlg.cpp @@ -46,7 +46,7 @@ TorrentCreatorDlg::TorrentCreatorDlg(KTorrentCore* core,TQWidget *parent, const TQMap n = bt::Globals::instance().getDHT().getClosestGoodNodes(10); for(TQMap::iterator it = n.begin(); it!=n.end(); ++it) - new TQListViewItem(m_nodeList, it.key(), TQString("%1").arg(it.data())); + new TQListViewItem(m_nodeList, it.key(), TQString("%1").tqarg(it.data())); } TorrentCreatorDlg::~TorrentCreatorDlg() @@ -105,7 +105,7 @@ void TorrentCreatorDlg::onCreate() s += ".torrent"; KProgressDialog* dlg = new KProgressDialog(this,0); - dlg->setLabel(i18n("Creating %1...").arg(s)); + dlg->setLabel(i18n("Creating %1...").tqarg(s)); dlg->setModal(true); dlg->setAllowCancel(false); dlg->show(); @@ -136,7 +136,7 @@ void TorrentCreatorDlg::btnRemoveNode_clicked() void TorrentCreatorDlg::btnAddNode_clicked() { - new TQListViewItem(m_nodeList, m_node->text(), TQString("%1").arg(m_port->value())); + new TQListViewItem(m_nodeList, m_node->text(), TQString("%1").tqarg(m_port->value())); } void TorrentCreatorDlg::m_nodeList_selectionChanged(TQListViewItem*) diff --git a/apps/ktorrent/torrentcreatordlgbase.ui b/apps/ktorrent/torrentcreatordlgbase.ui index a9199bc..fa02179 100644 --- a/apps/ktorrent/torrentcreatordlgbase.ui +++ b/apps/ktorrent/torrentcreatordlgbase.ui @@ -24,7 +24,7 @@ - layout2 + tqlayout2 @@ -66,7 +66,7 @@ - layout7 + tqlayout7 @@ -148,7 +148,7 @@ Expanding - + 21 20 @@ -188,7 +188,7 @@ - layout9 + tqlayout9 @@ -233,7 +233,7 @@ Expanding - + 20 20 @@ -319,7 +319,7 @@ - layout9 + tqlayout9 @@ -372,7 +372,7 @@ Maximum - + 40 20 @@ -422,7 +422,7 @@ Expanding - + 20 40 @@ -436,7 +436,7 @@ NOTE: Some known good DHT nodes are already inserted. You should probably insert your own IP address and port too if you plan to seed this torrent. - + WordBreak|AlignVCenter diff --git a/apps/ktorrent/trayhoverpopup.cpp b/apps/ktorrent/trayhoverpopup.cpp index 5cce261..7df590f 100644 --- a/apps/ktorrent/trayhoverpopup.cpp +++ b/apps/ktorrent/trayhoverpopup.cpp @@ -114,7 +114,7 @@ void TrayHoverPopup::create() hb->setSpacing(KDialog::spacingHint()); TQLabel* pix_lbl = new TQLabel(hb,"title_icon"); pix_lbl->setPixmap(pix); - pix_lbl->setAlignment(AlignLeft); + pix_lbl->tqsetAlignment(AlignLeft); } @@ -122,13 +122,13 @@ void TrayHoverPopup::create() TQFont fnt = title->font(); fnt.setBold( true ); title->setFont( fnt ); - title->setAlignment( TQt::AlignHCenter ); + title->tqsetAlignment( TQt::AlignHCenter ); if ( hb ) hb->setStretchFactor(title, 10 ); // enforce centering // text will be filled later text = new TQLabel( "Dummy", vb, "msg_label" ); - text->setAlignment( AlignLeft ); + text->tqsetAlignment( AlignLeft ); setView(vb); } diff --git a/apps/ktorrent/trayicon.cpp b/apps/ktorrent/trayicon.cpp index 8588fc2..14a3db7 100644 --- a/apps/ktorrent/trayicon.cpp +++ b/apps/ktorrent/trayicon.cpp @@ -88,24 +88,24 @@ void TrayIcon::leaveEvent(TQEvent* ) void TrayIcon::updateStats(const CurrentStats stats, bool showBars,int downloadBandwidth, int uploadBandwidth ) { TQString tip = i18n("
Speed:
Download: %1Upload: %2
Transfer:
Download: %3Upload: %4
") - .arg(KBytesPerSecToString((double)stats.download_speed/1024.0)) - .arg(KBytesPerSecToString((double)stats.upload_speed/1024.0)) - .arg(BytesToString(stats.bytes_downloaded)) - .arg(BytesToString(stats.bytes_uploaded)); + .tqarg(KBytesPerSecToString((double)stats.download_speed/1024.0)) + .tqarg(KBytesPerSecToString((double)stats.upload_speed/1024.0)) + .tqarg(BytesToString(stats.bytes_downloaded)) + .tqarg(BytesToString(stats.bytes_uploaded)); m_hover_popup->updateText(tip); if(showBars) drawSpeedBar(stats.download_speed/1024,stats.upload_speed/1024, downloadBandwidth, uploadBandwidth); else if (previousDownloadHeight > 0 || previousUploadHeight > 0) { - repaint(); // clear the bars if they are disabled + tqrepaint(); // clear the bars if they are disabled previousDownloadHeight = previousUploadHeight = 0; } } void TrayIcon::drawSpeedBar(int downloadSpeed, int uploadSpeed, int downloadBandwidth, int uploadBandwidth ) { - //check if need repaint + //check if need tqrepaint if (uploadBandwidth == 0) uploadBandwidth = 1; if (downloadBandwidth == 0) @@ -116,7 +116,7 @@ void TrayIcon::drawSpeedBar(int downloadSpeed, int uploadSpeed, int downloadBand if(previousDownloadHeight==DownloadHeight && previousUploadHeight==UploadHeight) return; - repaint (); + tqrepaint (); TQBrush brushD(green); TQBrush brushU(red); @@ -146,9 +146,9 @@ void TrayIcon::finished(TorrentInterface* tc) TQString msg = i18n("%1 has completed downloading." "
Average speed: %2 DL / %3 UL.") - .arg(s.torrent_name) - .arg(KBytesPerSecToString(speed_down / tc->getRunningTimeDL())) - .arg(KBytesPerSecToString(speed_up / tc->getRunningTimeUL())); + .tqarg(s.torrent_name) + .tqarg(KBytesPerSecToString(speed_down / tc->getRunningTimeDL())) + .tqarg(KBytesPerSecToString(speed_up / tc->getRunningTimeUL())); showPassivePopup(msg,i18n("Download completed")); } @@ -164,10 +164,10 @@ void TrayIcon::maxShareRatioReached(kt::TorrentInterface* tc) TQString msg = i18n("%1 has reached its maximum share ratio of %2 and has been stopped." "
Uploaded %3 at an average speed of %4.") - .arg(s.torrent_name) - .arg(loc->formatNumber(s.max_share_ratio,2)) - .arg(BytesToString(s.bytes_uploaded)) - .arg(KBytesPerSecToString(speed_up / tc->getRunningTimeUL())); + .tqarg(s.torrent_name) + .tqarg(loc->formatNumber(s.max_share_ratio,2)) + .tqarg(BytesToString(s.bytes_uploaded)) + .tqarg(KBytesPerSecToString(speed_up / tc->getRunningTimeUL())); showPassivePopup(msg,i18n("Seeding completed")); } @@ -183,10 +183,10 @@ void TrayIcon::maxSeedTimeReached(kt::TorrentInterface* tc) TQString msg = i18n("%1 has reached its maximum seed time of %2 hours and has been stopped." "
Uploaded %3 at an average speed of %4.") - .arg(s.torrent_name) - .arg(loc->formatNumber(s.max_seed_time,2)) - .arg(BytesToString(s.bytes_uploaded)) - .arg(KBytesPerSecToString(speed_up / tc->getRunningTimeUL())); + .tqarg(s.torrent_name) + .tqarg(loc->formatNumber(s.max_seed_time,2)) + .tqarg(BytesToString(s.bytes_uploaded)) + .tqarg(KBytesPerSecToString(speed_up / tc->getRunningTimeUL())); showPassivePopup(msg,i18n("Seeding completed")); } @@ -198,7 +198,7 @@ void TrayIcon::torrentStoppedByError(kt::TorrentInterface* tc, TQString msg) const TorrentStats & s = tc->getStats(); TQString err_msg = i18n("%1 has been stopped with the following error:
%2") - .arg(s.torrent_name).arg(msg); + .tqarg(s.torrent_name).tqarg(msg); showPassivePopup(err_msg,i18n("Error")); } @@ -211,7 +211,7 @@ void TrayIcon::corruptedData(kt::TorrentInterface* tc) const TorrentStats & s = tc->getStats(); TQString err_msg = i18n("Corrupted data has been found in the torrent %1" "
It would be a good idea to do a data integrity check on the torrent.") - .arg(s.torrent_name); + .tqarg(s.torrent_name); showPassivePopup(err_msg,i18n("Error")); } @@ -227,10 +227,10 @@ void TrayIcon::queuingNotPossible(kt::TorrentInterface* tc) if (tc->overMaxRatio()) msg = i18n("%1 has reached its maximum share ratio of %2 and cannot be enqueued. Remove the limit manually if you want to continue seeding.") - .arg(s.torrent_name).arg(loc->formatNumber(s.max_share_ratio,2)); + .tqarg(s.torrent_name).tqarg(loc->formatNumber(s.max_share_ratio,2)); else msg = i18n("%1 has reached its maximum seed time of %2 hours and cannot be enqueued. Remove the limit manually if you want to continue seeding.") - .arg(s.torrent_name).arg(loc->formatNumber(s.max_seed_time,2)); + .tqarg(s.torrent_name).tqarg(loc->formatNumber(s.max_seed_time,2)); showPassivePopup(msg,i18n("Torrent cannot be enqueued.")); } @@ -240,7 +240,7 @@ void TrayIcon::canNotStart(kt::TorrentInterface* tc,kt::TorrentStartResponse rea if (!Settings::showPopups()) return; - TQString msg = i18n("Cannot start %1 :
").arg(tc->getStats().torrent_name); + TQString msg = i18n("Cannot start %1 :
").tqarg(tc->getStats().torrent_name); switch (reason) { case kt::TQM_LIMITS_REACHED: @@ -274,7 +274,7 @@ void TrayIcon::lowDiskSpace(kt::TorrentInterface * tc, bool stopped) const TorrentStats & s = tc->getStats(); - TQString msg = i18n("Your disk is running out of space.
%1 is being downloaded to '%2'.").arg(s.torrent_name).arg(tc->getDataDir()); + TQString msg = i18n("Your disk is running out of space.
%1 is being downloaded to '%2'.").tqarg(s.torrent_name).tqarg(tc->getDataDir()); if(stopped) msg.prepend(i18n("Torrent has been stopped.
")); @@ -335,10 +335,10 @@ void SetMaxRate::makeMenu() { if(rate == valuePair[j] && j==0) { - setItemChecked(insertItem(TQString("%1").arg(valuePair[j]),-1, (j == 0) ? 2 : count()), true); + setItemChecked(insertItem(TQString("%1").tqarg(valuePair[j]),-1, (j == 0) ? 2 : count()), true); } else - insertItem(TQString("%1").arg(valuePair[j]),-1, (j == 0) ? 2 : count()); + insertItem(TQString("%1").tqarg(valuePair[j]),-1, (j == 0) ? 2 : count()); } } diff --git a/apps/ktupnptest/mainwidget.ui b/apps/ktupnptest/mainwidget.ui index ed2022c..0aacede 100644 --- a/apps/ktupnptest/mainwidget.ui +++ b/apps/ktupnptest/mainwidget.ui @@ -23,7 +23,7 @@
- layout1 + tqlayout1 @@ -39,7 +39,7 @@ Expanding - + 61 20 diff --git a/apps/ktupnptest/upnptestapp.cpp b/apps/ktupnptest/upnptestapp.cpp index 7ccbb4f..0d14228 100644 --- a/apps/ktupnptest/upnptestapp.cpp +++ b/apps/ktupnptest/upnptestapp.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include "upnptestapp.h" #include "mainwidget.h" diff --git a/estimation-scripts/enable-logging.diff b/estimation-scripts/enable-logging.diff index 57dc703..e030443 100644 --- a/estimation-scripts/enable-logging.diff +++ b/estimation-scripts/enable-logging.diff @@ -45,7 +45,7 @@ Index: estimation-scripts/enable-logging.diff -+ { -+ if(!started) -+ { --+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::currentDateTime().toTime_t() << "," << tc->getDownloadRate() << "," << tc->getBytesDownloaded() << "," << tc->getBytesLeft() << "," << tc->getNumPeers() << ",ACTIVATED" << endl; +-+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::tqcurrentDateTime().toTime_t() << "," << tc->getDownloadRate() << "," << tc->getBytesDownloaded() << "," << tc->getBytesLeft() << "," << tc->getNumPeers() << ",ACTIVATED" << endl; -+ tmpLog = false; -+ started = true; -+ toLog = true; @@ -56,7 +56,7 @@ Index: estimation-scripts/enable-logging.diff -+ { -+ if(started) -+ { --+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::currentDateTime().toTime_t() << "," << tc->getDownloadRate() << "," << tc->getBytesDownloaded() << "," << tc->getBytesLeft() << "," << tc->getNumPeers() << ",DEACTIVATED" <getTorrentName() << "}," << QDateTime::tqcurrentDateTime().toTime_t() << "," << tc->getDownloadRate() << "," << tc->getBytesDownloaded() << "," << tc->getBytesLeft() << "," << tc->getNumPeers() << ",DEACTIVATED" <getBytesLeft() == 0) - { -+ if(toLog && tmpLog) --+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::currentDateTime().toTime_t() << "," << tc->getDownloadRate() << "," << tc->getBytesDownloaded() << "," << 0 << "," << tc->getNumPeers() << ",FINISHED" << endl; +-+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::tqcurrentDateTime().toTime_t() << "," << tc->getDownloadRate() << "," << tc->getBytesDownloaded() << "," << 0 << "," << tc->getNumPeers() << ",FINISHED" << endl; -+ toLog = false; -+ - setText(7,i18n("finished")); @@ -83,13 +83,13 @@ Index: estimation-scripts/enable-logging.diff - if (tc->getDownloadRate() == 0) -+ { -+ if(toLog && tmpLog) --+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::currentDateTime().toTime_t() << "," << 0 << "," << tc->getBytesDownloaded() << "," << tc->getBytesLeft() << "," << tc->getNumPeers() << ",RUNNING" << endl; +-+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::tqcurrentDateTime().toTime_t() << "," << 0 << "," << tc->getBytesDownloaded() << "," << tc->getBytesLeft() << "," << tc->getNumPeers() << ",RUNNING" << endl; - setText(7,i18n("infinity")); -+ } - else - { -+ if(toLog && tmpLog) --+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::currentDateTime().toTime_t() << "," << tc->getDownloadRate() << "," << tc->getBytesDownloaded() << "," << tc->getBytesLeft() << "," << tc->getNumPeers() << ",RUNNING" << endl; +-+ Out() << "{" << tc->getTorrentName() << "}," << QDateTime::tqcurrentDateTime().toTime_t() << "," << tc->getDownloadRate() << "," << tc->getBytesDownloaded() << "," << tc->getBytesLeft() << "," << tc->getNumPeers() << ",RUNNING" << endl; -+ - Uint32 secs = (int)floor( (float)tc->getBytesLeft() / (float)tc->getDownloadRate() ); - QTime t; @@ -155,7 +155,7 @@ Index: apps/ktorrent/ktorrentviewitem.cpp + { + if(!started) + { -+ Out() << "{" << s.torrent_name << "}," << QDateTime::currentDateTime().toTime_t() << "," << s.download_rate << "," << s.bytes_downloaded << "," << s.bytes_left << "," << s.num_peers << ",ACTIVATED" << endl; ++ Out() << "{" << s.torrent_name << "}," << QDateTime::tqcurrentDateTime().toTime_t() << "," << s.download_rate << "," << s.bytes_downloaded << "," << s.bytes_left << "," << s.num_peers << ",ACTIVATED" << endl; + tmpLog = false; + started = true; + toLog = true; @@ -166,7 +166,7 @@ Index: apps/ktorrent/ktorrentviewitem.cpp + { + if(started) + { -+ Out() << "{" << s.torrent_name << "}," << QDateTime::currentDateTime().toTime_t() << "," << s.download_rate << "," << s.bytes_downloaded << "," << s.bytes_left << "," << s.num_peers << ",DEACTIVATED" < +#include #include #include "expandablewidget.h" @@ -53,7 +53,7 @@ namespace kt se->pos = pos; se->next = begin; - // remove old top from layout + // remove old top from tqlayout top_layout->remove(begin->w); // create new toplevel splitter @@ -84,7 +84,7 @@ namespace kt // make se new top of stack begin = se; - // add toplevel splitter to layout + // add toplevel splitter to tqlayout top_layout->add(s); // show s diff --git a/libktorrent/interfaces/filetreediritem.cpp b/libktorrent/interfaces/filetreediritem.cpp index 93db727..86481f2 100644 --- a/libktorrent/interfaces/filetreediritem.cpp +++ b/libktorrent/interfaces/filetreediritem.cpp @@ -73,7 +73,7 @@ namespace kt int p = path.find(bt::DirSeparator()); if (p == -1) { - children.insert(path,newFileTreeItem(path,file)); + tqchildren.insert(path,newFileTreeItem(path,file)); } else { @@ -98,8 +98,8 @@ namespace kt manual_change = false; } // first set all the child items - bt::PtrMap::iterator i = children.begin(); - while (i != children.end()) + bt::PtrMap::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { i->second->setChecked(on,keep_data); i++; @@ -118,8 +118,8 @@ namespace kt void FileTreeDirItem::invertChecked() { // first set all the child items - bt::PtrMap::iterator i = children.begin(); - while (i != children.end()) + bt::PtrMap::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { FileTreeItem* item = i->second; item->setChecked(!item->isOn()); @@ -171,8 +171,8 @@ namespace kt { Uint64 tot = 0; // first check all the child items - bt::PtrMap::const_iterator i = children.begin(); - while (i != children.end()) + bt::PtrMap::const_iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { const FileTreeItem* item = i->second; tot += item->bytesToDownload(); @@ -192,8 +192,8 @@ namespace kt bool FileTreeDirItem::allChildrenOn() { // first check all the child items - bt::PtrMap::iterator i = children.begin(); - while (i != children.end()) + bt::PtrMap::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { FileTreeItem* item = i->second; if (!item->isOn()) @@ -214,7 +214,7 @@ namespace kt void FileTreeDirItem::childStateChange() { - // only set this dir on if all children are on + // only set this dir on if all tqchildren are on manual_change = true; setOn(allChildrenOn()); manual_change = false; @@ -248,8 +248,8 @@ namespace kt { // first check all the child items TorrentFileInterface & nullfile = (TorrentFileInterface &)TorrentFile::null; - bt::PtrMap::iterator i = children.begin(); - while (i != children.end()) + bt::PtrMap::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { FileTreeItem* file = i->second; if (file == (FileTreeItem*)item) diff --git a/libktorrent/interfaces/filetreediritem.h b/libktorrent/interfaces/filetreediritem.h index 6deaab8..37de320 100644 --- a/libktorrent/interfaces/filetreediritem.h +++ b/libktorrent/interfaces/filetreediritem.h @@ -49,7 +49,7 @@ namespace kt protected: TQString name; Uint64 size; - bt::PtrMap children; + bt::PtrMap tqchildren; bt::PtrMap subdirs; FileTreeDirItem* parent; bool manual_change; diff --git a/libktorrent/interfaces/functions.cpp b/libktorrent/interfaces/functions.cpp index 6a19d7f..cade53a 100644 --- a/libktorrent/interfaces/functions.cpp +++ b/libktorrent/interfaces/functions.cpp @@ -32,19 +32,19 @@ namespace kt { KLocale* loc = KGlobal::locale(); if (bytes >= 1024 * 1024 * 1024) - return i18n("%1 GB").arg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision)); + return i18n("%1 GB").tqarg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision)); else if (bytes >= 1024*1024) - return i18n("%1 MB").arg(loc->formatNumber(bytes / TO_MEG,precision < 0 ? 1 : precision)); + return i18n("%1 MB").tqarg(loc->formatNumber(bytes / TO_MEG,precision < 0 ? 1 : precision)); else if (bytes >= 1024) - return i18n("%1 KB").arg(loc->formatNumber(bytes / TO_KB,precision < 0 ? 1 : precision)); + return i18n("%1 KB").tqarg(loc->formatNumber(bytes / TO_KB,precision < 0 ? 1 : precision)); else - return i18n("%1 B").arg(bytes); + return i18n("%1 B").tqarg(bytes); } TQString KBytesPerSecToString(double speed,int precision) { KLocale* loc = KGlobal::locale(); - return i18n("%1 KB/s").arg(loc->formatNumber(speed,precision)); + return i18n("%1 KB/s").tqarg(loc->formatNumber(speed,precision)); } TQString DurationToString(Uint32 nsecs) diff --git a/libktorrent/interfaces/torrentinterface.h b/libktorrent/interfaces/torrentinterface.h index 4ab3c74..14ad532 100644 --- a/libktorrent/interfaces/torrentinterface.h +++ b/libktorrent/interfaces/torrentinterface.h @@ -44,7 +44,7 @@ namespace kt class TorrentFileInterface; class PeerSource; - enum TorrentStatus + enum TorrenttqStatus { NOT_STARTED, SEEDING_COMPLETE, @@ -118,8 +118,8 @@ namespace kt Uint32 leechers_total; /// Num leechers connected to Uint32 leechers_connected_to; - /// Status of the download - TorrentStatus status; + /// tqStatus of the download + TorrenttqStatus status; /// The status of the tracker TQString trackerstatus; /// The number of bytes downloaded in this session diff --git a/libktorrent/kademlia/dhttrackerbackend.cpp b/libktorrent/kademlia/dhttrackerbackend.cpp index f266744..96277a3 100644 --- a/libktorrent/kademlia/dhttrackerbackend.cpp +++ b/libktorrent/kademlia/dhttrackerbackend.cpp @@ -137,7 +137,7 @@ namespace dht { Out(SYS_DHT|LOG_NOTICE) << TQString("DHT: Got %1 potential peers for torrent %2") - .arg(cnt).arg(tor->getStats().torrent_name) << endl; + .tqarg(cnt).tqarg(tor->getStats().torrent_name) << endl; peersReady(this); } } diff --git a/libktorrent/kademlia/rpcmsg.cpp b/libktorrent/kademlia/rpcmsg.cpp index 90d2484..6ef62b9 100644 --- a/libktorrent/kademlia/rpcmsg.cpp +++ b/libktorrent/kademlia/rpcmsg.cpp @@ -192,7 +192,7 @@ namespace dht if (mt_id.length() == 0) return 0; - Uint8 mtid = (char)mt_id.at(0).latin1(); + Uint8 mtid = (char)mt_id.tqat(0).latin1(); TQString str = vn->data().toString(); return new ErrMsg(mtid,id,str); @@ -266,7 +266,7 @@ namespace dht void PingReq::print() { - Out(SYS_DHT|LOG_DEBUG) << TQString("REQ: %1 %2 : ping").arg(mtid).arg(id.toString()) << endl; + Out(SYS_DHT|LOG_DEBUG) << TQString("REQ: %1 %2 : ping").tqarg(mtid).tqarg(id.toString()) << endl; } void PingReq::encode(TQByteArray & arr) @@ -303,7 +303,7 @@ namespace dht void FindNodeReq::print() { Out(SYS_DHT|LOG_NOTICE) << TQString("REQ: %1 %2 : find_node %3") - .arg(mtid).arg(id.toString()).arg(target.toString()) << endl; + .tqarg(mtid).tqarg(id.toString()).tqarg(target.toString()) << endl; } void FindNodeReq::encode(TQByteArray & arr) @@ -342,7 +342,7 @@ namespace dht void GetPeersReq::print() { Out(SYS_DHT|LOG_DEBUG) << TQString("REQ: %1 %2 : get_peers %3") - .arg(mtid).arg(id.toString()).arg(info_hash.toString()) << endl; + .tqarg(mtid).tqarg(id.toString()).tqarg(info_hash.toString()) << endl; } void GetPeersReq::encode(TQByteArray & arr) @@ -381,8 +381,8 @@ namespace dht void AnnounceReq::print() { Out(SYS_DHT|LOG_DEBUG) << TQString("REQ: %1 %2 : announce_peer %3 %4 %5") - .arg(mtid).arg(id.toString()).arg(info_hash.toString()) - .arg(port).arg(token.toString()) << endl; + .tqarg(mtid).tqarg(id.toString()).tqarg(info_hash.toString()) + .tqarg(port).tqarg(token.toString()) << endl; } void AnnounceReq::encode(TQByteArray & arr) @@ -421,7 +421,7 @@ namespace dht void PingRsp::print() { Out(SYS_DHT|LOG_DEBUG) << TQString("RSP: %1 %2 : ping") - .arg(mtid).arg(id.toString()) << endl; + .tqarg(mtid).tqarg(id.toString()) << endl; } void PingRsp::encode(TQByteArray & arr) @@ -456,7 +456,7 @@ namespace dht void FindNodeRsp::print() { Out(SYS_DHT|LOG_DEBUG) << TQString("RSP: %1 %2 : find_node") - .arg(mtid).arg(id.toString()) << endl; + .tqarg(mtid).tqarg(id.toString()) << endl; } void FindNodeRsp::encode(TQByteArray & arr) @@ -498,7 +498,7 @@ namespace dht void GetPeersRsp::print() { Out() << TQString("RSP: %1 %2 : get_peers(%3)") - .arg(mtid).arg(id.toString()).arg(data.size() > 0 ? "nodes" : "values") << endl; + .tqarg(mtid).tqarg(id.toString()).tqarg(data.size() > 0 ? "nodes" : "values") << endl; } void GetPeersRsp::encode(TQByteArray & arr) @@ -552,7 +552,7 @@ namespace dht void AnnounceRsp::print() { Out() << TQString("RSP: %1 %2 : announce_peer") - .arg(mtid).arg(id.toString()) << endl; + .tqarg(mtid).tqarg(id.toString()) << endl; } void AnnounceRsp::encode(TQByteArray & arr) diff --git a/libktorrent/labelview.cpp b/libktorrent/labelview.cpp index b36af4f..b46de3a 100644 --- a/libktorrent/labelview.cpp +++ b/libktorrent/labelview.cpp @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include -#include +#include #include #include #include @@ -105,13 +105,13 @@ namespace kt class LabelViewBox : public TQWidget { - TQVBoxLayout* layout; + TQVBoxLayout* tqlayout; public: LabelViewBox(TQWidget* parent) : TQWidget(parent) { setPaletteBackgroundColor(KGlobalSettings::baseColor()); - layout = new TQVBoxLayout(this); - layout->setMargin(0); + tqlayout = new TQVBoxLayout(this); + tqlayout->setMargin(0); } virtual ~LabelViewBox() @@ -120,24 +120,24 @@ namespace kt void add(LabelViewItem* item) { item->reparent(this,TQPoint(0,0)); - layout->add(item); + tqlayout->add(item); item->show(); } void remove(LabelViewItem* item) { item->hide(); - layout->remove(item); + tqlayout->remove(item); item->reparent(0,TQPoint(0,0)); } void sorted(const std::list items) { for (LabelViewCItr i = items.begin();i != items.end();i++) - layout->remove(*i); + tqlayout->remove(*i); for (LabelViewCItr i = items.begin();i != items.end();i++) - layout->add(*i); + tqlayout->add(*i); } }; @@ -184,11 +184,11 @@ namespace kt selected = 0; // update odd status of each item - updateOddStatus(); + updateOddtqStatus(); } } - void LabelView::updateOddStatus() + void LabelView::updateOddtqStatus() { bool odd = true; LabelViewItr i = items.begin(); @@ -250,7 +250,7 @@ namespace kt { items.sort(LabelViewItemCmp()); item_box->sorted(items); - updateOddStatus(); + updateOddtqStatus(); } } diff --git a/libktorrent/labelview.h b/libktorrent/labelview.h index eba2036..550e2d5 100644 --- a/libktorrent/labelview.h +++ b/libktorrent/labelview.h @@ -110,7 +110,7 @@ namespace kt void onItemClicked(LabelViewItem* it); private: - void updateOddStatus(); + void updateOddtqStatus(); signals: /// The current item has changed diff --git a/libktorrent/labelviewitembase.ui b/libktorrent/labelviewitembase.ui index fbce874..cb6821c 100644 --- a/libktorrent/labelviewitembase.ui +++ b/libktorrent/labelviewitembase.ui @@ -23,7 +23,7 @@ icon_lbl - + 64 64 @@ -35,7 +35,7 @@ - layout3 + tqlayout3 diff --git a/libktorrent/migrate/ccmigrate.cpp b/libktorrent/migrate/ccmigrate.cpp index e824830..3975de4 100644 --- a/libktorrent/migrate/ccmigrate.cpp +++ b/libktorrent/migrate/ccmigrate.cpp @@ -116,13 +116,13 @@ namespace bt // open the old current_chunks file File old_cc; if (!old_cc.open(current_chunks,"rb")) - throw Error(i18n("Cannot open file %1 : %2").arg(current_chunks).arg(old_cc.errorString())); + throw Error(i18n("Cannot open file %1 : %2").tqarg(current_chunks).tqarg(old_cc.errorString())); // open a new file in the /tmp dir File new_cc; TQString tmp = current_chunks + ".tmp"; if (!new_cc.open(tmp,"wb")) - throw Error(i18n("Cannot open file %1 : %2").arg(tmp).arg(old_cc.errorString())); + throw Error(i18n("Cannot open file %1 : %2").tqarg(tmp).tqarg(old_cc.errorString())); // read the number of chunks Uint32 num = 0; diff --git a/libktorrent/migrate/migrate.cpp b/libktorrent/migrate/migrate.cpp index ef6ddf1..a59f83c 100644 --- a/libktorrent/migrate/migrate.cpp +++ b/libktorrent/migrate/migrate.cpp @@ -42,7 +42,7 @@ namespace bt { // check if directory exists if (!bt::Exists(tor_dir)) - throw Error(i18n("The directory %1 does not exist").arg(tor_dir)); + throw Error(i18n("The directory %1 does not exist").tqarg(tor_dir)); // make sure it ends with a / TQString tdir = tor_dir; diff --git a/libktorrent/mse/functions.cpp b/libktorrent/mse/functions.cpp index a478cda..d9ed5cf 100644 --- a/libktorrent/mse/functions.cpp +++ b/libktorrent/mse/functions.cpp @@ -66,7 +66,7 @@ namespace mse lg << name << " (" << nb << ") = "; for (Uint32 i = 0;i < nb;i++) { - lg << TQString("0x%1 ").arg(buf[i],0,16); + lg << TQString("0x%1 ").tqarg(buf[i],0,16); } lg << endl; } diff --git a/libktorrent/net/address.cpp b/libktorrent/net/address.cpp index d4877da..e1de8d0 100644 --- a/libktorrent/net/address.cpp +++ b/libktorrent/net/address.cpp @@ -58,10 +58,10 @@ namespace net TQString Address::toString() const { return TQString("%1.%2.%3.%4") - .arg((m_ip & 0xFF000000) >> 24) - .arg((m_ip & 0x00FF0000) >> 16) - .arg((m_ip & 0x0000FF00) >> 8) - .arg(m_ip & 0x000000FF); + .tqarg((m_ip & 0xFF000000) >> 24) + .tqarg((m_ip & 0x00FF0000) >> 16) + .tqarg((m_ip & 0x0000FF00) >> 8) + .tqarg(m_ip & 0x000000FF); } } diff --git a/libktorrent/net/socket.cpp b/libktorrent/net/socket.cpp index e1e67ea..ff09a34 100644 --- a/libktorrent/net/socket.cpp +++ b/libktorrent/net/socket.cpp @@ -60,7 +60,7 @@ namespace net int val = 1; if (setsockopt(m_fd,SOL_SOCKET,SO_NOSIGPIPE,&val,sizeof(int)) < 0) { - Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the NOSIGPIPE option : %1").arg(strerror(errno)) << endl; + Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the NOSIGPIPE option : %1").tqarg(strerror(errno)) << endl; } #endif cacheAddress(); @@ -71,14 +71,14 @@ namespace net int fd = socket(PF_INET,tcp ? SOCK_STREAM : SOCK_DGRAM,0); if (fd < 0) { - Out(SYS_GEN|LOG_IMPORTANT) << TQString("Cannot create socket : %1").arg(strerror(errno)) << endl; + Out(SYS_GEN|LOG_IMPORTANT) << TQString("Cannot create socket : %1").tqarg(strerror(errno)) << endl; } m_fd = fd; #if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && !defined(__DragonFly__) && __FreeBSD_version < 600020) int val = 1; if (setsockopt(m_fd,SOL_SOCKET,SO_NOSIGPIPE,&val,sizeof(int)) < 0) { - Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the NOSIGPIPE option : %1").arg(strerror(errno)) << endl; + Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the NOSIGPIPE option : %1").tqarg(strerror(errno)) << endl; } #endif } @@ -127,7 +127,7 @@ namespace net else { Out(SYS_CON|LOG_NOTICE) << TQString("Cannot connect to host %1:%2 : %3") - .arg(a.toString()).arg(a.port()).arg(strerror(errno)) << endl; + .tqarg(a.toString()).tqarg(a.port()).tqarg(strerror(errno)) << endl; return false; } } @@ -145,20 +145,20 @@ namespace net if (::bind(m_fd,(struct sockaddr*)&addr,sizeof(struct sockaddr)) < 0) { - Out(SYS_CON|LOG_IMPORTANT) << TQString("Cannot bind to port %1 : %2").arg(port).arg(strerror(errno)) << endl; + Out(SYS_CON|LOG_IMPORTANT) << TQString("Cannot bind to port %1 : %2").tqarg(port).tqarg(strerror(errno)) << endl; return false; } if (also_listen && listen(m_fd,5) < 0) { - Out(SYS_CON|LOG_IMPORTANT) << TQString("Cannot listen to port %1 : %2").arg(port).arg(strerror(errno)) << endl; + Out(SYS_CON|LOG_IMPORTANT) << TQString("Cannot listen to port %1 : %2").tqarg(port).tqarg(strerror(errno)) << endl; return false; } int val = 1; if (setsockopt(m_fd,SOL_SOCKET,SO_REUSEADDR,&val,sizeof(int)) < 0) { - Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the reuseaddr option : %1").arg(strerror(errno)) << endl; + Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the reuseaddr option : %1").tqarg(strerror(errno)) << endl; } m_state = BOUND; return true; @@ -272,7 +272,7 @@ namespace net if (setsockopt(m_fd,IPPROTO_IP,IP_TOS,&c,sizeof(c)) < 0) { Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set TOS to %1 : %2") - .arg(type_of_service).arg(strerror(errno)) << endl; + .tqarg(type_of_service).tqarg(strerror(errno)) << endl; return false; } return true; diff --git a/libktorrent/pluginmanager.cpp b/libktorrent/pluginmanager.cpp index 25f310b..3ea1282 100644 --- a/libktorrent/pluginmanager.cpp +++ b/libktorrent/pluginmanager.cpp @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include -#include +#include #include #include #include @@ -71,7 +71,7 @@ namespace kt { Out(SYS_GEN|LOG_NOTICE) << TQString("Plugin %1 version does not match KTorrent version, unloading it.") - .arg(service->library()) << endl; + .tqarg(service->library()) << endl; delete plugin; // unload the library again, no need to have it loaded diff --git a/libktorrent/pluginmanagerprefpage.cpp b/libktorrent/pluginmanagerprefpage.cpp index 8a6e33c..70a8777 100644 --- a/libktorrent/pluginmanagerprefpage.cpp +++ b/libktorrent/pluginmanagerprefpage.cpp @@ -51,9 +51,9 @@ namespace kt { setTitle("

" + p->getGuiName() + "

"); setDescription( - i18n("%1
Status: %2
Author: %3").arg(p->getDescription()) - .arg(p->isLoaded() ? i18n("Loaded") : i18n("Not loaded")) - .arg(p->getAuthor())); + i18n("%1
Status: %2
Author: %3").tqarg(p->getDescription()) + .tqarg(p->isLoaded() ? i18n("Loaded") : i18n("Not loaded")) + .tqarg(p->getAuthor())); } TQString pluginName() {return p->getName();} diff --git a/libktorrent/pluginmanagerwidget.ui b/libktorrent/pluginmanagerwidget.ui index 6b077f5..aae2416 100644 --- a/libktorrent/pluginmanagerwidget.ui +++ b/libktorrent/pluginmanagerwidget.ui @@ -34,7 +34,7 @@
- layout1 + tqlayout1 @@ -82,7 +82,7 @@ Expanding - + 20 31 diff --git a/libktorrent/torrent/announcelist.cpp b/libktorrent/torrent/announcelist.cpp index d20873d..4d3d4fa 100644 --- a/libktorrent/torrent/announcelist.cpp +++ b/libktorrent/torrent/announcelist.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include namespace bt { diff --git a/libktorrent/torrent/bdecoder.cpp b/libktorrent/torrent/bdecoder.cpp index e965eb5..778cf8a 100644 --- a/libktorrent/torrent/bdecoder.cpp +++ b/libktorrent/torrent/bdecoder.cpp @@ -59,7 +59,7 @@ namespace bt } else { - throw Error(i18n("Illegal token: %1").arg(data[pos])); + throw Error(i18n("Illegal token: %1").tqarg(data[pos])); } } @@ -161,7 +161,7 @@ namespace bt Int64 bi = 0LL; bi = n.toLongLong(&ok); if (!ok) - throw Error(i18n("Cannot convert %1 to an int").arg(n)); + throw Error(i18n("Cannot convert %1 to an int").tqarg(n)); pos++; if (verbose) Out() << "INT64 = " << n << endl; @@ -195,7 +195,7 @@ namespace bt len = n.toInt(&ok); if (!ok) { - throw Error(i18n("Cannot convert %1 to an int").arg(n)); + throw Error(i18n("Cannot convert %1 to an int").tqarg(n)); } // move pos to the first part of the string pos++; @@ -204,7 +204,7 @@ namespace bt TQByteArray arr(len); for (unsigned int i = pos;i < pos + len;i++) - arr.at(i-pos) = data[i]; + arr.tqat(i-pos) = data[i]; pos += len; // read the string into n diff --git a/libktorrent/torrent/bencoder.cpp b/libktorrent/torrent/bencoder.cpp index cb82db7..ef01123 100644 --- a/libktorrent/torrent/bencoder.cpp +++ b/libktorrent/torrent/bencoder.cpp @@ -87,7 +87,7 @@ namespace bt { if (!out) return; - TQCString s = TQString("i%1e").arg(val).utf8(); + TQCString s = TQString("i%1e").tqarg(val).utf8(); out->write(s,s.length()); } @@ -95,7 +95,7 @@ namespace bt { if (!out) return; - TQCString s = TQString("i%1e").arg(val).utf8(); + TQCString s = TQString("i%1e").tqarg(val).utf8(); out->write(s,s.length()); } @@ -104,7 +104,7 @@ namespace bt if (!out) return; TQCString u = str.utf8(); - TQCString s = TQString("%1:").arg(u.length()).utf8(); + TQCString s = TQString("%1:").tqarg(u.length()).utf8(); out->write(s,s.length()); out->write(u,u.length()); } @@ -123,7 +123,7 @@ namespace bt { if (!out) return; - TQCString s = TQString("%1:").arg(size).utf8(); + TQCString s = TQString("%1:").tqarg(size).utf8(); out->write(s,s.length()); out->write((const char*)data,size); } diff --git a/libktorrent/torrent/bnode.cpp b/libktorrent/torrent/bnode.cpp index c32f09b..07b7ba0 100644 --- a/libktorrent/torrent/bnode.cpp +++ b/libktorrent/torrent/bnode.cpp @@ -56,8 +56,8 @@ namespace bt BDictNode::~BDictNode() { - TQValueList::iterator i = children.begin(); - while (i != children.end()) + TQValueList::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { DictEntry & e = *i; delete e.node; @@ -70,13 +70,13 @@ namespace bt DictEntry entry; entry.key = key; entry.node = node; - children.append(entry); + tqchildren.append(entry); } BNode* BDictNode::getData(const TQString & key) { - TQValueList::iterator i = children.begin(); - while (i != children.end()) + TQValueList::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { DictEntry & e = *i; if (TQString(e.key) == key) @@ -88,8 +88,8 @@ namespace bt BDictNode* BDictNode::getDict(const TQByteArray & key) { - TQValueList::iterator i = children.begin(); - while (i != children.end()) + TQValueList::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { DictEntry & e = *i; if (e.key == key) @@ -120,8 +120,8 @@ namespace bt void BDictNode::printDebugInfo() { Out() << "DICT" << endl; - TQValueList::iterator i = children.begin(); - while (i != children.end()) + TQValueList::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { DictEntry & e = *i; Out() << TQString(e.key) << ": " << endl; @@ -135,7 +135,7 @@ namespace bt BListNode::BListNode(Uint32 off) : BNode(LIST,off) { - children.setAutoDelete(true); + tqchildren.setAutoDelete(true); } @@ -145,7 +145,7 @@ namespace bt void BListNode::append(BNode* node) { - children.append(node); + tqchildren.append(node); } BListNode* BListNode::getList(Uint32 idx) @@ -165,10 +165,10 @@ namespace bt void BListNode::printDebugInfo() { - Out() << "LIST " << children.count() << endl; - for (Uint32 i = 0;i < children.count();i++) + Out() << "LIST " << tqchildren.count() << endl; + for (Uint32 i = 0;i < tqchildren.count();i++) { - BNode* n = children.at(i); + BNode* n = tqchildren.at(i); n->printDebugInfo(); } Out() << "END" << endl; diff --git a/libktorrent/torrent/bnode.h b/libktorrent/torrent/bnode.h index 84b306e..ccd2c94 100644 --- a/libktorrent/torrent/bnode.h +++ b/libktorrent/torrent/bnode.h @@ -102,7 +102,7 @@ namespace bt TQByteArray key; BNode* node; }; - TQValueList children; + TQValueList tqchildren; public: BDictNode(Uint32 off); virtual ~BDictNode(); @@ -159,7 +159,7 @@ namespace bt */ class BListNode : public BNode { - TQPtrList children; + TQPtrList tqchildren; public: BListNode(Uint32 off); virtual ~BListNode(); @@ -172,14 +172,14 @@ namespace bt void printDebugInfo(); /// Get the number of nodes in the list. - Uint32 getNumChildren() const {return children.count();} + Uint32 getNumChildren() const {return tqchildren.count();} /** * Get a node from the list * @param idx The index * @return The node or 0 if idx is out of bounds */ - BNode* getChild(Uint32 idx) {return children.at(idx);} + BNode* getChild(Uint32 idx) {return tqchildren.at(idx);} /** * Get a BListNode. diff --git a/libktorrent/torrent/cachefile.cpp b/libktorrent/torrent/cachefile.cpp index 7f02b6b..678124a 100644 --- a/libktorrent/torrent/cachefile.cpp +++ b/libktorrent/torrent/cachefile.cpp @@ -92,7 +92,7 @@ namespace bt if (fd < 0) { - throw Error(i18n("Cannot open %1 : %2").arg(path).arg(strerror(errno))); + throw Error(i18n("Cannot open %1 : %2").tqarg(path).tqarg(strerror(errno))); } file_size = FileSize(fd); @@ -118,7 +118,7 @@ namespace bt if (read_only && mode != READ) { - throw Error(i18n("Cannot open %1 for writing : readonly filesystem").arg(path)); + throw Error(i18n("Cannot open %1 for writing : readonly filesystem").tqarg(path)); } if (off + size > max_size) @@ -217,7 +217,7 @@ namespace bt } if (read_only) - throw Error(i18n("Cannot open %1 for writing : readonly filesystem").arg(path)); + throw Error(i18n("Cannot open %1 for writing : readonly filesystem").tqarg(path)); // jump to the end of the file SeekFile(fd,0,SEEK_END); @@ -237,22 +237,22 @@ namespace bt int nb = to_write > 1024 ? 1024 : to_write; int ret = ::write(fd,buf,nb); if (ret < 0) - throw Error(i18n("Cannot expand file %1 : %2").arg(path).arg(strerror(errno))); + throw Error(i18n("Cannot expand file %1 : %2").tqarg(path).tqarg(strerror(errno))); else if (ret != nb) - throw Error(i18n("Cannot expand file %1 : incomplete write").arg(path)); + throw Error(i18n("Cannot expand file %1 : incomplete write").tqarg(path)); to_write -= nb; } file_size += num; // - // Out() << TQString("growing %1 = %2").arg(path).arg(kt::BytesToString(file_size)) << endl; + // Out() << TQString("growing %1 = %2").tqarg(path).tqarg(kt::BytesToString(file_size)) << endl; if (file_size != FileSize(fd)) { -// Out() << TQString("Homer Simpson %1 %2").arg(file_size).arg(sb.st_size) << endl; +// Out() << TQString("Homer Simpson %1 %2").tqarg(file_size).tqarg(sb.st_size) << endl; fsync(fd); if (file_size != FileSize(fd)) { - throw Error(i18n("Cannot expand file %1").arg(path)); + throw Error(i18n("Cannot expand file %1").tqarg(path)); } } } @@ -292,7 +292,7 @@ namespace bt if (ret < 0) { - Out(SYS_DIO|LOG_IMPORTANT) << TQString("Munmap failed with error %1 : %2").arg(errno).arg(strerror(errno)) << endl; + Out(SYS_DIO|LOG_IMPORTANT) << TQString("Munmap failed with error %1 : %2").tqarg(errno).tqarg(strerror(errno)) << endl; } } @@ -326,7 +326,7 @@ namespace bt if (ret < 0) { - Out(SYS_DIO|LOG_IMPORTANT) << TQString("Munmap failed with error %1 : %2").arg(errno).arg(strerror(errno)) << endl; + Out(SYS_DIO|LOG_IMPORTANT) << TQString("Munmap failed with error %1 : %2").tqarg(errno).tqarg(strerror(errno)) << endl; } } ::close(fd); @@ -348,7 +348,7 @@ namespace bt if (off >= file_size || off >= max_size) { - throw Error(i18n("Error : Reading past the end of the file %1").arg(path)); + throw Error(i18n("Error : Reading past the end of the file %1").tqarg(path)); } // jump to right position @@ -358,7 +358,7 @@ namespace bt if (close_again) closeTemporary(); - throw Error(i18n("Error reading from %1").arg(path)); + throw Error(i18n("Error reading from %1").tqarg(path)); } if (close_again) @@ -379,7 +379,7 @@ namespace bt } if (read_only) - throw Error(i18n("Cannot open %1 for writing : readonly filesystem").arg(path)); + throw Error(i18n("Cannot open %1 for writing : readonly filesystem").tqarg(path)); if (off + size > max_size) { @@ -389,7 +389,7 @@ namespace bt if (file_size < off) { - //Out() << TQString("Writing %1 bytes at %2").arg(size).arg(off) << endl; + //Out() << TQString("Writing %1 bytes at %2").tqarg(size).tqarg(off) << endl; growFile(off - file_size); } @@ -400,11 +400,11 @@ namespace bt closeTemporary(); if (ret == -1) - throw Error(i18n("Error writing to %1 : %2").arg(path).arg(strerror(errno))); + throw Error(i18n("Error writing to %1 : %2").tqarg(path).tqarg(strerror(errno))); else if ((Uint32)ret != size) { - Out() << TQString("Incomplete write of %1 bytes, should be %2").arg(ret).arg(size) << endl; - throw Error(i18n("Error writing to %1").arg(path)); + Out() << TQString("Incomplete write of %1 bytes, should be %2").tqarg(ret).tqarg(size) << endl; + throw Error(i18n("Error writing to %1").tqarg(path)); } if (off + size > file_size) @@ -445,7 +445,7 @@ namespace bt if (close_again) closeTemporary(); - throw Error(i18n("Cannot open %1 for writing : readonly filesystem").arg(path)); + throw Error(i18n("Cannot open %1 for writing : readonly filesystem").tqarg(path)); } try @@ -472,7 +472,7 @@ namespace bt if (close_again) closeTemporary(); - throw Error(i18n("Cannot preallocate diskspace : %1").arg(strerror(errno))); + throw Error(i18n("Cannot preallocate diskspace : %1").tqarg(strerror(errno))); } } diff --git a/libktorrent/torrent/chunk.cpp b/libktorrent/torrent/chunk.cpp index 6873713..aaee35e 100644 --- a/libktorrent/torrent/chunk.cpp +++ b/libktorrent/torrent/chunk.cpp @@ -37,7 +37,7 @@ namespace bt clear(); } - void Chunk::setData(Uint8* d,Status nstatus) + void Chunk::setData(Uint8* d,tqStatus nstatus) { clear(); status = nstatus; diff --git a/libktorrent/torrent/chunk.h b/libktorrent/torrent/chunk.h index 0896e96..08d63c3 100644 --- a/libktorrent/torrent/chunk.h +++ b/libktorrent/torrent/chunk.h @@ -45,7 +45,7 @@ namespace bt Chunk(unsigned int index,Uint32 size); ~Chunk(); - enum Status + enum tqStatus { MMAPPED, BUFFERED, @@ -54,13 +54,13 @@ namespace bt }; /// Get the chunks status. - Status getStatus() const; + tqStatus gettqStatus() const; /** * Set the chunks status * @param s */ - void setStatus(Status s); + void settqStatus(tqStatus s); /// Get the data const Uint8* getData() const; @@ -69,7 +69,7 @@ namespace bt Uint8* getData(); /// Set the data and the new status - void setData(Uint8* d,Status nstatus); + void setData(Uint8* d,tqStatus nstatus); /// Clear the chunk (delete data depending on the mode) void clear(); @@ -118,7 +118,7 @@ namespace bt virtual void unmapped(); private: - Status status; + tqStatus status; Uint32 index; Uint8* data; Uint32 size; @@ -126,12 +126,12 @@ namespace bt Priority priority; }; - inline Chunk::Status Chunk::getStatus() const + inline Chunk::tqStatus Chunk::gettqStatus() const { return status; } - inline void Chunk::setStatus(Chunk::Status s) + inline void Chunk::settqStatus(Chunk::tqStatus s) { status = s; } diff --git a/libktorrent/torrent/chunkdownload.cpp b/libktorrent/torrent/chunkdownload.cpp index 38e4fec..04eb87f 100644 --- a/libktorrent/torrent/chunkdownload.cpp +++ b/libktorrent/torrent/chunkdownload.cpp @@ -35,17 +35,17 @@ namespace bt { - class DownloadStatus : public std::set + class DownloadtqStatus : public std::set { public: // typedef std::set::iterator iterator; - DownloadStatus() + DownloadtqStatus() { } - ~DownloadStatus() + ~DownloadtqStatus() { } @@ -111,7 +111,7 @@ namespace bt return false; - DownloadStatus* ds = dstatus.find(p.getPeer()); + DownloadtqStatus* ds = dstatus.find(p.getPeer()); if (ds) ds->remove(pp); @@ -169,7 +169,7 @@ namespace bt pd->grab(); pdown.append(pd); - dstatus.insert(pd->getPeer()->getID(),new DownloadStatus()); + dstatus.insert(pd->getPeer()->getID(),new DownloadtqStatus()); sendRequests(pd); connect(pd,TQT_SIGNAL(timedout(const Request& )),this,TQT_SLOT(onTimeout(const Request& ))); connect(pd,TQT_SIGNAL(rejected( const Request& )),this,TQT_SLOT(onRejected( const Request& ))); @@ -179,7 +179,7 @@ namespace bt void ChunkDownload::notDownloaded(const Request & r,bool reject) { // find the peer - DownloadStatus* ds = dstatus.find(r.getPeer()); + DownloadtqStatus* ds = dstatus.find(r.getPeer()); if (ds) { // Out() << "ds != 0" << endl; @@ -196,7 +196,7 @@ namespace bt { if (chunk->getIndex() == r.getIndex()) { -// Out(SYS_CON|LOG_DEBUG) << TQString("Request rejected %1 %2 %3 %4").arg(r.getIndex()).arg(r.getOffset()).arg(r.getLength()).arg(r.getPeer()) << endl; +// Out(SYS_CON|LOG_DEBUG) << TQString("Request rejected %1 %2 %3 %4").tqarg(r.getIndex()).tqarg(r.getOffset()).tqarg(r.getLength()).tqarg(r.getPeer()) << endl; notDownloaded(r,true); } @@ -207,7 +207,7 @@ namespace bt // see if we are dealing with a piece of ours if (chunk->getIndex() == r.getIndex()) { - Out(SYS_CON|LOG_DEBUG) << TQString("Request timed out %1 %2 %3 %4").arg(r.getIndex()).arg(r.getOffset()).arg(r.getLength()).arg(r.getPeer()) << endl; + Out(SYS_CON|LOG_DEBUG) << TQString("Request timed out %1 %2 %3 %4").tqarg(r.getIndex()).tqarg(r.getOffset()).tqarg(r.getLength()).tqarg(r.getPeer()) << endl; notDownloaded(r,false); } @@ -216,7 +216,7 @@ namespace bt void ChunkDownload::sendRequests(PeerDownloader* pd) { timer.update(); - DownloadStatus* ds = dstatus.find(pd->getPeer()->getID()); + DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID()); if (!ds) return; @@ -262,11 +262,11 @@ namespace bt void ChunkDownload::sendCancels(PeerDownloader* pd) { - DownloadStatus* ds = dstatus.find(pd->getPeer()->getID()); + DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID()); if (!ds) return; - DownloadStatus::iterator itr = ds->begin(); + DownloadtqStatus::iterator itr = ds->begin(); while (itr != ds->end()) { Uint32 i = *itr; @@ -287,7 +287,7 @@ namespace bt while (i != pdown.end()) { PeerDownloader* pd = *i; - DownloadStatus* ds = dstatus.find(pd->getPeer()->getID()); + DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID()); Uint32 pp = p.getOffset() / MAX_PIECE_LEN; if (ds && ds->contains(pp)) { @@ -360,7 +360,7 @@ namespace bt ChunkDownloadHeader hdr; hdr.index = chunk->getIndex(); hdr.num_bits = pieces.getNumBits(); - hdr.buffered = chunk->getStatus() == Chunk::BUFFERED ? 1 : 0; + hdr.buffered = chunk->gettqStatus() == Chunk::BUFFERED ? 1 : 0; // save the chunk header file.write(&hdr,sizeof(ChunkDownloadHeader)); // save the bitset @@ -370,7 +370,7 @@ namespace bt // if it's a buffered chunk, save the contents to file.write(chunk->getData(),chunk->getSize()); chunk->clear(); - chunk->setStatus(Chunk::ON_DISK); + chunk->settqStatus(Chunk::ON_DISK); } } diff --git a/libktorrent/torrent/chunkdownload.h b/libktorrent/torrent/chunkdownload.h index 83fd3e3..c8bd2ae 100644 --- a/libktorrent/torrent/chunkdownload.h +++ b/libktorrent/torrent/chunkdownload.h @@ -41,7 +41,7 @@ namespace bt class Peer; class Request; class PeerDownloader; - class DownloadStatus; + class DownloadtqStatus; struct ChunkDownloadHeader { @@ -193,7 +193,7 @@ namespace bt Uint32 last_size; Timer timer; TQPtrList pdown; - PtrMap dstatus; + PtrMap dstatus; std::set piece_providers; diff --git a/libktorrent/torrent/chunkmanager.cpp b/libktorrent/torrent/chunkmanager.cpp index e98c58b..ac45be5 100644 --- a/libktorrent/torrent/chunkmanager.cpp +++ b/libktorrent/torrent/chunkmanager.cpp @@ -189,7 +189,7 @@ namespace bt Chunk* c = getChunk(hdr.index); if (c) { - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); bitset.set(hdr.index,true); todo.set(hdr.index,false); recalc_chunks_left = true; @@ -204,12 +204,12 @@ namespace bt { File fptr; if (!fptr.open(index_file,"wb")) - throw Error(i18n("Cannot open index file %1 : %2").arg(index_file).arg(fptr.errorString())); + throw Error(i18n("Cannot open index file %1 : %2").tqarg(index_file).tqarg(fptr.errorString())); for (unsigned int i = 0;i < tor.getNumChunks();i++) { Chunk* c = getChunk(i); - if (c->getStatus() != Chunk::NOT_DOWNLOADED) + if (c->gettqStatus() != Chunk::NOT_DOWNLOADED) { NewChunkHeader hdr; hdr.index = i; @@ -267,16 +267,16 @@ namespace bt for (Uint32 i = 0;i < bitset.getNumBits();i++) { Chunk* c = chunks[i]; - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) { cache->save(c); c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); } - else if (c->getStatus() == Chunk::BUFFERED) + else if (c->gettqStatus() == Chunk::BUFFERED) { c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); } } cache->close(); @@ -288,11 +288,11 @@ namespace bt return 0; Chunk* c = chunks[i]; - if (c->getStatus() == Chunk::NOT_DOWNLOADED || c->isExcluded()) + if (c->gettqStatus() == Chunk::NOT_DOWNLOADED || c->isExcluded()) { return 0; } - else if (c->getStatus() == Chunk::ON_DISK) + else if (c->gettqStatus() == Chunk::ON_DISK) { // load the chunk if it is on disk cache->load(c); @@ -338,10 +338,10 @@ namespace bt Chunk* c = chunks[i]; if (!c->taken()) { - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) cache->save(c); c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); loaded.remove(i); } } @@ -352,10 +352,10 @@ namespace bt return; Chunk* c = chunks[i]; - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) cache->save(c); c->clear(); - c->setStatus(Chunk::NOT_DOWNLOADED); + c->settqStatus(Chunk::NOT_DOWNLOADED); bitset.set(i,false); todo.set(i,!excluded_chunks.get(i) && !only_seed_chunks.get(i)); loaded.remove(i); @@ -372,10 +372,10 @@ namespace bt // get rid of chunk if nobody asked for it in the last 5 seconds if (!c->taken() && bt::GetCurrentTime() - i.data() > 5000) { - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) cache->save(c); c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); TQMap::iterator j = i; i++; loaded.erase(j); @@ -387,7 +387,7 @@ namespace bt } } // Uint32 num_in_mem = loaded.count(); - // Out() << TQString("Cleaned %1 chunks, %2 still in memory").arg(num_removed).arg(num_in_mem) << endl; + // Out() << TQString("Cleaned %1 chunks, %2 still in memory").tqarg(num_removed).tqarg(num_in_mem) << endl; } void ChunkManager::saveChunk(unsigned int i,bool update_index) @@ -413,7 +413,7 @@ namespace bt else { c->clear(); - c->setStatus(Chunk::NOT_DOWNLOADED); + c->settqStatus(Chunk::NOT_DOWNLOADED); Out(SYS_DIO|LOG_IMPORTANT) << "Warning: attempted to save a chunk which was excluded" << endl; } } @@ -429,7 +429,7 @@ namespace bt // try again if (!fptr.open(index_file,"r+b")) // panick if it failes - throw Error(i18n("Cannot open index file %1 : %2").arg(index_file).arg(fptr.errorString())); + throw Error(i18n("Cannot open index file %1 : %2").tqarg(index_file).tqarg(fptr.errorString())); } @@ -1016,7 +1016,7 @@ namespace bt bool ChunkManager::prepareChunk(Chunk* c,bool allways) { - if (!allways && c->getStatus() != Chunk::NOT_DOWNLOADED) + if (!allways && c->gettqStatus() != Chunk::NOT_DOWNLOADED) return false; return cache->prep(c); @@ -1044,7 +1044,7 @@ namespace bt bitset.set(i,true); todo.set(i,false); // the chunk must be on disk - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); tor.updateFilePercentage(i,bitset); } else if (!ok_chunks.get(i) && bitset.get(i)) @@ -1053,12 +1053,12 @@ namespace bt // We think we have a chunk, but we don't bitset.set(i,false); todo.set(i,!only_seed_chunks.get(i) && !excluded_chunks.get(i)); - if (c->getStatus() == Chunk::ON_DISK) + if (c->gettqStatus() == Chunk::ON_DISK) { - c->setStatus(Chunk::NOT_DOWNLOADED); + c->settqStatus(Chunk::NOT_DOWNLOADED); tor.updateFilePercentage(i,bitset); } - else if (c->getStatus() == Chunk::MMAPPED || c->getStatus() == Chunk::BUFFERED) + else if (c->gettqStatus() == Chunk::MMAPPED || c->gettqStatus() == Chunk::BUFFERED) { resetChunk(i); } diff --git a/libktorrent/torrent/chunkselector.cpp b/libktorrent/torrent/chunkselector.cpp index b1c42fa..9c05629 100644 --- a/libktorrent/torrent/chunkselector.cpp +++ b/libktorrent/torrent/chunkselector.cpp @@ -165,7 +165,7 @@ namespace bt for (Uint32 i = from;i <= to;i++) { bool in_chunks = std::find(chunks.begin(),chunks.end(),i) != chunks.end(); - if (!in_chunks && cman.getChunk(i)->getStatus() != Chunk::ON_DISK) + if (!in_chunks && cman.getChunk(i)->gettqStatus() != Chunk::ON_DISK) { // Out(SYS_DIO|LOG_DEBUG) << "ChunkSelector::reIncluded " << i << endl; chunks.push_back(i); diff --git a/libktorrent/torrent/dndfile.cpp b/libktorrent/torrent/dndfile.cpp index dffb763..2ca669b 100644 --- a/libktorrent/torrent/dndfile.cpp +++ b/libktorrent/torrent/dndfile.cpp @@ -105,7 +105,7 @@ namespace bt File fptr; if (!fptr.open(path,"wb")) - throw Error(i18n("Cannot create file %1 : %2").arg(path).arg(fptr.errorString())); + throw Error(i18n("Cannot create file %1 : %2").tqarg(path).tqarg(fptr.errorString())); fptr.write(&hdr,sizeof(DNDFileHeader)); fptr.close(); @@ -172,7 +172,7 @@ namespace bt create(); if (!fptr.open(path,"r+b")) { - throw Error(i18n("Failed to write first chunk to DND file : %1").arg(fptr.errorString())); + throw Error(i18n("Failed to write first chunk to DND file : %1").tqarg(fptr.errorString())); } } @@ -230,7 +230,7 @@ namespace bt create(); if (!fptr.open(path,"r+b")) { - throw Error(i18n("Failed to write last chunk to DND file : %1").arg(fptr.errorString())); + throw Error(i18n("Failed to write last chunk to DND file : %1").tqarg(fptr.errorString())); } } diff --git a/libktorrent/torrent/downloader.cpp b/libktorrent/torrent/downloader.cpp index 582fa7e..a63163e 100644 --- a/libktorrent/torrent/downloader.cpp +++ b/libktorrent/torrent/downloader.cpp @@ -87,7 +87,7 @@ namespace bt } // if the chunk is not in memory, reload it - if (cd->getChunk()->getStatus() == Chunk::ON_DISK) + if (cd->getChunk()->gettqStatus() == Chunk::ON_DISK) { cman.prepareChunk(cd->getChunk(),true); } @@ -119,7 +119,7 @@ namespace bt downloaded += p.getLength(); // save to disk again, if it is idle - if (cd->isIdle() && cd->getChunk()->getStatus() == Chunk::MMAPPED) + if (cd->isIdle() && cd->getChunk()->gettqStatus() == Chunk::MMAPPED) { cman.saveChunk(cd->getChunk()->getIndex(),false); } @@ -160,7 +160,7 @@ namespace bt if (cd->isIdle()) // idle chunks do not need to be in memory { Chunk* c = cd->getChunk(); - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) { cman.saveChunk(cd->getChunk()->getIndex(),false); } @@ -169,7 +169,7 @@ namespace bt { cd->releaseAllPDs(); Chunk* c = cd->getChunk(); - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) { cman.saveChunk(cd->getChunk()->getIndex(),false); } @@ -277,7 +277,7 @@ namespace bt if (sel) { // if it is on disk, reload it - if (sel->getChunk()->getStatus() == Chunk::ON_DISK) + if (sel->getChunk()->gettqStatus() == Chunk::ON_DISK) cman.prepareChunk(sel->getChunk(),true); sel->assignPeer(pd); @@ -341,7 +341,7 @@ namespace bt if (cdmin) { // if it is on disk, reload it - if (cdmin->getChunk()->getStatus() == Chunk::ON_DISK) + if (cdmin->getChunk()->gettqStatus() == Chunk::ON_DISK) { cman.prepareChunk(cdmin->getChunk(),true); } @@ -438,10 +438,10 @@ namespace bt { Uint32 ch = i->first; Chunk* c = i->second->getChunk(); - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) cman.saveChunk(ch,false); - c->setStatus(Chunk::NOT_DOWNLOADED); + c->settqStatus(Chunk::NOT_DOWNLOADED); } current_chunks.clear(); } diff --git a/libktorrent/torrent/ipblocklist.cpp b/libktorrent/torrent/ipblocklist.cpp index f524d6b..547b6ad 100644 --- a/libktorrent/torrent/ipblocklist.cpp +++ b/libktorrent/torrent/ipblocklist.cpp @@ -338,7 +338,7 @@ namespace bt if(tmpmask == 0) out.prepend("*"); else - out.prepend(TQString("%1").arg(tmp)); + out.prepend(TQString("%1").tqarg(tmp)); ip >>= 8; mask >>= 8; tmp = ip; @@ -348,7 +348,7 @@ namespace bt if(tmpmask == 0) out.prepend("*."); else - out.prepend(TQString("%1.").arg(tmp)); + out.prepend(TQString("%1.").tqarg(tmp)); ip >>= 8; mask >>= 8; tmp = ip; @@ -358,7 +358,7 @@ namespace bt if(tmpmask == 0) out.prepend("*."); else - out.prepend(TQString("%1.").arg(tmp)); + out.prepend(TQString("%1.").tqarg(tmp)); ip >>= 8; mask >>= 8; tmp = ip; @@ -368,7 +368,7 @@ namespace bt if(tmpmask == 0) out.prepend("*."); else - out.prepend(TQString("%1.").arg(tmp)); + out.prepend(TQString("%1.").tqarg(tmp)); return out; } diff --git a/libktorrent/torrent/multifilecache.cpp b/libktorrent/torrent/multifilecache.cpp index 9d41fb8..b7dae26 100644 --- a/libktorrent/torrent/multifilecache.cpp +++ b/libktorrent/torrent/multifilecache.cpp @@ -425,7 +425,7 @@ namespace bt { // if mmap fails or is not possible use buffered mode c->allocate(); - c->setStatus(Chunk::BUFFERED); + c->settqStatus(Chunk::BUFFERED); } else { @@ -436,7 +436,7 @@ namespace bt { // just allocate it c->allocate(); - c->setStatus(Chunk::BUFFERED); + c->settqStatus(Chunk::BUFFERED); } return true; } @@ -446,7 +446,7 @@ namespace bt TQValueList tflist; tor.calcChunkPos(c->getIndex(),tflist); - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) { // mapped chunks are easy CacheFile* fd = files.find(tflist[0]); @@ -455,7 +455,7 @@ namespace bt fd->unmap(c->getData(),c->getSize()); c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); return; } @@ -506,7 +506,7 @@ namespace bt // set the chunk to on disk and clear it c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); } void MultiFileCache::downloadStatusChanged(TorrentFile* tf, bool download) @@ -592,7 +592,7 @@ namespace bt DNDFile out(dst_file); File fptr; if (!fptr.open(src_file,"rb")) - throw Error(i18n("Cannot open file %1 : %2").arg(src_file).arg(fptr.errorString())); + throw Error(i18n("Cannot open file %1 : %2").tqarg(src_file).tqarg(fptr.errorString())); Uint32 cs = 0; if (tf->getFirstChunk() == tor.getNumChunks() - 1) @@ -654,7 +654,7 @@ namespace bt // first attempt failed, must be fat so try that if (!FatPreallocate(output_file,tf->getSize())) { - throw Error(i18n("Cannot preallocate diskspace : %1").arg(strerror(errno))); + throw Error(i18n("Cannot preallocate diskspace : %1").tqarg(strerror(errno))); } } @@ -670,7 +670,7 @@ namespace bt File fptr; if (!fptr.open(output_file,"r+b")) - throw Error(i18n("Cannot open file %1 : %2").arg(output_file).arg(fptr.errorString())); + throw Error(i18n("Cannot open file %1 : %2").tqarg(output_file).tqarg(fptr.errorString())); Uint32 ts = cs - tf->getFirstChunkOffset() > tf->getLastChunkSize() ? @@ -782,7 +782,7 @@ namespace bt else { - // children, so we cannot delete any more directories higher up + // tqchildren, so we cannot delete any more directories higher up return; } } diff --git a/libktorrent/torrent/packet.cpp b/libktorrent/torrent/packet.cpp index e5b1aa0..4e6cf01 100644 --- a/libktorrent/torrent/packet.cpp +++ b/libktorrent/torrent/packet.cpp @@ -138,16 +138,16 @@ namespace bt switch (data[4]) { - case CHOKE : return TQString("CHOKE %1 %2").arg(hdr_length).arg(data_length); - case UNCHOKE : return TQString("UNCHOKE %1 %2").arg(hdr_length).arg(data_length); - case INTERESTED : return TQString("INTERESTED %1 %2").arg(hdr_length).arg(data_length); - case NOT_INTERESTED : return TQString("NOT_INTERESTED %1 %2").arg(hdr_length).arg(data_length); - case HAVE : return TQString("HAVE %1 %2").arg(hdr_length).arg(data_length); - case BITFIELD : return TQString("BITFIELD %1 %2").arg(hdr_length).arg(data_length); - case PIECE : return TQString("PIECE %1 %2").arg(hdr_length).arg(data_length); - case REQUEST : return TQString("REQUEST %1 %2").arg(hdr_length).arg(data_length); - case CANCEL : return TQString("CANCEL %1 %2").arg(hdr_length).arg(data_length); - default: return TQString("UNKNOWN %1 %2").arg(hdr_length).arg(data_length); + case CHOKE : return TQString("CHOKE %1 %2").tqarg(hdr_length).tqarg(data_length); + case UNCHOKE : return TQString("UNCHOKE %1 %2").tqarg(hdr_length).tqarg(data_length); + case INTERESTED : return TQString("INTERESTED %1 %2").tqarg(hdr_length).tqarg(data_length); + case NOT_INTERESTED : return TQString("NOT_INTERESTED %1 %2").tqarg(hdr_length).tqarg(data_length); + case HAVE : return TQString("HAVE %1 %2").tqarg(hdr_length).tqarg(data_length); + case BITFIELD : return TQString("BITFIELD %1 %2").tqarg(hdr_length).tqarg(data_length); + case PIECE : return TQString("PIECE %1 %2").tqarg(hdr_length).tqarg(data_length); + case REQUEST : return TQString("REQUEST %1 %2").tqarg(hdr_length).tqarg(data_length); + case CANCEL : return TQString("CANCEL %1 %2").tqarg(hdr_length).tqarg(data_length); + default: return TQString("UNKNOWN %1 %2").tqarg(hdr_length).tqarg(data_length); } } */ diff --git a/libktorrent/torrent/packetreader.cpp b/libktorrent/torrent/packetreader.cpp index b17becc..3d4910a 100644 --- a/libktorrent/torrent/packetreader.cpp +++ b/libktorrent/torrent/packetreader.cpp @@ -36,13 +36,13 @@ namespace bt #ifdef LOG_PACKET static void LogPacket(const Uint8* data,Uint32 size,Uint32 len) { - TQString file = TQString("/tmp/kt-packetreader-%1.log").arg(getpid()); + TQString file = TQString("/tmp/kt-packetreader-%1.log").tqarg(getpid()); File fptr; if (!fptr.open(file,"a")) return; - TQString tmp = TQString("PACKET len = %1, type = %2\nDATA: \n").arg(len).arg(data[0]); + TQString tmp = TQString("PACKET len = %1, type = %2\nDATA: \n").tqarg(len).tqarg(data[0]); fptr.write(tmp.ascii(),tmp.length()); @@ -51,7 +51,7 @@ namespace bt { for (Uint32 i = 0;i < size;i++) { - tmp = TQString("0x%1 ").arg(data[i],0,16); + tmp = TQString("0x%1 ").tqarg(data[i],0,16); fptr.write(tmp.ascii(),tmp.length()); j++; if (j > 10) @@ -65,7 +65,7 @@ namespace bt { for (Uint32 i = 0;i < 20;i++) { - tmp = TQString("0x%1 ").arg(data[i],0,16); + tmp = TQString("0x%1 ").tqarg(data[i],0,16); fptr.write(tmp.ascii(),tmp.length()); j++; if (j > 10) @@ -78,7 +78,7 @@ namespace bt fptr.write(tmp.ascii(),tmp.length()); for (Uint32 i = size - 20;i < size;i++) { - tmp = TQString("0x%1 ").arg(data[i],0,16); + tmp = TQString("0x%1 ").tqarg(data[i],0,16); fptr.write(tmp.ascii(),tmp.length()); j++; if (j > 10) diff --git a/libktorrent/torrent/packetwriter.cpp b/libktorrent/torrent/packetwriter.cpp index 21d26cf..6c186dc 100644 --- a/libktorrent/torrent/packetwriter.cpp +++ b/libktorrent/torrent/packetwriter.cpp @@ -195,7 +195,7 @@ namespace bt else { /* Out(SYS_CON|LOG_DEBUG) << TQString("Uploading %1 %2 %3 %4 %5") - .arg(index).arg(begin).arg(len).arg((TQ_ULLONG)ch,0,16).arg((TQ_ULLONG)ch->getData(),0,16) + .tqarg(index).tqarg(begin).tqarg(len).tqarg((TQ_ULLONG)ch,0,16).tqarg((TQ_ULLONG)ch->getData(),0,16) << endl;; */ queuePacket(new Packet(index,begin,len,ch)); @@ -218,7 +218,7 @@ namespace bt enc.write(TQString("p")); enc.write((Uint32)port); } - enc.write(TQString("v")); enc.write(TQString("KTorrent %1").arg(kt::VERSION_STRING)); + enc.write(TQString("v")); enc.write(TQString("KTorrent %1").tqarg(kt::VERSION_STRING)); enc.end(); sendExtProtMsg(0,arr); } diff --git a/libktorrent/torrent/peerid.cpp b/libktorrent/torrent/peerid.cpp index e6a3387..09b4bff 100644 --- a/libktorrent/torrent/peerid.cpp +++ b/libktorrent/torrent/peerid.cpp @@ -174,7 +174,7 @@ namespace bt Map["TS"] = "Torrent Storm"; Map["TT"] = "TuoTu"; Map["UL"] = "uLeecher!"; - Map["UT"] = TQString("%1Torrent").arg(TQChar(0x00B5)); // µTorrent, 0x00B5 is unicode for µ + Map["UT"] = TQString("%1Torrent").tqarg(TQChar(0x00B5)); // µTorrent, 0x00B5 is tqunicode for µ Map["WT"] = "BitLet"; Map["WY"] = "FireTorrent"; Map["XL"] = "Xunlei"; @@ -201,31 +201,31 @@ namespace bt } TQString name = i18n("Unknown client"); - if (peer_id.at(0) == '-' && - peer_id.at(1).isLetter() && - peer_id.at(2).isLetter() ) //AZ style + if (peer_id.tqat(0) == '-' && + peer_id.tqat(1).isLetter() && + peer_id.tqat(2).isLetter() ) //AZ style { TQString ID(peer_id.mid(1,2)); if (Map.contains(ID)) - name = Map[ID] + " " + peer_id.at(3) + "." + peer_id.at(4) + "." - + peer_id.at(5) + "." + peer_id.at(6); + name = Map[ID] + " " + peer_id.tqat(3) + "." + peer_id.tqat(4) + "." + + peer_id.tqat(5) + "." + peer_id.tqat(6); } - else if (peer_id.at(0).isLetter() && - peer_id.at(1).isDigit() && - peer_id.at(2).isDigit() ) //Shadow's style + else if (peer_id.tqat(0).isLetter() && + peer_id.tqat(1).isDigit() && + peer_id.tqat(2).isDigit() ) //Shadow's style { - TQString ID = TQString(peer_id.at(0)); + TQString ID = TQString(peer_id.tqat(0)); if (Map.contains(ID)) - name = Map[ID] + " " + peer_id.at(1) + "." + - peer_id.at(2) + "." + peer_id.at(3); + name = Map[ID] + " " + peer_id.tqat(1) + "." + + peer_id.tqat(2) + "." + peer_id.tqat(3); } - else if (peer_id.at(0) == 'M' && peer_id.at(2) == '-' && (peer_id.at(4) == '-' || peer_id.at(5) == '-')) + else if (peer_id.tqat(0) == 'M' && peer_id.tqat(2) == '-' && (peer_id.tqat(4) == '-' || peer_id.tqat(5) == '-')) { - name = Map["M"] + " " + peer_id.at(1) + "." + peer_id.at(3); - if(peer_id.at(4) == '-') - name += "." + peer_id.at(5); + name = Map["M"] + " " + peer_id.tqat(1) + "." + peer_id.tqat(3); + if(peer_id.tqat(4) == '-') + name += "." + peer_id.tqat(5); else - name += peer_id.at(4) + "." + peer_id.at(6); + name += peer_id.tqat(4) + "." + peer_id.tqat(6); } else if (peer_id.startsWith("OP")) { @@ -245,7 +245,7 @@ namespace bt } else if ( peer_id.startsWith("Mbrst")) { - name = Map["Mbrst"] + " " + peer_id.at(5) + "." + peer_id.at(7); + name = Map["Mbrst"] + " " + peer_id.tqat(5) + "." + peer_id.tqat(7); } return name; diff --git a/libktorrent/torrent/peermanager.cpp b/libktorrent/torrent/peermanager.cpp index eefd246..adacbae 100644 --- a/libktorrent/torrent/peermanager.cpp +++ b/libktorrent/torrent/peermanager.cpp @@ -475,10 +475,10 @@ namespace bt // convert IP address to string pp.ip = TQString("%1.%2.%3.%4") - .arg((e.ip & 0xFF000000) >> 24) - .arg((e.ip & 0x00FF0000) >> 16) - .arg((e.ip & 0x0000FF00) >> 8) - .arg( e.ip & 0x000000FF); + .tqarg((e.ip & 0xFF000000) >> 24) + .tqarg((e.ip & 0x00FF0000) >> 16) + .tqarg((e.ip & 0x0000FF00) >> 8) + .tqarg( e.ip & 0x000000FF); pp.port = e.port; addPotentialPeer(pp); } @@ -564,10 +564,10 @@ namespace bt pp.port = ReadUint16(tmp,4); Uint32 ip = ReadUint32(tmp,0); pp.ip = TQString("%1.%2.%3.%4") - .arg((ip & 0xFF000000) >> 24) - .arg((ip & 0x00FF0000) >> 16) - .arg((ip & 0x0000FF00) >> 8) - .arg( ip & 0x000000FF); + .tqarg((ip & 0xFF000000) >> 24) + .tqarg((ip & 0x00FF0000) >> 16) + .tqarg((ip & 0x0000FF00) >> 8) + .tqarg( ip & 0x000000FF); pp.local = false; addPotentialPeer(pp); diff --git a/libktorrent/torrent/peersourcemanager.cpp b/libktorrent/torrent/peersourcemanager.cpp index 136d9e5..44303c4 100644 --- a/libktorrent/torrent/peersourcemanager.cpp +++ b/libktorrent/torrent/peersourcemanager.cpp @@ -386,7 +386,7 @@ namespace bt // 30 minutes curr->setInterval(FINAL_WAIT_TIME); timer.start(FINAL_WAIT_TIME * 1000,true); - request_time = TQDateTime::currentDateTime(); + request_time = TQDateTime::tqcurrentDateTime(); } else if (curr->failureCount() > 2) { @@ -394,14 +394,14 @@ namespace bt // a minute or 5, no need for hammering every 30 seconds curr->setInterval(LONGER_WAIT_TIME); timer.start(LONGER_WAIT_TIME * 1000,true); - request_time = TQDateTime::currentDateTime(); + request_time = TQDateTime::tqcurrentDateTime(); } else { // lets not hammer and wait 30 seconds curr->setInterval(INITIAL_WAIT_TIME); timer.start(INITIAL_WAIT_TIME * 1000,true); - request_time = TQDateTime::currentDateTime(); + request_time = TQDateTime::tqcurrentDateTime(); } } else @@ -418,7 +418,7 @@ namespace bt { curr->setInterval(FINAL_WAIT_TIME); timer.start(FINAL_WAIT_TIME * 1000,true); - request_time = TQDateTime::currentDateTime(); + request_time = TQDateTime::tqcurrentDateTime(); } else if (trk->failureCount() > 2) { @@ -426,14 +426,14 @@ namespace bt // wait 5 minutes and try again curr->setInterval(LONGER_WAIT_TIME); timer.start(LONGER_WAIT_TIME * 1000,true); - request_time = TQDateTime::currentDateTime(); + request_time = TQDateTime::tqcurrentDateTime(); } else { // wait 30 seconds and try again curr->setInterval(INITIAL_WAIT_TIME); timer.start(INITIAL_WAIT_TIME * 1000,true); - request_time = TQDateTime::currentDateTime(); + request_time = TQDateTime::tqcurrentDateTime(); } } } @@ -449,7 +449,7 @@ namespace bt pending = false; if (started) statusChanged(i18n("OK")); - request_time = TQDateTime::currentDateTime(); + request_time = TQDateTime::tqcurrentDateTime(); } void PeerSourceManager::onTrackerRequestPending() @@ -504,7 +504,7 @@ namespace bt if (pending || !started || !curr) return 0; - return curr->getInterval() - request_time.secsTo(TQDateTime::currentDateTime()); + return curr->getInterval() - request_time.secsTo(TQDateTime::tqcurrentDateTime()); } Uint32 PeerSourceManager::getNumSeeders() const diff --git a/libktorrent/torrent/peersourcemanager.h b/libktorrent/torrent/peersourcemanager.h index d256397..c46bbb8 100644 --- a/libktorrent/torrent/peersourcemanager.h +++ b/libktorrent/torrent/peersourcemanager.h @@ -165,7 +165,7 @@ namespace bt signals: /** - * Status has changed of the tracker. + * tqStatus has changed of the tracker. * @param ns The new status */ void statusChanged(const TQString & ns); diff --git a/libktorrent/torrent/peeruploader.cpp b/libktorrent/torrent/peeruploader.cpp index 2de899b..4881dc8 100644 --- a/libktorrent/torrent/peeruploader.cpp +++ b/libktorrent/torrent/peeruploader.cpp @@ -45,7 +45,7 @@ namespace bt void PeerUploader::addRequest(const Request & r) { // Out(SYS_CON|LOG_DEBUG) << - // TQString("PeerUploader::addRequest %1 %2 %3\n").arg(r.getIndex()).arg(r.getOffset()).arg(r.getLength()) << endl; + // TQString("PeerUploader::addRequest %1 %2 %3\n").tqarg(r.getIndex()).tqarg(r.getOffset()).tqarg(r.getLength()) << endl; // allowed fast chunks go to the front of the queue requests.append(r); @@ -54,7 +54,7 @@ namespace bt void PeerUploader::removeRequest(const Request & r) { // Out(SYS_CON|LOG_DEBUG) << - // TQString("PeerUploader::removeRequest %1 %2 %3\n").arg(r.getIndex()).arg(r.getOffset()).arg(r.getLength()) << endl; + // TQString("PeerUploader::removeRequest %1 %2 %3\n").tqarg(r.getIndex()).tqarg(r.getOffset()).tqarg(r.getLength()) << endl; requests.remove(r); peer->getPacketWriter().doNotSendPiece(r,peer->getStats().fast_extensions); } diff --git a/libktorrent/torrent/queuemanager.cpp b/libktorrent/torrent/queuemanager.cpp index 0c76b8a..affedf5 100644 --- a/libktorrent/torrent/queuemanager.cpp +++ b/libktorrent/torrent/queuemanager.cpp @@ -132,7 +132,7 @@ namespace bt return kt::NOT_ENOUGH_DISKSPACE; case 1: //ask user - if (KMessageBox::questionYesNo(0, i18n("You don't have enough disk space to download this torrent. Are you sure you want to continue?"), i18n("Insufficient disk space for %1").arg(s.torrent_name)) == KMessageBox::No) + if (KMessageBox::questionYesNo(0, i18n("You don't have enough disk space to download this torrent. Are you sure you want to continue?"), i18n("Insufficient disk space for %1").tqarg(s.torrent_name)) == KMessageBox::No) { tc->setPriority(0); return kt::USER_CANCELED; @@ -154,7 +154,7 @@ namespace bt if (s.completed && max_ratio > 0 && ratio >= max_ratio) { - if (KMessageBox::questionYesNo(0, i18n("Torrent \"%1\" has reached its maximum share ratio. Ignore the limit and start seeding anyway?").arg(s.torrent_name), i18n("Maximum share ratio limit reached.")) == KMessageBox::Yes) + if (KMessageBox::questionYesNo(0, i18n("Torrent \"%1\" has reached its maximum share ratio. Ignore the limit and start seeding anyway?").tqarg(s.torrent_name), i18n("Maximum share ratio limit reached.")) == KMessageBox::Yes) { tc->setMaxShareRatio(0.00f); startSafely(tc); @@ -234,7 +234,7 @@ namespace bt { TQString msg = i18n("Error stopping torrent %1 : %2") - .arg(s.torrent_name).arg(err.toString()); + .tqarg(s.torrent_name).tqarg(err.toString()); KMessageBox::error(0, msg, i18n("Error")); } } @@ -740,7 +740,7 @@ namespace bt TQString msg = i18n("Error starting torrent %1 : %2") - .arg(s.torrent_name).arg(err.toString()); + .tqarg(s.torrent_name).tqarg(err.toString()); KMessageBox::error(0, msg, i18n("Error")); } @@ -758,7 +758,7 @@ namespace bt TQString msg = i18n("Error stopping torrent %1 : %2") - .arg(s.torrent_name).arg(err.toString()); + .tqarg(s.torrent_name).tqarg(err.toString()); KMessageBox::error(0, msg, i18n("Error")); } diff --git a/libktorrent/torrent/singlefilecache.cpp b/libktorrent/torrent/singlefilecache.cpp index 8986f98..4843c1f 100644 --- a/libktorrent/torrent/singlefilecache.cpp +++ b/libktorrent/torrent/singlefilecache.cpp @@ -76,7 +76,7 @@ namespace bt { // mmap continuously fails, so stop using it c->allocate(); - c->setStatus(Chunk::BUFFERED); + c->settqStatus(Chunk::BUFFERED); } else { @@ -88,7 +88,7 @@ namespace bt // buffer it if mmapping fails Out(SYS_GEN|LOG_IMPORTANT) << "Warning : mmap failure, falling back to buffered mode" << endl; c->allocate(); - c->setStatus(Chunk::BUFFERED); + c->settqStatus(Chunk::BUFFERED); } else { @@ -105,7 +105,7 @@ namespace bt if (mmap_failures >= 3 || !(buf = (Uint8*)fd->map(c,off,c->getSize(),CacheFile::READ))) { c->allocate(); - c->setStatus(Chunk::BUFFERED); + c->settqStatus(Chunk::BUFFERED); fd->read(c->getData(),c->getSize(),off); if (mmap_failures < 3) mmap_failures++; @@ -119,18 +119,18 @@ namespace bt void SingleFileCache::save(Chunk* c) { // unmap the chunk if it is mapped - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) { fd->unmap(c->getData(),c->getSize()); c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); } - else if (c->getStatus() == Chunk::BUFFERED) + else if (c->gettqStatus() == Chunk::BUFFERED) { Uint64 off = c->getIndex() * tor.getChunkSize(); fd->write(c->getData(),c->getSize(),off); c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); } } diff --git a/libktorrent/torrent/statsfile.cpp b/libktorrent/torrent/statsfile.cpp index 6a6e6c0..772f6be 100644 --- a/libktorrent/torrent/statsfile.cpp +++ b/libktorrent/torrent/statsfile.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace bt { diff --git a/libktorrent/torrent/torrent.cpp b/libktorrent/torrent/torrent.cpp index c175be9..c5d8459 100644 --- a/libktorrent/torrent/torrent.cpp +++ b/libktorrent/torrent/torrent.cpp @@ -101,7 +101,7 @@ namespace bt TQFile fptr(file); if (!fptr.open(IO_ReadOnly)) throw Error(i18n(" Unable to open torrent file %1 : %2") - .arg(file).arg(fptr.errorString())); + .tqarg(file).tqarg(fptr.errorString())); TQByteArray data(fptr.size()); // Out() << "File size = " << fptr.size() << endl; @@ -366,7 +366,7 @@ namespace bt const SHA1Hash & Torrent::getHash(Uint32 idx) const { if (idx >= hash_pieces.count()) - throw Error(TQString("Torrent::getHash %1 is out of bounds").arg(idx)); + throw Error(TQString("Torrent::getHash %1 is out of bounds").tqarg(idx)); return hash_pieces[idx]; } diff --git a/libktorrent/torrent/torrentcontrol.cpp b/libktorrent/torrent/torrentcontrol.cpp index a123803..a586356 100644 --- a/libktorrent/torrent/torrentcontrol.cpp +++ b/libktorrent/torrent/torrentcontrol.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -200,7 +200,7 @@ namespace bt if (stats.completed && !comp) { pman->killSeeders(); - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); istats.running_time_dl += istats.time_started_dl.secsTo(now); updateStatusMsg(); updateStats(); @@ -228,7 +228,7 @@ namespace bt else psman->manualUpdate(); istats.last_announce = bt::GetCurrentTime(); - istats.time_started_dl = TQDateTime::currentDateTime(); + istats.time_started_dl = TQDateTime::tqcurrentDateTime(); } updateStatusMsg(); @@ -351,7 +351,7 @@ namespace bt throw; } - istats.time_started_ul = istats.time_started_dl = TQDateTime::currentDateTime(); + istats.time_started_ul = istats.time_started_dl = TQDateTime::tqcurrentDateTime(); resetTrackerStats(); if (prealloc) @@ -408,7 +408,7 @@ namespace bt void TorrentControl::stop(bool user,WaitJob* wjob) { - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); if(!stats.completed) istats.running_time_dl += istats.time_started_dl.secsTo(now); istats.running_time_ul += istats.time_started_ul.secsTo(now); @@ -506,7 +506,7 @@ namespace bt delete tor; tor = 0; throw Error(i18n("An error occurred while loading the torrent." - " The torrent is probably corrupt or is not a torrent file.\n%1").arg(torrent)); + " The torrent is probably corrupt or is not a torrent file.\n%1").tqarg(torrent)); } initInternal(qman,tmpdir,ddir,default_save_dir,torrent.startsWith(tmpdir)); @@ -544,7 +544,7 @@ namespace bt TQFile fptr(tor_copy); if (!fptr.open(IO_WriteOnly)) throw Error(i18n("Unable to create %1 : %2") - .arg(tor_copy).arg(fptr.errorString())); + .tqarg(tor_copy).tqarg(fptr.errorString())); fptr.writeBlock(data.data(),data.size()); } @@ -559,12 +559,12 @@ namespace bt { qman->mergeAnnounceList(tor->getInfoHash(),tor->getTrackerList()); - throw Error(i18n("You are already downloading this torrent %1, the list of trackers of both torrents has been merged.").arg(tor->getNameSuggestion())); + throw Error(i18n("You are already downloading this torrent %1, the list of trackers of both torrents has been merged.").tqarg(tor->getNameSuggestion())); } else { throw Error(i18n("You are already downloading the torrent %1") - .arg(tor->getNameSuggestion())); + .tqarg(tor->getNameSuggestion())); } } } @@ -670,7 +670,7 @@ namespace bt throw Error( i18n("Cannot migrate %1 : %2") - .arg(tor->getNameSuggestion()).arg(err.toString())); + .tqarg(tor->getNameSuggestion()).tqarg(err.toString())); } } setupData(ddir); @@ -992,21 +992,21 @@ namespace bt if (stats.running) { - TQDateTime now = TQDateTime::currentDateTime(); - st.write("RUNNING_TIME_DL",TQString("%1").arg(istats.running_time_dl + istats.time_started_dl.secsTo(now))); - st.write("RUNNING_TIME_UL",TQString("%1").arg(istats.running_time_ul + istats.time_started_ul.secsTo(now))); + TQDateTime now = TQDateTime::tqcurrentDateTime(); + st.write("RUNNING_TIME_DL",TQString("%1").tqarg(istats.running_time_dl + istats.time_started_dl.secsTo(now))); + st.write("RUNNING_TIME_UL",TQString("%1").tqarg(istats.running_time_ul + istats.time_started_ul.secsTo(now))); } else { - st.write("RUNNING_TIME_DL", TQString("%1").arg(istats.running_time_dl)); - st.write("RUNNING_TIME_UL", TQString("%1").arg(istats.running_time_ul)); + st.write("RUNNING_TIME_DL", TQString("%1").tqarg(istats.running_time_dl)); + st.write("RUNNING_TIME_UL", TQString("%1").tqarg(istats.running_time_ul)); } - st.write("PRIORITY", TQString("%1").arg(istats.priority)); - st.write("AUTOSTART", TQString("%1").arg(stats.autostart)); - st.write("IMPORTED", TQString("%1").arg(stats.imported_bytes)); + st.write("PRIORITY", TQString("%1").tqarg(istats.priority)); + st.write("AUTOSTART", TQString("%1").tqarg(stats.autostart)); + st.write("IMPORTED", TQString("%1").tqarg(stats.imported_bytes)); st.write("CUSTOM_OUTPUT_NAME",istats.custom_output_name ? "1" : "0"); - st.write("MAX_RATIO", TQString("%1").arg(stats.max_share_ratio,0,'f',2)); + st.write("MAX_RATIO", TQString("%1").tqarg(stats.max_share_ratio,0,'f',2)); st.write("MAX_SEED_TIME",TQString::number(stats.max_seed_time)); st.write("RESTART_DISK_PREALLOCATION",prealloc ? "1" : "0"); @@ -1222,7 +1222,7 @@ namespace bt if (!stats.running || stats.completed) return istats.running_time_dl; else - return istats.running_time_dl + istats.time_started_dl.secsTo(TQDateTime::currentDateTime()); + return istats.running_time_dl + istats.time_started_dl.secsTo(TQDateTime::tqcurrentDateTime()); } Uint32 TorrentControl::getRunningTimeUL() const @@ -1230,7 +1230,7 @@ namespace bt if (!stats.running) return istats.running_time_ul; else - return istats.running_time_ul + istats.time_started_ul.secsTo(TQDateTime::currentDateTime()); + return istats.running_time_ul + istats.time_started_ul.secsTo(TQDateTime::tqcurrentDateTime()); } Uint32 TorrentControl::getNumFiles() const @@ -1274,7 +1274,7 @@ namespace bt " To make sure this torrent still works with this version of KTorrent, " "we will migrate this torrent. You will be asked for a location to save " "the torrent to. If you press cancel, we will select your home directory.") - .arg(tor->getNameSuggestion())); + .tqarg(tor->getNameSuggestion())); outputdir = KFileDialog::getExistingDirectory(TQString(), 0,i18n("Select Folder to Save To")); if (outputdir.isNull()) outputdir = TQDir::homeDirPath(); diff --git a/libktorrent/torrent/torrentcreator.cpp b/libktorrent/torrent/torrentcreator.cpp index fae7d75..5538b9e 100644 --- a/libktorrent/torrent/torrentcreator.cpp +++ b/libktorrent/torrent/torrentcreator.cpp @@ -120,7 +120,7 @@ namespace bt { File fptr; if (!fptr.open(url,"wb")) - throw Error(i18n("Cannot open file %1: %2").arg(url).arg(fptr.errorString())); + throw Error(i18n("Cannot open file %1: %2").tqarg(url).tqarg(fptr.errorString())); BEncoder enc(&fptr); enc.beginDict(); // top dict @@ -147,7 +147,7 @@ namespace bt enc.write(TQString("comments")); enc.write(comments); } - enc.write(TQString("created by"));enc.write(TQString("KTorrent %1").arg(kt::VERSION_STRING)); + enc.write(TQString("created by"));enc.write(TQString("KTorrent %1").tqarg(kt::VERSION_STRING)); enc.write(TQString("creation date"));enc.write((Uint64)time(0)); enc.write(TQString("info")); saveInfo(enc); @@ -237,7 +237,7 @@ namespace bt File fptr; if (!fptr.open(target,"rb")) throw Error(i18n("Cannot open file %1: %2") - .arg(target).arg(fptr.errorString())); + .tqarg(target).tqarg(fptr.errorString())); Uint32 s = cur_chunk != num_chunks - 1 ? chunk_size : last_size; fptr.seek(File::BEGIN,(Int64)cur_chunk*chunk_size); @@ -275,7 +275,7 @@ namespace bt if (!fptr.open(target + f.getPath(),"rb")) { throw Error(i18n("Cannot open file %1: %2") - .arg(f.getPath()).arg(fptr.errorString())); + .tqarg(f.getPath()).tqarg(fptr.errorString())); } // first calculate offset into file @@ -336,7 +336,7 @@ namespace bt // write full index file File fptr; if (!fptr.open(dd + "index","wb")) - throw Error(i18n("Cannot create index file: %1").arg(fptr.errorString())); + throw Error(i18n("Cannot create index file: %1").tqarg(fptr.errorString())); for (Uint32 i = 0;i < num_chunks;i++) { diff --git a/libktorrent/torrent/udptracker.cpp b/libktorrent/torrent/udptracker.cpp index ab33771..6597349 100644 --- a/libktorrent/torrent/udptracker.cpp +++ b/libktorrent/torrent/udptracker.cpp @@ -144,10 +144,10 @@ namespace bt { Uint32 ip = ReadUint32(buf,i); addPeer(TQString("%1.%2.%3.%4") - .arg((ip & (0xFF000000)) >> 24) - .arg((ip & (0x00FF0000)) >> 16) - .arg((ip & (0x0000FF00)) >> 8) - .arg(ip & 0x000000FF), + .tqarg((ip & (0xFF000000)) >> 24) + .tqarg((ip & (0x00FF0000)) >> 16) + .tqarg((ip & (0x0000FF00)) >> 8) + .tqarg(ip & 0x000000FF), ReadUint16(buf,i+4)); } diff --git a/libktorrent/torrent/udptrackersocket.cpp b/libktorrent/torrent/udptrackersocket.cpp index 78be6ad..e440e3c 100644 --- a/libktorrent/torrent/udptrackersocket.cpp +++ b/libktorrent/torrent/udptrackersocket.cpp @@ -59,7 +59,7 @@ namespace bt if (!bound) { KMessageBox::error(0, - i18n("Cannot bind to udp port %1 or the 10 following ports.").arg(port)); + i18n("Cannot bind to udp port %1 or the 10 following ports.").tqarg(port)); } else { diff --git a/libktorrent/torrent/value.cpp b/libktorrent/torrent/value.cpp index bf73cb0..4d8641c 100644 --- a/libktorrent/torrent/value.cpp +++ b/libktorrent/torrent/value.cpp @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include +#include #include "value.h" namespace bt diff --git a/libktorrent/util/autorotatelogjob.cpp b/libktorrent/util/autorotatelogjob.cpp index de4d1c5..d3a2d8a 100644 --- a/libktorrent/util/autorotatelogjob.cpp +++ b/libktorrent/util/autorotatelogjob.cpp @@ -46,8 +46,8 @@ namespace bt { while (cnt > 1) { - TQString prev = TQString("%1-%2.gz").arg(file).arg(cnt - 1); - TQString curr = TQString("%1-%2.gz").arg(file).arg(cnt); + TQString prev = TQString("%1-%2.gz").tqarg(file).tqarg(cnt - 1); + TQString curr = TQString("%1-%2.gz").tqarg(file).tqarg(cnt); if (bt::Exists(prev)) // if file exists start the move job { KIO::Job* sj = KIO::file_move(KURL::fromPathOrURL(prev),KURL::fromPathOrURL(curr),-1,true,false,false); diff --git a/libktorrent/util/file.cpp b/libktorrent/util/file.cpp index d27ccba..f757142 100644 --- a/libktorrent/util/file.cpp +++ b/libktorrent/util/file.cpp @@ -84,7 +84,7 @@ namespace bt if (errno == ENOSPC) Out() << "Disk full !" << endl; - throw Error(i18n("Cannot write to %1 : %2").arg(file).arg(strerror(errno))); + throw Error(i18n("Cannot write to %1 : %2").tqarg(file).tqarg(strerror(errno))); } return ret; } @@ -98,7 +98,7 @@ namespace bt if (ferror(fptr)) { clearerr(fptr); - throw Error(i18n("Cannot read from %1").arg(file)); + throw Error(i18n("Cannot read from %1").tqarg(file)); } return ret; } diff --git a/libktorrent/util/fileops.cpp b/libktorrent/util/fileops.cpp index d9ef172..a83134a 100644 --- a/libktorrent/util/fileops.cpp +++ b/libktorrent/util/fileops.cpp @@ -76,10 +76,10 @@ namespace bt { if (!nothrow) throw Error(i18n("Cannot create directory %1: %2") - .arg(dir).arg(strerror(errno))); + .tqarg(dir).tqarg(strerror(errno))); else { - Out() << TQString("Error : Cannot create directory %1 : %2").arg(dir).arg(strerror(errno))<< endl; + Out() << TQString("Error : Cannot create directory %1 : %2").tqarg(dir).tqarg(strerror(errno))<< endl; } } } @@ -90,12 +90,12 @@ namespace bt { if (!nothrow) throw Error(i18n("Cannot symlink %1 to %2: %3") - .arg(link_url.utf8().data()).arg(link_to.utf8().data()) - .arg(strerror(errno))); + .tqarg(link_url.utf8().data()).tqarg(link_to.utf8().data()) + .tqarg(strerror(errno))); else Out() << TQString("Error : Cannot symlink %1 to %2: %3") - .arg(link_url.utf8().data()).arg(link_to.utf8().data()) - .arg(strerror(errno)) << endl; + .tqarg(link_url.utf8().data()).tqarg(link_to.utf8().data()) + .tqarg(strerror(errno)) << endl; } } @@ -106,12 +106,12 @@ namespace bt { if (!nothrow) throw Error(i18n("Cannot move %1 to %2: %3") - .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString())); + .tqarg(src).tqarg(dst) + .tqarg(KIO::NetAccess::lastErrorString())); else Out() << TQString("Error : Cannot move %1 to %2: %3") - .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString()) << endl; + .tqarg(src).tqarg(dst) + .tqarg(KIO::NetAccess::lastErrorString()) << endl; } } @@ -122,12 +122,12 @@ namespace bt { if (!nothrow) throw Error(i18n("Cannot copy %1 to %2: %3") - .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString())); + .tqarg(src).tqarg(dst) + .tqarg(KIO::NetAccess::lastErrorString())); else Out() << TQString("Error : Cannot copy %1 to %2: %3") - .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString()) << endl; + .tqarg(src).tqarg(dst) + .tqarg(KIO::NetAccess::lastErrorString()) << endl; } } @@ -138,12 +138,12 @@ namespace bt { if (!nothrow) throw Error(i18n("Cannot copy %1 to %2: %3") - .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString())); + .tqarg(src).tqarg(dst) + .tqarg(KIO::NetAccess::lastErrorString())); else Out() << TQString("Error : Cannot copy %1 to %2: %3") - .arg(src).arg(dst) - .arg(KIO::NetAccess::lastErrorString()) << endl; + .tqarg(src).tqarg(dst) + .tqarg(KIO::NetAccess::lastErrorString()) << endl; } } @@ -230,8 +230,8 @@ namespace bt if (!ok) { TQString err = i18n("Cannot delete %1: %2") - .arg(url) - .arg(strerror(errno)); + .tqarg(url) + .tqarg(strerror(errno)); if (!nothrow) throw Error(err); else @@ -249,8 +249,8 @@ namespace bt { if (!nothrow) throw Error(i18n("Cannot create %1: %2") - .arg(url) - .arg(fptr.errorString())); + .tqarg(url) + .tqarg(fptr.errorString())); else Out() << "Error : Cannot create " << url << " : " << fptr.errorString() << endl; @@ -270,7 +270,7 @@ namespace bt #endif if (ret < 0) throw Error(i18n("Cannot calculate the filesize of %1: %2") - .arg(url).arg(strerror(errno))); + .tqarg(url).tqarg(strerror(errno))); return (Uint64)sb.st_size; } @@ -286,7 +286,7 @@ namespace bt ret = fstat(fd,&sb); #endif if (ret < 0) - throw Error(i18n("Cannot calculate the filesize : %2").arg(strerror(errno))); + throw Error(i18n("Cannot calculate the filesize : %2").tqarg(strerror(errno))); return (Uint64)sb.st_size; } @@ -314,7 +314,7 @@ namespace bt { int fd = ::open(TQFile::encodeName(path),O_RDWR | O_LARGEFILE); if (fd < 0) - throw Error(i18n("Cannot open %1 : %2").arg(path).arg(strerror(errno))); + throw Error(i18n("Cannot open %1 : %2").tqarg(path).tqarg(strerror(errno))); bool ret = FatPreallocate(fd,size); close(fd); @@ -343,7 +343,7 @@ namespace bt { int fd = ::open(TQFile::encodeName(path), O_RDWR | O_LARGEFILE); if (fd < 0) - throw Error(i18n("Cannot open %1 : %2").arg(path).arg(strerror(errno))); + throw Error(i18n("Cannot open %1 : %2").tqarg(path).tqarg(strerror(errno))); bool ret = XfsPreallocate(fd,size); close(fd); @@ -364,16 +364,16 @@ namespace bt #else if (ftruncate(fd,size) == -1) #endif - throw Error(i18n("Cannot expand file : %1").arg(strerror(errno))); + throw Error(i18n("Cannot expand file : %1").tqarg(strerror(errno))); } else { #if HAVE_POSIX_FALLOCATE64 if (posix_fallocate64(fd,0,size) != 0) - throw Error(i18n("Cannot expand file : %1").arg(strerror(errno))); + throw Error(i18n("Cannot expand file : %1").tqarg(strerror(errno))); #elif HAVE_POSIX_FALLOCATE if (posix_fallocate(fd,0,size) != 0) - throw Error(i18n("Cannot expand file : %1").arg(strerror(errno))); + throw Error(i18n("Cannot expand file : %1").tqarg(strerror(errno))); #else SeekFile(fd,0,SEEK_SET); bt::Array buf(4096); @@ -388,9 +388,9 @@ namespace bt int ret = write(fd,buf,to_write); if (ret < 0) - throw Error(i18n("Cannot expand file : %1").arg(strerror(errno))); + throw Error(i18n("Cannot expand file : %1").tqarg(strerror(errno))); else if (ret == 0 || ret != (int)to_write) - throw Error(i18n("Cannot expand file").arg(strerror(errno))); + throw Error(i18n("Cannot expand file").tqarg(strerror(errno))); else written += to_write; } @@ -402,7 +402,7 @@ namespace bt { int fd = ::open(TQFile::encodeName(path),O_RDWR | O_LARGEFILE); if (fd < 0) - throw Error(i18n("Cannot open %1 : %2").arg(path).arg(strerror(errno))); + throw Error(i18n("Cannot open %1 : %2").tqarg(path).tqarg(strerror(errno))); try { @@ -423,7 +423,7 @@ namespace bt #else if (lseek(fd,off,whence) == -1) #endif - throw Error(i18n("Cannot seek in file : %1").arg(strerror(errno))); + throw Error(i18n("Cannot seek in file : %1").tqarg(strerror(errno))); } bool FreeDiskSpace(const TQString & path,Uint64 & bytes_free) diff --git a/libktorrent/util/log.cpp b/libktorrent/util/log.cpp index 9594532..6030e99 100644 --- a/libktorrent/util/log.cpp +++ b/libktorrent/util/log.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -79,8 +79,8 @@ namespace bt // move all log files one up for (Uint32 i = 10;i > 1;i--) { - TQString prev = TQString("%1-%2.gz").arg(file).arg(i - 1); - TQString curr = TQString("%1-%2.gz").arg(file).arg(i); + TQString prev = TQString("%1-%2.gz").tqarg(file).tqarg(i - 1); + TQString curr = TQString("%1-%2.gz").tqarg(file).tqarg(i); if (bt::Exists(prev)) bt::Move(prev,curr,true); } @@ -100,7 +100,7 @@ namespace bt fptr.setName(file); if (!fptr.open(IO_WriteOnly)) - throw Error(i18n("Cannot open log file %1 : %2").arg(file).arg(fptr.errorString())); + throw Error(i18n("Cannot open log file %1 : %2").tqarg(file).tqarg(fptr.errorString())); out->setDevice(TQT_TQIODEVICE(&fptr)); } @@ -116,7 +116,7 @@ namespace bt // this could result in the loss of some messages if (!rotate_job) { - *out << TQDateTime::currentDateTime().toString() << ": " << tmp << ::endl; + *out << TQDateTime::tqcurrentDateTime().toString() << ": " << tmp << ::endl; fptr.flush(); if (to_cout) std::cout << TQString(tmp.local8Bit()) << std::endl; diff --git a/libktorrent/util/profiler.cpp b/libktorrent/util/profiler.cpp index 3cacbe3..a0f42d2 100644 --- a/libktorrent/util/profiler.cpp +++ b/libktorrent/util/profiler.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #ifdef KT_PROFILE #include -#include +#include #include #include "profiler.h" @@ -30,7 +30,7 @@ namespace bt min = max = avg = 0.0; count = 0; start_time = 0.0; - children.setAutoDelete(true); + tqchildren.setAutoDelete(true); } Profile::~Profile() @@ -63,8 +63,8 @@ namespace bt Profile* Profile::child(const TQString & name) { - TQPtrList::iterator i = children.begin(); - while (i != children.end()) + TQPtrList::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { Profile* p = *i; if (p->name == name) @@ -73,7 +73,7 @@ namespace bt } Profile* p = new Profile(this,name); - children.append(p); + tqchildren.append(p); return p; } @@ -84,8 +84,8 @@ namespace bt out.precision(5); out << qSetW(60) << nb << qSetW(10) << min << qSetW(10) << max << qSetW(10) << avg << qSetW(10) << count << endl; - TQPtrList::iterator i = children.begin(); - while (i != children.end()) + TQPtrList::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { Profile* p = *i; p->save(out,nb); diff --git a/libktorrent/util/profiler.h b/libktorrent/util/profiler.h index 1b220b1..917a671 100644 --- a/libktorrent/util/profiler.h +++ b/libktorrent/util/profiler.h @@ -35,7 +35,7 @@ namespace bt class Profile { Profile* parent; - TQPtrList children; + TQPtrList tqchildren; TQString name; double min,max,avg; diff --git a/plugins/infowidget/chunkbar.cpp b/plugins/infowidget/chunkbar.cpp index f8f421e..ad6dfd6 100644 --- a/plugins/infowidget/chunkbar.cpp +++ b/plugins/infowidget/chunkbar.cpp @@ -20,7 +20,7 @@ ***************************************************************************/ #include #include -#include +#include #include #include #include @@ -71,15 +71,15 @@ namespace kt TQMimeSourceFactory* factory = TQMimeSourceFactory::defaultFactory(); TQImage excluded(16, 16, 32); - FillAndFrameBlack(&excluded, TQColor(bar->colorGroup().color(TQColorGroup::Mid)).pixel(), 16); + FillAndFrameBlack(&excluded, TQColor(bar->tqcolorGroup().color(TQColorGroup::Mid)).pixel(), 16); factory->setImage("excluded_color", excluded); TQImage available(16, 16, 32); - FillAndFrameBlack(&available, bar->colorGroup().highlight().pixel(), 16); + FillAndFrameBlack(&available, bar->tqcolorGroup().highlight().pixel(), 16); factory->setImage("available_color", available); TQImage unavailable(16, 16, 32); - FillAndFrameBlack(&unavailable, bar->colorGroup().base().pixel(), 16); + FillAndFrameBlack(&unavailable, bar->tqcolorGroup().base().pixel(), 16); factory->setImage("unavailable_color", unavailable); } @@ -121,7 +121,7 @@ namespace kt // PROFILE("ChunkBar::updateBar"); // Out() << "Pixmap : " << s.width() << " " << s.height() << endl; pixmap.resize(s); - pixmap.fill(colorGroup().color(TQColorGroup::Base)); + pixmap.fill(tqcolorGroup().color(TQColorGroup::Base)); TQPainter painter(&pixmap); drawBarContents(&painter); update(); @@ -132,9 +132,9 @@ namespace kt { // first draw background if (isEnabled()) - p->setBrush(colorGroup().base()); + p->setBrush(tqcolorGroup().base()); else - p->setBrush(colorGroup().background()); + p->setBrush(tqcolorGroup().background()); p->setPen(TQt::NoPen); p->drawRect(contentsRect()); @@ -148,7 +148,7 @@ namespace kt TQSize s = contentsRect().size(); //Out() << "Pixmap : " << s.width() << " " << s.height() << endl; pixmap.resize(s); - pixmap.fill(colorGroup().color(TQColorGroup::Base)); + pixmap.fill(tqcolorGroup().color(TQColorGroup::Base)); TQPainter painter(&pixmap); drawBarContents(&painter); update(); @@ -164,15 +164,15 @@ namespace kt const BitSet & bs = getBitSet(); curr = bs; if (bs.allOn()) - drawAllOn(p,colorGroup().highlight()); + drawAllOn(p,tqcolorGroup().highlight()); else if (s.total_chunks > w) - drawMoreChunksThenPixels(p,bs,colorGroup().highlight()); + drawMoreChunksThenPixels(p,bs,tqcolorGroup().highlight()); else - drawEqual(p,bs,colorGroup().highlight()); + drawEqual(p,bs,tqcolorGroup().highlight()); if (show_excluded && s.num_chunks_excluded > 0) { - TQColor c = colorGroup().color(TQColorGroup::Mid); + TQColor c = tqcolorGroup().color(TQColorGroup::Mid); if (curr_ebs.allOn()) drawAllOn(p,c); else if (s.total_chunks > w) @@ -186,7 +186,7 @@ namespace kt void ChunkBar::drawEqual(TQPainter *p,const BitSet & bs,const TQColor & color) { - //p->setPen(TQPen(colorGroup().highlight(),1,TQt::SolidLine)); + //p->setPen(TQPen(tqcolorGroup().highlight(),1,TQt::SolidLine)); TQColor c = color; Uint32 w = contentsRect().width(); diff --git a/plugins/infowidget/chunkdownloadview.cpp b/plugins/infowidget/chunkdownloadview.cpp index 90595bd..eaed47e 100644 --- a/plugins/infowidget/chunkdownloadview.cpp +++ b/plugins/infowidget/chunkdownloadview.cpp @@ -43,7 +43,7 @@ namespace kt cd->getStats(s); setText(0,TQString::number(s.chunk_index)); - setText(1,TQString("%1 / %2").arg(s.pieces_downloaded).arg(s.total_pieces)); + setText(1,TQString("%1 / %2").tqarg(s.pieces_downloaded).tqarg(s.total_pieces)); setText(2,s.current_peer_id); setText(3,KBytesPerSecToString(s.download_speed / 1024.0)); setText(4,TQString::number(s.num_downloaders)); diff --git a/plugins/infowidget/chunkdownloadviewbase.ui b/plugins/infowidget/chunkdownloadviewbase.ui index a68b412..82db212 100644 --- a/plugins/infowidget/chunkdownloadviewbase.ui +++ b/plugins/infowidget/chunkdownloadviewbase.ui @@ -21,7 +21,7 @@ - layout8 + tqlayout8 @@ -29,7 +29,7 @@ - layout11 + tqlayout11 @@ -47,7 +47,7 @@ m_total_chunks - + 50 0 @@ -59,7 +59,7 @@ - + AlignVCenter|AlignRight @@ -67,7 +67,7 @@ - layout14 + tqlayout14 @@ -85,7 +85,7 @@ m_chunks_downloading - + 50 0 @@ -97,7 +97,7 @@ - + AlignVCenter|AlignRight @@ -105,7 +105,7 @@ - layout13 + tqlayout13 @@ -123,7 +123,7 @@ m_chunks_downloaded - + 50 0 @@ -135,7 +135,7 @@ - + AlignVCenter|AlignRight @@ -143,7 +143,7 @@
- layout38 + tqlayout38 @@ -161,7 +161,7 @@ m_excluded_chunks - + 50 0 @@ -173,7 +173,7 @@ - + AlignVCenter|AlignRight @@ -181,7 +181,7 @@
- layout38_2 + tqlayout38_2 @@ -199,7 +199,7 @@ m_chunks_left - + 50 0 @@ -211,7 +211,7 @@ - + AlignVCenter|AlignRight @@ -219,7 +219,7 @@
- layout24 + tqlayout24 @@ -237,7 +237,7 @@ m_size_chunks - + 80 0 @@ -249,7 +249,7 @@ - + AlignVCenter|AlignRight @@ -265,7 +265,7 @@ Expanding - + 40 20 diff --git a/plugins/infowidget/fileview.cpp b/plugins/infowidget/fileview.cpp index 6c80bf7..b8d371f 100644 --- a/plugins/infowidget/fileview.cpp +++ b/plugins/infowidget/fileview.cpp @@ -186,7 +186,7 @@ namespace kt else if (percent > 100.0) percent = 100.0; KLocale* loc = KGlobal::locale(); - it.current()->setText(4,i18n("%1 %").arg(loc->formatNumber(percent,2))); + it.current()->setText(4,i18n("%1 %").tqarg(loc->formatNumber(percent,2))); } } diff --git a/plugins/infowidget/flagdb.cpp b/plugins/infowidget/flagdb.cpp index c1e1fb4..c7ec520 100644 --- a/plugins/infowidget/flagdb.cpp +++ b/plugins/infowidget/flagdb.cpp @@ -40,9 +40,9 @@ kt::FlagDBSource::FlagDBSource() TQString kt::FlagDBSource::FlagDBSource::getPath(const TQString& country) const { if (type) { - return locate(type, pathPattern.arg(country)); + return locate(type, pathPattern.tqarg(country)); } else { - return pathPattern.arg(country); + return pathPattern.tqarg(country); } } diff --git a/plugins/infowidget/floatspinbox.cpp b/plugins/infowidget/floatspinbox.cpp index 883c7a0..35f5c42 100644 --- a/plugins/infowidget/floatspinbox.cpp +++ b/plugins/infowidget/floatspinbox.cpp @@ -43,7 +43,7 @@ kt::FloatSpinBox::FloatSpinBox( setStep( 0.25f ); connect(this, TQT_SIGNAL(valueChanged ( int )), this, TQT_SLOT(internalValueChanged( int ))); setValidator( new LocaleFloatValidator( TQT_TQOBJECT(dynamic_cast (this)) )); - editor()->setAlignment(TQt::AlignRight); + editor()->tqsetAlignment(TQt::AlignRight); } kt::FloatSpinBox::FloatSpinBox( diff --git a/plugins/infowidget/iwfiletreediritem.cpp b/plugins/infowidget/iwfiletreediritem.cpp index 2abd159..c143e7e 100644 --- a/plugins/infowidget/iwfiletreediritem.cpp +++ b/plugins/infowidget/iwfiletreediritem.cpp @@ -51,8 +51,8 @@ namespace kt void IWFileTreeDirItem::updatePercentageInformation() { // first set all the child items - bt::PtrMap::iterator i = children.begin(); - while (i != children.end()) + bt::PtrMap::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { IWFileTreeItem* item = (IWFileTreeItem*)i->second; item->updatePercentageInformation(); @@ -71,8 +71,8 @@ namespace kt void IWFileTreeDirItem::updatePreviewInformation(kt::TorrentInterface* tc) { // first set all the child items - bt::PtrMap::iterator i = children.begin(); - while (i != children.end()) + bt::PtrMap::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { IWFileTreeItem* item = (IWFileTreeItem*)i->second; item->updatePreviewInformation(tc); @@ -91,11 +91,11 @@ namespace kt Priority IWFileTreeDirItem::updatePriorityInformation(kt::TorrentInterface* tc) { // first set all the child items - bt::PtrMap::iterator i = children.begin(); + bt::PtrMap::iterator i = tqchildren.begin(); bool setpriority = false; bool oneexcluded = false; Priority priority = PREVIEW_PRIORITY; - if(i != children.end()) + if(i != tqchildren.end()) { IWFileTreeItem* item = (IWFileTreeItem*)i->second; item->updatePriorityInformation(tc); @@ -105,7 +105,7 @@ namespace kt oneexcluded = true; setpriority = true; } - while (i != children.end()) + while (i != tqchildren.end()) { IWFileTreeItem* item = (IWFileTreeItem*)i->second; item->updatePriorityInformation(tc); @@ -118,7 +118,7 @@ namespace kt // then recursivly move on to subdirs bt::PtrMap::iterator j = subdirs.begin(); - if(j != subdirs.end() && children.begin() == children.end()) + if(j != subdirs.end() && tqchildren.begin() == tqchildren.end()) { Priority priority = ((IWFileTreeDirItem*)j->second)->updatePriorityInformation(tc); @@ -189,8 +189,8 @@ namespace kt void IWFileTreeDirItem::updateDNDInformation() { // first set all the child items - bt::PtrMap::iterator i = children.begin(); - while (i != children.end()) + bt::PtrMap::iterator i = tqchildren.begin(); + while (i != tqchildren.end()) { IWFileTreeItem* item = (IWFileTreeItem*)i->second; item->updateDNDInformation(); diff --git a/plugins/infowidget/iwfiletreeitem.cpp b/plugins/infowidget/iwfiletreeitem.cpp index 04a4e41..fbfdb4b 100644 --- a/plugins/infowidget/iwfiletreeitem.cpp +++ b/plugins/infowidget/iwfiletreeitem.cpp @@ -92,7 +92,7 @@ namespace kt else if (percent > 100.0) percent = 100.0; KLocale* loc = KGlobal::locale(); - setText(4,i18n("%1 %").arg(loc->formatNumber(percent,2))); + setText(4,i18n("%1 %").tqarg(loc->formatNumber(percent,2))); perc_complete = percent; } diff --git a/plugins/infowidget/iwpref.ui b/plugins/infowidget/iwpref.ui index a26160b..ed4a9e1 100644 --- a/plugins/infowidget/iwpref.ui +++ b/plugins/infowidget/iwpref.ui @@ -45,7 +45,7 @@ Expanding - + 20 21 diff --git a/plugins/infowidget/peerview.cpp b/plugins/infowidget/peerview.cpp index 365e79d..35d2024 100644 --- a/plugins/infowidget/peerview.cpp +++ b/plugins/infowidget/peerview.cpp @@ -170,11 +170,11 @@ namespace kt setText(5,s.choked ? i18n("Yes") : i18n("No")); //setPixmap(6,!s.snubbed ? yes_pix : no_pix); setText(6,s.snubbed ? i18n("Yes") : i18n("No")); - setText(7,TQString("%1 %").arg(loc->formatNumber(s.perc_of_file,2))); + setText(7,TQString("%1 %").tqarg(loc->formatNumber(s.perc_of_file,2))); setPixmap(8,s.dht_support ? yes_pix : no_pix); setText(9,loc->formatNumber(s.aca_score,2)); setPixmap(10,s.has_upload_slot ? yes_pix : TQPixmap()); - setText(11,TQString("%1 / %2").arg(s.num_down_requests).arg(s.num_up_requests)); + setText(11,TQString("%1 / %2").tqarg(s.num_down_requests).tqarg(s.num_up_requests)); setText(12, BytesToString(s.bytes_downloaded)); setText(13, BytesToString(s.bytes_uploaded)); } diff --git a/plugins/infowidget/statustab.cpp b/plugins/infowidget/statustab.cpp index 44fe656..7317437 100644 --- a/plugins/infowidget/statustab.cpp +++ b/plugins/infowidget/statustab.cpp @@ -37,7 +37,7 @@ namespace kt StatusTab::StatusTab(TQWidget* parent, const char* name, WFlags fl) : StatusTabBase(parent,name,fl),curr_tc(0) { - TQColorGroup cg = colorGroup(); + TQColorGroup cg = tqcolorGroup(); // do not use hardcoded colors m_info_caption->setPaletteBackgroundColor(cg.mid()); m_chunks_caption->setPaletteBackgroundColor(cg.mid()); @@ -142,16 +142,16 @@ namespace kt m_tracker_status->setText(s.trackerstatus); m_seeders->setText(TQString("%1 (%2)") - .arg(s.seeders_connected_to).arg(s.seeders_total)); + .tqarg(s.seeders_connected_to).tqarg(s.seeders_total)); m_leechers->setText(TQString("%1 (%2)") - .arg(s.leechers_connected_to).arg(s.leechers_total)); + .tqarg(s.leechers_connected_to).tqarg(s.leechers_total)); float ratio = kt::ShareRatio(s); if(!maxRatio->hasFocus() && useLimit->isChecked()) maxRatioUpdate(); - m_share_ratio->setText(TQString("%2").arg(ratio <= 0.8 ? "#ff0000" : "#1c9a1c").arg(KGlobal::locale()->formatNumber(ratio,2))); + m_share_ratio->setText(TQString("%2").tqarg(ratio <= 0.8 ? "#ff0000" : "#1c9a1c").tqarg(KGlobal::locale()->formatNumber(ratio,2))); Uint32 secs = curr_tc->getRunningTimeUL(); if (secs == 0) diff --git a/plugins/infowidget/statustabbase.ui b/plugins/infowidget/statustabbase.ui index fc6a187..0a73993 100644 --- a/plugins/infowidget/statustabbase.ui +++ b/plugins/infowidget/statustabbase.ui @@ -41,7 +41,7 @@
- layout16 + tqlayout16 @@ -49,7 +49,7 @@ - layout15 + tqlayout15 @@ -75,7 +75,7 @@ m_seeders - + 100 0 @@ -87,7 +87,7 @@ - + AlignVCenter|AlignRight @@ -95,7 +95,7 @@ m_leechers - + 100 0 @@ -107,7 +107,7 @@ - + AlignVCenter|AlignRight @@ -115,7 +115,7 @@
- layout14 + tqlayout14 @@ -133,7 +133,7 @@ m_avg_down - + 100 0 @@ -145,7 +145,7 @@ - + AlignVCenter|AlignRight @@ -153,7 +153,7 @@ m_avg_up - + 100 0 @@ -165,7 +165,7 @@ - + AlignVCenter|AlignRight
@@ -181,7 +181,7 @@
- layout12 + tqlayout12 @@ -207,7 +207,7 @@ m_tracker_status - + 100 0 @@ -219,7 +219,7 @@ - + AlignVCenter|AlignRight @@ -227,7 +227,7 @@ m_tracker_update_time - + 100 0 @@ -239,7 +239,7 @@ - + AlignVCenter|AlignRight
@@ -255,7 +255,7 @@ Expanding - + 207 20 @@ -266,7 +266,7 @@
- layout17 + tqlayout17 @@ -274,7 +274,7 @@ - layout23 + tqlayout23 @@ -282,7 +282,7 @@ - layout25 + tqlayout25 @@ -344,7 +344,7 @@ 0 - + 0 20 @@ -379,7 +379,7 @@ 0 - + 0 20 @@ -398,7 +398,7 @@ Expanding - + 20 16 @@ -431,7 +431,7 @@ - layout16 + tqlayout16 @@ -459,7 +459,7 @@ - layout15 + tqlayout15 @@ -477,7 +477,7 @@ 0 - + 20 0 @@ -497,7 +497,7 @@ - layout11 + tqlayout11 @@ -515,7 +515,7 @@ 0 - + 20 0 @@ -561,7 +561,7 @@ m_share_ratio - + 50 0 @@ -573,7 +573,7 @@ - + AlignVCenter|AlignRight @@ -589,7 +589,7 @@ MinimumExpanding - + 20 20 diff --git a/plugins/infowidget/trackerview.cpp b/plugins/infowidget/trackerview.cpp index 7a84f12..c928a7f 100644 --- a/plugins/infowidget/trackerview.cpp +++ b/plugins/infowidget/trackerview.cpp @@ -167,7 +167,7 @@ namespace kt // only enable change when we can actually change and the torrent is running btnChange->setEnabled(s.running && listTrackers->childCount() > 1); - lblStatus->setText("" + s.trackerstatus + ""); + lbltqStatus->setText("" + s.trackerstatus + ""); if (tc->getTrackersList()) { TQString t = tc->getTrackersList()->getTrackerURL().prettyURL(); @@ -191,7 +191,7 @@ namespace kt listTrackers->clear(); if(!tc) { - lblStatus->clear(); + lbltqStatus->clear(); lblCurrent->clear(); lblUpdate->clear(); txtTracker->clear(); diff --git a/plugins/infowidget/trackerviewbase.ui b/plugins/infowidget/trackerviewbase.ui index 24d92c2..154842b 100644 --- a/plugins/infowidget/trackerviewbase.ui +++ b/plugins/infowidget/trackerviewbase.ui @@ -50,7 +50,7 @@ - layout8 + tqlayout8 @@ -85,7 +85,7 @@ Expanding - + 20 68 @@ -129,7 +129,7 @@ - layout6 + tqlayout6 @@ -180,7 +180,7 @@ Fixed - + 16 20 @@ -205,7 +205,7 @@ - lblStatus + lbltqStatus @@ -229,7 +229,7 @@ Fixed - + 16 20 diff --git a/plugins/ipfilter/antip2p.cpp b/plugins/ipfilter/antip2p.cpp index d37300e..b3755ec 100644 --- a/plugins/ipfilter/antip2p.cpp +++ b/plugins/ipfilter/antip2p.cpp @@ -67,19 +67,19 @@ namespace kt tmp = ip; tmp &= 0x000000FF; - out.prepend(TQString("%1").arg(tmp)); + out.prepend(TQString("%1").tqarg(tmp)); ip >>= 8; tmp = ip; tmp &= 0x000000FF; - out.prepend(TQString("%1.").arg(tmp)); + out.prepend(TQString("%1.").tqarg(tmp)); ip >>= 8; tmp = ip; tmp &= 0x000000FF; - out.prepend(TQString("%1.").arg(tmp)); + out.prepend(TQString("%1.").tqarg(tmp)); ip >>= 8; tmp = ip; tmp &= 0x000000FF; - out.prepend(TQString("%1.").arg(tmp)); + out.prepend(TQString("%1.").tqarg(tmp)); return out; } diff --git a/plugins/ipfilter/convert_dlg.ui b/plugins/ipfilter/convert_dlg.ui index 23e59ef..640e786 100644 --- a/plugins/ipfilter/convert_dlg.ui +++ b/plugins/ipfilter/convert_dlg.ui @@ -46,7 +46,7 @@ false - + WordBreak|AlignVCenter @@ -73,7 +73,7 @@ 0 - + 390 0 @@ -82,7 +82,7 @@ - layout6 + tqlayout6 diff --git a/plugins/ipfilter/convertdialog.cpp b/plugins/ipfilter/convertdialog.cpp index 7c6f4c8..8c9cf5a 100644 --- a/plugins/ipfilter/convertdialog.cpp +++ b/plugins/ipfilter/convertdialog.cpp @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/plugins/ipfilter/ipblockingpref.ui b/plugins/ipfilter/ipblockingpref.ui index bd58d65..44d48a9 100644 --- a/plugins/ipfilter/ipblockingpref.ui +++ b/plugins/ipfilter/ipblockingpref.ui @@ -29,7 +29,7 @@ Expanding - + 20 20 @@ -63,7 +63,7 @@ - layout5 + tqlayout5 @@ -92,7 +92,7 @@ - layout3 + tqlayout3 @@ -108,7 +108,7 @@ Expanding - + 361 20 @@ -152,7 +152,7 @@ NOTE: ZIP file from bluetack.co.uk is supported. Expanding - + 20 20 diff --git a/plugins/ipfilter/ipblockingprefpage.cpp b/plugins/ipfilter/ipblockingprefpage.cpp index 52e686d..c717c6a 100644 --- a/plugins/ipfilter/ipblockingprefpage.cpp +++ b/plugins/ipfilter/ipblockingprefpage.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include diff --git a/plugins/logviewer/logprefwidgetbase.ui b/plugins/logviewer/logprefwidgetbase.ui index 1fcf3bb..f940a87 100644 --- a/plugins/logviewer/logprefwidgetbase.ui +++ b/plugins/logviewer/logprefwidgetbase.ui @@ -29,7 +29,7 @@ Expanding - + 20 110 diff --git a/plugins/logviewer/logviewer.cpp b/plugins/logviewer/logviewer.cpp index 8107191..ac3e02e 100644 --- a/plugins/logviewer/logviewer.cpp +++ b/plugins/logviewer/logviewer.cpp @@ -50,7 +50,7 @@ namespace kt setTextFormat(TQt::LogText); setMaxLogLines(200); setMinimumSize(TQSize(0,50)); - setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding); + tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding); KGlobal::config()->setGroup("LogViewer"); if (KGlobal::config()->hasKey("LogViewerWidgetSize")) { diff --git a/plugins/partfileimport/importdialog.cpp b/plugins/partfileimport/importdialog.cpp index ba43ac9..d7f92d0 100644 --- a/plugins/partfileimport/importdialog.cpp +++ b/plugins/partfileimport/importdialog.cpp @@ -97,7 +97,7 @@ namespace kt catch (Error & e) { delete dc; - KMessageBox::error(this,i18n("Cannot verify data : %1").arg(e.toString()),i18n("Error")); + KMessageBox::error(this,i18n("Cannot verify data : %1").tqarg(e.toString()),i18n("Error")); reject(); return; } @@ -204,7 +204,7 @@ namespace kt } catch (Error & e) { - KMessageBox::error(this,i18n("Cannot load the torrent file : %1").arg(e.toString()), + KMessageBox::error(this,i18n("Cannot load the torrent file : %1").tqarg(e.toString()), i18n("Error")); reject(); return; @@ -240,7 +240,7 @@ namespace kt } catch (Error & e) { - KMessageBox::error(this,i18n("Cannot load the torrent file : %1").arg(e.toString()), + KMessageBox::error(this,i18n("Cannot load the torrent file : %1").tqarg(e.toString()), i18n("Error")); reject(); return; @@ -254,7 +254,7 @@ namespace kt // first try to open it File fptr; if (!fptr.open(file,"wb")) - throw Error(i18n("Cannot open %1 : %2").arg(file).arg(fptr.errorString())); + throw Error(i18n("Cannot open %1 : %2").tqarg(file).tqarg(fptr.errorString())); // write all chunks to the file for (Uint32 i = 0;i < chunks.getNumBits();i++) @@ -332,8 +332,8 @@ namespace kt out << "PRIORITY=0" << ::endl; out << "AUTOSTART=1" << ::endl; if (core->getGlobalMaxShareRatio() > 0) - out << TQString("MAX_RATIO=%1").arg(core->getGlobalMaxShareRatio(),0,'f',2) << ::endl; - out << TQString("IMPORTED=%1").arg(imported) << ::endl; + out << TQString("MAX_RATIO=%1").tqarg(core->getGlobalMaxShareRatio(),0,'f',2) << ::endl; + out << TQString("IMPORTED=%1").tqarg(imported) << ::endl; if (custom_output_name) out << "CUSTOM_OUTPUT_NAME=1" << endl; } diff --git a/plugins/partfileimport/importdlgbase.ui b/plugins/partfileimport/importdlgbase.ui index 29697e3..9d1dd95 100644 --- a/plugins/partfileimport/importdlgbase.ui +++ b/plugins/partfileimport/importdlgbase.ui @@ -21,7 +21,7 @@ - layout6 + tqlayout6 @@ -29,7 +29,7 @@ - layout5 + tqlayout5 @@ -39,7 +39,7 @@ textLabel1 - + 60 0 @@ -53,7 +53,7 @@ textLabel2 - + 60 0 @@ -67,7 +67,7 @@ - layout4 + tqlayout4 @@ -102,7 +102,7 @@ - layout3 + tqlayout3 @@ -118,7 +118,7 @@ Expanding - + 61 20 diff --git a/plugins/rssfeed/rss/article.cpp b/plugins/rssfeed/rss/article.cpp index 47413b3..9e52589 100644 --- a/plugins/rssfeed/rss/article.cpp +++ b/plugins/rssfeed/rss/article.cpp @@ -54,7 +54,7 @@ Article::Article(const TQDomNode &node, Format format) : d(new Private) d->numComments=0; - if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull()) d->title = elemText; @@ -62,14 +62,14 @@ Article::Article(const TQDomNode &node, Format format) : d(new Private) bool foundTorrentEnclosure = false; for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) { const TQDomElement e = n.toElement(); - if ( (e.tagName()==TQString::fromLatin1("enclosure") ) ) + if ( (e.tagName()==TQString::tqfromLatin1("enclosure") ) ) { - TQString enclosureAttr = e.attribute(TQString::fromLatin1("type")); + TQString enclosureAttr = e.attribute(TQString::tqfromLatin1("type")); if (!enclosureAttr.isNull() ) { if (enclosureAttr == "application/x-bittorrent") { - enclosureAttr = e.attribute(TQString::fromLatin1("url")); + enclosureAttr = e.attribute(TQString::tqfromLatin1("url")); if (!enclosureAttr.isNull() ) { d->link=enclosureAttr; @@ -88,41 +88,41 @@ Article::Article(const TQDomNode &node, Format format) : d(new Private) TQDomNode n; for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) { const TQDomElement e = n.toElement(); - if ( (e.tagName()==TQString::fromLatin1("link")) && - (e.attribute(TQString::fromLatin1("rel"))==TQString::fromLatin1("alternate"))) + if ( (e.tagName()==TQString::tqfromLatin1("link")) && + (e.attribute(TQString::tqfromLatin1("rel"))==TQString::tqfromLatin1("alternate"))) { - d->link=n.toElement().attribute(TQString::fromLatin1("href")); + d->link=n.toElement().attribute(TQString::tqfromLatin1("href")); break; } } } else { - if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull()) d->link = elemText; } } // prefer content/content:encoded over summary/description for feeds that provide it - TQString tagName=(format==AtomFeed)? TQString::fromLatin1("content"): TQString::fromLatin1("content:encoded"); + TQString tagName=(format==AtomFeed)? TQString::tqfromLatin1("content"): TQString::tqfromLatin1("content:encoded"); if (!(elemText = extractNode(node, tagName, false)).isNull()) d->description = elemText; if (d->description.isEmpty()) { - if (!(elemText = extractNode(node, TQString::fromLatin1("body"), false)).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("body"), false)).isNull()) d->description = elemText; if (d->description.isEmpty()) // 3rd try: see http://www.intertwingly.net/blog/1299.html { - if (!(elemText = extractNode(node, TQString::fromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull()) d->description = elemText; } } - if (!(elemText = extractNode(node, TQString::fromLatin1((format==AtomFeed)? "created": "pubDate"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1((format==AtomFeed)? "created": "pubDate"))).isNull()) { time_t _time; if (format==AtomFeed) @@ -134,7 +134,7 @@ Article::Article(const TQDomNode &node, Format format) : d(new Private) if (_time != 0) d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(node, TQString::fromLatin1("dc:date"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("dc:date"))).isNull()) { time_t _time = parseISO8601Date(elemText); @@ -146,23 +146,23 @@ Article::Article(const TQDomNode &node, Format format) : d(new Private) //no luck so far - so let's set it to the current time if (!d->pubDate.isValid()) { - d->pubDate = TQDateTime::currentDateTime(); + d->pubDate = TQDateTime::tqcurrentDateTime(); } - if (!(elemText = extractNode(node, TQString::fromLatin1("wfw:comment"))).isNull()) { + if (!(elemText = extractNode(node, TQString::tqfromLatin1("wfw:comment"))).isNull()) { d->commentsLink = elemText; } - if (!(elemText = extractNode(node, TQString::fromLatin1("slash:comments"))).isNull()) { + if (!(elemText = extractNode(node, TQString::tqfromLatin1("slash:comments"))).isNull()) { d->numComments = elemText.toInt(); } - tagName=(format==AtomFeed)? TQString::fromLatin1("id"): TQString::fromLatin1("guid"); + tagName=(format==AtomFeed)? TQString::tqfromLatin1("id"): TQString::tqfromLatin1("guid"); n = node.namedItem(tagName); if (!n.isNull()) { d->guidIsPermaLink = (format==AtomFeed)? false : true; - if (n.toElement().attribute(TQString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false; + if (n.toElement().attribute(TQString::tqfromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false; if (!(elemText = extractNode(node, tagName)).isNull()) d->guid = elemText; @@ -176,14 +176,14 @@ Article::Article(const TQDomNode &node, Format format) : d(new Private) md5Machine.update(d->title.utf8()); md5Machine.update(d->description.utf8()); d->guid = TQString(md5Machine.hexDigest().data()); - d->meta[TQString::fromLatin1("guidIsHash")] = TQString::fromLatin1("true"); + d->meta[TQString::tqfromLatin1("guidIsHash")] = TQString::tqfromLatin1("true"); } for (TQDomNode i = node.firstChild(); !i.isNull(); i = i.nextSibling()) { - if (i.isElement() && i.toElement().tagName() == TQString::fromLatin1("metaInfo:meta")) + if (i.isElement() && i.toElement().tagName() == TQString::tqfromLatin1("metaInfo:meta")) { - TQString type = i.toElement().attribute(TQString::fromLatin1("type")); + TQString type = i.toElement().attribute(TQString::tqfromLatin1("type")); d->meta[type] = i.toElement().text(); } } diff --git a/plugins/rssfeed/rss/document.cpp b/plugins/rssfeed/rss/document.cpp index d820613..c65e263 100644 --- a/plugins/rssfeed/rss/document.cpp +++ b/plugins/rssfeed/rss/document.cpp @@ -79,42 +79,42 @@ Document::Document(const TQDomDocument &doc) : d(new Private) TQString attr; // we should probably check that it ISN'T feed or rss, rather than check if it is xhtml - if (rootNode.toElement().tagName()==TQString::fromLatin1("html")) + if (rootNode.toElement().tagName()==TQString::tqfromLatin1("html")) d->valid=false; else d->valid=true; - attr = rootNode.toElement().attribute(TQString::fromLatin1("version"), TQString()); + attr = rootNode.toElement().attribute(TQString::tqfromLatin1("version"), TQString()); if (!attr.isNull()) { if (rootNode.toElement().tagName()=="feed") { d->format=AtomFeed; - if (attr == TQString::fromLatin1("0.3")) + if (attr == TQString::tqfromLatin1("0.3")) d->version = vAtom_0_3; - else if (attr == TQString::fromLatin1("0.2")) /* smt -> review */ + else if (attr == TQString::tqfromLatin1("0.2")) /* smt -> review */ d->version = vAtom_0_2; - else if (attr == TQString::fromLatin1("0.1")) /* smt -> review */ + else if (attr == TQString::tqfromLatin1("0.1")) /* smt -> review */ d->version = vAtom_0_1; } else { d->format=RSSFeed; - if (attr == TQString::fromLatin1("0.91")) + if (attr == TQString::tqfromLatin1("0.91")) d->version = v0_91; - else if (attr == TQString::fromLatin1("0.92")) + else if (attr == TQString::tqfromLatin1("0.92")) d->version = v0_92; - else if (attr == TQString::fromLatin1("0.93")) + else if (attr == TQString::tqfromLatin1("0.93")) d->version = v0_93; - else if (attr == TQString::fromLatin1("0.94")) + else if (attr == TQString::tqfromLatin1("0.94")) d->version = v0_94; - else if (attr.startsWith("2.0") || attr == TQString::fromLatin1("2")) // http://www.breuls.org/rss puts 2.00 in version (BR #0000016) + else if (attr.startsWith("2.0") || attr == TQString::tqfromLatin1("2")) // http://www.breuls.org/rss puts 2.00 in version (BR #0000016) d->version = v2_0; } } if (d->format==UnknownFormat) { - attr = rootNode.toElement().attribute(TQString::fromLatin1("xmlns"), TQString()); + attr = rootNode.toElement().attribute(TQString::tqfromLatin1("xmlns"), TQString()); if (!attr.isNull()) { /* * Hardcoding these URLs is actually a bad idea, since the DTD doesn't @@ -124,11 +124,11 @@ Document::Document(const TQDomDocument &doc) : d(new Private) * distinguish the RSS versions by analyzing the relationship between * the nodes. */ - if (attr == TQString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) { + if (attr == TQString::tqfromLatin1("http://my.netscape.com/rdf/simple/0.9/")) { d->format=RSSFeed; d->version = v0_90; } - else if (attr == TQString::fromLatin1("http://purl.org/rss/1.0/")) { + else if (attr == TQString::tqfromLatin1("http://purl.org/rss/1.0/")) { d->format=RSSFeed; d->version = v1_0; } @@ -140,13 +140,13 @@ Document::Document(const TQDomDocument &doc) : d(new Private) if (d->format == AtomFeed) channelNode=rootNode; else - channelNode=rootNode.namedItem(TQString::fromLatin1("channel")); + channelNode=rootNode.namedItem(TQString::tqfromLatin1("channel")); - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("link"))).isNull()) d->link = elemText; @@ -159,27 +159,27 @@ Document::Document(const TQDomDocument &doc) : d(new Private) else { // following is a HACK for broken 0.91 feeds like xanga.com's - if (!rootNode.namedItem(TQString::fromLatin1("item")).isNull()) + if (!rootNode.namedItem(TQString::tqfromLatin1("item")).isNull()) parentNode = rootNode; else parentNode = channelNode; } // image and textinput aren't supported by Atom.. handle in case feed provides - TQDomNode n = parentNode.namedItem(TQString::fromLatin1("image")); + TQDomNode n = parentNode.namedItem(TQString::tqfromLatin1("image")); if (!n.isNull()) d->image = new Image(n); - n = parentNode.namedItem(TQString::fromLatin1("textinput")); + n = parentNode.namedItem(TQString::tqfromLatin1("textinput")); if (!n.isNull()) d->textInput = new TextInput(n); // Our (hopefully faster) version of elementsByTagName() TQString tagName; if (d->format == AtomFeed) - tagName=TQString::fromLatin1("entry"); + tagName=TQString::tqfromLatin1("entry"); else - tagName=TQString::fromLatin1("item"); + tagName=TQString::tqfromLatin1("item"); for (n = parentNode.firstChild(); !n.isNull(); n = n.nextSibling()) { const TQDomElement e = n.toElement(); @@ -187,212 +187,212 @@ Document::Document(const TQDomDocument &doc) : d(new Private) d->articles.append(Article(e, d->format)); } - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("copyright"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("copyright"))).isNull()) d->copyright = elemText; if (d->format == AtomFeed) - elemText = rootNode.toElement().attribute(TQString::fromLatin1("xml:lang"), TQString()); + elemText = rootNode.toElement().attribute(TQString::tqfromLatin1("xml:lang"), TQString()); else - elemText = extractNode(channelNode, TQString::fromLatin1("language")); + elemText = extractNode(channelNode, TQString::tqfromLatin1("language")); if (!elemText.isNull()){ - if (elemText == TQString::fromLatin1("af")) + if (elemText == TQString::tqfromLatin1("af")) d->language = af; - else if (elemText == TQString::fromLatin1("sq")) + else if (elemText == TQString::tqfromLatin1("sq")) d->language = sq; - else if (elemText == TQString::fromLatin1("eu")) + else if (elemText == TQString::tqfromLatin1("eu")) d->language = eu; - else if (elemText == TQString::fromLatin1("be")) + else if (elemText == TQString::tqfromLatin1("be")) d->language = be; - else if (elemText == TQString::fromLatin1("bg")) + else if (elemText == TQString::tqfromLatin1("bg")) d->language = bg; - else if (elemText == TQString::fromLatin1("ca")) + else if (elemText == TQString::tqfromLatin1("ca")) d->language = ca; - else if (elemText == TQString::fromLatin1("zh-cn")) + else if (elemText == TQString::tqfromLatin1("zh-cn")) d->language = zh_cn; - else if (elemText == TQString::fromLatin1("zh-tw")) + else if (elemText == TQString::tqfromLatin1("zh-tw")) d->language = zh_tw; - else if (elemText == TQString::fromLatin1("hr")) + else if (elemText == TQString::tqfromLatin1("hr")) d->language = hr; - else if (elemText == TQString::fromLatin1("cs")) + else if (elemText == TQString::tqfromLatin1("cs")) d->language = cs; - else if (elemText == TQString::fromLatin1("da")) + else if (elemText == TQString::tqfromLatin1("da")) d->language = da; - else if (elemText == TQString::fromLatin1("nl")) + else if (elemText == TQString::tqfromLatin1("nl")) d->language = nl; - else if (elemText == TQString::fromLatin1("nl-be")) + else if (elemText == TQString::tqfromLatin1("nl-be")) d->language = nl_be; - else if (elemText == TQString::fromLatin1("nl-nl")) + else if (elemText == TQString::tqfromLatin1("nl-nl")) d->language = nl_nl; - else if (elemText == TQString::fromLatin1("en")) + else if (elemText == TQString::tqfromLatin1("en")) d->language = en; - else if (elemText == TQString::fromLatin1("en-au")) + else if (elemText == TQString::tqfromLatin1("en-au")) d->language = en_au; - else if (elemText == TQString::fromLatin1("en-bz")) + else if (elemText == TQString::tqfromLatin1("en-bz")) d->language = en_bz; - else if (elemText == TQString::fromLatin1("en-ca")) + else if (elemText == TQString::tqfromLatin1("en-ca")) d->language = en_ca; - else if (elemText == TQString::fromLatin1("en-ie")) + else if (elemText == TQString::tqfromLatin1("en-ie")) d->language = en_ie; - else if (elemText == TQString::fromLatin1("en-jm")) + else if (elemText == TQString::tqfromLatin1("en-jm")) d->language = en_jm; - else if (elemText == TQString::fromLatin1("en-nz")) + else if (elemText == TQString::tqfromLatin1("en-nz")) d->language = en_nz; - else if (elemText == TQString::fromLatin1("en-ph")) + else if (elemText == TQString::tqfromLatin1("en-ph")) d->language = en_ph; - else if (elemText == TQString::fromLatin1("en-za")) + else if (elemText == TQString::tqfromLatin1("en-za")) d->language = en_za; - else if (elemText == TQString::fromLatin1("en-tt")) + else if (elemText == TQString::tqfromLatin1("en-tt")) d->language = en_tt; - else if (elemText == TQString::fromLatin1("en-gb")) + else if (elemText == TQString::tqfromLatin1("en-gb")) d->language = en_gb; - else if (elemText == TQString::fromLatin1("en-us")) + else if (elemText == TQString::tqfromLatin1("en-us")) d->language = en_us; - else if (elemText == TQString::fromLatin1("en-zw")) + else if (elemText == TQString::tqfromLatin1("en-zw")) d->language = en_zw; - else if (elemText == TQString::fromLatin1("fo")) + else if (elemText == TQString::tqfromLatin1("fo")) d->language = fo; - else if (elemText == TQString::fromLatin1("fi")) + else if (elemText == TQString::tqfromLatin1("fi")) d->language = fi; - else if (elemText == TQString::fromLatin1("fr")) + else if (elemText == TQString::tqfromLatin1("fr")) d->language = fr; - else if (elemText == TQString::fromLatin1("fr-be")) + else if (elemText == TQString::tqfromLatin1("fr-be")) d->language = fr_be; - else if (elemText == TQString::fromLatin1("fr-ca")) + else if (elemText == TQString::tqfromLatin1("fr-ca")) d->language = fr_ca; - else if (elemText == TQString::fromLatin1("fr-fr")) + else if (elemText == TQString::tqfromLatin1("fr-fr")) d->language = fr_fr; - else if (elemText == TQString::fromLatin1("fr-lu")) + else if (elemText == TQString::tqfromLatin1("fr-lu")) d->language = fr_lu; - else if (elemText == TQString::fromLatin1("fr-mc")) + else if (elemText == TQString::tqfromLatin1("fr-mc")) d->language = fr_mc; - else if (elemText == TQString::fromLatin1("fr-ch")) + else if (elemText == TQString::tqfromLatin1("fr-ch")) d->language = fr_ch; - else if (elemText == TQString::fromLatin1("gl")) + else if (elemText == TQString::tqfromLatin1("gl")) d->language = gl; - else if (elemText == TQString::fromLatin1("gd")) + else if (elemText == TQString::tqfromLatin1("gd")) d->language = gd; - else if (elemText == TQString::fromLatin1("de")) + else if (elemText == TQString::tqfromLatin1("de")) d->language = de; - else if (elemText == TQString::fromLatin1("de-at")) + else if (elemText == TQString::tqfromLatin1("de-at")) d->language = de_at; - else if (elemText == TQString::fromLatin1("de-de")) + else if (elemText == TQString::tqfromLatin1("de-de")) d->language = de_de; - else if (elemText == TQString::fromLatin1("de-li")) + else if (elemText == TQString::tqfromLatin1("de-li")) d->language = de_li; - else if (elemText == TQString::fromLatin1("de-lu")) + else if (elemText == TQString::tqfromLatin1("de-lu")) d->language = de_lu; - else if (elemText == TQString::fromLatin1("de-ch")) + else if (elemText == TQString::tqfromLatin1("de-ch")) d->language = de_ch; - else if (elemText == TQString::fromLatin1("el")) + else if (elemText == TQString::tqfromLatin1("el")) d->language = el; - else if (elemText == TQString::fromLatin1("hu")) + else if (elemText == TQString::tqfromLatin1("hu")) d->language = hu; - else if (elemText == TQString::fromLatin1("is")) + else if (elemText == TQString::tqfromLatin1("is")) d->language = is; - else if (elemText == TQString::fromLatin1("id")) + else if (elemText == TQString::tqfromLatin1("id")) d->language = id; - else if (elemText == TQString::fromLatin1("ga")) + else if (elemText == TQString::tqfromLatin1("ga")) d->language = ga; - else if (elemText == TQString::fromLatin1("it")) + else if (elemText == TQString::tqfromLatin1("it")) d->language = it; - else if (elemText == TQString::fromLatin1("it-it")) + else if (elemText == TQString::tqfromLatin1("it-it")) d->language = it_it; - else if (elemText == TQString::fromLatin1("it-ch")) + else if (elemText == TQString::tqfromLatin1("it-ch")) d->language = it_ch; - else if (elemText == TQString::fromLatin1("ja")) + else if (elemText == TQString::tqfromLatin1("ja")) d->language = ja; - else if (elemText == TQString::fromLatin1("ko")) + else if (elemText == TQString::tqfromLatin1("ko")) d->language = ko; - else if (elemText == TQString::fromLatin1("mk")) + else if (elemText == TQString::tqfromLatin1("mk")) d->language = mk; - else if (elemText == TQString::fromLatin1("no")) + else if (elemText == TQString::tqfromLatin1("no")) d->language = no; - else if (elemText == TQString::fromLatin1("pl")) + else if (elemText == TQString::tqfromLatin1("pl")) d->language = pl; - else if (elemText == TQString::fromLatin1("pt")) + else if (elemText == TQString::tqfromLatin1("pt")) d->language = pt; - else if (elemText == TQString::fromLatin1("pt-br")) + else if (elemText == TQString::tqfromLatin1("pt-br")) d->language = pt_br; - else if (elemText == TQString::fromLatin1("pt-pt")) + else if (elemText == TQString::tqfromLatin1("pt-pt")) d->language = pt_pt; - else if (elemText == TQString::fromLatin1("ro")) + else if (elemText == TQString::tqfromLatin1("ro")) d->language = ro; - else if (elemText == TQString::fromLatin1("ro-mo")) + else if (elemText == TQString::tqfromLatin1("ro-mo")) d->language = ro_mo; - else if (elemText == TQString::fromLatin1("ro-ro")) + else if (elemText == TQString::tqfromLatin1("ro-ro")) d->language = ro_ro; - else if (elemText == TQString::fromLatin1("ru")) + else if (elemText == TQString::tqfromLatin1("ru")) d->language = ru; - else if (elemText == TQString::fromLatin1("ru-mo")) + else if (elemText == TQString::tqfromLatin1("ru-mo")) d->language = ru_mo; - else if (elemText == TQString::fromLatin1("ru-ru")) + else if (elemText == TQString::tqfromLatin1("ru-ru")) d->language = ru_ru; - else if (elemText == TQString::fromLatin1("sr")) + else if (elemText == TQString::tqfromLatin1("sr")) d->language = sr; - else if (elemText == TQString::fromLatin1("sk")) + else if (elemText == TQString::tqfromLatin1("sk")) d->language = sk; - else if (elemText == TQString::fromLatin1("sl")) + else if (elemText == TQString::tqfromLatin1("sl")) d->language = sl; - else if (elemText == TQString::fromLatin1("es")) + else if (elemText == TQString::tqfromLatin1("es")) d->language = es; - else if (elemText == TQString::fromLatin1("es-ar")) + else if (elemText == TQString::tqfromLatin1("es-ar")) d->language = es_ar; - else if (elemText == TQString::fromLatin1("es-bo")) + else if (elemText == TQString::tqfromLatin1("es-bo")) d->language = es_bo; - else if (elemText == TQString::fromLatin1("es-cl")) + else if (elemText == TQString::tqfromLatin1("es-cl")) d->language = es_cl; - else if (elemText == TQString::fromLatin1("es-co")) + else if (elemText == TQString::tqfromLatin1("es-co")) d->language = es_co; - else if (elemText == TQString::fromLatin1("es-cr")) + else if (elemText == TQString::tqfromLatin1("es-cr")) d->language = es_cr; - else if (elemText == TQString::fromLatin1("es-do")) + else if (elemText == TQString::tqfromLatin1("es-do")) d->language = es_do; - else if (elemText == TQString::fromLatin1("es-ec")) + else if (elemText == TQString::tqfromLatin1("es-ec")) d->language = es_ec; - else if (elemText == TQString::fromLatin1("es-sv")) + else if (elemText == TQString::tqfromLatin1("es-sv")) d->language = es_sv; - else if (elemText == TQString::fromLatin1("es-gt")) + else if (elemText == TQString::tqfromLatin1("es-gt")) d->language = es_gt; - else if (elemText == TQString::fromLatin1("es-hn")) + else if (elemText == TQString::tqfromLatin1("es-hn")) d->language = es_hn; - else if (elemText == TQString::fromLatin1("es-mx")) + else if (elemText == TQString::tqfromLatin1("es-mx")) d->language = es_mx; - else if (elemText == TQString::fromLatin1("es-ni")) + else if (elemText == TQString::tqfromLatin1("es-ni")) d->language = es_ni; - else if (elemText == TQString::fromLatin1("es-pa")) + else if (elemText == TQString::tqfromLatin1("es-pa")) d->language = es_pa; - else if (elemText == TQString::fromLatin1("es-py")) + else if (elemText == TQString::tqfromLatin1("es-py")) d->language = es_py; - else if (elemText == TQString::fromLatin1("es-pe")) + else if (elemText == TQString::tqfromLatin1("es-pe")) d->language = es_pe; - else if (elemText == TQString::fromLatin1("es-pr")) + else if (elemText == TQString::tqfromLatin1("es-pr")) d->language = es_pr; - else if (elemText == TQString::fromLatin1("es-es")) + else if (elemText == TQString::tqfromLatin1("es-es")) d->language = es_es; - else if (elemText == TQString::fromLatin1("es-uy")) + else if (elemText == TQString::tqfromLatin1("es-uy")) d->language = es_uy; - else if (elemText == TQString::fromLatin1("es-ve")) + else if (elemText == TQString::tqfromLatin1("es-ve")) d->language = es_ve; - else if (elemText == TQString::fromLatin1("sv")) + else if (elemText == TQString::tqfromLatin1("sv")) d->language = sv; - else if (elemText == TQString::fromLatin1("sv-fi")) + else if (elemText == TQString::tqfromLatin1("sv-fi")) d->language = sv_fi; - else if (elemText == TQString::fromLatin1("sv-se")) + else if (elemText == TQString::tqfromLatin1("sv-se")) d->language = sv_se; - else if (elemText == TQString::fromLatin1("tr")) + else if (elemText == TQString::tqfromLatin1("tr")) d->language = tr; - else if (elemText == TQString::fromLatin1("uk")) + else if (elemText == TQString::tqfromLatin1("uk")) d->language = uk; else d->language = UndefinedLanguage; } if (d->format == AtomFeed) - tagName=TQString::fromLatin1("issued"); // atom doesn't specify this for feeds + tagName=TQString::tqfromLatin1("issued"); // atom doesn't specify this for feeds // but some broken feeds do this else - tagName=TQString::fromLatin1("pubDate"); + tagName=TQString::tqfromLatin1("pubDate"); if (!(elemText = extractNode(channelNode, tagName)).isNull()) { time_t _time; @@ -408,7 +408,7 @@ Document::Document(const TQDomDocument &doc) : d(new Private) d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("dc:date"))).isNull()) { + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("dc:date"))).isNull()) { time_t _time = parseISO8601Date(elemText); /* \bug This isn't really the right way since it will set the date to * Jan 1 1970, 1:00:00 if the passed date was invalid; this means that @@ -418,9 +418,9 @@ Document::Document(const TQDomDocument &doc) : d(new Private) } if (d->format == AtomFeed) - tagName=TQString::fromLatin1("modified"); + tagName=TQString::tqfromLatin1("modified"); else - tagName=TQString::fromLatin1("lastBuildDate"); + tagName=TQString::tqfromLatin1("lastBuildDate"); if (!(elemText = extractNode(channelNode, tagName)).isNull()) { time_t _time; if (d->format == AtomFeed) @@ -430,44 +430,44 @@ Document::Document(const TQDomDocument &doc) : d(new Private) d->lastBuildDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("rating"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("rating"))).isNull()) d->rating = elemText; - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("docs"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("docs"))).isNull()) d->docs = elemText; - if (!(elemText = extractNode(channelNode, TQString::fromLatin1((d->format == AtomFeed) ? "author" : "managingEditor"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1((d->format == AtomFeed) ? "author" : "managingEditor"))).isNull()) d->managingEditor = elemText; - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("webMaster"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("webMaster"))).isNull()) d->webMaster = elemText; - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("ttl"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("ttl"))).isNull()) d->ttl = elemText.toUInt(); - n = channelNode.namedItem(TQString::fromLatin1("skipHours")); + n = channelNode.namedItem(TQString::tqfromLatin1("skipHours")); if (!n.isNull()) for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) - if (e.tagName() == TQString::fromLatin1("hour")) + if (e.tagName() == TQString::tqfromLatin1("hour")) d->skipHours.append(e.text().toUInt()); - n = channelNode.namedItem(TQString::fromLatin1("skipDays")); + n = channelNode.namedItem(TQString::tqfromLatin1("skipDays")); if (!n.isNull()) { Day day; TQString elemText; for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) - if (e.tagName() == TQString::fromLatin1("day")) { + if (e.tagName() == TQString::tqfromLatin1("day")) { elemText = e.text().lower(); - if (elemText == TQString::fromLatin1("monday")) + if (elemText == TQString::tqfromLatin1("monday")) day = Monday; - else if (elemText == TQString::fromLatin1("tuesday")) + else if (elemText == TQString::tqfromLatin1("tuesday")) day = Tuesday; - else if (elemText == TQString::fromLatin1("wednesday")) + else if (elemText == TQString::tqfromLatin1("wednesday")) day = Wednesday; - else if (elemText == TQString::fromLatin1("thursday")) + else if (elemText == TQString::tqfromLatin1("thursday")) day = Thursday; - else if (elemText == TQString::fromLatin1("friday")) + else if (elemText == TQString::tqfromLatin1("friday")) day = Friday; - else if (elemText == TQString::fromLatin1("saturday")) + else if (elemText == TQString::tqfromLatin1("saturday")) day = Saturday; - else if (elemText == TQString::fromLatin1("sunday")) + else if (elemText == TQString::tqfromLatin1("sunday")) day = Sunday; else day = UndefinedDay; @@ -496,16 +496,16 @@ Version Document::version() const TQString Document::verbVersion() const { switch (d->version) { - case v0_90: return TQString::fromLatin1("0.90"); - case v0_91: return TQString::fromLatin1("0.91"); - case v0_92: return TQString::fromLatin1("0.92"); - case v0_93: return TQString::fromLatin1("0.93"); - case v0_94: return TQString::fromLatin1("0.94"); - case v1_0: return TQString::fromLatin1("1.0"); - case v2_0: return TQString::fromLatin1("2.0"); - case vAtom_0_3: return TQString::fromLatin1("0.3"); - case vAtom_0_2: return TQString::fromLatin1("0.2"); - case vAtom_0_1: return TQString::fromLatin1("0.1"); + case v0_90: return TQString::tqfromLatin1("0.90"); + case v0_91: return TQString::tqfromLatin1("0.91"); + case v0_92: return TQString::tqfromLatin1("0.92"); + case v0_93: return TQString::tqfromLatin1("0.93"); + case v0_94: return TQString::tqfromLatin1("0.94"); + case v1_0: return TQString::tqfromLatin1("1.0"); + case v2_0: return TQString::tqfromLatin1("2.0"); + case vAtom_0_3: return TQString::tqfromLatin1("0.3"); + case vAtom_0_2: return TQString::tqfromLatin1("0.2"); + case vAtom_0_1: return TQString::tqfromLatin1("0.1"); } return TQString(); } diff --git a/plugins/rssfeed/rss/global.h b/plugins/rssfeed/rss/global.h index 92d3866..e4bc7c7 100644 --- a/plugins/rssfeed/rss/global.h +++ b/plugins/rssfeed/rss/global.h @@ -39,7 +39,7 @@ namespace RSS * Possible status values returned by the signal * Loader::loadingComplete(). */ - enum Status { + enum tqStatus { Success, /** * Nothing went wrong so far, but you still have to check * what values are returned by the classes since it's not diff --git a/plugins/rssfeed/rss/image.cpp b/plugins/rssfeed/rss/image.cpp index cb8d7c8..98074be 100644 --- a/plugins/rssfeed/rss/image.cpp +++ b/plugins/rssfeed/rss/image.cpp @@ -48,17 +48,17 @@ Image::Image(const TQDomNode &node) : TQObject(), d(new Private) { TQString elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("url"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("url"))).isNull()) d->url = elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull()) d->link = elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("height"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("height"))).isNull()) d->height = elemText.toUInt(); - if (!(elemText = extractNode(node, TQString::fromLatin1("width"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("width"))).isNull()) d->width = elemText.toUInt(); } diff --git a/plugins/rssfeed/rss/loader.cpp b/plugins/rssfeed/rss/loader.cpp index 6c5b3d5..835a2e6 100644 --- a/plugins/rssfeed/rss/loader.cpp +++ b/plugins/rssfeed/rss/loader.cpp @@ -240,7 +240,7 @@ Loader *Loader::create() Loader *Loader::create(TQObject *object, const char *slot) { Loader *loader = create(); - connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)), + connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, tqStatus)), object, slot); return loader; } @@ -300,7 +300,7 @@ void Loader::slotRetrieverDone(const TQByteArray &data, bool success) d->retriever = NULL; Document rssDoc; - Status status = Success; + tqStatus status = Success; if (success) { TQDomDocument doc; diff --git a/plugins/rssfeed/rss/loader.h b/plugins/rssfeed/rss/loader.h index 807bee5..438ebaf 100644 --- a/plugins/rssfeed/rss/loader.h +++ b/plugins/rssfeed/rss/loader.h @@ -209,8 +209,8 @@ namespace RSS * * \code * Loader *loader = Loader::create(); - * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)), - * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, Status))); + * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, tqStatus)), + * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, tqStatus))); * loader->loadFrom("http://www.blah.org/foobar.rdf", new FileRetriever); * \endcode * @@ -234,7 +234,7 @@ namespace RSS * 'slotLoadingComplete' method might look like this: * * \code - * void MyClass::slotLoadingComplete(Loader *loader, Document doc, Status status) + * void MyClass::slotLoadingComplete(Loader *loader, Document doc, tqStatus status) * { * // Note that Loader::~Loader() is private, so you cannot delete Loader instances. * // You don't need to do that anyway since Loader instances delete themselves. @@ -320,9 +320,9 @@ namespace RSS * the case if you intend to call getPixmap() on Document::image()! * @param status A status byte telling whether there were any problems * while retrieving or parsing the data. - * @see Document, Status + * @see Document, tqStatus */ - void loadingComplete(Loader *loader, Document doc, Status status); + void loadingComplete(Loader *loader, Document doc, tqStatus status); private slots: void slotRetrieverDone(const TQByteArray &data, bool success); diff --git a/plugins/rssfeed/rss/testlibrss.cpp b/plugins/rssfeed/rss/testlibrss.cpp index 7d88c3d..571717a 100644 --- a/plugins/rssfeed/rss/testlibrss.cpp +++ b/plugins/rssfeed/rss/testlibrss.cpp @@ -19,12 +19,12 @@ static const KCmdLineOptions options[] = void Tester::test( const TQString &url ) { Loader *loader = Loader::create(); - connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ), - this, TQT_SLOT( slotLoadingComplete( Loader *, Document, Status ) ) ); + connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, tqStatus ) ), + this, TQT_SLOT( slotLoadingComplete( Loader *, Document, tqStatus ) ) ); loader->loadFrom( url, new FileRetriever ); } -void Tester::slotLoadingComplete( Loader *loader, Document doc, Status status ) +void Tester::slotLoadingComplete( Loader *loader, Document doc, tqStatus status ) { if ( status == Success ) { diff --git a/plugins/rssfeed/rss/testlibrss.h b/plugins/rssfeed/rss/testlibrss.h index 3d3e963..18e1832 100644 --- a/plugins/rssfeed/rss/testlibrss.h +++ b/plugins/rssfeed/rss/testlibrss.h @@ -10,7 +10,7 @@ using RSS::Loader; using RSS::Document; -using RSS::Status; +using RSS::tqStatus; class Tester : public TQObject { @@ -20,7 +20,7 @@ class Tester : public TQObject void test( const TQString &url ); private slots: - void slotLoadingComplete( Loader *loader, Document doc, Status status ); + void slotLoadingComplete( Loader *loader, Document doc, tqStatus status ); }; #endif diff --git a/plugins/rssfeed/rss/textinput.cpp b/plugins/rssfeed/rss/textinput.cpp index 04799fc..a12442f 100644 --- a/plugins/rssfeed/rss/textinput.cpp +++ b/plugins/rssfeed/rss/textinput.cpp @@ -38,13 +38,13 @@ TextInput::TextInput(const TQDomNode &node) : d(new Private) { TQString elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("name")))) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("name")))) d->name = elemText; - if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull()) d->link = elemText; } diff --git a/plugins/rssfeed/rssfeed.cpp b/plugins/rssfeed/rssfeed.cpp index 2b70193..f051f1b 100644 --- a/plugins/rssfeed/rssfeed.cpp +++ b/plugins/rssfeed/rssfeed.cpp @@ -223,7 +223,7 @@ namespace kt RssArticle::List::iterator it; for ( it = m_articles.begin(); it != m_articles.end(); ) { - if ((*it).pubDate().daysTo(TQDateTime::currentDateTime()) > m_articleAge) + if ((*it).pubDate().daysTo(TQDateTime::tqcurrentDateTime()) > m_articleAge) { it = m_articles.erase(it); removed = true; @@ -254,12 +254,12 @@ namespace kt feedLoading = true; cleanArticles(); Loader * feedLoader = Loader::create(); - connect( feedLoader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ), - this, TQT_SLOT( feedLoaded( Loader *, Document, Status ) ) ); + connect( feedLoader, TQT_SIGNAL( loadingComplete( Loader *, Document, tqStatus ) ), + this, TQT_SLOT( feedLoaded( Loader *, Document, tqStatus ) ) ); feedLoader->loadFrom( m_feedUrl, new FileRetriever ); } - void RssFeed::feedLoaded(Loader *feedLoader, Document doc, Status status) + void RssFeed::feedLoaded(Loader *feedLoader, Document doc, tqStatus status) { feedLoading = false; @@ -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::currentDateTime()) < m_articleAge && !m_articles.contains(curArticle)) + if (curArticle.pubDate().daysTo(TQDateTime::tqcurrentDateTime()) < m_articleAge && !m_articles.contains(curArticle)) { m_articles.prepend(curArticle); emit scanRssArticle(curArticle); @@ -306,8 +306,8 @@ namespace kt qDebug( "There was and error loading the feed\n"); } - disconnect( feedLoader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ), - this, TQT_SLOT( feedLoaded( Loader *, Document, Status ) ) ); + disconnect( feedLoader, TQT_SIGNAL( loadingComplete( Loader *, Document, tqStatus ) ), + this, TQT_SLOT( feedLoaded( Loader *, Document, tqStatus ) ) ); feedLoader->deleteLater(); } diff --git a/plugins/rssfeed/rssfeed.h b/plugins/rssfeed/rssfeed.h index 835d1b3..5213d8f 100644 --- a/plugins/rssfeed/rssfeed.h +++ b/plugins/rssfeed/rssfeed.h @@ -73,7 +73,7 @@ namespace kt public slots: void refreshFeed(); - void feedLoaded(Loader *feedLoader, Document doc, Status status); + void feedLoaded(Loader *feedLoader, Document doc, tqStatus status); void clearArticles(); diff --git a/plugins/rssfeed/rssfeedmanager.cpp b/plugins/rssfeed/rssfeedmanager.cpp index bd08224..20f81a6 100644 --- a/plugins/rssfeed/rssfeedmanager.cpp +++ b/plugins/rssfeed/rssfeedmanager.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/plugins/rssfeed/rssfeedwidget.ui b/plugins/rssfeed/rssfeedwidget.ui index 62c2af8..5cd8e89 100644 --- a/plugins/rssfeed/rssfeedwidget.ui +++ b/plugins/rssfeed/rssfeedwidget.ui @@ -48,7 +48,7 @@ - layout2 + tqlayout2 @@ -152,7 +152,7 @@ Expanding - + 90 21 @@ -194,7 +194,7 @@ - layout13 + tqlayout13 @@ -252,7 +252,7 @@ Expanding - + 60 21 @@ -277,7 +277,7 @@ - layout47 + tqlayout47 @@ -367,7 +367,7 @@ - layout28 + tqlayout28 @@ -476,7 +476,7 @@ - layout14 + tqlayout14 @@ -484,7 +484,7 @@ - layout9 + tqlayout9 @@ -526,7 +526,7 @@ - layout12 + tqlayout12 @@ -565,7 +565,7 @@ - layout11 + tqlayout11 @@ -573,7 +573,7 @@ - layout28 + tqlayout28 @@ -600,7 +600,7 @@ Preferred - + 50 21 @@ -614,7 +614,7 @@ true - + 60 32767 @@ -633,7 +633,7 @@ seriesBox - + 32000 32000 @@ -648,7 +648,7 @@ - layout9 + tqlayout9 @@ -664,7 +664,7 @@ Expanding - + 20 21 @@ -686,7 +686,7 @@ - layout10 + tqlayout10 @@ -792,7 +792,7 @@ - layout33 + tqlayout33 @@ -880,7 +880,7 @@ - layout13 + tqlayout13 @@ -910,7 +910,7 @@ Expanding - + 170 21 diff --git a/plugins/rssfeed/rssfilter.cpp b/plugins/rssfeed/rssfilter.cpp index 32d13d0..51ac2ff 100644 --- a/plugins/rssfeed/rssfilter.cpp +++ b/plugins/rssfeed/rssfilter.cpp @@ -302,8 +302,8 @@ namespace kt regEx.setPattern(*episodeFormats.at(i)); if (regEx.search(article.title()) >= 0) { - season = (*regEx.capturedTexts().at(1)).toInt(); - episode = (*regEx.capturedTexts().at(2)).toInt(); + season = (*regEx.tqcapturedTexts().at(1)).toInt(); + episode = (*regEx.tqcapturedTexts().at(2)).toInt(); if (!episodeInRange(season,episode,ignoreMatches,alreadyDownloaded)) { return false; @@ -313,8 +313,8 @@ namespace kt if (regEx.search(article.link().prettyURL()) >= 0) { - season = (*regEx.capturedTexts().at(1)).toInt(); - episode = (*regEx.capturedTexts().at(2)).toInt(); + season = (*regEx.tqcapturedTexts().at(1)).toInt(); + episode = (*regEx.tqcapturedTexts().at(2)).toInt(); if (!episodeInRange(season,episode,ignoreMatches,alreadyDownloaded)) { return false; @@ -324,8 +324,8 @@ namespace kt if (regEx.search(article.description()) >= 0) { - season = (*regEx.capturedTexts().at(1)).toInt(); - episode = (*regEx.capturedTexts().at(2)).toInt(); + season = (*regEx.tqcapturedTexts().at(1)).toInt(); + episode = (*regEx.tqcapturedTexts().at(2)).toInt(); if (!episodeInRange(season,episode,ignoreMatches,alreadyDownloaded)) { return false; diff --git a/plugins/rssfeed/rssfilter.h b/plugins/rssfeed/rssfilter.h index 2a24d7d..53695f5 100644 --- a/plugins/rssfeed/rssfilter.h +++ b/plugins/rssfeed/rssfilter.h @@ -42,8 +42,8 @@ namespace kt { public: - FilterMatch() { m_season = 0; m_episode = 0; m_time = TQDateTime::currentDateTime().toString(); m_link=TQString(); }; - FilterMatch(int season, int episode, TQString link, TQString time = TQDateTime::currentDateTime().toString()); + FilterMatch() { m_season = 0; m_episode = 0; m_time = TQDateTime::tqcurrentDateTime().toString(); m_link=TQString(); }; + FilterMatch(int season, int episode, TQString link, TQString time = TQDateTime::tqcurrentDateTime().toString()); FilterMatch(const FilterMatch &other); FilterMatch &operator=(const FilterMatch &other); bool operator==(const FilterMatch &other) const; diff --git a/plugins/rssfeed/rsslinkdownloader.cpp b/plugins/rssfeed/rsslinkdownloader.cpp index 4c11bb9..972a220 100644 --- a/plugins/rssfeed/rsslinkdownloader.cpp +++ b/plugins/rssfeed/rsslinkdownloader.cpp @@ -42,7 +42,7 @@ namespace kt if (!KURL(link).isValid()) { // no valid URL, so just display an error message - KMessageBox::error(0,i18n("Failed to find and download a valid torrent for %1").arg(curLink)); + KMessageBox::error(0,i18n("Failed to find and download a valid torrent for %1").tqarg(curLink)); TQTimer::singleShot(50,this,TQT_SLOT(suicide())); } else @@ -59,10 +59,10 @@ namespace kt } - void RssLinkDownloader::processLink(KIO::Job* jobStatus) + void RssLinkDownloader::processLink(KIO::Job* jobtqStatus) { - if (!jobStatus->error()) + if (!jobtqStatus->error()) { //the file downloaded ok - so let's check if it's a torrent KMimeType linkType = *KMimeType::findByContent(curFile->data()); @@ -100,15 +100,15 @@ namespace kt hrefText = TQString("HREF=\"?([^\">< ]*)[\" ]"); hrefText.setCaseSensitive(false); - hrefTags.capturedTexts()[0].find(hrefText); + hrefTags.tqcapturedTexts()[0].find(hrefText); //lets get the captured TQString hrefLink = hrefText.capturedTexts()[1]; - if (hrefLink.startsWith("/")) + if (hrefLink.tqstartsWith("/")) { hrefLink = url.protocol() + "://" + url.host() + hrefLink; } - else if (!hrefLink.startsWith("http://", false)) + else if (!hrefLink.tqstartsWith("http://", false)) { hrefLink = url.url().left(url.url().findRev("/")+1) + hrefLink; } @@ -180,7 +180,7 @@ namespace kt else { //failed to download a selected article from a feed - KMessageBox::error(0,i18n("Failed to find and download a valid torrent for %1").arg(curLink)); + KMessageBox::error(0,i18n("Failed to find and download a valid torrent for %1").tqarg(curLink)); } deleteLater(); } diff --git a/plugins/rssfeed/rsslinkdownloader.h b/plugins/rssfeed/rsslinkdownloader.h index 17d8676..2bd8bf1 100644 --- a/plugins/rssfeed/rsslinkdownloader.h +++ b/plugins/rssfeed/rsslinkdownloader.h @@ -59,7 +59,7 @@ namespace kt public slots: - void processLink(KIO::Job* jobStatus); + void processLink(KIO::Job* jobtqStatus); void suicide(); signals: diff --git a/plugins/scanfolder/scanfolderprefpagewidget.cpp b/plugins/scanfolder/scanfolderprefpagewidget.cpp index 5a96afd..af70fc6 100644 --- a/plugins/scanfolder/scanfolderprefpagewidget.cpp +++ b/plugins/scanfolder/scanfolderprefpagewidget.cpp @@ -73,7 +73,7 @@ namespace kt TQString message = i18n( "ScanFolder - Folder %1: Invalid URL or folder does not exist. Please, choose a valid directory." ); if(!TQFile::exists(sfPath1) && usesf1) { - KMessageBox::sorry(0, message.arg( 1 ) ); + KMessageBox::sorry(0, message.tqarg( 1 ) ); usesf1 = false; } else @@ -81,7 +81,7 @@ namespace kt if(!TQFile::exists(sfPath2) && usesf2) { - KMessageBox::sorry(0, message.arg( 2 ) ); + KMessageBox::sorry(0, message.tqarg( 2 ) ); usesf2 = false; } else @@ -89,7 +89,7 @@ namespace kt if(!TQFile::exists(sfPath3) && usesf3) { - KMessageBox::sorry(0, message.arg( 3 ) ); + KMessageBox::sorry(0, message.tqarg( 3 ) ); usesf3 = false; } else diff --git a/plugins/scanfolder/sfprefwidgetbase.ui b/plugins/scanfolder/sfprefwidgetbase.ui index e9ddfdc..ae599b3 100644 --- a/plugins/scanfolder/sfprefwidgetbase.ui +++ b/plugins/scanfolder/sfprefwidgetbase.ui @@ -21,7 +21,7 @@ - layout16 + tqlayout16 @@ -188,7 +188,7 @@ Fixed - + 20 20 @@ -205,7 +205,7 @@ Expanding - + 20 90 diff --git a/plugins/scheduler/bwscheduler.cpp b/plugins/scheduler/bwscheduler.cpp index 56256a4..a669360 100644 --- a/plugins/scheduler/bwscheduler.cpp +++ b/plugins/scheduler/bwscheduler.cpp @@ -160,9 +160,9 @@ namespace kt if(!m_enabled) return; - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); - TQString prefix = TQString("BWS: %1 :: ").arg(now.toString()); + TQString prefix = TQString("BWS: %1 :: ").tqarg(now.toString()); int t1 = now.date().dayOfWeek(); int t2 = now.time().hour(); @@ -173,7 +173,7 @@ namespace kt case CAT_NORMAL: Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to NORMAL category" << endl; Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down") - .arg(m_core->getMaxUploadSpeed()).arg(m_core->getMaxDownloadSpeed()) << endl; + .tqarg(m_core->getMaxUploadSpeed()).tqarg(m_core->getMaxDownloadSpeed()) << endl; if(!m_core) break; m_core->setPausedState(false); @@ -183,7 +183,7 @@ namespace kt case CAT_FIRST: Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to FIRST category" << endl; Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down") - .arg(m_schedule.getUpload(0)).arg(m_schedule.getDownload(0)) << endl; + .tqarg(m_schedule.getUpload(0)).tqarg(m_schedule.getDownload(0)) << endl; if(!m_core) break; m_core->setPausedState(false); @@ -193,7 +193,7 @@ namespace kt case CAT_SECOND: Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to SECOND category" << endl; Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down") - .arg(m_schedule.getUpload(1)).arg(m_schedule.getDownload(1)) << endl; + .tqarg(m_schedule.getUpload(1)).tqarg(m_schedule.getDownload(1)) << endl; if(!m_core) break; m_core->setPausedState(false); @@ -203,7 +203,7 @@ namespace kt case CAT_THIRD: Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to THIRD category" << endl; Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down") - .arg(m_schedule.getUpload(2)).arg(m_schedule.getDownload(2)) << endl; + .tqarg(m_schedule.getUpload(2)).tqarg(m_schedule.getDownload(2)) << endl; if(!m_core) break; m_core->setPausedState(false); diff --git a/plugins/scheduler/bwspage.ui b/plugins/scheduler/bwspage.ui index 547de3f..12fdbd4 100644 --- a/plugins/scheduler/bwspage.ui +++ b/plugins/scheduler/bwspage.ui @@ -12,13 +12,13 @@ 530 - + 0 0 - + 750 540 @@ -36,7 +36,7 @@ - layout21 + tqlayout21 @@ -73,7 +73,7 @@ 0 - + 30 15 @@ -95,7 +95,7 @@ 0 - + 30 15 @@ -117,7 +117,7 @@ 0 - + 30 15 @@ -139,7 +139,7 @@ 0 - + 30 15 @@ -177,7 +177,7 @@ 0 - + 30 15 @@ -245,7 +245,7 @@ 0 - + 30 15 @@ -267,7 +267,7 @@ 0 - + 30 15 @@ -289,7 +289,7 @@ 0 - + 30 15 @@ -311,7 +311,7 @@ 0 - + 30 15 @@ -349,7 +349,7 @@ 0 - + 30 15 @@ -411,7 +411,7 @@ - layout8 + tqlayout8 @@ -461,7 +461,7 @@ - layout9 + tqlayout9 @@ -511,7 +511,7 @@ - layout10 + tqlayout10 @@ -581,13 +581,13 @@ 0 - + 379 510 - + 379 508 @@ -596,7 +596,7 @@ - layout34 + tqlayout34 @@ -604,7 +604,7 @@ - lblStatus + lbltqStatus @@ -625,7 +625,7 @@ * zero means no limit - + AlignVCenter|AlignRight @@ -641,7 +641,7 @@ Expanding - + 20 16 @@ -650,7 +650,7 @@ - layout32 + tqlayout32 @@ -658,7 +658,7 @@ - layout31 + tqlayout31 @@ -700,7 +700,7 @@ Expanding - + 36 20 @@ -728,7 +728,7 @@ Expanding - + 35 20 @@ -737,7 +737,7 @@ - layout29 + tqlayout29 diff --git a/plugins/scheduler/bwsprefpagewidget.cpp b/plugins/scheduler/bwsprefpagewidget.cpp index 391ccbf..95f72d6 100644 --- a/plugins/scheduler/bwsprefpagewidget.cpp +++ b/plugins/scheduler/bwsprefpagewidget.cpp @@ -51,7 +51,7 @@ namespace kt loadDefault(); - lblStatus->clear(); + lbltqStatus->clear(); pix_icon->setPixmap(KGlobal::iconLoader()->loadIcon("clock",KIcon::NoGroup)); @@ -162,7 +162,7 @@ namespace kt stream << (int) schedule.getCategory(i, j); file.close(); - lblStatus->setText(i18n("Schedule saved.")); + lbltqStatus->setText(i18n("Schedule saved.")); } void BWSPrefPageWidget::loadSchedule(TQString& fn, bool showmsg) @@ -205,7 +205,7 @@ namespace kt file.close(); m_bwsWidget->setSchedule(schedule); - lblStatus->setText(i18n("Schedule loaded.")); + lbltqStatus->setText(i18n("Schedule loaded.")); } void BWSPrefPageWidget::loadDefault() @@ -228,7 +228,7 @@ namespace kt ulCat2->setValue(0); ulCat3->setValue(0); - lblStatus->clear(); + lbltqStatus->clear(); } void BWSPrefPageWidget::apply() diff --git a/plugins/scheduler/schedulerpage.ui b/plugins/scheduler/schedulerpage.ui index 0fc52b3..9b6f292 100644 --- a/plugins/scheduler/schedulerpage.ui +++ b/plugins/scheduler/schedulerpage.ui @@ -72,7 +72,7 @@ Expanding - + 40 20 @@ -89,7 +89,7 @@ Expanding - + 20 80 @@ -108,7 +108,7 @@ Expanding - + 20 40 diff --git a/plugins/scheduler/schedulerplugin.cpp b/plugins/scheduler/schedulerplugin.cpp index 436f32b..ddef7c8 100644 --- a/plugins/scheduler/schedulerplugin.cpp +++ b/plugins/scheduler/schedulerplugin.cpp @@ -74,7 +74,7 @@ namespace kt getGUI()->addPrefPage(Pref); BWScheduler::instance().setCoreInterface(getCore()); - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); //each hour TQDateTime hour = now.addSecs(3600); @@ -115,7 +115,7 @@ namespace kt void SchedulerPlugin::timer_triggered() { m_timer.changeInterval(3600*1000); - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); BWScheduler::instance().trigger(); } diff --git a/plugins/search/htmlpart.cpp b/plugins/search/htmlpart.cpp index 52cb764..bad55d6 100644 --- a/plugins/search/htmlpart.cpp +++ b/plugins/search/htmlpart.cpp @@ -21,7 +21,7 @@ #include #include //#include -#include +#include #include #include #include @@ -60,7 +60,7 @@ namespace kt void HTMLPart::copy() { TQString txt = selectedText(); - TQClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); // Copy text into the clipboard if (cb) cb->setText(txt,TQClipboard::Clipboard); diff --git a/plugins/search/searchbar.ui b/plugins/search/searchbar.ui index 7784264..370da86 100644 --- a/plugins/search/searchbar.ui +++ b/plugins/search/searchbar.ui @@ -63,7 +63,7 @@ Maximum - + 60 20 diff --git a/plugins/search/searchenginelist.cpp b/plugins/search/searchenginelist.cpp index 63b932a..a117f79 100644 --- a/plugins/search/searchenginelist.cpp +++ b/plugins/search/searchenginelist.cpp @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include -#include +#include #include #include "searchenginelist.h" diff --git a/plugins/search/searchplugin.cpp b/plugins/search/searchplugin.cpp index 2f63f4e..b22e858 100644 --- a/plugins/search/searchplugin.cpp +++ b/plugins/search/searchplugin.cpp @@ -108,7 +108,7 @@ namespace kt if(SearchPluginSettings::useDefaultBrowser()) kapp->invokeBrowser(url.url()); else - KRun::runCommand(TQString("%1 \"%2\"").arg(SearchPluginSettings::customBrowser()).arg(url.url()), SearchPluginSettings::customBrowser(), "viewmag" ); + KRun::runCommand(TQString("%1 \"%2\"").tqarg(SearchPluginSettings::customBrowser()).tqarg(url.url()), SearchPluginSettings::customBrowser(), "viewmag" ); return; } diff --git a/plugins/search/searchpref.ui b/plugins/search/searchpref.ui index 2baa1af..cadfbd8 100644 --- a/plugins/search/searchpref.ui +++ b/plugins/search/searchpref.ui @@ -20,7 +20,7 @@ 0 - + 500 350 @@ -65,7 +65,7 @@ - layout29 + tqlayout29 @@ -97,7 +97,7 @@ Expanding - + 40 20 @@ -129,7 +129,7 @@ - layout22 + tqlayout22 @@ -152,7 +152,7 @@ - layout23 + tqlayout23 @@ -223,7 +223,7 @@ 0 - + 0 50 @@ -235,7 +235,7 @@ - layout5 + tqlayout5 @@ -267,7 +267,7 @@ Maximum - + 16 20 diff --git a/plugins/search/searchprefpage.cpp b/plugins/search/searchprefpage.cpp index c3f1517..adf78ba 100644 --- a/plugins/search/searchprefpage.cpp +++ b/plugins/search/searchprefpage.cpp @@ -53,9 +53,9 @@ namespace kt " (capital letters) on the search engine you want to add.
" "Then copy the URL in the addressbar after the search is finished, and paste it here.

Searching for %1" " on Google for example, will result in http://www.google.com/search?q=FOOBAR&ie=UTF-8&oe=UTF-8.
" - "If you add this URL here, ktorrent can search using Google.").arg("FOOBAR").arg("FOOBAR"); + "If you add this URL here, ktorrent can search using Google.").tqarg("FOOBAR").tqarg("FOOBAR"); TQString info_short = i18n("Use your web browser to search for the string %1 (capital letters) " - "on the search engine you want to add. Use the resulting URL below.").arg("FOOBAR"); + "on the search engine you want to add. Use the resulting URL below.").tqarg("FOOBAR"); m_infoLabel->setText(info_short); TQToolTip::add(m_infoLabel,info); TQToolTip::add(m_engine_name,info); diff --git a/plugins/search/searchtab.cpp b/plugins/search/searchtab.cpp index 591fcdb..02f3acf 100644 --- a/plugins/search/searchtab.cpp +++ b/plugins/search/searchtab.cpp @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/plugins/search/searchwidget.cpp b/plugins/search/searchwidget.cpp index adecd51..abe1f39 100644 --- a/plugins/search/searchwidget.cpp +++ b/plugins/search/searchwidget.cpp @@ -21,9 +21,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include @@ -59,8 +59,8 @@ namespace kt SearchWidget::SearchWidget(SearchPlugin* sp) : html_part(0),sp(sp) { - TQVBoxLayout* layout = new TQVBoxLayout(this); - layout->setAutoAdd(true); + TQVBoxLayout* tqlayout = new TQVBoxLayout(this); + tqlayout->setAutoAdd(true); sbar = new SearchBar(this); html_part = new HTMLPart(this); @@ -175,7 +175,7 @@ namespace kt s_url.replace("FOOBAR", KURL::encode_string(text), true); KURL url = KURL::fromPathOrURL(s_url); - statusBarMsg(i18n("Searching for %1...").arg(text)); + statusBarMsg(i18n("Searching for %1...").tqarg(text)); //html_part->openURL(url); html_part->openURLRequest(url,KParts::URLArgs()); } diff --git a/plugins/stats/ChartDrawer.cc b/plugins/stats/ChartDrawer.cc index 6eb08b4..4c7c1d3 100644 --- a/plugins/stats/ChartDrawer.cc +++ b/plugins/stats/ChartDrawer.cc @@ -416,7 +416,7 @@ void ChartDrawer::MakeLegendTooltip() { TQToolTip::remove(this); - TQString helpstr(TQString("%1:

").arg(i18n("Legend"))); + TQString helpstr(TQString("%1:

").tqarg(i18n("Legend"))); TQMimeSourceFactory* factory = TQMimeSourceFactory::defaultFactory(); std::vector img; @@ -434,7 +434,7 @@ void ChartDrawer::MakeLegendTooltip() } factory->setImage(mEls[i].GetName().replace(' ', '_') + "-" + TQString::number(i), img[i]); - helpstr += TQString("  -  %2
").arg(mEls[i].GetName().replace(" ", "_") + "-" + TQString::number(i)).arg( mEls[i].GetName() ); + helpstr += TQString("  -  %2
").tqarg(mEls[i].GetName().replace(" ", "_") + "-" + TQString::number(i)).tqarg( mEls[i].GetName() ); } TQToolTip::add(this, helpstr); diff --git a/plugins/stats/StatsCon.cc b/plugins/stats/StatsCon.cc index 568005d..548b38a 100644 --- a/plugins/stats/StatsCon.cc +++ b/plugins/stats/StatsCon.cc @@ -26,16 +26,16 @@ StatsCon::StatsCon(TQWidget * p) : StatsConWgt(p), pmPeersConCht(new ChartDrawe pmDHTCht(new ChartDrawer(DHTGbw, StatsPluginSettings::dHTMeasurements())) { PeersConGbw->setColumnLayout(0, Qt::Vertical ); - PeersConGbw->layout()->setSpacing( 6 ); - PeersConGbw->layout()->setMargin( 11 ); + PeersConGbw->tqlayout()->setSpacing( 6 ); + PeersConGbw->tqlayout()->setMargin( 11 ); - pmPeersConLay = new TQVBoxLayout(PeersConGbw -> layout()); + pmPeersConLay = new TQVBoxLayout(PeersConGbw -> tqlayout()); DHTGbw->setColumnLayout(0, Qt::Vertical ); - DHTGbw->layout()->setSpacing( 6 ); - DHTGbw->layout()->setMargin( 11 ); + DHTGbw->tqlayout()->setSpacing( 6 ); + DHTGbw->tqlayout()->setMargin( 11 ); - pmDHTLay = new TQVBoxLayout(DHTGbw -> layout()); + pmDHTLay = new TQVBoxLayout(DHTGbw -> tqlayout()); //------------- diff --git a/plugins/stats/StatsCon.h b/plugins/stats/StatsCon.h index 47502c6..da984f1 100644 --- a/plugins/stats/StatsCon.h +++ b/plugins/stats/StatsCon.h @@ -22,7 +22,7 @@ #define STATSCON_H_ #include -#include +#include #include #include diff --git a/plugins/stats/StatsSpd.cc b/plugins/stats/StatsSpd.cc index c8cb157..0ea427a 100644 --- a/plugins/stats/StatsSpd.cc +++ b/plugins/stats/StatsSpd.cc @@ -29,22 +29,22 @@ StatsSpd::StatsSpd(TQWidget *p) : StatsSpdWgt(p), { DownSpeedGbw->setColumnLayout(0, Qt::Vertical ); - DownSpeedGbw->layout()->setSpacing( 6 ); - DownSpeedGbw->layout()->setMargin( 11 ); + DownSpeedGbw->tqlayout()->setSpacing( 6 ); + DownSpeedGbw->tqlayout()->setMargin( 11 ); - pmDSpdLay = new TQVBoxLayout(DownSpeedGbw -> layout()); + pmDSpdLay = new TQVBoxLayout(DownSpeedGbw -> tqlayout()); UpSpeedGbw->setColumnLayout(0, Qt::Vertical ); - UpSpeedGbw->layout()->setSpacing( 6 ); - UpSpeedGbw->layout()->setMargin( 11 ); + UpSpeedGbw->tqlayout()->setSpacing( 6 ); + UpSpeedGbw->tqlayout()->setMargin( 11 ); - pmUSpdLay = new TQVBoxLayout(UpSpeedGbw -> layout()); + pmUSpdLay = new TQVBoxLayout(UpSpeedGbw -> tqlayout()); PeersSpdGbw->setColumnLayout(0, Qt::Vertical ); - PeersSpdGbw->layout()->setSpacing( 6 ); - PeersSpdGbw->layout()->setMargin( 11 ); + PeersSpdGbw->tqlayout()->setSpacing( 6 ); + PeersSpdGbw->tqlayout()->setMargin( 11 ); - pmPeersSpdLay = new TQVBoxLayout(PeersSpdGbw -> layout()); + pmPeersSpdLay = new TQVBoxLayout(PeersSpdGbw -> tqlayout()); //----------------- diff --git a/plugins/stats/StatsSpd.h b/plugins/stats/StatsSpd.h index bbb2eb5..971209a 100644 --- a/plugins/stats/StatsSpd.h +++ b/plugins/stats/StatsSpd.h @@ -22,7 +22,7 @@ #define STATSSPD_H_ #include -#include +#include #include #include diff --git a/plugins/stats/sprefwgt.ui b/plugins/stats/sprefwgt.ui index b6ce139..980f024 100644 --- a/plugins/stats/sprefwgt.ui +++ b/plugins/stats/sprefwgt.ui @@ -32,7 +32,7 @@
- layout2 + tqlayout2 @@ -78,7 +78,7 @@ - layout4 + tqlayout4 @@ -140,7 +140,7 @@ - layout11 + tqlayout11 @@ -197,7 +197,7 @@ - layout3 + tqlayout3 @@ -253,7 +253,7 @@ Gathering data about many connected peers can be CPU consuming. - + WordBreak|AlignVCenter @@ -275,7 +275,7 @@
- layout7 + tqlayout7 @@ -314,7 +314,7 @@ - layout5 + tqlayout5 @@ -346,7 +346,7 @@ - layout5_2 + tqlayout5_2 @@ -378,7 +378,7 @@ - layout5_3 + tqlayout5_3 @@ -410,7 +410,7 @@ - layout5_5 + tqlayout5_5 @@ -442,7 +442,7 @@ - layout5_4 + tqlayout5_4 @@ -484,7 +484,7 @@ Expanding - + 20 40 diff --git a/plugins/stats/statsconwgt.ui b/plugins/stats/statsconwgt.ui index 3565a3c..c76e6eb 100644 --- a/plugins/stats/statsconwgt.ui +++ b/plugins/stats/statsconwgt.ui @@ -18,7 +18,7 @@ - layout3 + tqlayout3 diff --git a/plugins/stats/statsspdwgt.ui b/plugins/stats/statsspdwgt.ui index b04e19a..25a3cd8 100644 --- a/plugins/stats/statsspdwgt.ui +++ b/plugins/stats/statsspdwgt.ui @@ -18,7 +18,7 @@ - layout5 + tqlayout5 diff --git a/plugins/upnp/soap.cpp b/plugins/upnp/soap.cpp index c44ab1e..f80d5af 100644 --- a/plugins/upnp/soap.cpp +++ b/plugins/upnp/soap.cpp @@ -29,7 +29,7 @@ namespace kt "" "" "" - "\r\n").arg(action).arg(service); + "\r\n").tqarg(action).tqarg(service); return comm; } @@ -39,7 +39,7 @@ namespace kt TQString comm = TQString("\r\n" "" "" - "").arg(action).arg(service); + "").tqarg(action).tqarg(service); for (TQValueList::const_iterator i = args.begin();i != args.end();i++) { @@ -47,7 +47,7 @@ namespace kt comm += "<" + a.element + ">" + a.value + ""; } - comm += TQString("\r\n").arg(action); + comm += TQString("\r\n").tqarg(action); return comm; } } diff --git a/plugins/upnp/upnpdescriptionparser.cpp b/plugins/upnp/upnpdescriptionparser.cpp index 1e73362..bd933a4 100644 --- a/plugins/upnp/upnpdescriptionparser.cpp +++ b/plugins/upnp/upnpdescriptionparser.cpp @@ -32,7 +32,7 @@ namespace kt class XMLContentHandler : public TQXmlDefaultHandler { - enum Status + enum tqStatus { TOPLEVEL,ROOT,DEVICE,SERVICE,FIELD,OTHER }; @@ -40,7 +40,7 @@ namespace kt TQString tmp; UPnPRouter* router; UPnPService curr_service; - TQValueStack status_stack; + TQValueStack status_stack; public: XMLContentHandler(UPnPRouter* router); virtual ~XMLContentHandler(); diff --git a/plugins/upnp/upnpmcastsocket.cpp b/plugins/upnp/upnpmcastsocket.cpp index 1a4e0a0..facf207 100644 --- a/plugins/upnp/upnpmcastsocket.cpp +++ b/plugins/upnp/upnpmcastsocket.cpp @@ -35,7 +35,7 @@ extern "C" { #include #include #include -#include +#include #include "upnpmcastsocket.h" using namespace KNetwork; diff --git a/plugins/upnp/upnprouter.cpp b/plugins/upnp/upnprouter.cpp index 05d47a4..e5593ea 100644 --- a/plugins/upnp/upnprouter.cpp +++ b/plugins/upnp/upnprouter.cpp @@ -113,7 +113,7 @@ namespace kt UPnPRouter::UPnPRouter(const TQString & server,const KURL & location,bool verbose) : server(server),location(location),verbose(verbose) { // make the tmp_file unique, current time * a random number should be enough - tmp_file = TQString("/tmp/ktorrent_upnp_description-%1.xml").arg(bt::GetCurrentTime() * rand()); + tmp_file = TQString("/tmp/ktorrent_upnp_description-%1.xml").tqarg(bt::GetCurrentTime() * rand()); } @@ -227,7 +227,7 @@ namespace kt a.element = "NewPortMappingDescription"; static Uint32 cnt = 0; - a.value = TQString("KTorrent UPNP %1").arg(cnt++); // TODO: change this + a.value = TQString("KTorrent UPNP %1").tqarg(cnt++); // TODO: change this args.append(a); a.element = "NewLeaseDuration"; @@ -335,7 +335,7 @@ namespace kt "Content-length: $CONTENT_LENGTH\r\n" "Content-Type: text/xml\r\n" "SOAPAction: \"%4\"\r\n" - "\r\n").arg(controlurl).arg(location.host()).arg(location.port()).arg(soapact); + "\r\n").tqarg(controlurl).tqarg(location.host()).tqarg(location.port()).tqarg(soapact); HTTPRequest* r = new HTTPRequest(http_hdr,query,location.host(),location.port(),verbose); diff --git a/plugins/upnp/upnpwidget.ui b/plugins/upnp/upnpwidget.ui index d06576a..50e1e1a 100644 --- a/plugins/upnp/upnpwidget.ui +++ b/plugins/upnp/upnpwidget.ui @@ -21,7 +21,7 @@ - layout1 + tqlayout1 @@ -77,7 +77,7 @@ - layout3 + tqlayout3 @@ -109,7 +109,7 @@ Expanding - + 70 20 diff --git a/plugins/webinterface/httpclienthandler.cpp b/plugins/webinterface/httpclienthandler.cpp index cba0372..1ad2d8d 100644 --- a/plugins/webinterface/httpclienthandler.cpp +++ b/plugins/webinterface/httpclienthandler.cpp @@ -171,7 +171,7 @@ namespace kt void HttpClientHandler::send500(HttpResponseHeader & hdr) { // Out(SYS_WEB|LOG_DEBUG) << "Sending 500 " << endl; - TQString data = TQString(HTTP_500_ERROR).arg("An internal server error occured !"); + TQString data = TQString(HTTP_500_ERROR).tqarg("An internal server error occured !"); hdr.setValue("Content-Length",TQString::number(data.length())); TQTextStream os(client); @@ -199,7 +199,7 @@ namespace kt php = new PhpHandler(php_exe,php_iface); if (!php->executeScript(php_file,args)) { - TQString data = TQString(HTTP_500_ERROR).arg("Failed to launch PHP executable !"); + TQString data = TQString(HTTP_500_ERROR).tqarg("Failed to launch PHP executable !"); hdr.setResponseCode(500); hdr.setValue("Content-Length",TQString::number(data.utf8().length())); diff --git a/plugins/webinterface/httpresponseheader.cpp b/plugins/webinterface/httpresponseheader.cpp index 3056f79..7b87892 100644 --- a/plugins/webinterface/httpresponseheader.cpp +++ b/plugins/webinterface/httpresponseheader.cpp @@ -61,12 +61,12 @@ namespace kt TQString HttpResponseHeader::toString() const { TQString str; - str += TQString("HTTP/1.1 %1 %2\r\n").arg(response_code).arg(ResponseCodeToString(response_code)); + str += TQString("HTTP/1.1 %1 %2\r\n").tqarg(response_code).tqarg(ResponseCodeToString(response_code)); TQMap::const_iterator itr = fields.begin(); while (itr != fields.end()) { - str += TQString("%1: %2\r\n").arg(itr.key()).arg(itr.data()); + str += TQString("%1: %2\r\n").tqarg(itr.key()).tqarg(itr.data()); itr++; } str += "\r\n"; diff --git a/plugins/webinterface/httpserver.cpp b/plugins/webinterface/httpserver.cpp index 4d582a7..d04449b 100644 --- a/plugins/webinterface/httpserver.cpp +++ b/plugins/webinterface/httpserver.cpp @@ -237,23 +237,23 @@ namespace kt { if (!cookie) return now.toString("%1, dd %2 yyyy hh:mm:ss UTC") - .arg(days[now.date().dayOfWeek() - 1]) - .arg(months[now.date().month() - 1]); + .tqarg(days[now.date().dayOfWeek() - 1]) + .tqarg(months[now.date().month() - 1]); else return now.toString("%1, dd-%2-yyyy hh:mm:ss GMT") - .arg(days[now.date().dayOfWeek() - 1]) - .arg(months[now.date().month() - 1]); + .tqarg(days[now.date().dayOfWeek() - 1]) + .tqarg(months[now.date().month() - 1]); } void HttpServer::setDefaultResponseHeaders(HttpResponseHeader & hdr,const TQString & content_type,bool with_session_info) { hdr.setValue("Server","KTorrent/" KT_VERSION_MACRO); - hdr.setValue("Date",DateTimeToString(TQDateTime::currentDateTime(Qt::UTC),false)); + hdr.setValue("Date",DateTimeToString(TQDateTime::tqcurrentDateTime(Qt::UTC),false)); hdr.setValue("Content-Type",content_type); hdr.setValue("Connection","keep-alive"); if (with_session_info && session.sessionId && session.logged_in) { - hdr.setValue("Set-Cookie",TQString("KT_SESSID=%1").arg(session.sessionId)); + hdr.setValue("Set-Cookie",TQString("KT_SESSID=%1").tqarg(session.sessionId)); } } @@ -328,8 +328,8 @@ namespace kt if (path.endsWith("login.html")) { // clear cookie in case of login page - TQDateTime dt = TQDateTime::currentDateTime().addDays(-1); - TQString cookie = TQString("KT_SESSID=666; expires=%1 +0000").arg(DateTimeToString(dt,true)); + TQDateTime dt = TQDateTime::tqcurrentDateTime().addDays(-1); + TQString cookie = TQString("KT_SESSID=666; expires=%1 +0000").tqarg(DateTimeToString(dt,true)); rhdr.setValue("Set-Cookie",cookie); } @@ -351,7 +351,7 @@ namespace kt setDefaultResponseHeaders(rhdr,"text/html",true); rhdr.setValue("Cache-Control","max-age=0"); rhdr.setValue("Last-Modified",DateTimeToString(fi.lastModified(),false)); - rhdr.setValue("Expires",DateTimeToString(TQDateTime::currentDateTime(Qt::UTC).addSecs(3600),false)); + rhdr.setValue("Expires",DateTimeToString(TQDateTime::tqcurrentDateTime(Qt::UTC).addSecs(3600),false)); hdlr->sendResponse(rhdr); return; } @@ -361,7 +361,7 @@ namespace kt HttpResponseHeader rhdr(200); setDefaultResponseHeaders(rhdr,ExtensionToContentType(ext),true); rhdr.setValue("Last-Modified",DateTimeToString(fi.lastModified(),false)); - rhdr.setValue("Expires",DateTimeToString(TQDateTime::currentDateTime(Qt::UTC).addSecs(3600),false)); + rhdr.setValue("Expires",DateTimeToString(TQDateTime::tqcurrentDateTime(Qt::UTC).addSecs(3600),false)); rhdr.setValue("Cache-Control","private"); if (!hdlr->sendFile(rhdr,path)) { diff --git a/plugins/webinterface/php_handler.cpp b/plugins/webinterface/php_handler.cpp index d2c2f55..87c8acd 100644 --- a/plugins/webinterface/php_handler.cpp +++ b/plugins/webinterface/php_handler.cpp @@ -76,13 +76,13 @@ namespace kt ts.setEncoding( TQTextStream::UnicodeUTF8 ); ts.writeRawBytes(php_s.data(),off); // first write the opening tag from the script php_i->globalInfo(ts); - php_i->downloadStatus(ts); + php_i->downloadtqStatus(ts); TQMap::const_iterator it; for ( it = args.begin(); it != args.end(); ++it ) { - ts << TQString("$_REQUEST['%1']=\"%2\";\n").arg(it.key()).arg(it.data()); + ts << TQString("$_REQUEST['%1']=\"%2\";\n").tqarg(it.key()).tqarg(it.data()); } ts.writeRawBytes(php_s.data() + off,php_s.size() - off); // the rest of the script ts << flush; diff --git a/plugins/webinterface/php_interface.cpp b/plugins/webinterface/php_interface.cpp index 048310d..9e2a577 100644 --- a/plugins/webinterface/php_interface.cpp +++ b/plugins/webinterface/php_interface.cpp @@ -48,19 +48,19 @@ namespace kt { KLocale* loc = KGlobal::locale(); if (bytes >= 1024 * 1024 * 1024) - return TQString("%1 GB").arg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision)); + return TQString("%1 GB").tqarg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision)); else if (bytes >= 1024*1024) - return TQString("%1 MB").arg(loc->formatNumber(bytes / TO_MEG,precision < 0 ? 1 : precision)); + return TQString("%1 MB").tqarg(loc->formatNumber(bytes / TO_MEG,precision < 0 ? 1 : precision)); else if (bytes >= 1024) - return TQString("%1 KB").arg(loc->formatNumber(bytes / TO_KB,precision < 0 ? 1 : precision)); + return TQString("%1 KB").tqarg(loc->formatNumber(bytes / TO_KB,precision < 0 ? 1 : precision)); else - return TQString("%1 B").arg(bytes); + return TQString("%1 B").tqarg(bytes); } TQString KBytesPerSecToString2(double speed,int precision = 2) { KLocale* loc = KGlobal::locale(); - return TQString("%1 KB/s").arg(loc->formatNumber(speed,precision)); + return TQString("%1 KB/s").tqarg(loc->formatNumber(speed,precision)); } /************************ @@ -72,12 +72,12 @@ namespace kt } /*Generate php code - * function downloadStatus() + * function downloadtqStatus() * { * return array( ... ); * } */ - void PhpCodeGenerator::downloadStatus(TQTextStream & out) + void PhpCodeGenerator::downloadtqStatus(TQTextStream & out) { TorrentStats stats; //Priority file_priority; @@ -91,42 +91,42 @@ namespace kt out << ",\n"; stats=(*i)->getStats(); - out << TQString("\n%1 => array(").arg(k); + out << TQString("\n%1 => array(").tqarg(k); - out << TQString("\"imported_bytes\" => %1,\n").arg(stats.imported_bytes); - out << TQString("\"bytes_downloaded\" => \"%1\",\n").arg(BytesToString2(stats.bytes_downloaded)); - out << TQString("\"bytes_uploaded\" => \"%1\",\n").arg(BytesToString2(stats.bytes_uploaded)); - out << TQString("\"bytes_left\" => %1,\n").arg(stats.bytes_left); - out << TQString("\"bytes_left_to_download\" => %1,\n").arg(stats.bytes_left_to_download); - out << TQString("\"total_bytes\" => \"%1\",\n").arg(BytesToString2(stats.total_bytes)); - out << TQString("\"total_bytes_to_download\" => %1,\n").arg(stats.total_bytes_to_download); - out << TQString("\"download_rate\" => \"%1\",\n").arg(KBytesPerSecToString2(stats.download_rate / 1024.0)); - out << TQString("\"upload_rate\" => \"%1\",\n").arg(KBytesPerSecToString2(stats.upload_rate / 1024.0)); - out << TQString("\"num_peers\" => %1,\n").arg(stats.num_peers); - out << TQString("\"num_chunks_downloading\" => %1,\n").arg(stats.num_chunks_downloading); - out << TQString("\"total_chunks\" => %1,\n").arg(stats.total_chunks); - out << TQString("\"num_chunks_downloaded\" => %1,\n").arg(stats.num_chunks_downloaded); - out << TQString("\"num_chunks_excluded\" => %1,\n").arg(stats.num_chunks_excluded); - out << TQString("\"chunk_size\" => %1,\n").arg(stats.chunk_size); - out << TQString("\"seeders_total\" => %1,\n").arg(stats.seeders_total); - out << TQString("\"seeders_connected_to\" => %1,\n").arg(stats.seeders_connected_to); - out << TQString("\"leechers_total\" => %1,\n").arg(stats.leechers_total); - out << TQString("\"leechers_connected_to\" => %1,\n").arg(stats.leechers_connected_to); - out << TQString("\"status\" => %1,\n").arg(stats.status); - out << TQString("\"running\" => %1,\n").arg(stats.running); - out << TQString("\"trackerstatus\" => \"%1\",\n").arg(stats.trackerstatus.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$")); - out << TQString("\"session_bytes_downloaded\" => %1,\n").arg(stats.session_bytes_downloaded); - out << TQString("\"session_bytes_uploaded\" => %1,\n").arg(stats.session_bytes_uploaded); - out << TQString("\"trk_bytes_downloaded\" => %1,\n").arg(stats.trk_bytes_downloaded); - out << TQString("\"trk_bytes_uploaded\" => %1,\n").arg(stats.trk_bytes_uploaded); - out << TQString("\"torrent_name\" => \"%1\",\n").arg(stats.torrent_name.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$")); - out << TQString("\"output_path\" => \"%1\",\n").arg(stats.output_path.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$")); - out << TQString("\"stopped_by_error\" => \"%1\",\n").arg(stats.stopped_by_error); - out << TQString("\"completed\" => \"%1\",\n").arg(stats.completed); - out << TQString("\"user_controlled\" => \"%1\",\n").arg(stats.user_controlled); - out << TQString("\"max_share_ratio\" => %1,\n").arg(stats.max_share_ratio); - out << TQString("\"priv_torrent\" => \"%1\",\n").arg(stats.priv_torrent); - out << TQString("\"num_files\" => \"%1\",\n").arg((*i)->getNumFiles()); + out << TQString("\"imported_bytes\" => %1,\n").tqarg(stats.imported_bytes); + out << TQString("\"bytes_downloaded\" => \"%1\",\n").tqarg(BytesToString2(stats.bytes_downloaded)); + out << TQString("\"bytes_uploaded\" => \"%1\",\n").tqarg(BytesToString2(stats.bytes_uploaded)); + out << TQString("\"bytes_left\" => %1,\n").tqarg(stats.bytes_left); + out << TQString("\"bytes_left_to_download\" => %1,\n").tqarg(stats.bytes_left_to_download); + out << TQString("\"total_bytes\" => \"%1\",\n").tqarg(BytesToString2(stats.total_bytes)); + out << TQString("\"total_bytes_to_download\" => %1,\n").tqarg(stats.total_bytes_to_download); + out << TQString("\"download_rate\" => \"%1\",\n").tqarg(KBytesPerSecToString2(stats.download_rate / 1024.0)); + out << TQString("\"upload_rate\" => \"%1\",\n").tqarg(KBytesPerSecToString2(stats.upload_rate / 1024.0)); + out << TQString("\"num_peers\" => %1,\n").tqarg(stats.num_peers); + out << TQString("\"num_chunks_downloading\" => %1,\n").tqarg(stats.num_chunks_downloading); + out << TQString("\"total_chunks\" => %1,\n").tqarg(stats.total_chunks); + out << TQString("\"num_chunks_downloaded\" => %1,\n").tqarg(stats.num_chunks_downloaded); + out << TQString("\"num_chunks_excluded\" => %1,\n").tqarg(stats.num_chunks_excluded); + out << TQString("\"chunk_size\" => %1,\n").tqarg(stats.chunk_size); + out << TQString("\"seeders_total\" => %1,\n").tqarg(stats.seeders_total); + out << TQString("\"seeders_connected_to\" => %1,\n").tqarg(stats.seeders_connected_to); + out << TQString("\"leechers_total\" => %1,\n").tqarg(stats.leechers_total); + 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.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.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); + out << TQString("\"max_share_ratio\" => %1,\n").tqarg(stats.max_share_ratio); + out << TQString("\"priv_torrent\" => \"%1\",\n").tqarg(stats.priv_torrent); + out << TQString("\"num_files\" => \"%1\",\n").tqarg((*i)->getNumFiles()); out << TQString("\"files\" => array("); out << flush; if (stats.multi_file_torrent) @@ -138,11 +138,11 @@ namespace kt out << ",\n"; TorrentFileInterface & file = (*i)->getTorrentFile(j); - out << TQString("\"%1\" => array(\n").arg(j); - out << TQString("\"name\" => \"%1\",\n").arg(file.getPath()); - out << TQString("\"size\" => \"%1\",\n").arg(KIO::convertSize(file.getSize())); - out << TQString("\"perc_done\" => \"%1\",\n").arg(file.getDownloadPercentage()); - out << TQString("\"status\" => \"%1\"\n").arg(file.getPriority()); + out << TQString("\"%1\" => array(\n").tqarg(j); + out << TQString("\"name\" => \"%1\",\n").tqarg(file.getPath()); + out << TQString("\"size\" => \"%1\",\n").tqarg(KIO::convertSize(file.getSize())); + out << TQString("\"perc_done\" => \"%1\",\n").tqarg(file.getDownloadPercentage()); + out << TQString("\"status\" => \"%1\"\n").tqarg(file.getPriority()); out << TQString(")\n"); out << flush; } @@ -156,7 +156,7 @@ namespace kt } /*Generate php code - * function globalStatus() + * function globaltqStatus() * { * return array( ... ); * } @@ -166,16 +166,16 @@ namespace kt out << "function globalInfo()\n{\nreturn array("; CurrentStats stats=core->getStats(); - out << TQString("\"download_speed\" => \"%1\",").arg(KBytesPerSecToString2(stats.download_speed / 1024.0)); - out << TQString("\"upload_speed\" => \"%1\",").arg(KBytesPerSecToString2(stats.upload_speed / 1024.0)); - out << TQString("\"bytes_downloaded\" => \"%1\",").arg(stats.bytes_downloaded); - out << TQString("\"bytes_uploaded\" => \"%1\",").arg(stats.bytes_uploaded); - out << TQString("\"max_download_speed\" => \"%1\",").arg(core->getMaxDownloadSpeed()); - out << TQString("\"max_upload_speed\" => \"%1\",").arg(core->getMaxUploadSpeed()); - out << TQString("\"max_downloads\" => \"%1\",").arg(Settings::maxDownloads()); - out << TQString("\"max_seeds\"=> \"%1\",").arg(Settings::maxSeeds()); - out << TQString("\"dht_support\" => \"%1\",").arg(Settings::dhtSupport()); - out << TQString("\"use_encryption\" => \"%1\"").arg(Settings::useEncryption()); + out << TQString("\"download_speed\" => \"%1\",").tqarg(KBytesPerSecToString2(stats.download_speed / 1024.0)); + out << TQString("\"upload_speed\" => \"%1\",").tqarg(KBytesPerSecToString2(stats.upload_speed / 1024.0)); + out << TQString("\"bytes_downloaded\" => \"%1\",").tqarg(stats.bytes_downloaded); + out << TQString("\"bytes_uploaded\" => \"%1\",").tqarg(stats.bytes_uploaded); + out << TQString("\"max_download_speed\" => \"%1\",").tqarg(core->getMaxDownloadSpeed()); + out << TQString("\"max_upload_speed\" => \"%1\",").tqarg(core->getMaxUploadSpeed()); + out << TQString("\"max_downloads\" => \"%1\",").tqarg(Settings::maxDownloads()); + out << TQString("\"max_seeds\"=> \"%1\",").tqarg(Settings::maxSeeds()); + out << TQString("\"dht_support\" => \"%1\",").tqarg(Settings::dhtSupport()); + out << TQString("\"use_encryption\" => \"%1\"").tqarg(Settings::useEncryption()); out << ");\n}\n"; } diff --git a/plugins/webinterface/php_interface.h b/plugins/webinterface/php_interface.h index acfd8c7..4995ae6 100644 --- a/plugins/webinterface/php_interface.h +++ b/plugins/webinterface/php_interface.h @@ -40,7 +40,7 @@ namespace kt PhpCodeGenerator(CoreInterface *c); virtual ~PhpCodeGenerator(){} - void downloadStatus(TQTextStream & out); + void downloadtqStatus(TQTextStream & out); void globalInfo(TQTextStream & out); private: CoreInterface *core; diff --git a/plugins/webinterface/webinterfacepref.ui b/plugins/webinterface/webinterfacepref.ui index 4927673..dca1d84 100644 --- a/plugins/webinterface/webinterfacepref.ui +++ b/plugins/webinterface/webinterfacepref.ui @@ -20,7 +20,7 @@ 0 - + 500 350 @@ -46,7 +46,7 @@ - layout5 + tqlayout5 @@ -92,7 +92,7 @@ Expanding - + 54 21 @@ -128,7 +128,7 @@ - layout4 + tqlayout4 @@ -151,7 +151,7 @@ - layout6 + tqlayout6 @@ -159,7 +159,7 @@ - layout5 + tqlayout5 @@ -192,7 +192,7 @@ - layout7 + tqlayout7 diff --git a/plugins/webinterface/webinterfaceprefwidget.cpp b/plugins/webinterface/webinterfaceprefwidget.cpp index 48ab0c7..6f4baed 100644 --- a/plugins/webinterface/webinterfaceprefwidget.cpp +++ b/plugins/webinterface/webinterfaceprefwidget.cpp @@ -113,23 +113,23 @@ void WebInterfacePrefWidget::changeLedState() { TQFileInfo fi(phpExecutablePath->url()); if(fi.isExecutable() && (fi.isFile() || fi.isSymLink())){ - TQToolTip::add( kled, i18n("%1 exists and it is executable").arg(phpExecutablePath->url())); + TQToolTip::add( kled, i18n("%1 exists and it is executable").tqarg(phpExecutablePath->url())); kled->setColor(green); } else if (!fi.exists()){ - TQToolTip::add( kled, i18n("%1 does not exist").arg(phpExecutablePath->url()) ); + TQToolTip::add( kled, i18n("%1 does not exist").tqarg(phpExecutablePath->url()) ); kled->setColor(red); } else if (!fi.isExecutable()){ - TQToolTip::add( kled, i18n("%1 is not executable").arg(phpExecutablePath->url()) ); + TQToolTip::add( kled, i18n("%1 is not executable").tqarg(phpExecutablePath->url()) ); kled->setColor(red); } else if (fi.isDir()){ - TQToolTip::add( kled, i18n("%1 is a directory").arg(phpExecutablePath->url()) ); + TQToolTip::add( kled, i18n("%1 is a directory").tqarg(phpExecutablePath->url()) ); kled->setColor(red); } else{ - TQToolTip::add( kled, i18n("%1 is not php executable path").arg(phpExecutablePath->url()) ); + TQToolTip::add( kled, i18n("%1 is not php executable path").tqarg(phpExecutablePath->url()) ); kled->setColor(red); } } diff --git a/plugins/webinterface/www/default/details.php b/plugins/webinterface/www/default/details.php index a19d57e..92c8d48 100644 --- a/plugins/webinterface/www/default/details.php +++ b/plugins/webinterface/www/default/details.php @@ -1,5 +1,5 @@ Actions File - Status + tqStatus Size Complete diff --git a/plugins/webinterface/www/default/interface.php b/plugins/webinterface/www/default/interface.php index 6432798..f34e651 100644 --- a/plugins/webinterface/www/default/interface.php +++ b/plugins/webinterface/www/default/interface.php @@ -1,6 +1,6 @@ 'Checking Data' ); if (array_key_exists($status_id, $table)) return $table[$status_id]; - else return 'Not supported Status'; + else return 'Not supported tqStatus'; } function generate_button_code($img, $alt, $href='') @@ -104,7 +104,7 @@ function generate_button_code($img, $alt, $href='') Actions File - Status + tqStatus Downloaded Size Uploaded diff --git a/plugins/webinterface/www/default/wz_tooltip.js b/plugins/webinterface/www/default/wz_tooltip.js index 1329a1b..0405498 100644 --- a/plugins/webinterface/www/default/wz_tooltip.js +++ b/plugins/webinterface/www/default/wz_tooltip.js @@ -300,7 +300,7 @@ function tt_DeAlt(t_tag) { if(t_tag.alt) t_tag.alt = ""; if(t_tag.title) t_tag.title = ""; - var t_c = t_tag.children || t_tag.childNodes || null; + var t_c = t_tag.tqchildren || t_tag.childNodes || null; if(t_c) { for(var t_i = t_c.length; t_i; ) diff --git a/plugins/webinterface/www/mobile/interface.php b/plugins/webinterface/www/mobile/interface.php index 57582de..3f5e88b 100644 --- a/plugins/webinterface/www/mobile/interface.php +++ b/plugins/webinterface/www/mobile/interface.php @@ -18,7 +18,7 @@ "; diff --git a/plugins/webinterface/www/mobile/torrent.php b/plugins/webinterface/www/mobile/torrent.php index a1e451d..b041d3f 100644 --- a/plugins/webinterface/www/mobile/torrent.php +++ b/plugins/webinterface/www/mobile/torrent.php @@ -8,7 +8,7 @@ ktorrent->transfers->{$t['torrent_name']}"; echo ""; diff --git a/plugins/zeroconf/avahiservice.cpp b/plugins/zeroconf/avahiservice.cpp index aebaa00..a77d9ff 100644 --- a/plugins/zeroconf/avahiservice.cpp +++ b/plugins/zeroconf/avahiservice.cpp @@ -66,7 +66,7 @@ namespace kt } } - const char* name = avahi_strdup(TQString("%1__%2%3").arg(service->id).arg((rand() % 26) + 65).arg((rand() % 26) + 65).ascii()); + const char* name = avahi_strdup(TQString("%1__%2%3").tqarg(service->id).tqarg((rand() % 26) + 65).tqarg((rand() % 26) + 65).ascii()); const char* type = avahi_strdup("_bittorrent._tcp"); const char* subtype = avahi_strdup(TQString("_" + service->infoHash + "._sub._bittorrent._tcp").ascii()); @@ -75,7 +75,7 @@ namespace kt (AvahiPublishFlags)0, name, type, NULL, NULL, service->port, NULL)) { if (avahi_client_errno(c) != -8) - Out(SYS_ZCO|LOG_DEBUG) << TQString("ZC: Failed to add the service (%i).").arg(avahi_client_errno(c)) << endl; + Out(SYS_ZCO|LOG_DEBUG) << TQString("ZC: Failed to add the service (%i).").tqarg(avahi_client_errno(c)) << endl; else publish_service(service, c); return; @@ -85,7 +85,7 @@ namespace kt service->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, (AvahiPublishFlags)0, name, type, NULL, subtype)) { - Out(SYS_ZCO|LOG_DEBUG) << TQString("ZC: Failed to add the service subtype (%i).").arg( avahi_client_errno(c)) << endl; + Out(SYS_ZCO|LOG_DEBUG) << TQString("ZC: Failed to add the service subtype (%i).").tqarg( avahi_client_errno(c)) << endl; return; } diff --git a/utests/biginttest.cpp b/utests/biginttest.cpp index 514663e..36a896a 100644 --- a/utests/biginttest.cpp +++ b/utests/biginttest.cpp @@ -43,7 +43,7 @@ namespace utest b.toBuffer(buf,10); for (Uint32 i = 0;i < 10;i++) { - Out() << TQString("0x%1 ").arg(buf[i],0,16); + Out() << TQString("0x%1 ").tqarg(buf[i],0,16); } Out() << endl; } @@ -67,7 +67,7 @@ namespace utest a.toBuffer(foobar,5); for (Uint32 i = 0;i < 5;i++) { - Out() << TQString("0x%1 ").arg(foobar[i],0,16); + Out() << TQString("0x%1 ").tqarg(foobar[i],0,16); } Out() << endl; Out() << "Third test" << endl; -- cgit v1.2.1
refresh