summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-06-28 01:00:23 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-06-28 01:00:23 +0200
commit7265fb0597a52692ffeb455a3da1271903b8cd58 (patch)
tree096426673daaac690735a86b10a26c2e625cd424 /src/plugins/platforms
parent0d6b4b519272915c2690ee12d1834823747233ab (diff)
parent2a756e294e2efa4bcb2b51afd1c20822df251f29 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm19
2 files changed, 21 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp
index a78a62337f..7fc68c3d7c 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.cpp
+++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp
@@ -489,6 +489,8 @@ QVariant QAndroidPlatformTheme::themeHint(ThemeHint hint) const
Q_FALLTHROUGH();
}
+ case DialogButtonBoxLayout:
+ return QVariant(QPlatformDialogHelper::AndroidLayout);
default:
return QPlatformTheme::themeHint(hint);
}
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 300082d694..08e7447a75 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -215,6 +215,25 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
connect(qGuiApp, &QGuiApplication::focusWindowChanged,
this, &QCocoaIntegration::focusWindowChanged);
+
+ static auto splashScreenHider = QMacKeyValueObserver(NSApp, @"modalWindow", []{
+ const QWindowList allWindows = QGuiApplication::topLevelWindows();
+ for (QWindow *window : allWindows) {
+ if ((window->flags() & Qt::SplashScreen) == Qt::SplashScreen) {
+ QCocoaWindow *platformWindow = static_cast<QCocoaWindow*>(window->handle());
+ NSWindow *splashWindow = platformWindow->view().window;
+ if (!splashWindow)
+ continue;
+ if (NSApp.modalWindow) {
+ NSInteger originalLevel = splashWindow.level;
+ splashWindow.level = NSNormalWindowLevel;
+ window->setProperty("_q_levelBeforeModalSession", (qlonglong)originalLevel);
+ } else if (NSInteger originalLevel = window->property("_q_levelBeforeModalSession").toLongLong()) {
+ splashWindow.level = originalLevel;
+ }
+ }
+ }
+ });
}
QCocoaIntegration::~QCocoaIntegration()