on xenial help sign in
Implemented support for all requested cli options
commit50572adf4b84af3690b3d5fc56b923fd2b6666be authorJosh Arenson <joshua.arenson@canonical.com> dateMon 21 Apr 2014, 16:39 (12 years ago) parent8b34afb
1 file changed+12−8
src/main.cpp+12−8
src/main.cpp+12−8
@@ -49,18 +49,22 @@ int startShell(int argc, const char** argv, void* server)
4949 parser.setApplicationDescription("Description: Unity 8 Shell");
5050 parser.addHelpOption();
5151
52− QCommandLineOption fullscreenOption ("fullscreen",
53− QCoreApplication::translate("fullscreen","Run in fullscreen"));
52+ QCommandLineOption fullscreenOption("fullscreen",
53+ QCoreApplication::translate("fullscreen", "Run in fullscreen"));
5454 parser.addOption(fullscreenOption);
5555
56− QCommandLineOption framelessOption ("frameless",
57− QCoreApplication::translate("frameless","Run without window borders"));
56+ QCommandLineOption framelessOption("frameless",
57+ QCoreApplication::translate("frameless", "Run without window borders"));
5858 parser.addOption(framelessOption);
5959
60− QCommandLineOption mousetouchOption ("mousetouch",
61− QCoreApplication::translate("mousetouch","Allow the mouse to provide touch input"));
60+ QCommandLineOption mousetouchOption("mousetouch",
61+ QCoreApplication::translate("mousetouch", "Allow the mouse to provide touch input"));
6262 parser.addOption(mousetouchOption);
63−
63+
64+ QCommandLineOption testabilityOption("testability",
65+ QCoreApplication::translate("testability", "DISCOURAGED: Please set \
66+QT_LOAD_TESTABILITY instead. \nLoad the testability driver"));
67+ parser.addOption(testabilityOption);
6468
6569 if (isUbuntuMirServer) {
6670 QLibrary unityMir("unity-mir", 1);
@@ -92,7 +96,7 @@ int startShell(int argc, const char** argv, void* server)
9296
9397 // The testability driver is only loaded by QApplication but not by QGuiApplication.
9498 // However, QApplication depends on QWidget which would add some unneeded overhead => Let's load the testability driver on our own.
95− if (args.contains(QLatin1String("-testability")) || getenv("QT_LOAD_TESTABILITY")) {
99+ if (parser.isSet(testabilityOption) || getenv("QT_LOAD_TESTABILITY")) {
96100 QLibrary testLib(QLatin1String("qttestability"));
97101 if (testLib.load()) {
98102 typedef void (*TasInitialize)(void);