Skip to content

Commit

Permalink
Use Qt::QueuedConnection for language message box
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ann0see committed Oct 13, 2024
1 parent c1718a8 commit b552c04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<void ( QComboBox::* ) ( int )> ( &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<void ( QComboBox::* ) ( int )> ( &QComboBox::activated ),
this,
&CLanguageComboBox::OnLanguageActivated,
Qt::QueuedConnection );
}

void CLanguageComboBox::Init ( QString& strSelLanguage )
Expand Down

0 comments on commit b552c04

Please sign in to comment.