diff options
author | Frerich Raabe <raabe@froglogic.com> | 2016-06-02 11:03:25 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2017-01-11 10:05:58 +0000 |
commit | fc09159454375aa2ff9502f8fe117dc924529fdf (patch) | |
tree | 67e2efdde1d9106a3ab5b2c1e2d061e23726f8f9 /src/sdk/constants.h | |
parent | b4144d80976c1af3c68b8f78dec635146f3c6981 (diff) |
Avoid warning messages when passing '--platform minimal'
Unattended installations typically use no UI, and the documentation
recommends passing '-platform minimal' (note: one dash!) to hide the UI.
Alas, the command line parsing is not implemented in terms of
QCoreApplication::arguments() which means that even the -platform
argument which is meant to be processed by QApplication is interpreted
by the command line parser -- which then complains about the unknown
switch by printing
Unknown option: p, l, a, t, f, o, r, m
Let's avoid this by just registering a dummy '--platform' switch
ourselves. It has no effect, but avoids the warning. This however means
that two dashes need to be used, because that's how the command line
parser works.
For what it's worth, there is also a 'gui.setSilent()' setter, but it's
not quite as comprehensive as using the 'minimal' platform plugin: using
setSilent() will still create a QApplication and thus create e.g. a task
bar entry on OS X (and I suspect it requires an X connection on Linux).
The 'minimal' platform plugin apparently avoids this.
Change-Id: I8cd4cfd496f8c435f0766e3162672eaefbef94cc
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/sdk/constants.h')
-rw-r--r-- | src/sdk/constants.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sdk/constants.h b/src/sdk/constants.h index 7c849135c..e1224f573 100644 --- a/src/sdk/constants.h +++ b/src/sdk/constants.h @@ -58,6 +58,7 @@ const char StartServer[] = "startserver"; const char StartClient[] = "startclient"; const char InstallCompressedRepository[] = "installCompressedRepository"; const char SilentUpdate[] = "silentUpdate"; +const char Platform[] = "platform"; } // namespace CommandLineOptions |