mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-27 02:50:22 +03:00
context:use restore() provided function
containment() is not accessible during the containment actions constructor. We now use the provided ::restore() function in order to load the actions BUG:441448
This commit is contained in:
parent
f0ce1fff90
commit
5e03174b7c
@ -56,7 +56,6 @@ enum LatteConfigPage
|
||||
Menu::Menu(QObject *parent, const QVariantList &args)
|
||||
: Plasma::ContainmentActions(parent, args)
|
||||
{
|
||||
makeActions();
|
||||
}
|
||||
|
||||
Menu::~Menu()
|
||||
@ -75,8 +74,12 @@ Menu::~Menu()
|
||||
m_actions.clear();
|
||||
}
|
||||
|
||||
void Menu::makeActions()
|
||||
void Menu::restore(const KConfigGroup &config)
|
||||
{
|
||||
if (!m_actions.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_actions[Latte::Data::ContextMenu::SECTIONACTION] = new QAction(this);
|
||||
m_actions[Latte::Data::ContextMenu::SECTIONACTION]->setSeparator(true);
|
||||
m_actions[Latte::Data::ContextMenu::SECTIONACTION]->setText("Latte");
|
||||
|
@ -30,10 +30,10 @@ public:
|
||||
~Menu() override;
|
||||
|
||||
QList<QAction *> contextualActions() override;
|
||||
void restore(const KConfigGroup &) override;
|
||||
|
||||
QAction *action(const QString &name);
|
||||
private Q_SLOTS:
|
||||
void makeActions();
|
||||
void populateLayouts();
|
||||
void populateMoveToLayouts();
|
||||
void populateViewTemplates();
|
||||
|
Loading…
x
Reference in New Issue
Block a user