summaryrefslogtreecommitdiffstats
path: root/libktorrent
diff options
context:
space:
mode:
Diffstat (limited to 'libktorrent')
-rw-r--r--libktorrent/datachecker/multidatachecker.cpp8
-rw-r--r--libktorrent/datachecker/singledatachecker.cpp2
-rw-r--r--libktorrent/expandablewidget.cpp6
-rw-r--r--libktorrent/interfaces/filetreediritem.cpp24
-rw-r--r--libktorrent/interfaces/filetreediritem.h2
-rw-r--r--libktorrent/interfaces/functions.cpp10
-rw-r--r--libktorrent/interfaces/torrentinterface.h6
-rw-r--r--libktorrent/kademlia/dhttrackerbackend.cpp2
-rw-r--r--libktorrent/kademlia/rpcmsg.cpp20
-rw-r--r--libktorrent/labelview.cpp22
-rw-r--r--libktorrent/labelview.h2
-rw-r--r--libktorrent/labelviewitembase.ui4
-rw-r--r--libktorrent/migrate/ccmigrate.cpp4
-rw-r--r--libktorrent/migrate/migrate.cpp2
-rw-r--r--libktorrent/mse/functions.cpp2
-rw-r--r--libktorrent/net/address.cpp8
-rw-r--r--libktorrent/net/socket.cpp16
-rw-r--r--libktorrent/pluginmanager.cpp4
-rw-r--r--libktorrent/pluginmanagerprefpage.cpp6
-rw-r--r--libktorrent/pluginmanagerwidget.ui4
-rw-r--r--libktorrent/torrent/announcelist.cpp2
-rw-r--r--libktorrent/torrent/bdecoder.cpp8
-rw-r--r--libktorrent/torrent/bencoder.cpp8
-rw-r--r--libktorrent/torrent/bnode.cpp28
-rw-r--r--libktorrent/torrent/bnode.h8
-rw-r--r--libktorrent/torrent/cachefile.cpp38
-rw-r--r--libktorrent/torrent/chunk.cpp2
-rw-r--r--libktorrent/torrent/chunk.h14
-rw-r--r--libktorrent/torrent/chunkdownload.cpp28
-rw-r--r--libktorrent/torrent/chunkdownload.h4
-rw-r--r--libktorrent/torrent/chunkmanager.cpp46
-rw-r--r--libktorrent/torrent/chunkselector.cpp2
-rw-r--r--libktorrent/torrent/dndfile.cpp6
-rw-r--r--libktorrent/torrent/downloader.cpp16
-rw-r--r--libktorrent/torrent/ipblocklist.cpp8
-rw-r--r--libktorrent/torrent/multifilecache.cpp18
-rw-r--r--libktorrent/torrent/packet.cpp20
-rw-r--r--libktorrent/torrent/packetreader.cpp10
-rw-r--r--libktorrent/torrent/packetwriter.cpp4
-rw-r--r--libktorrent/torrent/peerid.cpp36
-rw-r--r--libktorrent/torrent/peermanager.cpp16
-rw-r--r--libktorrent/torrent/peersourcemanager.cpp16
-rw-r--r--libktorrent/torrent/peersourcemanager.h2
-rw-r--r--libktorrent/torrent/peeruploader.cpp4
-rw-r--r--libktorrent/torrent/queuemanager.cpp10
-rw-r--r--libktorrent/torrent/singlefilecache.cpp14
-rw-r--r--libktorrent/torrent/statsfile.cpp2
-rw-r--r--libktorrent/torrent/torrent.cpp4
-rw-r--r--libktorrent/torrent/torrentcontrol.cpp44
-rw-r--r--libktorrent/torrent/torrentcreator.cpp10
-rw-r--r--libktorrent/torrent/udptracker.cpp8
-rw-r--r--libktorrent/torrent/udptrackersocket.cpp2
-rw-r--r--libktorrent/torrent/value.cpp2
-rw-r--r--libktorrent/util/autorotatelogjob.cpp4
-rw-r--r--libktorrent/util/file.cpp4
-rw-r--r--libktorrent/util/fileops.cpp66
-rw-r--r--libktorrent/util/log.cpp10
-rw-r--r--libktorrent/util/profiler.cpp14
-rw-r--r--libktorrent/util/profiler.h2
59 files changed, 347 insertions, 347 deletions
diff --git a/libktorrent/datachecker/multidatachecker.cpp b/libktorrent/datachecker/multidatachecker.cpp
index e98a64f..526fd08 100644
--- a/libktorrent/datachecker/multidatachecker.cpp
+++ b/libktorrent/datachecker/multidatachecker.cpp
@@ -109,8 +109,8 @@ namespace bt
File fptr;
if (!fptr.open(cache + tf.getPath(), "rb"))
{
- Out() << TQString("Warning : Cannot open %1 : %2").arg(cache +
- tf.getPath()).arg(fptr.errorString()) << endl;
+ Out() << TQString("Warning : Cannot open %1 : %2").tqarg(cache +
+ tf.getPath()).tqarg(fptr.errorString()) << endl;
return 0;
}
@@ -183,8 +183,8 @@ namespace bt
File fptr;
if (!fptr.open(cache + f.getPath(), "rb"))
{
- Out() << TQString("Warning : Cannot open %1 : %2").arg(cache +
- f.getPath()).arg(fptr.errorString()) << endl;
+ Out() << TQString("Warning : Cannot open %1 : %2").tqarg(cache +
+ f.getPath()).tqarg(fptr.errorString()) << endl;
return false;
}
else
diff --git a/libktorrent/datachecker/singledatachecker.cpp b/libktorrent/datachecker/singledatachecker.cpp
index 948537c..e086e90 100644
--- a/libktorrent/datachecker/singledatachecker.cpp
+++ b/libktorrent/datachecker/singledatachecker.cpp
@@ -48,7 +48,7 @@ namespace bt
if (!fptr.open(path,"rb"))
{
throw Error(i18n("Cannot open file : %1 : %2")
- .arg(path).arg( fptr.errorString()));
+ .tqarg(path).tqarg( fptr.errorString()));
}
// initialize the bitsets
diff --git a/libktorrent/expandablewidget.cpp b/libktorrent/expandablewidget.cpp
index 84804fe..a6ec44d 100644
--- a/libktorrent/expandablewidget.cpp
+++ b/libktorrent/expandablewidget.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <layout.h>
+#include <tqlayout.h>
#include <tqsplitter.h>
#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<TQString,FileTreeItem>::iterator i = children.begin();
- while (i != children.end())
+ bt::PtrMap<TQString,FileTreeItem>::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<TQString,FileTreeItem>::iterator i = children.begin();
- while (i != children.end())
+ bt::PtrMap<TQString,FileTreeItem>::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<TQString,FileTreeItem>::const_iterator i = children.begin();
- while (i != children.end())
+ bt::PtrMap<TQString,FileTreeItem>::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<TQString,FileTreeItem>::iterator i = children.begin();
- while (i != children.end())
+ bt::PtrMap<TQString,FileTreeItem>::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<TQString,FileTreeItem>::iterator i = children.begin();
- while (i != children.end())
+ bt::PtrMap<TQString,FileTreeItem>::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<TQString,FileTreeItem> children;
+ bt::PtrMap<TQString,FileTreeItem> tqchildren;
bt::PtrMap<TQString,FileTreeDirItem> 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 <algorithm>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include <kiconloader.h>
#include <kglobalsettings.h>
@@ -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<LabelViewItem*> 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 @@
<property name="name">
<cstring>icon_lbl</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>64</width>
<height>64</height>
@@ -35,7 +35,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<vbox>
<property name="name">
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 <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <kparts/componentfactory.h>
#include <util/log.h>
#include <util/error.h>
@@ -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("<h3>" + p->getGuiName() + "</h3>");
setDescription(
- i18n("%1<br>Status: <b>%2</b><br>Author: %3").arg(p->getDescription())
- .arg(p->isLoaded() ? i18n("Loaded") : i18n("Not loaded"))
- .arg(p->getAuthor()));
+ i18n("%1<br>Status: <b>%2</b><br>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 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<vbox>
<property name="name">
@@ -82,7 +82,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>31</height>
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 <klocale.h>
#include <tqstringlist.h>
#include <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.h>
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<DictEntry>::iterator i = children.begin();
- while (i != children.end())
+ TQValueList<DictEntry>::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<DictEntry>::iterator i = children.begin();
- while (i != children.end())
+ TQValueList<DictEntry>::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<DictEntry>::iterator i = children.begin();
- while (i != children.end())
+ TQValueList<DictEntry>::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<DictEntry>::iterator i = children.begin();
- while (i != children.end())
+ TQValueList<DictEntry>::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<DictEntry> children;
+ TQValueList<DictEntry> tqchildren;
public:
BDictNode(Uint32 off);
virtual ~BDictNode();
@@ -159,7 +159,7 @@ namespace bt
*/
class BListNode : public BNode
{
- TQPtrList<BNode> children;
+ TQPtrList<BNode> 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<Uint32>
+ class DownloadtqStatus : public std::set<Uint32>
{
public:
// typedef std::set<Uint32>::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<PeerDownloader> pdown;
- PtrMap<Uint32,DownloadStatus> dstatus;
+ PtrMap<Uint32,DownloadtqStatus> dstatus;
std::set<Uint32> 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<Uint32,TimeStamp>::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<Uint32> 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 <tqstring.h>
#include <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.h>
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 <klocale.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <util/log.h>
#include <util/error.h>
#include <util/bitset.h>
@@ -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 <textcodec.h>
+#include <tqtextcodec.h>
#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<Uint8> 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 <kprocess.h>
#include <klocale.h>
#include <tqdatetime.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <tqfile.h>
#include <tqptrlist.h>
#include <iostream>
@@ -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 <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <sys/time.h>
#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<Profile>::iterator i = children.begin();
- while (i != children.end())
+ TQPtrList<Profile>::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<Profile>::iterator i = children.begin();
- while (i != children.end())
+ TQPtrList<Profile>::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<Profile> children;
+ TQPtrList<Profile> tqchildren;
TQString name;
double min,max,avg;