summaryrefslogtreecommitdiffstats
path: root/libktorrent/migrate/cachemigrate.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
commit1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch)
tree38559cd68cd4f63023fb5f6375def9db3b8b491e /libktorrent/migrate/cachemigrate.cpp
parent894f94545727610df22c4f73911d62d58266f695 (diff)
downloadktorrent-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/migrate/cachemigrate.cpp')
-rw-r--r--libktorrent/migrate/cachemigrate.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/libktorrent/migrate/cachemigrate.cpp b/libktorrent/migrate/cachemigrate.cpp
index f9b203c..9006e2a 100644
--- a/libktorrent/migrate/cachemigrate.cpp
+++ b/libktorrent/migrate/cachemigrate.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qstringlist.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqfileinfo.h>
#include <util/log.h>
#include <util/fileops.h>
#include <util/functions.h>
@@ -30,21 +30,21 @@
namespace bt
{
- bool IsCacheMigrateNeeded(const Torrent & tor,const QString & cache)
+ bool IsCacheMigrateNeeded(const Torrent & tor,const TQString & cache)
{
// mutli files always need to be migrated
if (tor.isMultiFile())
return true;
// a single file and a symlink do not need to be migrated
- QFileInfo finfo(cache);
+ TQFileInfo finfo(cache);
if (finfo.isSymLink())
return false;
return true;
}
- static void MigrateSingleCache(const Torrent & tor,const QString & cache,const QString & output_dir)
+ static void MigrateSingleCache(const Torrent & tor,const TQString & cache,const TQString & output_dir)
{
Out() << "Migrating single cache " << cache << " to " << output_dir << endl;
@@ -52,12 +52,12 @@ namespace bt
bt::SymLink(output_dir + tor.getNameSuggestion(),cache);
}
- static void MakePath(const QString & startdir,const QString & path)
+ static void MakePath(const TQString & startdir,const TQString & path)
{
- QStringList sl = QStringList::split(bt::DirSeparator(),path);
+ TQStringList sl = TQStringList::split(bt::DirSeparator(),path);
// create all necessary subdirs
- QString ctmp = startdir;
+ TQString ctmp = startdir;
for (Uint32 i = 0;i < sl.count() - 1;i++)
{
@@ -71,22 +71,22 @@ namespace bt
}
}
- static void MigrateMultiCache(const Torrent & tor,const QString & cache,const QString & output_dir)
+ static void MigrateMultiCache(const Torrent & tor,const TQString & cache,const TQString & output_dir)
{
Out() << "Migrating multi cache " << cache << " to " << output_dir << endl;
// if the cache dir is a symlink, everything is OK
- if (QFileInfo(cache).isSymLink())
+ if (TQFileInfo(cache).isSymLink())
return;
- QString cache_dir = cache;
+ TQString cache_dir = cache;
// make the output dir if it does not exists
if (!bt::Exists(output_dir + tor.getNameSuggestion()))
bt::MakeDir(output_dir + tor.getNameSuggestion());
- QString odir = output_dir + tor.getNameSuggestion() + bt::DirSeparator();
- QString cdir = cache;
+ TQString odir = output_dir + tor.getNameSuggestion() + bt::DirSeparator();
+ TQString cdir = cache;
if (!cdir.endsWith(bt::DirSeparator()))
cdir += bt::DirSeparator();
@@ -94,7 +94,7 @@ namespace bt
for (Uint32 i = 0;i < tor.getNumFiles();i++)
{
const TorrentFile & tf = tor.getFile(i);
- QFileInfo fi(cdir + tf.getPath());
+ TQFileInfo fi(cdir + tf.getPath());
// symlinks are OK
if (fi.isSymLink())
continue;
@@ -106,9 +106,9 @@ namespace bt
}
}
- void MigrateCache(const Torrent & tor,const QString & cache,const QString & output_dir)
+ void MigrateCache(const Torrent & tor,const TQString & cache,const TQString & output_dir)
{
- QString odir = output_dir;
+ TQString odir = output_dir;
if (!odir.endsWith(bt::DirSeparator()))
odir += bt::DirSeparator();