on xenial help sign in
Fix warning on make try*
8f05dd2Albert Astals Cid
tests/uqmlscene/CMakeLists.txt+1
@@ -8,6 +8,7 @@ qt5_use_modules(uqmlscene Qml Quick Test)
8pkg_check_modules(XCB REQUIRED xcb)
8pkg_check_modules(XCB REQUIRED xcb)
9
9
10include_directories(
10include_directories(
11+ ${CMAKE_CURRENT_BINARY_DIR}
11 ${CMAKE_SOURCE_DIR}/src
12 ${CMAKE_SOURCE_DIR}/src
12 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
13 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
13 ${CMAKE_SOURCE_DIR}/libs/UbuntuGestures
14 ${CMAKE_SOURCE_DIR}/libs/UbuntuGestures
tests/uqmlscene/main.cpp+17−1
@@ -345,12 +345,26 @@ static void loadDummyDataFiles(QQmlEngine &engine, const QString& directory)
345 }
345 }
346}
346}
347
347
348+class DummyTestRootObject : public QObject
349+{
350+ Q_OBJECT
351+ Q_PROPERTY(bool windowShown READ windowShown NOTIFY windowShownChanged)
352+
353+public:
354+ DummyTestRootObject(QObject *o) : QObject(o) {}
355+
356+ bool windowShown() const { return false; }
357+
358+Q_SIGNALS:
359+ void windowShownChanged();
360+};
361+
348static QObject *s_testRootObject = nullptr;
362static QObject *s_testRootObject = nullptr;
349static QObject *testRootObject(QQmlEngine *engine, QJSEngine *jsEngine)
363static QObject *testRootObject(QQmlEngine *engine, QJSEngine *jsEngine)
350{
364{
351 Q_UNUSED(jsEngine);
365 Q_UNUSED(jsEngine);
352 if (!s_testRootObject) {
366 if (!s_testRootObject) {
353− s_testRootObject = new QObject(engine);
367+ s_testRootObject = new DummyTestRootObject(engine);
354 }
368 }
355 return s_testRootObject;
369 return s_testRootObject;
356}
370}
@@ -560,3 +574,5 @@ int main(int argc, char ** argv)
560
574
561 return exitCode;
575 return exitCode;
562}
576}
577+
578+#include "main.moc"