From 454cca671135e0e99287ff16b01d32736a513387 Mon Sep 17 00:00:00 2001 From: martinrotter Date: Wed, 4 Jan 2023 14:17:38 +0100 Subject: [PATCH] Add workaround for a macOS-only Qt crash (#866) QTBUG: https://bugreports.qt.io/browse/QTBUG-102107 Co-authored-by: guihkx <626206+guihkx@users.noreply.github.com> --- src/librssguard/gui/dialogs/formmain.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/librssguard/gui/dialogs/formmain.cpp b/src/librssguard/gui/dialogs/formmain.cpp index c0c0f669d..5c3b42c98 100644 --- a/src/librssguard/gui/dialogs/formmain.cpp +++ b/src/librssguard/gui/dialogs/formmain.cpp @@ -267,6 +267,12 @@ void FormMain::prepareMenus() { if (QSysInfo::currentCpuArchitecture().contains(QSL("arm"), Qt::CaseSensitivity::CaseInsensitive)) { qWarningNN << LOGSEC_GUI << "Disabling native menu bar."; m_ui->m_menuBar->setNativeMenuBar(false); +#if defined(Q_OS_MACOS) + // This works around a macOS-only Qt crash. + // QTBUG: https://bugreports.qt.io/browse/QTBUG-102107 + // TODO: Remove this workaround once the upstream bug gets addressed. + m_ui->m_menuBar->setCornerWidget(nullptr); +#endif } }