From d13f6bb870cdda71257f665367be8ef9fca86255 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Tue, 17 May 2022 11:47:01 +0200 Subject: Apply clang-format. --- src/modlistcontextmenu.h | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'src/modlistcontextmenu.h') diff --git a/src/modlistcontextmenu.h b/src/modlistcontextmenu.h index 8a6ce3df..320ece93 100644 --- a/src/modlistcontextmenu.h +++ b/src/modlistcontextmenu.h @@ -18,39 +18,37 @@ class ModListGlobalContextMenu : public QMenu { Q_OBJECT public: - - ModListGlobalContextMenu(OrganizerCore& core, ModListView* view, QWidget* parent = nullptr); + ModListGlobalContextMenu(OrganizerCore& core, ModListView* view, + QWidget* parent = nullptr); protected: - friend class ModListContextMenu; // populate the menu void populate(OrganizerCore& core, ModListView* view, const QModelIndex& index); // creates a "All mods" context menu for the given index (can be invalid). - ModListGlobalContextMenu(OrganizerCore& core, ModListView* view, const QModelIndex& index, QWidget* parent = nullptr); - + ModListGlobalContextMenu(OrganizerCore& core, ModListView* view, + const QModelIndex& index, QWidget* parent = nullptr); }; class ModListChangeCategoryMenu : public QMenu { Q_OBJECT public: - - ModListChangeCategoryMenu( - CategoryFactory& categories, ModInfo::Ptr mod, QMenu* parent = nullptr); + ModListChangeCategoryMenu(CategoryFactory& categories, ModInfo::Ptr mod, + QMenu* parent = nullptr); // return a list of pair from the menu // std::vector> categories() const; private: - // populate the tree with the category, using the enabled/disabled state from the // given mod // - bool populate(QMenu* menu, CategoryFactory& categories, ModInfo::Ptr mod, int targetId = 0); + bool populate(QMenu* menu, CategoryFactory& categories, ModInfo::Ptr mod, + int targetId = 0); // internal implementation of categories() for recursion // @@ -61,19 +59,17 @@ class ModListPrimaryCategoryMenu : public QMenu { Q_OBJECT public: - - ModListPrimaryCategoryMenu(CategoryFactory& categories, ModInfo::Ptr mod, QMenu* parent = nullptr); + ModListPrimaryCategoryMenu(CategoryFactory& categories, ModInfo::Ptr mod, + QMenu* parent = nullptr); // return the selected primary category // int primaryCategory() const; private: - // populate the categories // void populate(const CategoryFactory& categories, ModInfo::Ptr mod); - }; class ModListContextMenu : public QMenu @@ -81,14 +77,13 @@ class ModListContextMenu : public QMenu Q_OBJECT public: - - // creates a new context menu, the given index is the one for the click and should be valid + // creates a new context menu, the given index is the one for the click and should be + // valid // - ModListContextMenu( - const QModelIndex& index, OrganizerCore& core, CategoryFactory& categories, ModListView* modListView); + ModListContextMenu(const QModelIndex& index, OrganizerCore& core, + CategoryFactory& categories, ModListView* modListView); private: - // adds the "Send to... " context menu // void addSendToContextMenu(); @@ -101,7 +96,6 @@ private: // void addMenuAsPushButton(QMenu* menu); - // add actions/menus to this menu for each type of mod // void addOverwriteActions(ModInfo::Ptr mod); @@ -115,8 +109,7 @@ private: QModelIndex m_index; QModelIndexList m_selected; ModListView* m_view; - ModListViewActions& m_actions; // shortcut for m_view->actions() - + ModListViewActions& m_actions; // shortcut for m_view->actions() }; #endif -- cgit v1.3.1