diff --git a/src/plugins/macros/actionmacrohandler.cpp b/src/plugins/macros/actionmacrohandler.cpp index 0dc4fd95773..c6510171d82 100644 --- a/src/plugins/macros/actionmacrohandler.cpp +++ b/src/plugins/macros/actionmacrohandler.cpp @@ -21,10 +21,9 @@ using namespace Core; using namespace Utils; -namespace Macros { -namespace Internal { +namespace Macros::Internal { -static const char EVENTNAME[] = "Action"; +const char EVENTNAME[] = "Action"; static quint8 ACTIONNAME = 0; ActionMacroHandler::ActionMacroHandler() @@ -82,5 +81,4 @@ void ActionMacroHandler::addCommand(Id id) registerCommand(id); } -} // namespace Internal -} // namespace Macros +} // namespace Macros::Internal diff --git a/src/plugins/macros/actionmacrohandler.h b/src/plugins/macros/actionmacrohandler.h index 32bd1c70421..f8251f03b70 100644 --- a/src/plugins/macros/actionmacrohandler.h +++ b/src/plugins/macros/actionmacrohandler.h @@ -9,13 +9,10 @@ #include -namespace Macros { -namespace Internal { +namespace Macros::Internal { class ActionMacroHandler : public IMacroHandler { - Q_OBJECT - public: ActionMacroHandler(); @@ -31,5 +28,4 @@ private: QSet m_commandIds; }; -} // namespace Internal -} // namespace Macros +} // namespace Macros::Internal diff --git a/src/plugins/macros/findmacrohandler.cpp b/src/plugins/macros/findmacrohandler.cpp index 878854e7b17..319a7cfc49f 100644 --- a/src/plugins/macros/findmacrohandler.cpp +++ b/src/plugins/macros/findmacrohandler.cpp @@ -13,10 +13,10 @@ #include -using namespace Macros; -using namespace Macros::Internal; using namespace Utils; +namespace Macros::Internal { + static const char EVENTNAME[] = "Find"; static const quint8 TYPE = 0; static const quint8 BEFORE = 1; @@ -202,3 +202,5 @@ void FindMacroHandler::startRecording(Macro* macro) if (current) changeEditor(current); } + +} // namespace Macros::Internal diff --git a/src/plugins/macros/findmacrohandler.h b/src/plugins/macros/findmacrohandler.h index ef157051c75..32469ebd27e 100644 --- a/src/plugins/macros/findmacrohandler.h +++ b/src/plugins/macros/findmacrohandler.h @@ -6,21 +6,19 @@ #include "imacrohandler.h" #include + #include namespace Core { class IEditor; } -namespace Macros { -namespace Internal { +namespace Macros::Internal { class FindMacroHandler : public IMacroHandler { - Q_OBJECT - public: FindMacroHandler(); - void startRecording(Macro* macro) override; + void startRecording(Macro *macro) override; bool canExecuteEvent(const MacroEvent ¯oEvent) override; bool executeEvent(const MacroEvent ¯oEvent) override; @@ -36,5 +34,4 @@ private: void changeEditor(Core::IEditor *editor); }; -} // namespace Internal -} // namespace Macros +} // namespace Macros::Internal diff --git a/src/plugins/macros/imacrohandler.h b/src/plugins/macros/imacrohandler.h index 53eb744fc16..fcaf743cd12 100644 --- a/src/plugins/macros/imacrohandler.h +++ b/src/plugins/macros/imacrohandler.h @@ -5,26 +5,23 @@ #include -namespace Macros { -namespace Internal { +namespace Macros::Internal { class Macro; class MacroEvent; class MacroManager; -class IMacroHandler: public QObject +class IMacroHandler : public QObject { - Q_OBJECT - public: - virtual void startRecording(Macro* macro); - virtual void endRecordingMacro(Macro* macro); + virtual void startRecording(Macro *macro); + virtual void endRecordingMacro(Macro *macro); virtual bool canExecuteEvent(const MacroEvent ¯oEvent) = 0; virtual bool executeEvent(const MacroEvent ¯oEvent) = 0; protected: - void addMacroEvent(const MacroEvent& event); + void addMacroEvent(const MacroEvent &event); void setCurrentMacro(Macro *macro); @@ -36,5 +33,4 @@ private: Macro *m_currentMacro = nullptr; }; -} // namespace Internal -} // namespace Macros +} // namespace Macros::Internal diff --git a/src/plugins/macros/texteditormacrohandler.cpp b/src/plugins/macros/texteditormacrohandler.cpp index 1125b1e8cde..1147c02b0db 100644 --- a/src/plugins/macros/texteditormacrohandler.cpp +++ b/src/plugins/macros/texteditormacrohandler.cpp @@ -18,8 +18,7 @@ #include #include -using namespace Macros; -using namespace Macros::Internal; +namespace Macros::Internal { static const char KEYEVENTNAME[] = "TextEditorKey"; static quint8 TEXT = 0; @@ -118,3 +117,5 @@ void TextEditorMacroHandler::closeEditor(Core::IEditor *editor) m_currentEditor->widget()->removeEventFilter(this); m_currentEditor = nullptr; } + +} // namespace Macro::Internal diff --git a/src/plugins/macros/texteditormacrohandler.h b/src/plugins/macros/texteditormacrohandler.h index 57a9e1982bd..60e742fb325 100644 --- a/src/plugins/macros/texteditormacrohandler.h +++ b/src/plugins/macros/texteditormacrohandler.h @@ -9,13 +9,10 @@ namespace Core { class IEditor; } namespace TextEditor { class BaseTextEditor; } -namespace Macros { -namespace Internal { +namespace Macros::Internal { class TextEditorMacroHandler : public IMacroHandler { - Q_OBJECT - public: TextEditorMacroHandler(); @@ -34,5 +31,4 @@ private: TextEditor::BaseTextEditor *m_currentEditor = nullptr; }; -} // namespace Internal -} // namespace Macros +} // namespace Macros::Internal