@@ -27,8 +27,9 @@
2727#include <libintl.h>
2828
2929#include <paths.h>
30−#include "../MouseTouchAdaptor.h"
31−#include "../ApplicationArguments.h"
30+#ifdef UNITY8_ENABLE_TOUCH_EMULATION
31+ #include "../MouseTouchAdaptor.h"
32+#endif
3233#include "../CachingNetworkManagerFactory.h"
3334
3435int main(int argc, const char *argv[])
@@ -57,8 +58,6 @@ int main(int argc, const char *argv[])
5758 parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
5859 parser.process(*application);
5960
60− ApplicationArguments qmlArgs;
61−
6261 if (getenv("QT_LOAD_TESTABILITY")) {
6362 QLibrary testLib(QStringLiteral("qttestability"));
6463 if (testLib.load()) {
@@ -92,14 +91,15 @@ int main(int argc, const char *argv[])
9291 }
9392
9493 view->setTitle(QStringLiteral("Scopes"));
95− view->rootContext()->setContextProperty(QStringLiteral("applicationArguments"), &qmlArgs);
9694
95+ #ifdef UNITY8_ENABLE_TOUCH_EMULATION
9796 // You will need this if you want to interact with touch-only components using a mouse
9897 // Needed only when manually testing on a desktop.
9998 MouseTouchAdaptor *mouseTouchAdaptor = 0;
10099 if (parser.isSet(mousetouchOption)) {
101100 mouseTouchAdaptor = MouseTouchAdaptor::instance();
102101 }
102+ #endif
103103
104104 QUrl source(::qmlDirectory() + "/Dash/DashApplication.qml");
105105 prependImportPaths(view->engine(), ::overrideImportPaths());
@@ -114,7 +114,11 @@ int main(int argc, const char *argv[])
114114 int result = application->exec();
115115
116116 delete view;
117+
118+ #ifdef UNITY8_ENABLE_TOUCH_EMULATION
117119 delete mouseTouchAdaptor;
120+ #endif
121+
118122 delete application;
119123
120124 return result;