@@ -28,6 +28,7 @@
2828
2929#include <paths.h>
3030#include "../MouseTouchAdaptor.h"
31+#include "../ApplicationArguments.h"
3132#include "../CachingNetworkManagerFactory.h"
3233
3334int main(int argc, const char *argv[])
@@ -42,7 +43,11 @@ int main(int argc, const char *argv[])
4243 "Allow the mouse to provide touch input");
4344 parser.addOption(mousetouchOption);
4445
45− // FIXME Remove once we drop the need of the hint
46+ QCommandLineOption windowGeometryOption(QStringList() << "windowgeometry",
47+ "Specify the window geometry as [<width>x<height>]", "windowgeometry", "1");
48+ parser.addOption(windowGeometryOption);
49+
50+ // FIXME Remove once we drop the need of the hint
4651 QCommandLineOption desktopFileHintOption("desktop_file_hint",
4752 "The desktop_file_hint option for QtMir", "hint_file");
4853 parser.addOption(desktopFileHintOption);
@@ -52,6 +57,14 @@ int main(int argc, const char *argv[])
5257 parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
5358 parser.process(*application);
5459
60+ ApplicationArguments qmlArgs;
61+ if (parser.isSet(windowGeometryOption) &&
62+ parser.value(windowGeometryOption).split('x').size() == 2)
63+ {
64+ QStringList geom = parser.value(windowGeometryOption).split('x');
65+ qmlArgs.setSize(geom.at(0).toInt(), geom.at(1).toInt());
66+ }
67+
5568 if (getenv("QT_LOAD_TESTABILITY")) {
5669 QLibrary testLib(QLatin1String("qttestability"));
5770 if (testLib.load()) {
@@ -72,7 +85,8 @@ int main(int argc, const char *argv[])
7285
7386 QQuickView* view = new QQuickView();
7487 view->setResizeMode(QQuickView::SizeRootObjectToView);
75− view->setTitle("Unity Dash");
88+ view->setTitle("Scopes");
89+ view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
7690
7791 // You will need this if you want to interact with touch-only components using a mouse
7892 // Needed only when manually testing on a desktop.