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:
Ulf Hermann 2015-07-14 12:27:40 +02:00
parent db90054b18
commit c866ba8e3a
6 changed files with 2 additions and 31 deletions

View File

@ -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;

View File

@ -62,9 +62,6 @@ public:
static QQmlDebugServer *instance();
bool hasThread() const;
bool hasConnection() const;
bool hasDebuggingClient() const;
bool blockingMode() const;
QList<QQmlDebugService*> services() const;

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}