summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/torrent
diff options
context:
space:
mode:
Diffstat (limited to 'kfile-plugins/torrent')
-rw-r--r--kfile-plugins/torrent/bbase.h6
-rw-r--r--kfile-plugins/torrent/bdict.cpp22
-rw-r--r--kfile-plugins/torrent/bdict.h22
-rw-r--r--kfile-plugins/torrent/bint.cpp18
-rw-r--r--kfile-plugins/torrent/bint.h10
-rw-r--r--kfile-plugins/torrent/blist.cpp6
-rw-r--r--kfile-plugins/torrent/blist.h16
-rw-r--r--kfile-plugins/torrent/bstring.cpp22
-rw-r--r--kfile-plugins/torrent/bstring.h28
-rw-r--r--kfile-plugins/torrent/bytetape.cpp2
-rw-r--r--kfile-plugins/torrent/bytetape.h14
-rw-r--r--kfile-plugins/torrent/kfile_torrent.cpp72
-rw-r--r--kfile-plugins/torrent/kfile_torrent.h2
13 files changed, 120 insertions, 120 deletions
diff --git a/kfile-plugins/torrent/bbase.h b/kfile-plugins/torrent/bbase.h
index 046bd545..36eccd39 100644
--- a/kfile-plugins/torrent/bbase.h
+++ b/kfile-plugins/torrent/bbase.h
@@ -79,11 +79,11 @@ class BBase : public KShared
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device) = 0;
+ virtual bool writeToDevice (TQIODevice &device) = 0;
};
#endif /* _BBASE_H */
diff --git a/kfile-plugins/torrent/bdict.cpp b/kfile-plugins/torrent/bdict.cpp
index 2dd7457e..4819165c 100644
--- a/kfile-plugins/torrent/bdict.cpp
+++ b/kfile-plugins/torrent/bdict.cpp
@@ -16,8 +16,8 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
-#include <qiodevice.h>
+#include <tqstringlist.h>
+#include <tqiodevice.h>
#include <kdebug.h>
@@ -27,7 +27,7 @@
#include "bint.h"
#include "blist.h"
-BDict::BDict (QByteArray &dict, int start)
+BDict::BDict (TQByteArray &dict, int start)
: m_map(), m_valid(false)
{
ByteTape tape(dict, start);
@@ -108,7 +108,7 @@ void BDict::init (ByteTape &tape)
BDict::~BDict ()
{
- // QDict will take care of deleting each entry that
+ // TQDict will take care of deleting each entry that
// it holds.
}
@@ -152,7 +152,7 @@ BString *BDict::findStr (const char *key)
return 0;
}
-bool BDict::writeToDevice(QIODevice &device)
+bool BDict::writeToDevice(TQIODevice &device)
{
if (!isValid())
return false;
@@ -172,25 +172,25 @@ bool BDict::writeToDevice(QIODevice &device)
}
// Strings are supposed to be written in the dictionary such that
- // the keys are in sorted order. QDictIterator doesn't support an
+ // the keys are in sorted order. TQDictIterator doesn't support an
// ordering, so we have to get a list of all the keys, sort it, and
// then go by the list.
BBaseHashIterator iter (m_map);
- QStringList key_list;
+ TQStringList key_list;
for ( ; iter.current(); ++iter)
key_list.append(iter.currentKey());
key_list.sort();
- QStringList::Iterator key_iter;
+ TQStringList::Iterator key_iter;
for (key_iter = key_list.begin(); key_iter != key_list.end(); ++key_iter)
{
- QCString utfString = (*key_iter).utf8();
- QString str = QString("%1:").arg(utfString.size() - 1);
+ TQCString utfString = (*key_iter).utf8();
+ TQString str = TQString("%1:").arg(utfString.size() - 1);
- QCString lenString = str.utf8();
+ TQCString lenString = str.utf8();
// Write out length of key
device.writeBlock(lenString.data(), lenString.size() - 1);
diff --git a/kfile-plugins/torrent/bdict.h b/kfile-plugins/torrent/bdict.h
index 4722b9ec..77516c7f 100644
--- a/kfile-plugins/torrent/bdict.h
+++ b/kfile-plugins/torrent/bdict.h
@@ -19,14 +19,14 @@
#ifndef _BDICT_H
#define _BDICT_H
-#include <qdict.h>
-#include <qcstring.h> // QByteArray
+#include <tqdict.h>
+#include <tqcstring.h> // QByteArray
#include "bytetape.h"
#include "bbase.h"
// Some useful typedefs
-typedef QDict<BBase> BBaseHash;
-typedef QDictIterator<BBase> BBaseHashIterator;
+typedef TQDict<BBase> BBaseHash;
+typedef TQDictIterator<BBase> BBaseHashIterator;
// Forward declarations
class BInt;
@@ -53,7 +53,7 @@ class BDict : public BBase
* @param dict the buffer containing the b-encoded dictionary
* @param start the position of the data within the buffer
*/
- BDict (QByteArray &dict, int start = 0);
+ BDict (TQByteArray &dict, int start = 0);
/**
* Construct a dictionary from a ByteTape. The data and current
@@ -166,17 +166,17 @@ class BDict : public BBase
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device);
+ virtual bool writeToDevice (TQIODevice &device);
/**
- * Returns a QDictIterator<BBase> that you can use to iterate through
+ * Returns a TQDictIterator<BBase> that you can use to iterate through
* the items in the dictionary.
*
- * @return QDictIterator<BBase>, which can be used to iterate through
+ * @return TQDictIterator<BBase>, which can be used to iterate through
* the items in the dictionary.
*/
BBaseHashIterator iterator() const
@@ -194,7 +194,7 @@ class BDict : public BBase
*/
void init (ByteTape &tape);
- BBaseHash m_map; /// The QDict that actually store the data
+ BBaseHash m_map; /// The TQDict that actually store the data
bool m_valid; /// Store initialization status
};
diff --git a/kfile-plugins/torrent/bint.cpp b/kfile-plugins/torrent/bint.cpp
index eb96fcba..567edece 100644
--- a/kfile-plugins/torrent/bint.cpp
+++ b/kfile-plugins/torrent/bint.cpp
@@ -16,16 +16,16 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qcstring.h>
-#include <qiodevice.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqiodevice.h>
#include "bytetape.h"
#include "bint.h"
// A bencoded int is (approximately) as follows:
// i(\d)+e
-BInt::BInt (QByteArray &dict, int start)
+BInt::BInt (TQByteArray &dict, int start)
: m_value (0), m_valid(false)
{
ByteTape tape (dict, start);
@@ -45,7 +45,7 @@ void BInt::init (ByteTape &tape)
tape ++; // Move to start of digits
- QByteArray &dict (tape.data());
+ TQByteArray &dict (tape.data());
if (dict.find('e', tape.pos()) == -1)
return;
@@ -56,12 +56,12 @@ void BInt::init (ByteTape &tape)
ptr += tape.pos(); // Advance to current position in tape
// Allocate temporary data buffer
- QByteArray buffer(length + 1);
+ TQByteArray buffer(length + 1);
qmemmove (buffer.data(), ptr, length);
buffer[length] = 0; // Null-terminate
- QString numberString (buffer);
+ TQString numberString (buffer);
bool a_isValid; // We want to make sure the string is a valid number
m_value = numberString.toLongLong(&a_isValid);
@@ -77,13 +77,13 @@ BInt::~BInt()
/* Nothing yet */
}
-bool BInt::writeToDevice (QIODevice &device)
+bool BInt::writeToDevice (TQIODevice &device)
{
if (!m_valid)
return false;
/* Write out i234e, and such */
- QString str = QString("i%1e").
+ TQString str = TQString("i%1e").
arg (m_value);
Q_LONG written = 0, result = 0;
diff --git a/kfile-plugins/torrent/bint.h b/kfile-plugins/torrent/bint.h
index 02875bad..7e1fc582 100644
--- a/kfile-plugins/torrent/bint.h
+++ b/kfile-plugins/torrent/bint.h
@@ -19,7 +19,7 @@
#ifndef _BINT_H
#define _BINT_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include "bbase.h"
#include "bytetape.h"
@@ -42,7 +42,7 @@ class BInt : public BBase
* @param start the position within the buffer of the beginning
* of the b-encoded integer.
*/
- BInt (QByteArray &dict, int start = 0);
+ BInt (TQByteArray &dict, int start = 0);
/**
* Constructs a BInt by reading a b-encoded integer from @p tape.
@@ -86,11 +86,11 @@ class BInt : public BBase
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device);
+ virtual bool writeToDevice (TQIODevice &device);
private:
diff --git a/kfile-plugins/torrent/blist.cpp b/kfile-plugins/torrent/blist.cpp
index d9d10021..8b11fbc6 100644
--- a/kfile-plugins/torrent/blist.cpp
+++ b/kfile-plugins/torrent/blist.cpp
@@ -16,7 +16,7 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qiodevice.h>
+#include <tqiodevice.h>
#include "bytetape.h"
#include "blist.h"
@@ -30,7 +30,7 @@ BList::BList (ByteTape &tape)
init (tape);
}
-BList::BList (QByteArray &dict, unsigned int start)
+BList::BList (TQByteArray &dict, unsigned int start)
: m_valid(false), m_array()
{
ByteTape tape (dict, start);
@@ -136,7 +136,7 @@ BString * BList::indexStr (unsigned int i)
return 0;
}
-bool BList::writeToDevice(QIODevice &device)
+bool BList::writeToDevice(TQIODevice &device)
{
if (!m_valid)
return false;
diff --git a/kfile-plugins/torrent/blist.h b/kfile-plugins/torrent/blist.h
index a00cca87..4085ec39 100644
--- a/kfile-plugins/torrent/blist.h
+++ b/kfile-plugins/torrent/blist.h
@@ -19,13 +19,13 @@
#ifndef _BLIST_H
#define _BLIST_H
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
#include "bbase.h"
#include "bytetape.h"
-typedef QValueList<BBase *> BBaseVector;
-typedef QValueList<BBase *>::iterator BBaseVectorIterator;
+typedef TQValueList<BBase *> BBaseVector;
+typedef TQValueList<BBase *>::iterator BBaseVectorIterator;
// Predeclare the following classes
class BDict;
@@ -50,7 +50,7 @@ class BList : public BBase
* @param start the position in the buffer to start
* reading from
*/
- BList (QByteArray &dict, unsigned int start = 0);
+ BList (TQByteArray &dict, unsigned int start = 0);
/**
* Construct a BList from @p tape. Any changes made to
@@ -175,11 +175,11 @@ class BList : public BBase
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device);
+ virtual bool writeToDevice (TQIODevice &device);
private:
diff --git a/kfile-plugins/torrent/bstring.cpp b/kfile-plugins/torrent/bstring.cpp
index 30be9704..924acdbc 100644
--- a/kfile-plugins/torrent/bstring.cpp
+++ b/kfile-plugins/torrent/bstring.cpp
@@ -16,15 +16,15 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qcstring.h>
-#include <qiodevice.h>
+#include <tqcstring.h>
+#include <tqiodevice.h>
#include <kdebug.h>
#include "bstring.h"
#include "bytetape.h"
-BString::BString (QByteArray &dict, int start) :
+BString::BString (TQByteArray &dict, int start) :
m_data(), m_valid(false)
{
ByteTape tape (dict, start);
@@ -37,12 +37,12 @@ BString::BString (ByteTape &tape)
init (tape);
}
-// The reason we don't store stuff in a QString is because BitTorrent
+// The reason we don't store stuff in a TQString is because BitTorrent
// b-encoded strings may contain zeroes within the string, which makes
// a BString more of a buffer than a true string.
void BString::init (ByteTape &tape)
{
- QByteArray &dict(tape.data());
+ TQByteArray &dict(tape.data());
if (dict.find(':', tape.pos()) == -1)
{
@@ -57,11 +57,11 @@ void BString::init (ByteTape &tape)
ptr += tape.pos();
- QByteArray buffer (length + 1);
+ TQByteArray buffer (length + 1);
qmemmove (buffer.data(), ptr, length);
buffer[length] = 0;
- QString numberString (buffer);
+ TQString numberString (buffer);
bool a_isValid;
ulong len = numberString.toULong (&a_isValid);
@@ -99,15 +99,15 @@ BString::~BString ()
{
}
-bool BString::writeToDevice(QIODevice &device)
+bool BString::writeToDevice(TQIODevice &device)
{
if (!m_valid)
return false;
- QString str = QString("%1:").
+ TQString str = TQString("%1:").
arg(get_len());
- QCString utfString = str.utf8();
+ TQCString utfString = str.utf8();
/* Don't write null terminator */
device.writeBlock (utfString.data(), utfString.size() - 1);
@@ -119,7 +119,7 @@ bool BString::writeToDevice(QIODevice &device)
return true;
}
-bool BString::setValue (const QString &str)
+bool BString::setValue (const TQString &str)
{
m_data = str.utf8();
return true;
diff --git a/kfile-plugins/torrent/bstring.h b/kfile-plugins/torrent/bstring.h
index 81b1b0b0..c51311fc 100644
--- a/kfile-plugins/torrent/bstring.h
+++ b/kfile-plugins/torrent/bstring.h
@@ -19,8 +19,8 @@
#ifndef _BSTRING_H
#define _BSTRING_H
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include "bytetape.h"
#include "bbase.h"
@@ -45,7 +45,7 @@ class BString : public BBase
* @param start the position in the buffer to start
* reading from
*/
- BString (QByteArray &dict, int start = 0);
+ BString (TQByteArray &dict, int start = 0);
/**
* Construct a BString from @p tape. Any changes made to
@@ -67,14 +67,14 @@ class BString : public BBase
virtual ~BString ();
/**
- * Returns a QString representation of the data in the
+ * Returns a TQString representation of the data in the
* BString. It is the responsibility of the caller to ensure
- * that the data is convertible to a QString. More specifically,
+ * that the data is convertible to a TQString. More specifically,
* the data should not contain any embedded NULLs.
*
- * @return QString containing the data from this BString.
+ * @return TQString containing the data from this BString.
*/
- QString get_string() const { return QString::fromUtf8(m_data.data()); }
+ TQString get_string() const { return TQString::fromUtf8(m_data.data()); }
/**
* Returns the amount of data held by the string. It would be
@@ -104,20 +104,20 @@ class BString : public BBase
/**
* Outputs the b-encoded representation of the object to the given
- * QIODevice.
- * @param device the QIODevice to write to
+ * TQIODevice.
+ * @param device the TQIODevice to write to
* @return true on a successful write, false otherwise
*/
- virtual bool writeToDevice (QIODevice &device);
+ virtual bool writeToDevice (TQIODevice &device);
/**
- * Changes the value of the string to the given QString.
+ * Changes the value of the string to the given TQString.
*
- * @param str the QString containing the new value
+ * @param str the TQString containing the new value
* @return true if the value was successfully changed,
* false otherwise.
*/
- bool setValue (const QString &str);
+ bool setValue (const TQString &str);
private:
@@ -129,7 +129,7 @@ class BString : public BBase
*/
void init (ByteTape &tape);
- QByteArray m_data;
+ TQByteArray m_data;
bool m_valid;
};
diff --git a/kfile-plugins/torrent/bytetape.cpp b/kfile-plugins/torrent/bytetape.cpp
index 19c9d3d8..5d6b8099 100644
--- a/kfile-plugins/torrent/bytetape.cpp
+++ b/kfile-plugins/torrent/bytetape.cpp
@@ -21,7 +21,7 @@
#include "bytetape.h"
-ByteTape::ByteTape (QByteArray &array, int pos)
+ByteTape::ByteTape (TQByteArray &array, int pos)
: m_array(array), m_shared(new ByteTapeShared)
{
m_shared->pos = pos;
diff --git a/kfile-plugins/torrent/bytetape.h b/kfile-plugins/torrent/bytetape.h
index 55fef4b5..4c803122 100644
--- a/kfile-plugins/torrent/bytetape.h
+++ b/kfile-plugins/torrent/bytetape.h
@@ -21,7 +21,7 @@
#include <ksharedptr.h>
-#include <qcstring.h>
+#include <tqcstring.h>
class ByteTapeShared : public KShared
{
@@ -31,7 +31,7 @@ class ByteTapeShared : public KShared
};
/**
- * Class to simulate a seekable byte stream. Very similar to QByteArray,
+ * Class to simulate a seekable byte stream. Very similar to TQByteArray,
* but the difference is that this class "knows" what a current position
* is. Also, the copy constructor will share the byte stream of the
* ByteTape being copied. This means that any copies made of an object of
@@ -54,7 +54,7 @@ class ByteTape
* @param pos the initial position of the tape head. It must be
* a position within the buffer contained in @p array.
*/
- ByteTape (QByteArray &array, int pos = 0);
+ ByteTape (TQByteArray &array, int pos = 0);
/**
* Creates a ByteTape as a copy of @p tape. The newly created
@@ -177,15 +177,15 @@ class ByteTape
bool setPos(unsigned int pos);
/**
- * Returns a reference to the QByteArray used to hold all the data.
+ * Returns a reference to the TQByteArray used to hold all the data.
*
- * @return the QByteArray used to hold the data
+ * @return the TQByteArray used to hold the data
* @see QByteArray
*/
- QByteArray &data() { return m_array; }
+ TQByteArray &data() { return m_array; }
private:
- QByteArray &m_array;
+ TQByteArray &m_array;
KSharedPtr<ByteTapeShared> m_shared;
};
diff --git a/kfile-plugins/torrent/kfile_torrent.cpp b/kfile-plugins/torrent/kfile_torrent.cpp
index 2d97915e..4aca75bc 100644
--- a/kfile-plugins/torrent/kfile_torrent.cpp
+++ b/kfile-plugins/torrent/kfile_torrent.cpp
@@ -16,11 +16,11 @@
* If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
#include <kmessagebox.h>
#include <kgenericfactory.h>
@@ -34,11 +34,11 @@
typedef KGenericFactory<KTorrentPlugin> TorrentFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_torrent, TorrentFactory("kfile_torrent"))
-QStringList filesList (BList *list);
+TQStringList filesList (BList *list);
Q_ULLONG filesLength (BList *list);
-KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
- const QStringList &args)
+KTorrentPlugin::KTorrentPlugin (TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin (parent, name, args), m_failed(true), m_dict(0)
{
KFileMimeTypeInfo *info = addMimeTypeInfo ("application/x-bittorrent");
@@ -59,7 +59,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo *item = 0;
- item = addItemInfo(group, "name", i18n("Name"), QVariant::String);
+ item = addItemInfo(group, "name", i18n("Name"), TQVariant::String);
if (!item)
{
kdError() << "Error adding Name to group!\n";
@@ -68,7 +68,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
setHint (item, KFileMimeTypeInfo::Name);
setAttributes (item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "length", i18n("Torrent Length"), QVariant::ULongLong);
+ item = addItemInfo(group, "length", i18n("Torrent Length"), TQVariant::ULongLong);
if (!item)
{
kdError() << "Error adding Length to group!\n";
@@ -77,28 +77,28 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
setHint (item, KFileMimeTypeInfo::Length);
setUnit (item, KFileMimeTypeInfo::Bytes);
- item = addItemInfo(group, "announce", i18n("Tracker URL"), QVariant::String);
+ item = addItemInfo(group, "announce", i18n("Tracker URL"), TQVariant::String);
if (!item)
{
kdError() << "Error adding Announce to group!\n";
return;
}
- item = addItemInfo(group, "creation date", i18n("Date Created"), QVariant::DateTime);
+ item = addItemInfo(group, "creation date", i18n("Date Created"), TQVariant::DateTime);
if (!item)
{
kdError() << "Error adding DateCreated to group!\n";
return;
}
- item = addItemInfo(group, "NumFiles", i18n("Number of Files"), QVariant::Int);
+ item = addItemInfo(group, "NumFiles", i18n("Number of Files"), TQVariant::Int);
if (!item)
{
kdError() << "Error adding NumFiles to group!\n";
return;
}
- item = addItemInfo(group, "piece length", i18n("File Piece Length"), QVariant::Int);
+ item = addItemInfo(group, "piece length", i18n("File Piece Length"), TQVariant::Int);
if (!item)
{
kdError() << "Error adding PieceLength to group!\n";
@@ -106,7 +106,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name,
}
setUnit (item, KFileMimeTypeInfo::Bytes);
- item = addItemInfo(group, "comment", i18n("Comment"), QVariant::String);
+ item = addItemInfo(group, "comment", i18n("Comment"), TQVariant::String);
if (!item)
{
kdError() << "Error adding Comment to group!\n";
@@ -129,7 +129,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
return false;
}
- QFile file (info.path());
+ TQFile file (info.path());
if (!file.open(IO_ReadOnly))
{
kdError() << "Unable to open given file!\n";
@@ -137,7 +137,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
}
// We need to read in the entire file to parse the dictionary structure.
- QByteArray buf = file.readAll();
+ TQByteArray buf = file.readAll();
file.close();
if (!buf)
@@ -171,20 +171,20 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
BString *str = m_dict->findStr ("announce");
if (!str)
return false;
- appendItem (group, "announce", QString(str->get_string()));
+ appendItem (group, "announce", TQString(str->get_string()));
}
if (m_dict->contains("creation date"))
{
BInt *the_data = m_dict->findInt ("creation date");
- QDateTime my_date;
+ TQDateTime my_date;
if (!the_data)
return false;
unsigned int the_time = the_data->get_value();
- /* Hopefully the_time is UTC, because that's what QDateTime does. */
+ /* Hopefully the_time is UTC, because that's what TQDateTime does. */
my_date.setTime_t (the_time);
appendItem (group, "creation date", my_date);
}
@@ -229,7 +229,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
if (!str)
return false;
- QString real_str (str->get_string());
+ TQString real_str (str->get_string());
if (num_files > 1 && !real_str.endsWith("/"))
real_str.append('/');
@@ -253,18 +253,18 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int)
appendItem (group, "comment", comment->get_string());
}
else
- appendItem (group, "comment", QString());
+ appendItem (group, "comment", TQString());
return true;
}
-/* Returns a QStringList containing file names within the list. The list
+/* Returns a TQStringList containing file names within the list. The list
* should be the one contained within the info dictionary of the torrent,
* keyed by 'files'
*/
-QStringList filesList (BList *list)
+TQStringList filesList (BList *list)
{
- QStringList str_list, failList;
+ TQStringList str_list, failList;
for (unsigned int i = 0; i < list->count(); ++i)
{
@@ -283,7 +283,7 @@ QStringList filesList (BList *list)
if (!list_path)
return failList;
- QString str;
+ TQString str;
BString *temp_str;
if (list_path->count() > 0)
@@ -295,10 +295,10 @@ QStringList filesList (BList *list)
str.append (temp_str->get_string());
}
- /* Construct QString consisting of path and file name */
+ /* Construct TQString consisting of path and file name */
for (unsigned int j = 1; j < list_path->count(); ++j)
{
- str.append (QDir::separator());
+ str.append (TQDir::separator());
temp_str = list_path->indexStr (j);
if (!temp_str)
return failList;
@@ -347,17 +347,17 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const
// The m_dict is ready, all we have to do is open a file, and
// let 'er go.
- QStringList list = info.groups();
- QStringList::Iterator it = list.begin();
+ TQStringList list = info.groups();
+ TQStringList::Iterator it = list.begin();
for (; it != list.end(); ++it)
{
- QStringList list2 = info[*it].keys();
- QStringList::Iterator it2 = list2.begin();
+ TQStringList list2 = info[*it].keys();
+ TQStringList::Iterator it2 = list2.begin();
for (; it2 != list2.end(); ++it2)
{
- QString key = *it2;
+ TQString key = *it2;
if (info[*it][key].isModified())
{
@@ -380,10 +380,10 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const
if (!name_str)
return false;
- QString the_name = info[*it][key].value().toString();
+ TQString the_name = info[*it][key].value().toString();
// Remove trailing slashes
- the_name.replace (QRegExp("/*$"), "");
+ the_name.replace (TQRegExp("/*$"), "");
name_str->setValue (the_name);
}
@@ -391,7 +391,7 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const
}
}
- QFile output (info.path());
+ TQFile output (info.path());
if (!output.open(IO_WriteOnly | IO_Truncate))
return false;
diff --git a/kfile-plugins/torrent/kfile_torrent.h b/kfile-plugins/torrent/kfile_torrent.h
index 282fda23..3c7fc83a 100644
--- a/kfile-plugins/torrent/kfile_torrent.h
+++ b/kfile-plugins/torrent/kfile_torrent.h
@@ -47,7 +47,7 @@ class KTorrentPlugin : public KFilePlugin
* @param name the name of this object (not user-readable)
* @param args unused by this class
*/
- KTorrentPlugin (QObject *parent, const char *name, const QStringList &args);
+ KTorrentPlugin (TQObject *parent, const char *name, const TQStringList &args);
/**
* Destructor that closes the dictionary holding the torrent information.