From b552c04e43166f2cb9c67b9bf859bd4962796dfd Mon Sep 17 00:00:00 2001 From: ann0see <20726856+ann0see@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:32:40 +0200 Subject: [PATCH] Use Qt::QueuedConnection for language message box Due to https://bugreports.qt.io/browse/QTBUG-64577 on iOS a Qt::QueuedConnection is necessary. Otherwise, the message box would never show up and hang the app. --- src/util.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 9bd56db361..e4e961fe13 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -642,7 +642,12 @@ CHelpMenu::CHelpMenu ( const bool bIsClient, QWidget* parent ) : QMenu ( tr ( "& // Language combo box ---------------------------------------------------------- CLanguageComboBox::CLanguageComboBox ( QWidget* parent ) : QComboBox ( parent ), iIdxSelectedLanguage ( INVALID_INDEX ) { - QObject::connect ( this, static_cast ( &QComboBox::activated ), this, &CLanguageComboBox::OnLanguageActivated ); + // This requires a Qt::QueuedConnection on iOS due to https://bugreports.qt.io/browse/QTBUG-64577 + QObject::connect ( this, + static_cast ( &QComboBox::activated ), + this, + &CLanguageComboBox::OnLanguageActivated, + Qt::QueuedConnection ); } void CLanguageComboBox::Init ( QString& strSelLanguage )