summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sorvig <morten.sorvig@nokia.com>2012-08-07 14:17:27 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-10 11:42:22 +0200
commitca23ae5c4b67f498b6c741b7ff1f521111df7ca0 (patch)
treed6c8aa0b1ed5212fea0d8f9386b59233cfe83207
parent8ec3a419d12294c07ae4ea7970caa21a22f82182 (diff)
Handle "-psn_XXX" command line args on Mac
Finder on Mac OS X sends a command line argument of the form -psn_0_3523420 when launching applications. Eat the argument like we do in Qt 4. Change-Id: I09db9dea035e62c0b816a833c9ad6fcd78f83735 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Simo Fält <simo.falt@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r--src/gui/kernel/qguiapplication.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index af899cf792..85297dda1c 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -842,6 +842,10 @@ void QGuiApplicationPrivate::init()
} else if (arg == "-reverse") {
force_reverse = true;
QGuiApplication::setLayoutDirection(Qt::RightToLeft);
+#ifdef Q_OS_MAC
+ } else if (arg.startsWith("-psn_")) {
+ // eat "-psn_xxxx" on Mac
+#endif
} else {
argv[j++] = argv[i];
}