mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-30 12:18:05 -06:00
Avoid creating unnecessary event loops
The `exec()` method will create another event loop and transfer control over there which might introduce unexpected bugs.
This commit is contained in:
@@ -48,8 +48,9 @@ ComboBoxMenuButton::ComboBoxMenuButton(QWidget *parent, QMenu *menu)
|
||||
|
||||
void ComboBoxMenuButton::showPopup()
|
||||
{
|
||||
QPoint p = mapToGlobal(QPoint(0, height()));
|
||||
m_menu->exec(p);
|
||||
const QPoint p = mapToGlobal(QPoint(0, height()));
|
||||
m_menu->popup(p);
|
||||
|
||||
QComboBox::hidePopup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user