Skip to content

Commit

Permalink
deps.qt: Restore native dialogs on macOS
Browse files Browse the repository at this point in the history
Revert qtbase 1b71e2d894c2be7052518cdcb96020c9950e2dc7:
QMessageBox: don't use a native dialog if a style sheet is active

The commit in question causes us to lose native dialogs on macOS. We can
restore them by reverting the above commit. This is hopefully a
temporary measure until either this is addressed in Qt itself or we get
guidance on the correct way to deal with this.
  • Loading branch information
RytoEX committed Feb 20, 2024
1 parent d90e263 commit e81a04e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions deps.qt/patches/Qt6/mac/0001-QTBUG-121351.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 047044c1fda8515975b163f0b011da1a80191377 Mon Sep 17 00:00:00 2001
From: Sebastian Beckmann <[email protected]>
Date: Mon, 12 Feb 2024 20:30:54 +0100
Subject: [PATCH] Revert "QMessageBox: don't use a native dialog if a style
sheet is active"

This reverts commit 1b71e2d894c2be7052518cdcb96020c9950e2dc7.
---
src/widgets/dialogs/qmessagebox.cpp | 1 -
1 file changed, 1 deletion(-)

diff --git a/qtbase/src/widgets/dialogs/qmessagebox.cpp b/qtbase/src/widgets/dialogs/qmessagebox.cpp
index cc8e985caf..51a986e8aa 100644
--- a/qtbase/src/widgets/dialogs/qmessagebox.cpp
+++ b/qtbase/src/widgets/dialogs/qmessagebox.cpp
@@ -2821,7 +2821,6 @@ bool QMessageBoxPrivate::canBeNativeDialog() const
return true;
if (QCoreApplication::testAttribute(Qt::AA_DontUseNativeDialogs)
|| q->testAttribute(Qt::WA_DontShowOnScreen)
- || q->testAttribute(Qt::WA_StyleSheet)
|| (options->options() & QMessageDialogOptions::Option::DontUseNativeDialog)) {
return false;
}
--
2.37.5

4 changes: 4 additions & 0 deletions deps.qt/qt6.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ local name='qt6'
local version=6.6.2
local url='https://download.qt.io/official_releases/qt/6.6/6.6.2'
local hash="${0:a:h}/checksums"
local -a patches=(
"macos ${0:a:h}/patches/Qt6/mac/0001-QTBUG-121351.patch \
df46dc93e874c36b2ad0da746c43585528308a7fcde60930c1ffb5e841472e7b"
)

local -a qt_components=(
'qtbase'
Expand Down

0 comments on commit e81a04e

Please sign in to comment.