aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/Info.plist2
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp12
2 files changed, 10 insertions, 4 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/Info.plist b/share/qtcreator/qml/qmlpuppet/qml2puppet/Info.plist
index f8d63231ea..c15f81acad 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/Info.plist
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/Info.plist
@@ -28,7 +28,5 @@ be met: https://www.gnu.org/licenses/gpl-3.0.html.</string>
<string>qml2puppet</string>
<key>CFBundleIdentifier</key>
<string>org.qt-project.qtcreator.qml2puppet</string>
- <key>LSUIElement</key>
- <string>1</string>
</dict>
</plist>
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp
index 22460eaf6b..85c8e512d5 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp
@@ -132,8 +132,16 @@ int main(int argc, char *argv[])
// Since we always render text into an FBO, we need to globally disable
// subpixel antialiasing and instead use gray.
qputenv("QSG_DISTANCEFIELD_ANTIALIASING", "gray");
-#ifdef Q_OS_OSX //This keeps qml2puppet from stealing focus
- qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
+#ifdef Q_OS_MACOS
+ // We have to parse the arguments before Q[Gui]Application creation
+ // Since the Qt arguments are not filtered out, yet we do not know the position of the argument
+ for (int i = 0; i < argc; ++i) {
+ const char *arg = argv[i];
+ //In previewmode and rendermode we hide the process
+ if (!qstrcmp(arg, "previewmode") || !qstrcmp(arg, "rendermode"))
+ qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
+ // This keeps qml2puppet from stealing focus
+ }
#endif
//If a style different from Desktop is set we have to use QGuiApplication