diff --git a/containmentactions/contextmenu/menu.cpp b/containmentactions/contextmenu/menu.cpp index 2b421f41b..0800fbbad 100644 --- a/containmentactions/contextmenu/menu.cpp +++ b/containmentactions/contextmenu/menu.cpp @@ -64,8 +64,6 @@ Menu::~Menu() qDeleteAll(m_actions.values()); m_actions.clear(); - m_separator->deleteLater(); - //! sub-menus m_addViewMenu->deleteLater(); m_switchLayoutsMenu->deleteLater(); @@ -88,8 +86,8 @@ void Menu::makeActions() m_actions[Latte::Data::ContextMenu::SECTIONACTION]->setSeparator(true); m_actions[Latte::Data::ContextMenu::SECTIONACTION]->setText("Latte"); - m_separator = new QAction(this); - m_separator->setSeparator(true); + m_actions[Latte::Data::ContextMenu::SEPARATOR1ACTION] = new QAction(this); + m_actions[Latte::Data::ContextMenu::SEPARATOR1ACTION]->setSeparator(true); //! Print Message... m_printAction = new QAction(QIcon::fromTheme("edit"), "Print Message...", this); @@ -230,7 +228,7 @@ QList Menu::contextualActions() actions << m_preferenceAction; actions << m_quitApplication; - actions << m_separator; + actions << m_actions[Latte::Data::ContextMenu::SEPARATOR1ACTION]; actions << m_addWidgetsAction; actions << m_addViewAction; actions << m_moveAction; diff --git a/containmentactions/contextmenu/menu.h b/containmentactions/contextmenu/menu.h index 22dfc8d24..ed0e8f673 100644 --- a/containmentactions/contextmenu/menu.h +++ b/containmentactions/contextmenu/menu.h @@ -55,8 +55,6 @@ private: QHash m_actions; - QAction *m_separator{nullptr}; - QAction *m_addWidgetsAction{nullptr}; QAction *m_configureAction{nullptr}; QAction *m_duplicateAction{nullptr};