Skip to content

Commit b552c04

Browse files
committed
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.
1 parent c1718a8 commit b552c04

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/util.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,12 @@ CHelpMenu::CHelpMenu ( const bool bIsClient, QWidget* parent ) : QMenu ( tr ( "&
642642
// Language combo box ----------------------------------------------------------
643643
CLanguageComboBox::CLanguageComboBox ( QWidget* parent ) : QComboBox ( parent ), iIdxSelectedLanguage ( INVALID_INDEX )
644644
{
645-
QObject::connect ( this, static_cast<void ( QComboBox::* ) ( int )> ( &QComboBox::activated ), this, &CLanguageComboBox::OnLanguageActivated );
645+
// This requires a Qt::QueuedConnection on iOS due to https://bugreports.qt.io/browse/QTBUG-64577
646+
QObject::connect ( this,
647+
static_cast<void ( QComboBox::* ) ( int )> ( &QComboBox::activated ),
648+
this,
649+
&CLanguageComboBox::OnLanguageActivated,
650+
Qt::QueuedConnection );
646651
}
647652

648653
void CLanguageComboBox::Init ( QString& strSelLanguage )

0 commit comments

Comments
 (0)