summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/torrent/bstring.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kfile-plugins/torrent/bstring.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-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/bstring.cpp')
-rw-r--r--kfile-plugins/torrent/bstring.cpp22
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;