mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 13:17:41 +02:00
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into validate_metadata
This commit is contained in:
@ -309,4 +309,15 @@ bool WideBar::checkHash(QByteArray const& old_hash) const
|
||||
return old_hash == getHash();
|
||||
}
|
||||
|
||||
void WideBar::removeAction(QAction* action)
|
||||
{
|
||||
auto iter = getMatching(action);
|
||||
if (iter == m_entries.end())
|
||||
return;
|
||||
|
||||
iter->bar_action->setVisible(false);
|
||||
removeAction(iter->bar_action);
|
||||
m_entries.erase(iter);
|
||||
}
|
||||
|
||||
#include "WideBar.moc"
|
||||
|
@ -38,6 +38,8 @@ class WideBar : public QToolBar {
|
||||
[[nodiscard]] QByteArray getVisibilityState() const;
|
||||
void setVisibilityState(QByteArray&&);
|
||||
|
||||
void removeAction(QAction* action);
|
||||
|
||||
private:
|
||||
struct BarEntry {
|
||||
enum class Type { None, Action, Separator, Spacer } type = Type::None;
|
||||
|
Reference in New Issue
Block a user