diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2013-12-10 12:02:40 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-23 10:19:24 +0100 |
commit | ff379a67cb891bf2c06ae549bc6e6b0ddfaf54e0 (patch) | |
tree | 63d4c9892e61cf8f713ef1fcd8d3bd1b1b539935 /tests | |
parent | e2ea0a83cc876fb54a2a8bf6f1350dbfa52f596b (diff) |
Rename V8 profiler classes to V4
Change-Id: I54a71b83bdcaa4198b63a08572bc3d9d1bf8deea
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/debugger/debugger.pro | 2 | ||||
-rw-r--r-- | tests/auto/qml/debugger/qv4profilerservice/data/console.qml (renamed from tests/auto/qml/debugger/qv8profilerservice/data/console.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/debugger/qv4profilerservice/data/exit.qml (renamed from tests/auto/qml/debugger/qv8profilerservice/data/exit.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/debugger/qv4profilerservice/data/test.qml (renamed from tests/auto/qml/debugger/qv8profilerservice/data/test.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/debugger/qv4profilerservice/qv4profilerservice.pro (renamed from tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro) | 4 | ||||
-rw-r--r-- | tests/auto/qml/debugger/qv4profilerservice/tst_qv4profilerservice.cpp (renamed from tests/auto/qml/debugger/qv8profilerservice/tst_qv8profilerservice.cpp) | 64 |
6 files changed, 35 insertions, 35 deletions
diff --git a/tests/auto/qml/debugger/debugger.pro b/tests/auto/qml/debugger/debugger.pro index aa3ad6a3a3..6838d01352 100644 --- a/tests/auto/qml/debugger/debugger.pro +++ b/tests/auto/qml/debugger/debugger.pro @@ -4,7 +4,7 @@ PUBLICTESTS += \ qqmlenginedebugservice \ qqmldebugjs \ qpacketprotocol \ -# qv8profilerservice \ +# qv4profilerservice \ # qdebugmessageservice \ qqmlenginedebuginspectorintegrationtest \ qqmlinspector \ diff --git a/tests/auto/qml/debugger/qv8profilerservice/data/console.qml b/tests/auto/qml/debugger/qv4profilerservice/data/console.qml index c23c820216..c23c820216 100644 --- a/tests/auto/qml/debugger/qv8profilerservice/data/console.qml +++ b/tests/auto/qml/debugger/qv4profilerservice/data/console.qml diff --git a/tests/auto/qml/debugger/qv8profilerservice/data/exit.qml b/tests/auto/qml/debugger/qv4profilerservice/data/exit.qml index 604265354c..604265354c 100644 --- a/tests/auto/qml/debugger/qv8profilerservice/data/exit.qml +++ b/tests/auto/qml/debugger/qv4profilerservice/data/exit.qml diff --git a/tests/auto/qml/debugger/qv8profilerservice/data/test.qml b/tests/auto/qml/debugger/qv4profilerservice/data/test.qml index 9c36e13c5b..9c36e13c5b 100644 --- a/tests/auto/qml/debugger/qv8profilerservice/data/test.qml +++ b/tests/auto/qml/debugger/qv4profilerservice/data/test.qml diff --git a/tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro b/tests/auto/qml/debugger/qv4profilerservice/qv4profilerservice.pro index dc6f4c5038..459f931f94 100644 --- a/tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro +++ b/tests/auto/qml/debugger/qv4profilerservice/qv4profilerservice.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qv8profilerservice +TARGET = tst_qv4profilerservice macx:CONFIG -= app_bundle -SOURCES += tst_qv8profilerservice.cpp +SOURCES += tst_qv4profilerservice.cpp INCLUDEPATH += ../shared include(../../../shared/util.pri) diff --git a/tests/auto/qml/debugger/qv8profilerservice/tst_qv8profilerservice.cpp b/tests/auto/qml/debugger/qv4profilerservice/tst_qv4profilerservice.cpp index a461519c75..23dfb3c75f 100644 --- a/tests/auto/qml/debugger/qv8profilerservice/tst_qv8profilerservice.cpp +++ b/tests/auto/qml/debugger/qv4profilerservice/tst_qv4profilerservice.cpp @@ -49,7 +49,7 @@ #define STR_PORT_FROM "13774" #define STR_PORT_TO "13790" -struct QV8ProfilerData +struct QV4ProfilerData { int messageType; QString filename; @@ -62,24 +62,24 @@ struct QV8ProfilerData QByteArray toByteArray() const; }; -class QV8ProfilerClient : public QQmlDebugClient +class QV4ProfilerClient : public QQmlDebugClient { Q_OBJECT public: enum MessageType { - V8Entry, - V8Complete, - V8SnapshotChunk, - V8SnapshotComplete, - V8Started, + V4Entry, + V4Complete, + V4SnapshotChunk, + V4SnapshotComplete, + V4Started, - V8MaximumMessage + V4MaximumMessage }; enum ServiceState { NotRunning, Running } serviceState; - QV8ProfilerClient(QQmlDebugConnection *connection) + QV4ProfilerClient(QQmlDebugConnection *connection) : QQmlDebugClient(QLatin1String("V8Profiler"), connection) , serviceState(NotRunning) { @@ -113,7 +113,7 @@ public: sendMessage(message); } - QList<QV8ProfilerData> traceMessages; + QList<QV4ProfilerData> traceMessages; QList<QByteArray> snapshotMessages; signals: @@ -125,12 +125,12 @@ protected: void messageReceived(const QByteArray &message); }; -class tst_QV8ProfilerService : public QQmlDataTest +class tst_QV4ProfilerService : public QQmlDataTest { Q_OBJECT public: - tst_QV8ProfilerService() + tst_QV4ProfilerService() : m_process(0) , m_connection(0) , m_client(0) @@ -140,7 +140,7 @@ public: private: QQmlDebugProcess *m_process; QQmlDebugConnection *m_connection; - QV8ProfilerClient *m_client; + QV4ProfilerClient *m_client; bool connect(bool block, const QString &testFile, QString *error); @@ -155,7 +155,7 @@ private slots: void console(); }; -void QV8ProfilerClient::messageReceived(const QByteArray &message) +void QV4ProfilerClient::messageReceived(const QByteArray &message) { QByteArray msg = message; QDataStream stream(&msg, QIODevice::ReadOnly); @@ -164,31 +164,31 @@ void QV8ProfilerClient::messageReceived(const QByteArray &message) stream >> messageType; QVERIFY(messageType >= 0); - QVERIFY(messageType < QV8ProfilerClient::V8MaximumMessage); + QVERIFY(messageType < QV4ProfilerClient::V4MaximumMessage); switch (messageType) { - case QV8ProfilerClient::V8Entry: { + case QV4ProfilerClient::V4Entry: { QCOMPARE(serviceState, Running); - QV8ProfilerData entry; + QV4ProfilerData entry; stream >> entry.filename >> entry.functionname >> entry.lineNumber >> entry.totalTime >> entry.selfTime >> entry.treeLevel; traceMessages.append(entry); break; } - case QV8ProfilerClient::V8Complete: + case QV4ProfilerClient::V4Complete: QCOMPARE(serviceState, Running); serviceState = NotRunning; emit complete(); break; - case QV8ProfilerClient::V8SnapshotChunk: { + case QV4ProfilerClient::V4SnapshotChunk: { QByteArray json; stream >> json; snapshotMessages.append(json); break; } - case QV8ProfilerClient::V8SnapshotComplete: + case QV4ProfilerClient::V4SnapshotComplete: emit snapshot(); break; - case QV8ProfilerClient::V8Started: + case QV4ProfilerClient::V4Started: QCOMPARE(serviceState, NotRunning); serviceState = Running; emit started(); @@ -201,7 +201,7 @@ void QV8ProfilerClient::messageReceived(const QByteArray &message) QVERIFY(stream.atEnd()); } -bool tst_QV8ProfilerService::connect(bool block, const QString &testFile, +bool tst_QV4ProfilerService::connect(bool block, const QString &testFile, QString *error) { const QString executable = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml"; @@ -215,7 +215,7 @@ bool tst_QV8ProfilerService::connect(bool block, const QString &testFile, arguments << QQmlDataTest::instance()->testFile(testFile); m_connection = new QQmlDebugConnection(); - m_client = new QV8ProfilerClient(m_connection); + m_client = new QV4ProfilerClient(m_connection); m_process = new QQmlDebugProcess(executable); m_process->start(QStringList() << arguments); @@ -232,7 +232,7 @@ bool tst_QV8ProfilerService::connect(bool block, const QString &testFile, return true; } -void tst_QV8ProfilerService::cleanup() +void tst_QV4ProfilerService::cleanup() { if (QTest::currentTestFailed()) { qDebug() << "Process State:" << m_process->state(); @@ -243,7 +243,7 @@ void tst_QV8ProfilerService::cleanup() delete m_connection; } -void tst_QV8ProfilerService::blockingConnectWithTraceEnabled() +void tst_QV4ProfilerService::blockingConnectWithTraceEnabled() { QString error; if (!connect(true, "test.qml", &error)) @@ -257,7 +257,7 @@ void tst_QV8ProfilerService::blockingConnectWithTraceEnabled() "No trace received in time."); } -void tst_QV8ProfilerService::blockingConnectWithTraceDisabled() +void tst_QV4ProfilerService::blockingConnectWithTraceDisabled() { QString error; if (!connect(true, "test.qml", &error)) @@ -274,7 +274,7 @@ void tst_QV8ProfilerService::blockingConnectWithTraceDisabled() "No trace received in time."); } -void tst_QV8ProfilerService::nonBlockingConnect() +void tst_QV4ProfilerService::nonBlockingConnect() { QString error; if (!connect(false, "test.qml", &error)) @@ -288,7 +288,7 @@ void tst_QV8ProfilerService::nonBlockingConnect() "No trace received in time."); } -void tst_QV8ProfilerService::snapshot() +void tst_QV4ProfilerService::snapshot() { QString error; if (!connect(false, "test.qml", &error)) @@ -301,7 +301,7 @@ void tst_QV8ProfilerService::snapshot() "No trace received in time."); } -void tst_QV8ProfilerService::profileOnExit() +void tst_QV4ProfilerService::profileOnExit() { QString error; if (!connect(true, "exit.qml", &error)) @@ -314,7 +314,7 @@ void tst_QV8ProfilerService::profileOnExit() "No trace received in time."); } -void tst_QV8ProfilerService::console() +void tst_QV4ProfilerService::console() { QString error; if (!connect(true, "console.qml", &error)) @@ -329,6 +329,6 @@ void tst_QV8ProfilerService::console() QVERIFY(!m_client->traceMessages.isEmpty()); } -QTEST_MAIN(tst_QV8ProfilerService) +QTEST_MAIN(tst_QV4ProfilerService) -#include "tst_qv8profilerservice.moc" +#include "tst_qv4profilerservice.moc" |