From: Morten Johan Sorvig Date: Tue, 7 Aug 2012 12:17:27 +0000 (+0200) Subject: Handle "-psn_XXX" command line args on Mac X-Git-Tag: v5.0.0-beta1~331 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca23ae5c4b67f498b6c741b7ff1f521111df7ca0;p=profile%2Fivi%2Fqtbase.git 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 Reviewed-by: Simo Fält Reviewed-by: Marius Storm-Olsen Reviewed-by: Lars Knoll --- diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index af899cf..85297dd 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]; }