forked from qt-creator/qt-creator
QmlDesigner: Do not allow keyboard focus on macOS for puppet
Since we integrated the 3D view no keyboard focus is required anymore. Change-Id: Ia523e1a6b0c1d0ef9912775a91022f28de47b54a Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -28,5 +28,7 @@ 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>
|
||||
|
@@ -133,19 +133,7 @@ int main(int argc, char *argv[])
|
||||
// subpixel antialiasing and instead use gray.
|
||||
qputenv("QSG_DISTANCEFIELD_ANTIALIASING", "gray");
|
||||
#ifdef Q_OS_MACOS
|
||||
if (!qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_MODE")) {
|
||||
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
|
||||
} else {
|
||||
// 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
|
||||
}
|
||||
}
|
||||
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
|
||||
#endif
|
||||
|
||||
//If a style different from Desktop is set we have to use QGuiApplication
|
||||
|
Reference in New Issue
Block a user