From 1c1403293485f35fd53db45aaa77a01cdd9627e7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 20:34:15 +0000 Subject: 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 --- libktorrent/torrent/chunkmanager.h | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'libktorrent/torrent/chunkmanager.h') diff --git a/libktorrent/torrent/chunkmanager.h b/libktorrent/torrent/chunkmanager.h index daa2300..2ff2ca7 100644 --- a/libktorrent/torrent/chunkmanager.h +++ b/libktorrent/torrent/chunkmanager.h @@ -20,15 +20,15 @@ #ifndef BTCHUNKMANAGER_H #define BTCHUNKMANAGER_H -#include -#include -#include -#include +#include +#include +#include +#include #include #include "chunk.h" #include "globals.h" -class QStringList; +class TQStringList; namespace KIO { @@ -58,15 +58,16 @@ namespace bt * The chunks are stored in the cache file in the correct order. Eliminating * the need for a file reconstruction algorithm for single files. */ - class ChunkManager : public QObject + class ChunkManager : public TQObject { Q_OBJECT + TQ_OBJECT Torrent & tor; - QString index_file,file_info_file,file_priority_file; - QPtrVector chunks; + TQString index_file,file_info_file,file_priority_file; + TQPtrVector chunks; Cache* cache; - QMap loaded; // loaded chunks and when they were loaded + TQMap loaded; // loaded chunks and when they were loaded BitSet bitset; BitSet excluded_chunks; BitSet only_seed_chunks; @@ -78,8 +79,8 @@ namespace bt bool during_load; public: ChunkManager(Torrent & tor, - const QString & tmpdir, - const QString & datadir, + const TQString & tmpdir, + const TQString & datadir, bool custom_output_name); virtual ~ChunkManager(); @@ -87,12 +88,12 @@ namespace bt const Torrent & getTorrent() const {return tor;} /// Get the data dir - QString getDataDir() const; + TQString getDataDir() const; /// Get the actual output path - QString getOutputPath() const; + TQString getOutputPath() const; - void changeOutputPath(const QString& output_path); + void changeOutputPath(const TQString& output_path); /// Remove obsolete chunks void checkMemoryUsage(); @@ -101,14 +102,14 @@ namespace bt * Change the data dir. * @param data_dir */ - void changeDataDir(const QString & data_dir); + void changeDataDir(const TQString & data_dir); /** * Move the data files of the torrent. * @param ndir The new directory * @return The job doing the move */ - KIO::Job* moveDataFiles(const QString & ndir); + KIO::Job* moveDataFiles(const TQString & ndir); /** * The move data files job has finished @@ -133,7 +134,7 @@ namespace bt * Test all files and see if they are not missing. * If so put them in a list */ - bool hasMissingFiles(QStringList & sl); + bool hasMissingFiles(TQStringList & sl); /** * Preallocate diskspace for all files @@ -357,7 +358,8 @@ namespace bt private slots: void downloadStatusChanged(TorrentFile* tf,bool download); void downloadPriorityChanged(TorrentFile* tf,Priority newpriority,Priority oldpriority); - + + private: static Uint32 max_chunk_size_for_data_check; }; -- cgit v1.2.1