forked from qt-creator/qt-creator
Macros: Remove Q_OBJECT macro from some classes that don't need it
Plus some code cosmetics. Change-Id: Ifa9c4e7322ae7a2d5c1480f7afc58f020efcbc1c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -21,10 +21,9 @@
|
|||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace Macros {
|
namespace Macros::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
static const char EVENTNAME[] = "Action";
|
const char EVENTNAME[] = "Action";
|
||||||
static quint8 ACTIONNAME = 0;
|
static quint8 ACTIONNAME = 0;
|
||||||
|
|
||||||
ActionMacroHandler::ActionMacroHandler()
|
ActionMacroHandler::ActionMacroHandler()
|
||||||
@@ -82,5 +81,4 @@ void ActionMacroHandler::addCommand(Id id)
|
|||||||
registerCommand(id);
|
registerCommand(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Macros::Internal
|
||||||
} // namespace Macros
|
|
||||||
|
|||||||
@@ -9,13 +9,10 @@
|
|||||||
|
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
|
||||||
namespace Macros {
|
namespace Macros::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class ActionMacroHandler : public IMacroHandler
|
class ActionMacroHandler : public IMacroHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ActionMacroHandler();
|
ActionMacroHandler();
|
||||||
|
|
||||||
@@ -31,5 +28,4 @@ private:
|
|||||||
QSet<Utils::Id> m_commandIds;
|
QSet<Utils::Id> m_commandIds;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Macros::Internal
|
||||||
} // namespace Macros
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
#include <aggregation/aggregate.h>
|
#include <aggregation/aggregate.h>
|
||||||
|
|
||||||
using namespace Macros;
|
|
||||||
using namespace Macros::Internal;
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
|
namespace Macros::Internal {
|
||||||
|
|
||||||
static const char EVENTNAME[] = "Find";
|
static const char EVENTNAME[] = "Find";
|
||||||
static const quint8 TYPE = 0;
|
static const quint8 TYPE = 0;
|
||||||
static const quint8 BEFORE = 1;
|
static const quint8 BEFORE = 1;
|
||||||
@@ -202,3 +202,5 @@ void FindMacroHandler::startRecording(Macro* macro)
|
|||||||
if (current)
|
if (current)
|
||||||
changeEditor(current);
|
changeEditor(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Macros::Internal
|
||||||
|
|||||||
@@ -6,17 +6,15 @@
|
|||||||
#include "imacrohandler.h"
|
#include "imacrohandler.h"
|
||||||
|
|
||||||
#include <coreplugin/find/textfindconstants.h>
|
#include <coreplugin/find/textfindconstants.h>
|
||||||
|
|
||||||
#include <utils/filesearch.h>
|
#include <utils/filesearch.h>
|
||||||
|
|
||||||
namespace Core { class IEditor; }
|
namespace Core { class IEditor; }
|
||||||
|
|
||||||
namespace Macros {
|
namespace Macros::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class FindMacroHandler : public IMacroHandler
|
class FindMacroHandler : public IMacroHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FindMacroHandler();
|
FindMacroHandler();
|
||||||
|
|
||||||
@@ -36,5 +34,4 @@ private:
|
|||||||
void changeEditor(Core::IEditor *editor);
|
void changeEditor(Core::IEditor *editor);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Macros::Internal
|
||||||
} // namespace Macros
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace Macros {
|
namespace Macros::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class Macro;
|
class Macro;
|
||||||
class MacroEvent;
|
class MacroEvent;
|
||||||
@@ -14,8 +13,6 @@ class MacroManager;
|
|||||||
|
|
||||||
class IMacroHandler : public QObject
|
class IMacroHandler : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void startRecording(Macro *macro);
|
virtual void startRecording(Macro *macro);
|
||||||
virtual void endRecordingMacro(Macro *macro);
|
virtual void endRecordingMacro(Macro *macro);
|
||||||
@@ -36,5 +33,4 @@ private:
|
|||||||
Macro *m_currentMacro = nullptr;
|
Macro *m_currentMacro = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Macros::Internal
|
||||||
} // namespace Macros
|
|
||||||
|
|||||||
@@ -18,8 +18,7 @@
|
|||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
using namespace Macros;
|
namespace Macros::Internal {
|
||||||
using namespace Macros::Internal;
|
|
||||||
|
|
||||||
static const char KEYEVENTNAME[] = "TextEditorKey";
|
static const char KEYEVENTNAME[] = "TextEditorKey";
|
||||||
static quint8 TEXT = 0;
|
static quint8 TEXT = 0;
|
||||||
@@ -118,3 +117,5 @@ void TextEditorMacroHandler::closeEditor(Core::IEditor *editor)
|
|||||||
m_currentEditor->widget()->removeEventFilter(this);
|
m_currentEditor->widget()->removeEventFilter(this);
|
||||||
m_currentEditor = nullptr;
|
m_currentEditor = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Macro::Internal
|
||||||
|
|||||||
@@ -9,13 +9,10 @@ namespace Core { class IEditor; }
|
|||||||
|
|
||||||
namespace TextEditor { class BaseTextEditor; }
|
namespace TextEditor { class BaseTextEditor; }
|
||||||
|
|
||||||
namespace Macros {
|
namespace Macros::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class TextEditorMacroHandler : public IMacroHandler
|
class TextEditorMacroHandler : public IMacroHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TextEditorMacroHandler();
|
TextEditorMacroHandler();
|
||||||
|
|
||||||
@@ -34,5 +31,4 @@ private:
|
|||||||
TextEditor::BaseTextEditor *m_currentEditor = nullptr;
|
TextEditor::BaseTextEditor *m_currentEditor = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Macros::Internal
|
||||||
} // namespace Macros
|
|
||||||
|
|||||||
Reference in New Issue
Block a user