diff options
author | Charles Yin <yinyunqiao@gmail.com> | 2012-04-18 21:01:57 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-19 04:55:38 +0200 |
commit | 458eb3cce93162dced2649e44c59f27bb088f07c (patch) | |
tree | 97893c1e4fcbc75f6e1732e7535e27ce06db1154 /src/imports/testlib | |
parent | 83c8ca0ab459dbf7594abf90fdf4e83f9f121a74 (diff) |
Clean up qmltest code
1. Remove qmlviewer related code from TestCase.qml
2. util.wrapper is no longer used
Change-Id: I17d9198a7871762da07a790700d69504b8226c48
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/imports/testlib')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 17 | ||||
-rw-r--r-- | src/imports/testlib/main.cpp | 7 |
2 files changed, 1 insertions, 23 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 371bba9fde..41e1686a27 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -66,10 +66,7 @@ Item { // other test failed which this one depends on). property bool optional: false - // Property that is set to true when the main window is shown. - // We need to set the property value in an odd way to handle - // both qmlviewer and the QtQuickTest module test wrapper. - property bool windowShown: util.wrapper ? qtest.windowShown : false + property bool windowShown: qtest.windowShown // Internal private state. Identifiers prefixed with qtest are reserved. property bool qtest_prevWhen: true @@ -688,15 +685,6 @@ Item { } } - // The test framework will set util.windowShown when the - // window is actually shown. If we are running with qmlviewer, - // then this won't happen. So we use a timer instead. - Timer { - id: qtest_windowShowTimer - interval: 100 - repeat: false - onTriggered: { windowShown = true } - } Component.onCompleted: { qtest.hasTestCase = true; @@ -724,9 +712,6 @@ Item { if (optional) TestLogger.log_optional_test(qtest_testId) qtest_prevWhen = when - var isQmlViewer = util.wrapper ? false : true - if (isQmlViewer) - qtest_windowShowTimer.running = true if (when && !completed && !running) qtest_run() } diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp index 18039e7a3f..459d34fcc9 100644 --- a/src/imports/testlib/main.cpp +++ b/src/imports/testlib/main.cpp @@ -62,7 +62,6 @@ class QuickTestUtil : public QObject { Q_OBJECT Q_PROPERTY(bool printAvailableFunctions READ printAvailableFunctions NOTIFY printAvailableFunctionsChanged) - Q_PROPERTY(bool wrapper READ wrapper NOTIFY wrapperChanged) Q_PROPERTY(int dragThreshold READ dragThreshold NOTIFY dragThresholdChanged) public: QuickTestUtil(QObject *parent = 0) @@ -75,15 +74,10 @@ public: { return QTest::printAvailableFunctions; } - bool wrapper() const - { - return true; - } int dragThreshold() const { return qApp->styleHints()->startDragDistance(); } Q_SIGNALS: void printAvailableFunctionsChanged(); - void wrapperChanged(); void dragThresholdChanged(); public Q_SLOTS: @@ -91,7 +85,6 @@ public Q_SLOTS: QQmlV8Handle typeName(const QVariant& v) const { QString name(v.typeName()); - //qDebug() << "type:" << name << " string value:" << v.toString() << " value:" << v; if (v.canConvert<QObject*>()) { QQmlType *type = 0; const QMetaObject *mo = v.value<QObject*>()->metaObject(); |