diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 20:34:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 20:34:15 +0000 |
commit | 1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch) | |
tree | 38559cd68cd4f63023fb5f6375def9db3b8b491e /libktorrent/datachecker | |
parent | 894f94545727610df22c4f73911d62d58266f695 (diff) | |
download | ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.tar.gz ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.zip |
TQt4 port ktorrent
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1238733 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libktorrent/datachecker')
-rw-r--r-- | libktorrent/datachecker/datachecker.h | 4 | ||||
-rw-r--r-- | libktorrent/datachecker/datacheckerthread.cpp | 4 | ||||
-rw-r--r-- | libktorrent/datachecker/datacheckerthread.h | 14 | ||||
-rw-r--r-- | libktorrent/datachecker/multidatachecker.cpp | 14 | ||||
-rw-r--r-- | libktorrent/datachecker/multidatachecker.h | 6 | ||||
-rw-r--r-- | libktorrent/datachecker/singledatachecker.cpp | 4 | ||||
-rw-r--r-- | libktorrent/datachecker/singledatachecker.h | 2 |
7 files changed, 24 insertions, 24 deletions
diff --git a/libktorrent/datachecker/datachecker.h b/libktorrent/datachecker/datachecker.h index e181925..e038152 100644 --- a/libktorrent/datachecker/datachecker.h +++ b/libktorrent/datachecker/datachecker.h @@ -23,7 +23,7 @@ #include <util/bitset.h> #include "datacheckerlistener.h" -class QString; +class TQString; namespace bt @@ -54,7 +54,7 @@ namespace bt * @param tor The torrent * @param dnddir DND dir, optional argument if we know this */ - virtual void check(const QString & path,const Torrent & tor,const QString & dnddir) = 0; + virtual void check(const TQString & path,const Torrent & tor,const TQString & dnddir) = 0; /** * Get the BitSet representing all the downloaded chunks. diff --git a/libktorrent/datachecker/datacheckerthread.cpp b/libktorrent/datachecker/datacheckerthread.cpp index 12a58d7..fcbdf3d 100644 --- a/libktorrent/datachecker/datacheckerthread.cpp +++ b/libktorrent/datachecker/datacheckerthread.cpp @@ -27,9 +27,9 @@ namespace bt { DataCheckerThread::DataCheckerThread(DataChecker* dc, - const QString & path, + const TQString & path, const Torrent & tor, - const QString & dnddir) + const TQString & dnddir) : dc(dc),path(path),tor(tor),dnddir(dnddir) { running = true; diff --git a/libktorrent/datachecker/datacheckerthread.h b/libktorrent/datachecker/datacheckerthread.h index 749e3e8..207b245 100644 --- a/libktorrent/datachecker/datacheckerthread.h +++ b/libktorrent/datachecker/datacheckerthread.h @@ -20,7 +20,7 @@ #ifndef BTDATACHECKERTHREAD_H #define BTDATACHECKERTHREAD_H -#include <qthread.h> +#include <tqthread.h> namespace bt { @@ -32,16 +32,16 @@ namespace bt Thread which runs the data check. */ - class DataCheckerThread : public QThread + class DataCheckerThread : public TQThread { DataChecker* dc; - QString path; + TQString path; const Torrent & tor; - QString dnddir; + TQString dnddir; bool running; - QString error; + TQString error; public: - DataCheckerThread(DataChecker* dc,const QString & path,const Torrent & tor,const QString & dnddir); + DataCheckerThread(DataChecker* dc,const TQString & path,const Torrent & tor,const TQString & dnddir); virtual ~DataCheckerThread(); virtual void run(); @@ -53,7 +53,7 @@ namespace bt bool isRunning() const {return running;} /// Get the error (if any occured) - QString getError() const {return error;} + TQString getError() const {return error;} }; } diff --git a/libktorrent/datachecker/multidatachecker.cpp b/libktorrent/datachecker/multidatachecker.cpp index 3c26721..526fd08 100644 --- a/libktorrent/datachecker/multidatachecker.cpp +++ b/libktorrent/datachecker/multidatachecker.cpp @@ -45,7 +45,7 @@ namespace bt delete [] buf; } - void MultiDataChecker::check(const QString& path, const Torrent& tor,const QString & dnddir) + void MultiDataChecker::check(const TQString& path, const Torrent& tor,const TQString & dnddir) { Uint32 num_chunks = tor.getNumChunks(); // initialize the bitsets @@ -104,13 +104,13 @@ namespace bt const TorrentFile & tf, const Torrent & tor, Uint8* buf, - const QString & cache) + const TQString & cache) { File fptr; if (!fptr.open(cache + tf.getPath(), "rb")) { - Out() << QString("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; } @@ -121,7 +121,7 @@ namespace bt bool MultiDataChecker::loadChunk(Uint32 ci,Uint32 cs,const Torrent & tor) { - QValueList<Uint32> tflist; + TQValueList<Uint32> tflist; tor.calcChunkPos(ci,tflist); // one file is simple @@ -183,8 +183,8 @@ namespace bt File fptr; if (!fptr.open(cache + f.getPath(), "rb")) { - Out() << QString("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/multidatachecker.h b/libktorrent/datachecker/multidatachecker.h index d095e99..bb68a06 100644 --- a/libktorrent/datachecker/multidatachecker.h +++ b/libktorrent/datachecker/multidatachecker.h @@ -34,13 +34,13 @@ namespace bt MultiDataChecker(); virtual ~MultiDataChecker(); - virtual void check(const QString& path, const Torrent& tor,const QString & dnddir); + virtual void check(const TQString& path, const Torrent& tor,const TQString & dnddir); private: bool loadChunk(Uint32 ci,Uint32 cs,const Torrent & to); private: - QString cache; - QString dnd_dir; + TQString cache; + TQString dnd_dir; Uint8* buf; }; diff --git a/libktorrent/datachecker/singledatachecker.cpp b/libktorrent/datachecker/singledatachecker.cpp index 0579338..e086e90 100644 --- a/libktorrent/datachecker/singledatachecker.cpp +++ b/libktorrent/datachecker/singledatachecker.cpp @@ -39,7 +39,7 @@ namespace bt {} - void SingleDataChecker::check(const QString& path, const Torrent& tor,const QString &) + void SingleDataChecker::check(const TQString& path, const Torrent& tor,const TQString &) { // open the file Uint32 num_chunks = tor.getNumChunks(); @@ -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/datachecker/singledatachecker.h b/libktorrent/datachecker/singledatachecker.h index 20107b3..3b86829 100644 --- a/libktorrent/datachecker/singledatachecker.h +++ b/libktorrent/datachecker/singledatachecker.h @@ -36,7 +36,7 @@ namespace bt SingleDataChecker(); virtual ~SingleDataChecker(); - virtual void check(const QString& path, const Torrent& tor,const QString & dnddir); + virtual void check(const TQString& path, const Torrent& tor,const TQString & dnddir); }; } |