commit 8a25aa9aee9467d43f3cc071b26c5214a8c9fe87
Author: Koji Yokota <[email protected]>
Date: Wed Nov 5 19:30:47 2025 +0900
Workaround Qt6 bug on macOS Tahoe
[QTBUG-141689]
https://bugreports.qt.io/browse/QTBUG-141689
---
src/frontends/qt/GuiAlert.cpp | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt/GuiAlert.cpp b/src/frontends/qt/GuiAlert.cpp
index e942996dc4..1b017652fb 100644
--- a/src/frontends/qt/GuiAlert.cpp
+++ b/src/frontends/qt/GuiAlert.cpp
@@ -32,6 +32,10 @@
#include <QInputDialog>
#include <QPushButton>
+#ifdef Q_OS_MACOS
+#include <QOperatingSystemVersion>
+#endif
+
#include <iomanip>
#include <iostream>
@@ -111,8 +115,14 @@ buttonid doPrompt(docstring const & title, docstring const
& question,
QMessageBox msg_box(QMessageBox::Information,
toqstr(title), toqstr(question),
QMessageBox::NoButton, qApp->focusWidget());
-#ifdef Q_OS_MAC
- msg_box.setWindowModality(Qt::WindowModal);
+#ifdef Q_OS_MACOS
+ // temporary workaround of the issue:
+ // https://bugreports.qt.io/browse/QTBUG-141689
+ if (QOperatingSystemVersion::current() <
+ QOperatingSystemVersion(QOperatingSystemVersion::MacOS, 26))
+ msg_box.setWindowModality(Qt::WindowModal);
+ else
+ msg_box.setWindowModality(Qt::ApplicationModal);
#endif
b[0] = msg_box.addButton(b1.empty() ? "OK" : toqstr(b1),
QMessageBox::ActionRole);
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs