diff options
6 files changed, 2 insertions, 31 deletions
diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp index 44cd767914..607b03916e 100644 --- a/src/qml/debugger/qqmldebugserver.cpp +++ b/src/qml/debugger/qqmldebugserver.cpp @@ -347,26 +347,6 @@ void QQmlDebugServerThread::run() eventLoop.processEvents(QEventLoop::AllEvents); } -bool QQmlDebugServer::hasDebuggingClient() const -{ - Q_D(const QQmlDebugServer); - return d->connection - && d->connection->isConnected() - && d->gotHello; -} - -bool QQmlDebugServer::hasThread() const -{ - Q_D(const QQmlDebugServer); - return d->thread != 0; -} - -bool QQmlDebugServer::hasConnection() const -{ - Q_D(const QQmlDebugServer); - return d->connection != 0; -} - bool QQmlDebugServer::blockingMode() const { Q_D(const QQmlDebugServer); @@ -819,8 +799,8 @@ bool QQmlDebugServerPrivate::enable(Action action) return false; if (!action(d)) return false; - while (!wrapper->m_instance.hasConnection()) { - if (!wrapper->m_instance.hasThread()) + while (!d->connection) { + if (!d->thread) return false; } return true; diff --git a/src/qml/debugger/qqmldebugserver_p.h b/src/qml/debugger/qqmldebugserver_p.h index 4183370c46..fdac9e1abf 100644 --- a/src/qml/debugger/qqmldebugserver_p.h +++ b/src/qml/debugger/qqmldebugserver_p.h @@ -62,9 +62,6 @@ public: static QQmlDebugServer *instance(); - bool hasThread() const; - bool hasConnection() const; - bool hasDebuggingClient() const; bool blockingMode() const; QList<QQmlDebugService*> services() const; diff --git a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp index 3aaf833f5b..8062643799 100644 --- a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp +++ b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp @@ -84,7 +84,6 @@ void tst_QQmlDebugClient::initTestCase() QVERIFY(m_conn->isConnected()); - QTRY_VERIFY(QQmlDebugServer::instance() && QQmlDebugServer::instance()->hasDebuggingClient()); QTRY_COMPARE(client.state(), QQmlDebugClient::Enabled); } diff --git a/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp b/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp index f2cb141a6c..bf0a92b5bb 100644 --- a/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp +++ b/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp @@ -88,7 +88,6 @@ void tst_QQmlDebugLocal::initTestCase() QVERIFY(m_conn->isConnected()); - QTRY_VERIFY(QQmlDebugServer::instance() && QQmlDebugServer::instance()->hasDebuggingClient()); QTRY_COMPARE(client.state(), QQmlDebugClient::Enabled); } diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp index da320ebefa..7a46b69b0e 100644 --- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp +++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp @@ -88,8 +88,6 @@ void tst_QQmlDebugService::initTestCase() QTest::qSleep(100); } QVERIFY(m_conn->isConnected()); - - QTRY_VERIFY(QQmlDebugServer::instance() && QQmlDebugServer::instance()->hasDebuggingClient()); } void tst_QQmlDebugService::checkPortRange() @@ -259,7 +257,6 @@ void tst_QQmlDebugService::checkSupportForOldDataStreamVersion() } QVERIFY(m_conn->isConnected()); - QTRY_VERIFY(QQmlDebugServer::instance() && QQmlDebugServer::instance()->hasDebuggingClient()); QQmlDebugTestService service("tst_QQmlDebugService::sendMessage2()"); QQmlDebugTestClient client("tst_QQmlDebugService::sendMessage2()", m_conn); diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp index 2722ef984b..d2bfd2981b 100644 --- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp @@ -352,7 +352,6 @@ void tst_QQmlEngineDebugService::initTestCase() bool ok = m_conn->waitForConnected(); QVERIFY(ok); - QTRY_VERIFY(QQmlDebugServer::instance() && QQmlDebugServer::instance()->hasDebuggingClient()); m_dbg = new QQmlEngineDebugClient(m_conn); QTRY_COMPARE(m_dbg->state(), QQmlEngineDebugClient::Enabled); } |