on xenial help sign in
unity8-dash also needs a TouchRegistry
84a0589Daniel d'Andrada
src/Dash/CMakeLists.txt+2
@@ -12,6 +12,8 @@ qt5_use_modules(unity8-dash Gui Qml Quick Test)
12# For it to find libUbuntuGestures.so, needed by Ubuntu.Gestures QML module.
12# For it to find libUbuntuGestures.so, needed by Ubuntu.Gestures QML module.
13set_target_properties(unity8-dash PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}")
13set_target_properties(unity8-dash PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}")
14
14
15+target_link_libraries(unity8-dash UbuntuGestures)
16+
15# install binaries
17# install binaries
16install(TARGETS ${DASH_APP}
18install(TARGETS ${DASH_APP}
17 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
19 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
src/Dash/main.cpp+6
@@ -31,6 +31,9 @@
31#include "../ApplicationArguments.h"
31#include "../ApplicationArguments.h"
32#include "../CachingNetworkManagerFactory.h"
32#include "../CachingNetworkManagerFactory.h"
33
33
34+// Ubuntu Gestures
35+#include <TouchRegistry.h>
36+
34int main(int argc, const char *argv[])
37int main(int argc, const char *argv[])
35{
38{
36 QGuiApplication *application = new QGuiApplication(argc, (char**)argv);
39 QGuiApplication *application = new QGuiApplication(argc, (char**)argv);
@@ -88,6 +91,9 @@ int main(int argc, const char *argv[])
88 view->setTitle("Scopes");
91 view->setTitle("Scopes");
89 view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
92 view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
90
93
94+ TouchRegistry touchRegistry;
95+ view->installEventFilter(&touchRegistry);
96+
91 // You will need this if you want to interact with touch-only components using a mouse
97 // You will need this if you want to interact with touch-only components using a mouse
92 // Needed only when manually testing on a desktop.
98 // Needed only when manually testing on a desktop.
93 MouseTouchAdaptor *mouseTouchAdaptor = 0;
99 MouseTouchAdaptor *mouseTouchAdaptor = 0;