diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-21 13:30:14 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-21 13:30:14 (GMT) |
commit | 181f86f118f5a53abf43bce37758b331b0aabe9a (patch) | |
tree | 9cf57674f8c70d53ca15e2530af1663c16f60e9d /src/declarative/debugger/qpacketprotocol.cpp | |
parent | 59de8f1c2aa210dcbbaed49666719bdb3d1d0e86 (diff) | |
parent | d5631f115c2e32f8201e98813613010c9d7cb590 (diff) | |
download | Qt-181f86f118f5a53abf43bce37758b331b0aabe9a.zip Qt-181f86f118f5a53abf43bce37758b331b0aabe9a.tar.gz Qt-181f86f118f5a53abf43bce37758b331b0aabe9a.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-doc-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-doc-team:
QDeclarativeDebug: Fix cases where multiple packets arrive in one go
Fix build break in S60 5.0 environment
Skip softkeys update if application is not on foreground in Symbian
Revert "Opening taskswitcher, pushes application softkeys to top of switcher"
Fix js debugging autotest on Windows + Add license header
Rewrite autotests for js debugging
Rename qdeclarativescriptdebugging autotest directory
Create property cache in case of Component{} root
Diffstat (limited to 'src/declarative/debugger/qpacketprotocol.cpp')
-rw-r--r-- | src/declarative/debugger/qpacketprotocol.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp index 9caaa79..f53d2a3 100644 --- a/src/declarative/debugger/qpacketprotocol.cpp +++ b/src/declarative/debugger/qpacketprotocol.cpp @@ -164,12 +164,16 @@ public Q_SLOTS: void readyToRead() { + bool gotPackets = false; while (true) { - // Need to get trailing data + // Get size header (if not in progress) if (-1 == inProgressSize) { // We need a size header of sizeof(qint32) - if (sizeof(qint32) > (uint)dev->bytesAvailable()) - return; + if (sizeof(qint32) > (uint)dev->bytesAvailable()) { + if (gotPackets) + emit readyRead(); + return; // no more data available + } // Read size header int read = dev->read((char *)&inProgressSize, sizeof(qint32)); @@ -200,9 +204,12 @@ public Q_SLOTS: inProgress.clear(); waitingForPacket = false; - emit readyRead(); - } else - return; + gotPackets = true; + } else { + if (gotPackets) + emit readyRead(); + return; // packet in progress is not yet complete + } } } } |