The call to `printUsage()` happens in `BrowserApplication::initialize()`, which is after the constructor has been called. The base class `QApplication` seems to require a Mir server (or X server) running.
Conclusion
----------
- In order to be able to print the usage on the console without requiring a Mir server this call needs to be made before the constructor is called.
- It may also be a good idea to check all the command line arguments and reject invalid ones. (Is there no module available for this, similar to Python's argparse? Can we use QCommandLineParser? http://doc.qt.io/qt-5/qcommandlineparser.html)
The call to `printUsage()` happens in `BrowserApplica tion::initializ e()`, which is after the constructor has been called. The base class `QApplication` seems to require a Mir server (or X server) running.
Conclusion
----------
- In order to be able to print the usage on the console without requiring a Mir server this call needs to be made before the constructor is called.
- It may also be a good idea to check all the command line arguments and reject invalid ones. (Is there no module available for this, similar to Python's argparse? Can we use QCommandLineParser? http:// doc.qt. io/qt-5/ qcommandlinepar ser.html)
References
----------
- http:// bazaar. launchpad. net/~ubuntu- branches/ ubuntu/ wily/webbrowser -app/wily/ view/head: /src/app/ browserapplicat ion.cpp# L121 bazaar. launchpad. net/~ubuntu- branches/ ubuntu/ wily/webbrowser -app/wily/ view/head: /src/app/ browserapplicat ion.cpp# L42 doc.qt. io/qt-5/ qcommandlinepar ser.html
- http://
- http://