summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-20 01:00:08 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-03-20 14:09:30 +0100
commit6893919b0c4cddfbd82ebf963cc7bebde816b1b3 (patch)
tree9bfa1b57707fe609f9401c5b3bd5cd85ec1ae777 /src/widgets/widgets
parent3ca05b2a2e80863202bdb6a225f72debbb28b8fe (diff)
parent2bafd997ee515d3b6a6a8fb030e1265a4713713e (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/gui/kernel/qplatformintegration.cpp src/gui/kernel/qplatformintegration.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/xcb/qxcbconnection_screens.cpp Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp13
-rw-r--r--src/widgets/widgets/qsplitter.cpp8
2 files changed, 14 insertions, 7 deletions
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index 4af4f90119..bf6bf1c7c9 100644
--- a/src/widgets/widgets/qsplashscreen.cpp
+++ b/src/widgets/widgets/qsplashscreen.cpp
@@ -289,8 +289,7 @@ void QSplashScreen::setPixmap(const QPixmap &pixmap)
// 1) If a QDesktopScreenWidget is found in the parent hierarchy, use that (see docs on
// QSplashScreen(QWidget *, QPixmap).
// 2) If a widget with associated QWindow is found, use that
-// 3) When nothing can be found, do not position the widget, allowing for
-// QPlatformWindow::initialGeometry() to center it over the cursor
+// 3) When nothing can be found, try to center it over the cursor
static inline int screenNumberOf(const QDesktopScreenWidget *dsw)
{
@@ -307,7 +306,15 @@ const QScreen *QSplashScreenPrivate::screenFor(const QWidget *w)
if (QWindow *window = p->windowHandle())
return window->screen();
}
- return nullptr;
+#if QT_CONFIG(cursor)
+ // Note: We could rely on QPlatformWindow::initialGeometry() to center it
+ // over the cursor, but not all platforms (namely Android) use that.
+ if (QGuiApplication::screens().size() > 1) {
+ if (auto screenAtCursor = QGuiApplication::screenAt(QCursor::pos()))
+ return screenAtCursor;
+ }
+#endif // cursor
+ return QGuiApplication::primaryScreen();
}
void QSplashScreenPrivate::setPixmap(const QPixmap &p, const QScreen *screen)
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index 98bb23caad..de838a8f93 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -161,11 +161,10 @@ Qt::Orientation QSplitterHandle::orientation() const
/*!
- Returns \c true if widgets are resized dynamically (opaquely), otherwise
- returns \c false. This value is controlled by the QSplitter.
+ Returns \c true if widgets are resized dynamically (opaquely) while interactively moving the
+ splitter. Otherwise returns \c false. This value is controlled by the QSplitter.
\sa QSplitter::opaqueResize()
-
*/
bool QSplitterHandle::opaqueResize() const
{
@@ -1483,7 +1482,8 @@ int QSplitter::closestLegalPosition(int pos, int index)
/*!
\property QSplitter::opaqueResize
- \brief whether resizing is opaque
+ Returns \c true if widgets are resized dynamically (opaquely) while interactively moving the
+ splitter. Otherwise returns \c false.
The default resize behavior is style dependent (determined by the
SH_Splitter_OpaqueResize style hint). However, you can override it