@@ -18,6 +18,7 @@
21+#include <QCommandLineParser>
21#include <QtQuick/QQuickView>
22#include <QtQuick/QQuickView>
22#include <QtGui/QGuiApplication>
23#include <QtGui/QGuiApplication>
23#include <QtQml/QQmlEngine>
24#include <QtQml/QQmlEngine>
@@ -43,6 +44,15 @@ int startShell(int argc, const char** argv, void* server)
44 QGuiApplication::setApplicationName("Unity 8");
45 QGuiApplication::setApplicationName("Unity 8");
45 QGuiApplication *application;
46 QGuiApplication *application;
48+ QCommandLineParser parser;
49+ parser.setApplicationDescription("Application Description Goes Here!");
50+ parser.addHelpOption();
52+ QCommandLineOption fullscreenOption (QStringList() << "f" << "fullscreen",
53+ "Run in fullscreen");
54+ parser.addOption(fullscreenOption);
46 if (isUbuntuMirServer) {
56 if (isUbuntuMirServer) {
47 QLibrary unityMir("unity-mir", 1);
57 QLibrary unityMir("unity-mir", 1);
48 unityMir.load();
58 unityMir.load();
@@ -58,6 +68,8 @@ int startShell(int argc, const char** argv, void* server)
59 application = new QGuiApplication(argc, (char**)argv);
69 application = new QGuiApplication(argc, (char**)argv);
72+ parser.process(*application);
62 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
74 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
63 if (indicatorProfile.isEmpty()) {
75 if (indicatorProfile.isEmpty()) {
@@ -125,7 +137,7 @@ int startShell(int argc, const char** argv, void* server)
125 view->setSource(source);
137 view->setSource(source);
126 view->setColor("transparent");
138 view->setColor("transparent");
128− if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || args.contains(QLatin1String("-fullscreen"))) {
140+ if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || parser.isSet(fullscreenOption)) {
129 view->showFullScreen();
141 view->showFullScreen();
131 view->show();
143 view->show();