From fc09159454375aa2ff9502f8fe117dc924529fdf Mon Sep 17 00:00:00 2001 From: Frerich Raabe Date: Thu, 2 Jun 2016 11:03:25 +0200 Subject: 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 --- src/sdk/constants.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sdk/constants.h') 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 -- cgit v1.2.3