summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/shared/debugutil.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-11-23 05:40:24 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-11-23 05:40:33 (GMT)
commitca1ed2bd2528d1474c870d1b508c65b1bf9442da (patch)
treeda8f0f87249da632b527a7d6d296c720c1c80256 /tests/auto/declarative/shared/debugutil.cpp
parent3a46e59a71487c375b303cd982707dc0743f6f93 (diff)
downloadQt-ca1ed2bd2528d1474c870d1b508c65b1bf9442da.zip
Qt-ca1ed2bd2528d1474c870d1b508c65b1bf9442da.tar.gz
Qt-ca1ed2bd2528d1474c870d1b508c65b1bf9442da.tar.bz2
Fix occasionally-failing debug tests.
Diffstat (limited to 'tests/auto/declarative/shared/debugutil.cpp')
-rw-r--r--tests/auto/declarative/shared/debugutil.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/declarative/shared/debugutil.cpp b/tests/auto/declarative/shared/debugutil.cpp
index 7008529..8f6fdef 100644
--- a/tests/auto/declarative/shared/debugutil.cpp
+++ b/tests/auto/declarative/shared/debugutil.cpp
@@ -88,8 +88,8 @@ void QmlDebugTestService::messageReceived(const QByteArray &ba)
void QmlDebugTestService::enabledChanged(bool e)
{
- emit enabledStateChanged();
enabled = e;
+ emit enabledStateChanged();
}
@@ -100,17 +100,18 @@ QmlDebugTestClient::QmlDebugTestClient(const QString &s, QmlDebugConnection *c)
QByteArray QmlDebugTestClient::waitForResponse()
{
- QSignalSpy spy(this, SIGNAL(serverMessage(QByteArray)));
+ lastMsg.clear();
QmlDebugTest::waitForSignal(this, SIGNAL(serverMessage(QByteArray)));
- if (spy.count() == 0) {
+ if (lastMsg.isEmpty()) {
qWarning() << "tst_QmlDebugClient: no response from server!";
return QByteArray();
}
- return spy.at(0).at(0).value<QByteArray>();
+ return lastMsg;
}
void QmlDebugTestClient::messageReceived(const QByteArray &ba)
{
+ lastMsg = ba;
emit serverMessage(ba);
}