Remove some methods from QQmlDebugServer
They were only used internally or for redundant checks in the tests. Change-Id: Iaa7d52be030adaa52a07b28fba53bdef9fada879 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
parent
db90054b18
commit
c866ba8e3a
|
@ -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;
|
||||
|
|
|
@ -62,9 +62,6 @@ public:
|
|||
|
||||
static QQmlDebugServer *instance();
|
||||
|
||||
bool hasThread() const;
|
||||
bool hasConnection() const;
|
||||
bool hasDebuggingClient() const;
|
||||
bool blockingMode() const;
|
||||
|
||||
QList<QQmlDebugService*> services() const;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue