diff options
Diffstat (limited to 'kfile-plugins/torrent/bstring.cpp')
-rw-r--r-- | kfile-plugins/torrent/bstring.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
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; |