mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
Don't close tags menu when toggling items (#15098)
The issue was resolved by using QAction::toggled signal instead of QAction::triggered. In QT 5.15+ the latter signal causes a QMenu to close, whereas the former does not. Closes #13492.
This commit is contained in:
@@ -45,8 +45,7 @@ TriStateAction::TriStateAction(const QString &text, QWidget *parent)
|
||||
m_triStateWidget->setCheckState(checked ? Qt::Checked : Qt::Unchecked);
|
||||
});
|
||||
|
||||
connect(m_triStateWidget, &TriStateWidget::triggered, this, &QAction::setChecked);
|
||||
connect(m_triStateWidget, &TriStateWidget::triggered, this, &QAction::triggered);
|
||||
connect(m_triStateWidget, &TriStateWidget::triggered, this, &QAction::toggled);
|
||||
setDefaultWidget(m_triStateWidget);
|
||||
}
|
||||
|
||||
@@ -56,7 +55,7 @@ void TriStateAction::setCheckState(const Qt::CheckState checkState)
|
||||
m_triStateWidget->setCheckState(checkState);
|
||||
}
|
||||
|
||||
void TriStateAction::setCloseOnTriggered(const bool enabled)
|
||||
void TriStateAction::setCloseOnInteraction(const bool enabled)
|
||||
{
|
||||
m_triStateWidget->setCloseOnTriggered(enabled);
|
||||
m_triStateWidget->setCloseOnInteraction(enabled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user