@@ -27,8 +27,9 @@
27#include <libintl.h>
27#include <libintl.h>
29#include <paths.h>
29#include <paths.h>
30+#ifdef UNITY8_ENABLE_TOUCH_EMULATION
30−#include "../MouseTouchAdaptor.h"
31+ #include "../MouseTouchAdaptor.h"
31−#include "../ApplicationArguments.h"
32+#endif
32#include "../CachingNetworkManagerFactory.h"
33#include "../CachingNetworkManagerFactory.h"
34int main(int argc, const char *argv[])
35int main(int argc, const char *argv[])
@@ -57,8 +58,6 @@ int main(int argc, const char *argv[])
57 parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
58 parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
58 parser.process(*application);
59 parser.process(*application);
60− ApplicationArguments qmlArgs;
62 if (getenv("QT_LOAD_TESTABILITY")) {
61 if (getenv("QT_LOAD_TESTABILITY")) {
63 QLibrary testLib(QStringLiteral("qttestability"));
62 QLibrary testLib(QStringLiteral("qttestability"));
64 if (testLib.load()) {
63 if (testLib.load()) {
@@ -92,14 +91,15 @@ int main(int argc, const char *argv[])
94 view->setTitle(QStringLiteral("Scopes"));
93 view->setTitle(QStringLiteral("Scopes"));
95− view->rootContext()->setContextProperty(QStringLiteral("applicationArguments"), &qmlArgs);
95+ #ifdef UNITY8_ENABLE_TOUCH_EMULATION
97 // You will need this if you want to interact with touch-only components using a mouse
96 // You will need this if you want to interact with touch-only components using a mouse
98 // Needed only when manually testing on a desktop.
97 // Needed only when manually testing on a desktop.
99 MouseTouchAdaptor *mouseTouchAdaptor = 0;
98 MouseTouchAdaptor *mouseTouchAdaptor = 0;
100 if (parser.isSet(mousetouchOption)) {
99 if (parser.isSet(mousetouchOption)) {
101 mouseTouchAdaptor = MouseTouchAdaptor::instance();
100 mouseTouchAdaptor = MouseTouchAdaptor::instance();
104 QUrl source(::qmlDirectory() + "/Dash/DashApplication.qml");
104 QUrl source(::qmlDirectory() + "/Dash/DashApplication.qml");
105 prependImportPaths(view->engine(), ::overrideImportPaths());
105 prependImportPaths(view->engine(), ::overrideImportPaths());
@@ -114,7 +114,11 @@ int main(int argc, const char *argv[])
114 int result = application->exec();
114 int result = application->exec();
116 delete view;
116 delete view;
118+ #ifdef UNITY8_ENABLE_TOUCH_EMULATION
117 delete mouseTouchAdaptor;
119 delete mouseTouchAdaptor;
118 delete application;
122 delete application;
120 return result;
124 return result;