diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-10 17:10:10 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-10 17:10:10 +0100 |
commit | 107e60448ec89883e60905f5a1cef507c0bf9fc2 (patch) | |
tree | 36fe3ba8226bb2bba594de8a3d574bfa2e28ce36 /tests/kubetestrunner.cpp | |
parent | 4e0369c1ca779576998c27dc4f06c018c5a22202 (diff) | |
download | kube-107e60448ec89883e60905f5a1cef507c0bf9fc2.tar.gz kube-107e60448ec89883e60905f5a1cef507c0bf9fc2.zip |
Run views with a test dataset using TestStore.
This allows us to start the view using qmlscene with a testdata set that
is created in a test datastore (isolated from the regular data).
Diffstat (limited to 'tests/kubetestrunner.cpp')
-rw-r--r-- | tests/kubetestrunner.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/kubetestrunner.cpp b/tests/kubetestrunner.cpp index dd022091..99017a43 100644 --- a/tests/kubetestrunner.cpp +++ b/tests/kubetestrunner.cpp | |||
@@ -19,21 +19,10 @@ | |||
19 | #include <QtQuickTest/quicktest.h> | 19 | #include <QtQuickTest/quicktest.h> |
20 | #include <QQmlEngine> | 20 | #include <QQmlEngine> |
21 | #include <sink/test.h> | 21 | #include <sink/test.h> |
22 | #include "teststore.h" | ||
23 | |||
24 | static QObject *teststore(QQmlEngine *engine, QJSEngine *scriptEngine) | ||
25 | { | ||
26 | Q_UNUSED(engine) | ||
27 | Q_UNUSED(scriptEngine) | ||
28 | return new Kube::TestStore; | ||
29 | } | ||
30 | 22 | ||
31 | int main(int argc, char **argv) | 23 | int main(int argc, char **argv) |
32 | { | 24 | { |
33 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); | 25 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); |
34 | Sink::Test::initTest(); | ||
35 | |||
36 | qmlRegisterSingletonType<Kube::TestStore>("org.kube.test", 1, 0, "TestStore", teststore); | ||
37 | 26 | ||
38 | QTEST_ADD_GPU_BLACKLIST_SUPPORT | 27 | QTEST_ADD_GPU_BLACKLIST_SUPPORT |
39 | QTEST_SET_MAIN_SOURCE_PATH | 28 | QTEST_SET_MAIN_SOURCE_PATH |