diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kfile-plugins/torrent/bint.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins/torrent/bint.cpp')
-rw-r--r-- | kfile-plugins/torrent/bint.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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; |