summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-12-11 15:54:33 +0100
committerMilian Wolff <milian.wolff@kdab.com>2013-12-12 13:41:18 +0100
commitfb587a3a996d2e9d2fca34cc053df29f6d23f64e (patch)
tree52020dfe8ad740c5a68a402b0cd37fbd1f43f660 /tests
parentacf7f0b1ae956f2fac7182c194e0441cd9c6f4d0 (diff)
downloadqtwebchannel-fb587a3a996d2e9d2fca34cc053df29f6d23f64e.tar.gz
Restructure sources and assimilate to Qt module structure.
This module can hopefully be done in time for 5.3. This commit changes the source structure and QMake files to adapt to typical Qt modules. With this in place, we can now use QT += webchannel in qmake files to link against the pure Qt/C++ QtWebChannel library. The QML plugin is separated from it and can be loaded optionally, if the quick module could be found. Also added is now a qmlplugindump for tooling integration. Note that the Qt.labs namespace is removed. The test file structure is also adapted to how its done in the QtDeclarative module. Note that this setup apparently does not support to run tests without running make install first. Change-Id: I1c15d72e7ab5f525d5a6f651f4e965ef86bc17bd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qml/WebChannelTest.qml6
-rw-r--r--tests/qml/data/bench_init.html (renamed from tests/qml/bench_init.html)0
-rw-r--r--tests/qml/data/disconnect.html (renamed from tests/qml/disconnect.html)0
-rw-r--r--tests/qml/data/grouping.html (renamed from tests/qml/grouping.html)0
-rw-r--r--tests/qml/data/method.html (renamed from tests/qml/method.html)0
-rw-r--r--tests/qml/data/property.html (renamed from tests/qml/property.html)0
-rw-r--r--tests/qml/data/receiveRaw.html (renamed from tests/qml/receiveRaw.html)0
-rw-r--r--tests/qml/data/respond.html (renamed from tests/qml/respond.html)0
-rw-r--r--tests/qml/data/send.html (renamed from tests/qml/send.html)0
-rw-r--r--tests/qml/data/signal.html (renamed from tests/qml/signal.html)0
-rw-r--r--tests/qml/data/wrapper.html (renamed from tests/qml/wrapper.html)0
-rw-r--r--tests/qml/qml.cpp2
-rw-r--r--tests/qml/qml.pro15
-rw-r--r--tests/qml/tst_bench.qml4
-rw-r--r--tests/qml/tst_metaobjectpublisher.qml4
-rw-r--r--tests/qml/tst_webchannel.qml2
-rw-r--r--tests/tests.pro5
17 files changed, 24 insertions, 14 deletions
diff --git a/tests/qml/WebChannelTest.qml b/tests/qml/WebChannelTest.qml
index ca2996d..ee6cadd 100644
--- a/tests/qml/WebChannelTest.qml
+++ b/tests/qml/WebChannelTest.qml
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QWebChannel module on Qt labs.
+** This file is part of the QtWebChannel module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -34,7 +34,7 @@
import QtQuick 2.0
import QtTest 1.0
-import Qt.labs.WebChannel 1.0
+import QtWebChannel 1.0
import QtWebKit 3.0
import QtWebKit.experimental 1.0
@@ -86,7 +86,7 @@ TestCase {
function loadUrl(url)
{
verify(webChannel.baseUrl != "", "webChannel.baseUrl is empty");
- view.url = url + "?webChannelBaseUrl=" + webChannel.baseUrl;
+ view.url = "data/" + url + "?webChannelBaseUrl=" + webChannel.baseUrl;
// now wait for page to finish loading
do {
loadingSpy.wait(500);
diff --git a/tests/qml/bench_init.html b/tests/qml/data/bench_init.html
index ef18650..ef18650 100644
--- a/tests/qml/bench_init.html
+++ b/tests/qml/data/bench_init.html
diff --git a/tests/qml/disconnect.html b/tests/qml/data/disconnect.html
index f4cbb0a..f4cbb0a 100644
--- a/tests/qml/disconnect.html
+++ b/tests/qml/data/disconnect.html
diff --git a/tests/qml/grouping.html b/tests/qml/data/grouping.html
index bb804f4..bb804f4 100644
--- a/tests/qml/grouping.html
+++ b/tests/qml/data/grouping.html
diff --git a/tests/qml/method.html b/tests/qml/data/method.html
index 618550f..618550f 100644
--- a/tests/qml/method.html
+++ b/tests/qml/data/method.html
diff --git a/tests/qml/property.html b/tests/qml/data/property.html
index 1a8360a..1a8360a 100644
--- a/tests/qml/property.html
+++ b/tests/qml/data/property.html
diff --git a/tests/qml/receiveRaw.html b/tests/qml/data/receiveRaw.html
index cfe685e..cfe685e 100644
--- a/tests/qml/receiveRaw.html
+++ b/tests/qml/data/receiveRaw.html
diff --git a/tests/qml/respond.html b/tests/qml/data/respond.html
index 29e47b8..29e47b8 100644
--- a/tests/qml/respond.html
+++ b/tests/qml/data/respond.html
diff --git a/tests/qml/send.html b/tests/qml/data/send.html
index f30e9c8..f30e9c8 100644
--- a/tests/qml/send.html
+++ b/tests/qml/data/send.html
diff --git a/tests/qml/signal.html b/tests/qml/data/signal.html
index e3815cb..e3815cb 100644
--- a/tests/qml/signal.html
+++ b/tests/qml/data/signal.html
diff --git a/tests/qml/wrapper.html b/tests/qml/data/wrapper.html
index 54f456b..54f456b 100644
--- a/tests/qml/wrapper.html
+++ b/tests/qml/data/wrapper.html
diff --git a/tests/qml/qml.cpp b/tests/qml/qml.cpp
index 242a2b6..9dfd7e6 100644
--- a/tests/qml/qml.cpp
+++ b/tests/qml/qml.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QWebChannel module on Qt labs.
+** This file is part of the QtWebChannel module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/qml/qml.pro b/tests/qml/qml.pro
index c969291..a2b6933 100644
--- a/tests/qml/qml.pro
+++ b/tests/qml/qml.pro
@@ -1,10 +1,19 @@
-QT += testlib
-
+QT += testlib declarative
+TEMPLATE = app
TARGET = qml
CONFIG += warn_on qmltestcase
-IMPORTPATH += $$OUT_PWD/../../src $$PWD
+# TODO: running tests without requiring make install
+IMPORTPATH += $$PWD
SOURCES += \
qml.cpp
+
+OTHER_FILES += \
+ WebChannelTest.qml \
+ tst_webchannel.qml \
+ tst_metaobjectpublisher.qml \
+ tst_bench.qml
+
+TESTDATA = data/*
diff --git a/tests/qml/tst_bench.qml b/tests/qml/tst_bench.qml
index c7c7c7c..6893a00 100644
--- a/tests/qml/tst_bench.qml
+++ b/tests/qml/tst_bench.qml
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QWebChannel module on Qt labs.
+** This file is part of the QtWebChannel module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -33,7 +33,7 @@
import QtQuick 2.0
-import Qt.labs.WebChannel 1.0
+import QtWebChannel 1.0
WebChannelTest {
name: "Bench"
diff --git a/tests/qml/tst_metaobjectpublisher.qml b/tests/qml/tst_metaobjectpublisher.qml
index 6cb01e6..c99cb47 100644
--- a/tests/qml/tst_metaobjectpublisher.qml
+++ b/tests/qml/tst_metaobjectpublisher.qml
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QWebChannel module on Qt labs.
+** This file is part of the QtWebChannel module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -33,7 +33,7 @@
import QtQuick 2.0
-import Qt.labs.WebChannel 1.0
+import QtWebChannel 1.0
WebChannelTest {
name: "MetaObjectPublisher"
diff --git a/tests/qml/tst_webchannel.qml b/tests/qml/tst_webchannel.qml
index a915ea3..2cc6153 100644
--- a/tests/qml/tst_webchannel.qml
+++ b/tests/qml/tst_webchannel.qml
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QWebChannel module on Qt labs.
+** This file is part of the QtWebChannel module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/tests.pro b/tests/tests.pro
index 3f166e8..a839495 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
-SUBDIRS = \
- qml
+qtHaveModule(quick) {
+ SUBDIRS += qml
+}