summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/debugger
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-02-02 11:18:08 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-10 11:49:38 +0100
commit9daf11cede6a13fb95f202b2bdee7966a502d3f7 (patch)
treeae09d426af7edb1e998eeb45f1afb7a644a19800 /tests/auto/declarative/debugger
parente761f5b906c427433325debb9f08c4f2d0ba902d (diff)
Debugger: Consistenly use 'state' instead of 'status'
Fix inconsistent naming e.g. in QtDeclarativeEngineDebug by always using 'state' instead of 'status'. This is in line with the other source code, which also seems to favor 'state'. Change-Id: I65a7a3bd0eb7dfffeb37b5f8dad15b0a4a78de70 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'tests/auto/declarative/debugger')
-rw-r--r--tests/auto/declarative/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp6
-rw-r--r--tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp34
-rw-r--r--tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp8
-rw-r--r--tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp26
-rw-r--r--tests/auto/declarative/debugger/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp26
-rw-r--r--tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp2
-rw-r--r--tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp4
-rw-r--r--tests/auto/declarative/debugger/qv8profilerservice/tst_qv8profilerservice.cpp10
-rw-r--r--tests/auto/declarative/debugger/shared/debugutil.cpp10
-rw-r--r--tests/auto/declarative/debugger/shared/debugutil_p.h8
10 files changed, 67 insertions, 67 deletions
diff --git a/tests/auto/declarative/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/declarative/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
index 8b38d26127..bf5c139730 100644
--- a/tests/auto/declarative/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
+++ b/tests/auto/declarative/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
@@ -104,7 +104,7 @@ public:
protected:
//inherited from QDeclarativeDebugClient
- void statusChanged(Status status);
+ void stateChanged(State state);
void messageReceived(const QByteArray &data);
signals:
@@ -112,9 +112,9 @@ signals:
void debugOutput();
};
-void QDeclarativeDebugMsgClient::statusChanged(Status status)
+void QDeclarativeDebugMsgClient::stateChanged(State state)
{
- if (status == Enabled) {
+ if (state == Enabled) {
emit enabled();
}
}
diff --git a/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
index 1a5aeb9458..e059c7617b 100644
--- a/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
+++ b/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
@@ -63,7 +63,7 @@ private slots:
void initTestCase();
void name();
- void status();
+ void state();
void sendMessage();
void parallelConnect();
void sequentialConnect();
@@ -92,7 +92,7 @@ void tst_QDeclarativeDebugClient::initTestCase()
QVERIFY(m_conn->isConnected());
QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient());
- QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled);
}
void tst_QDeclarativeDebugClient::name()
@@ -103,33 +103,33 @@ void tst_QDeclarativeDebugClient::name()
QCOMPARE(client.name(), name);
}
-void tst_QDeclarativeDebugClient::status()
+void tst_QDeclarativeDebugClient::state()
{
{
QDeclarativeDebugConnection dummyConn;
- QDeclarativeDebugClient client("tst_QDeclarativeDebugClient::status()", &dummyConn);
- QCOMPARE(client.status(), QDeclarativeDebugClient::NotConnected);
+ QDeclarativeDebugClient client("tst_QDeclarativeDebugClient::state()", &dummyConn);
+ QCOMPARE(client.state(), QDeclarativeDebugClient::NotConnected);
QCOMPARE(client.serviceVersion(), -1.0f);
}
- QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::status()", m_conn);
- QCOMPARE(client.status(), QDeclarativeDebugClient::Unavailable);
+ QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::state()", m_conn);
+ QCOMPARE(client.state(), QDeclarativeDebugClient::Unavailable);
{
- QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::status()", 2);
- QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
+ QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::state()", 2);
+ QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled);
QCOMPARE(client.serviceVersion(), 2.0f);
}
- QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Unavailable);
+ QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Unavailable);
// duplicate plugin name
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugClient: Conflicting plugin name \"tst_QDeclarativeDebugClient::status()\" ");
- QDeclarativeDebugClient client2("tst_QDeclarativeDebugClient::status()", m_conn);
- QCOMPARE(client2.status(), QDeclarativeDebugClient::NotConnected);
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugClient: Conflicting plugin name \"tst_QDeclarativeDebugClient::state()\" ");
+ QDeclarativeDebugClient client2("tst_QDeclarativeDebugClient::state()", m_conn);
+ QCOMPARE(client2.state(), QDeclarativeDebugClient::NotConnected);
- QDeclarativeDebugClient client3("tst_QDeclarativeDebugClient::status3()", 0);
- QCOMPARE(client3.status(), QDeclarativeDebugClient::NotConnected);
+ QDeclarativeDebugClient client3("tst_QDeclarativeDebugClient::state3()", 0);
+ QCOMPARE(client3.state(), QDeclarativeDebugClient::NotConnected);
}
void tst_QDeclarativeDebugClient::sendMessage()
@@ -139,7 +139,7 @@ void tst_QDeclarativeDebugClient::sendMessage()
QByteArray msg = "hello!";
- QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled);
client.sendMessage(msg);
QByteArray resp = client.waitForResponse();
@@ -175,7 +175,7 @@ void tst_QDeclarativeDebugClient::sequentialConnect()
QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established");
QVERIFY(connection2.waitForConnected());
QVERIFY(connection2.isConnected());
- QTRY_VERIFY(client2.status() == QDeclarativeDebugClient::Enabled);
+ QTRY_VERIFY(client2.state() == QDeclarativeDebugClient::Enabled);
}
int main(int argc, char *argv[])
diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp b/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp
index 03aeef165b..7d57c8eda2 100644
--- a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp
+++ b/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp
@@ -293,7 +293,7 @@ public:
protected:
//inherited from QDeclarativeDebugClient
- void statusChanged(Status status);
+ void stateChanged(State state);
void messageReceived(const QByteArray &data);
signals:
@@ -879,9 +879,9 @@ void QJSDebugClient::listBreakpoints()
sendMessage(packMessage(V8REQUEST, json.toString().toUtf8()));
}
-void QJSDebugClient::statusChanged(Status status)
+void QJSDebugClient::stateChanged(State state)
{
- if (status == Enabled) {
+ if (state == Enabled) {
flushSendBuffer();
emit enabled();
}
@@ -957,7 +957,7 @@ void QJSDebugClient::messageReceived(const QByteArray &data)
void QJSDebugClient::sendMessage(const QByteArray &msg)
{
- if (status() == Enabled) {
+ if (state() == Enabled) {
QDeclarativeDebugClient::sendMessage(msg);
} else {
sendBuffer.append(msg);
diff --git a/tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
index 89cea1692e..c38b7854e0 100644
--- a/tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
+++ b/tests/auto/declarative/debugger/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
@@ -67,7 +67,7 @@ private slots:
void name();
void version();
- void status();
+ void state();
void sendMessage();
void idForObject();
void objectForId();
@@ -112,23 +112,23 @@ void tst_QDeclarativeDebugService::version()
QCOMPARE(service.version(), 2.0f);
}
-void tst_QDeclarativeDebugService::status()
+void tst_QDeclarativeDebugService::state()
{
- QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::status()");
- QCOMPARE(service.status(), QDeclarativeDebugService::Unavailable);
+ QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::state()");
+ QCOMPARE(service.state(), QDeclarativeDebugService::Unavailable);
{
- QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::status()", m_conn);
- QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
- QTRY_COMPARE(service.status(), QDeclarativeDebugService::Enabled);
+ QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::state()", m_conn);
+ QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(service.state(), QDeclarativeDebugService::Enabled);
}
- QTRY_COMPARE(service.status(), QDeclarativeDebugService::Unavailable);
+ QTRY_COMPARE(service.state(), QDeclarativeDebugService::Unavailable);
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::status()\" ");
- QDeclarativeDebugTestService duplicate("tst_QDeclarativeDebugService::status()");
- QCOMPARE(duplicate.status(), QDeclarativeDebugService::NotConnected);
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::state()\" ");
+ QDeclarativeDebugTestService duplicate("tst_QDeclarativeDebugService::state()");
+ QCOMPARE(duplicate.state(), QDeclarativeDebugService::NotConnected);
}
void tst_QDeclarativeDebugService::sendMessage()
@@ -138,8 +138,8 @@ void tst_QDeclarativeDebugService::sendMessage()
QByteArray msg = "hello!";
- QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
- QTRY_COMPARE(service.status(), QDeclarativeDebugService::Enabled);
+ QTRY_COMPARE(client.state(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(service.state(), QDeclarativeDebugService::Enabled);
client.sendMessage(msg);
QByteArray resp = client.waitForResponse();
diff --git a/tests/auto/declarative/debugger/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp b/tests/auto/declarative/debugger/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp
index e0c8af7181..f0a660c146 100644
--- a/tests/auto/declarative/debugger/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp
+++ b/tests/auto/declarative/debugger/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp
@@ -61,7 +61,7 @@ public:
QList<QDeclarativeDebugData> traceMessages;
- void setTraceStatus(bool enabled) {
+ void setTraceState(bool enabled) {
QByteArray message;
QDataStream stream(&message, QIODevice::WriteOnly);
stream << enabled;
@@ -216,10 +216,10 @@ void tst_QDeclarativeDebugTrace::cleanup()
void tst_QDeclarativeDebugTrace::blockingConnectWithTraceEnabled()
{
connect(true, "test.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
- m_client->setTraceStatus(true);
- m_client->setTraceStatus(false);
+ m_client->setTraceState(true);
+ m_client->setTraceState(false);
if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()))) {
QString failMsg
= QString("No trace received in time. App output: \n%1\n").arg(m_process->output());
@@ -239,11 +239,11 @@ void tst_QDeclarativeDebugTrace::blockingConnectWithTraceEnabled()
void tst_QDeclarativeDebugTrace::blockingConnectWithTraceDisabled()
{
connect(true, "test.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
- m_client->setTraceStatus(false);
- m_client->setTraceStatus(true);
- m_client->setTraceStatus(false);
+ m_client->setTraceState(false);
+ m_client->setTraceState(true);
+ m_client->setTraceState(false);
if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()))) {
QString failMsg
= QString("No trace received in time. App output: \n%1\n").arg(m_process->output());
@@ -264,10 +264,10 @@ void tst_QDeclarativeDebugTrace::blockingConnectWithTraceDisabled()
void tst_QDeclarativeDebugTrace::nonBlockingConnect()
{
connect(false, "test.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
- m_client->setTraceStatus(true);
- m_client->setTraceStatus(false);
+ m_client->setTraceState(true);
+ m_client->setTraceState(false);
if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()))) {
QString failMsg
= QString("No trace received in time. App output: \n%1\n").arg(m_process->output());
@@ -286,9 +286,9 @@ void tst_QDeclarativeDebugTrace::nonBlockingConnect()
void tst_QDeclarativeDebugTrace::profileOnExit()
{
connect(true, "exit.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
- m_client->setTraceStatus(true);
+ m_client->setTraceState(true);
if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()))) {
QString failMsg
diff --git a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp b/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
index e13e32223a..098ac90ca5 100644
--- a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
+++ b/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
@@ -387,7 +387,7 @@ void tst_QDeclarativeEngineDebug::initTestCase()
QVERIFY(ok);
QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient());
m_dbg = new QDeclarativeEngineDebug(m_conn, this);
- QTRY_VERIFY(m_dbg->status() == QDeclarativeEngineDebug::Enabled);
+ QTRY_VERIFY(m_dbg->state() == QDeclarativeEngineDebug::Enabled);
}
void tst_QDeclarativeEngineDebug::cleanupTestCase()
diff --git a/tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp b/tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp
index b03faccfdc..4d7e57f4d4 100644
--- a/tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp
+++ b/tests/auto/declarative/debugger/qdeclarativeinspector/tst_qdeclarativeinspector.cpp
@@ -165,12 +165,12 @@ void tst_QDeclarativeInspector::cleanup()
void tst_QDeclarativeInspector::connect()
{
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
}
void tst_QDeclarativeInspector::showAppOnTop()
{
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
m_client->setShowAppOnTop(true);
QVERIFY(QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(showAppOnTopChanged())));
diff --git a/tests/auto/declarative/debugger/qv8profilerservice/tst_qv8profilerservice.cpp b/tests/auto/declarative/debugger/qv8profilerservice/tst_qv8profilerservice.cpp
index 2556e41e4f..3ec92f9987 100644
--- a/tests/auto/declarative/debugger/qv8profilerservice/tst_qv8profilerservice.cpp
+++ b/tests/auto/declarative/debugger/qv8profilerservice/tst_qv8profilerservice.cpp
@@ -201,7 +201,7 @@ void tst_QV8ProfilerService::cleanup()
void tst_QV8ProfilerService::blockingConnectWithTraceEnabled()
{
connect(true, "test.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
m_client->startProfiling("");
m_client->stopProfiling("");
@@ -215,7 +215,7 @@ void tst_QV8ProfilerService::blockingConnectWithTraceEnabled()
void tst_QV8ProfilerService::blockingConnectWithTraceDisabled()
{
connect(true, "test.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
m_client->stopProfiling("");
if (QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(complete()), 1000)) {
@@ -235,7 +235,7 @@ void tst_QV8ProfilerService::blockingConnectWithTraceDisabled()
void tst_QV8ProfilerService::nonBlockingConnect()
{
connect(false, "test.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
m_client->startProfiling("");
m_client->stopProfiling("");
@@ -249,7 +249,7 @@ void tst_QV8ProfilerService::nonBlockingConnect()
void tst_QV8ProfilerService::snapshot()
{
connect(false, "test.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
m_client->takeSnapshot();
if (!QDeclarativeDebugTest::waitForSignal(m_client, SIGNAL(snapshot()))) {
@@ -262,7 +262,7 @@ void tst_QV8ProfilerService::snapshot()
void tst_QV8ProfilerService::profileOnExit()
{
connect(true, "exit.qml");
- QTRY_COMPARE(m_client->status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(m_client->state(), QDeclarativeDebugClient::Enabled);
m_client->startProfiling("");
diff --git a/tests/auto/declarative/debugger/shared/debugutil.cpp b/tests/auto/declarative/debugger/shared/debugutil.cpp
index 14bf68285d..fcac1bc61d 100644
--- a/tests/auto/declarative/debugger/shared/debugutil.cpp
+++ b/tests/auto/declarative/debugger/shared/debugutil.cpp
@@ -69,9 +69,9 @@ void QDeclarativeDebugTestService::messageReceived(const QByteArray &ba)
sendMessage(ba);
}
-void QDeclarativeDebugTestService::statusChanged(Status)
+void QDeclarativeDebugTestService::stateChanged(State)
{
- emit statusHasChanged();
+ emit stateHasChanged();
}
@@ -91,10 +91,10 @@ QByteArray QDeclarativeDebugTestClient::waitForResponse()
return lastMsg;
}
-void QDeclarativeDebugTestClient::statusChanged(Status stat)
+void QDeclarativeDebugTestClient::stateChanged(State stat)
{
- QCOMPARE(stat, status());
- emit statusHasChanged();
+ QCOMPARE(stat, state());
+ emit stateHasChanged();
}
void QDeclarativeDebugTestClient::messageReceived(const QByteArray &ba)
diff --git a/tests/auto/declarative/debugger/shared/debugutil_p.h b/tests/auto/declarative/debugger/shared/debugutil_p.h
index aecd656a07..520cb11a5a 100644
--- a/tests/auto/declarative/debugger/shared/debugutil_p.h
+++ b/tests/auto/declarative/debugger/shared/debugutil_p.h
@@ -67,11 +67,11 @@ public:
QDeclarativeDebugTestService(const QString &s, float version = 1, QObject *parent = 0);
signals:
- void statusHasChanged();
+ void stateHasChanged();
protected:
virtual void messageReceived(const QByteArray &ba);
- virtual void statusChanged(Status status);
+ virtual void stateChanged(State state);
};
class QDeclarativeDebugTestClient : public QDeclarativeDebugClient
@@ -83,11 +83,11 @@ public:
QByteArray waitForResponse();
signals:
- void statusHasChanged();
+ void stateHasChanged();
void serverMessage(const QByteArray &);
protected:
- virtual void statusChanged(Status status);
+ virtual void stateChanged(State state);
virtual void messageReceived(const QByteArray &ba);
private: