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/createinstancedialog.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'src/createinstancedialog.h') diff --git a/src/createinstancedialog.h b/src/createinstancedialog.h index 8e8fe517..fe3c5646 100644 --- a/src/createinstancedialog.h +++ b/src/createinstancedialog.h @@ -3,9 +3,18 @@ #include -namespace MOBase { class IPluginGame; } -namespace Ui { class CreateInstanceDialog; }; -namespace cid { class Page; } +namespace MOBase +{ +class IPluginGame; +} +namespace Ui +{ +class CreateInstanceDialog; +}; +namespace cid +{ +class Page; +} class PluginContainer; class Settings; @@ -71,9 +80,8 @@ public: Paths paths; }; - - CreateInstanceDialog( - const PluginContainer& pc, Settings* s, QWidget *parent = nullptr); + CreateInstanceDialog(const PluginContainer& pc, Settings* s, + QWidget* parent = nullptr); ~CreateInstanceDialog(); @@ -87,7 +95,7 @@ public: void setSinglePage(const QString& instanceName) { for (auto&& p : m_pages) { - if (auto* tp=dynamic_cast(p.get())) { + if (auto* tp = dynamic_cast(p.get())) { tp->setSkip(false); } else { p->setSkip(true); @@ -103,7 +111,7 @@ public: Page* getPage() { for (auto&& p : m_pages) { - if (auto* tp=dynamic_cast(p.get())) { + if (auto* tp = dynamic_cast(p.get())) { return tp; } } @@ -111,11 +119,10 @@ public: return nullptr; } - // moves to the next page; if `allowFinish` is true, calls finish() if // currently on the last page // - void next(bool allowFinish=true); + void next(bool allowFinish = true); // moves to the previous page, if any // @@ -144,7 +151,6 @@ public: // void finish(); - // updates the navigation buttons based on the current page // void updateNavigation(); @@ -176,10 +182,9 @@ private: bool m_switching; bool m_singlePage; - // creates a shortcut for the given sequence // - void addShortcut(QKeySequence seq, std::function f); + void addShortcut(QKeySequence seq, std::function f); // creates a shortcut for the given sequence and executes the action when // activated @@ -219,4 +224,4 @@ private: } }; -#endif // MODORGANIZER_CREATEINSTANCEDIALOG_INCLUDED +#endif // MODORGANIZER_CREATEINSTANCEDIALOG_INCLUDED -- cgit v1.3.1