diff options
author | Tom Sutcliffe <ext-thomas.1.sutcliffe@nokia.com> | 2011-03-23 16:02:22 +0000 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-04-12 16:33:02 +0200 |
commit | 9e0a51bf8c3cdac61e54a657ed944d963d899ad7 (patch) | |
tree | 12a5a2dddeca2601d8ed3c7b3287745e4080c87a /src/shared/symbianutils | |
parent | 48fef07a08712e4c05d8e83eefb86fd5e5704bc4 (diff) | |
download | qt-creator-9e0a51bf8c3cdac61e54a657ed944d963d899ad7.tar.gz |
Fixes for QML debugging over USB OST
Diffstat (limited to 'src/shared/symbianutils')
-rw-r--r-- | src/shared/symbianutils/symbiandevicemanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shared/symbianutils/symbiandevicemanager.cpp b/src/shared/symbianutils/symbiandevicemanager.cpp index 27fc593417..7482bf0436 100644 --- a/src/shared/symbianutils/symbiandevicemanager.cpp +++ b/src/shared/symbianutils/symbiandevicemanager.cpp @@ -699,11 +699,12 @@ qint64 OstChannel::writeData(const char *data, qint64 maxSize) { static const qint64 KMaxOstPayload = 1024; // If necessary, split the packet up - while (maxSize) { - QByteArray dataBuf = QByteArray::fromRawData(data, qMin(KMaxOstPayload, maxSize)); + qint64 remainder = maxSize; + while (remainder) { + QByteArray dataBuf = QByteArray::fromRawData(data, qMin(KMaxOstPayload, remainder)); d->m_codaPtr->writeCustomData(d->m_channelId, dataBuf); data += dataBuf.length(); - maxSize -= dataBuf.length(); + remainder -= dataBuf.length(); } return maxSize; } |