summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-22 22:28:32 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-22 22:28:33 +0200
commitc0f7cc3a3cc3f06b09591f25277f8083b3a55581 (patch)
treeecf3d3f49d6dc85b55fbdbe999e386ceda31ef39 /src/widgets
parent139240ac671953f0763308f235d8b868c1efe1b1 (diff)
parentaa6d7dd7ee306c0adbcd42b013d1e749072205bb (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dialogs/qwizard.cpp10
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.h2
-rw-r--r--src/widgets/widgets/qmenubar.cpp13
3 files changed, 12 insertions, 13 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 7558054da5..5752e218c2 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -3271,9 +3271,13 @@ bool QWizard::nativeEvent(const QByteArray &eventType, void *message, long *resu
MSG *windowsMessage = static_cast<MSG *>(message);
const bool winEventResult = d->vistaHelper->handleWinEvent(windowsMessage, result);
if (QVistaHelper::vistaState() != d->vistaState) {
- d->vistaState = QVistaHelper::vistaState();
- d->vistaStateChanged = true;
- setWizardStyle(AeroStyle);
+ // QTBUG-78300: When Qt::AA_NativeWindows is set, delay further
+ // window creation until after the platform window creation events.
+ if (windowsMessage->message == WM_GETICON) {
+ d->vistaStateChanged = true;
+ d->vistaState = QVistaHelper::vistaState();
+ setWizardStyle(AeroStyle);
+ }
}
return winEventResult;
} else {
diff --git a/src/widgets/graphicsview/qgraphicsscene.h b/src/widgets/graphicsview/qgraphicsscene.h
index 3cc00ead08..d36a871533 100644
--- a/src/widgets/graphicsview/qgraphicsscene.h
+++ b/src/widgets/graphicsview/qgraphicsscene.h
@@ -115,7 +115,7 @@ public:
BspTreeIndex,
NoIndex = -1
};
-
+ Q_ENUM(ItemIndexMethod)
enum SceneLayer {
ItemLayer = 0x1,
BackgroundLayer = 0x2,
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 3d31a3b73a..69b1c5896f 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -324,15 +324,10 @@ void QMenuBarPrivate::popupAction(QAction *action, bool activateFirst)
QPoint pos(q->mapToGlobal(QPoint(adjustedActionRect.left(), adjustedActionRect.bottom() + 1)));
QSize popup_size = activeMenu->sizeHint();
//we put the popup menu on the screen containing the bottom-center of the action rect
- QScreen *popupScreen = q->window()->windowHandle()->screen();
- QPoint bottomMiddlePos = pos + QPoint(adjustedActionRect.width() / 2, 0);
- const auto &siblings = popupScreen->virtualSiblings();
- for (QScreen *sibling : siblings) {
- if (sibling->geometry().contains(bottomMiddlePos)) {
- popupScreen = sibling;
- break;
- }
- }
+ QScreen *menubarScreen = q->window()->windowHandle()->screen();
+ QScreen *popupScreen = menubarScreen->virtualSiblingAt(pos + QPoint(adjustedActionRect.width() / 2, 0));
+ if (!popupScreen)
+ popupScreen = menubarScreen;
QRect screenRect = popupScreen->geometry();
pos = QPoint(qMax(pos.x(), screenRect.x()), qMax(pos.y(), screenRect.y()));
const bool fitUp = (pos.y() - popup_size.height() >= screenRect.top());