forked from qt-creator/qt-creator
Macros: Avoid use of global object pool
Change-Id: I84eb19e3e081fd63d390b7ae065c138bb483201f Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -37,8 +37,8 @@
|
||||
using namespace Macros;
|
||||
using namespace Macros::Internal;
|
||||
|
||||
MacroLocatorFilter::MacroLocatorFilter():
|
||||
m_icon(QPixmap(":/macros/images/macro.png"))
|
||||
MacroLocatorFilter::MacroLocatorFilter(QObject *parent)
|
||||
: Core::ILocatorFilter(parent), m_icon(QPixmap(":/macros/images/macro.png"))
|
||||
{
|
||||
setId("Macros");
|
||||
setDisplayName(tr("Text Editing Macros"));
|
||||
|
@@ -30,8 +30,6 @@
|
||||
#include <QIcon>
|
||||
|
||||
namespace Macros {
|
||||
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class MacroLocatorFilter : public Core::ILocatorFilter
|
||||
@@ -39,7 +37,7 @@ class MacroLocatorFilter : public Core::ILocatorFilter
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MacroLocatorFilter();
|
||||
explicit MacroLocatorFilter(QObject *parent);
|
||||
~MacroLocatorFilter();
|
||||
|
||||
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
|
||||
|
@@ -58,8 +58,8 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag
|
||||
Q_UNUSED(arguments);
|
||||
Q_UNUSED(errorMessage);
|
||||
|
||||
addAutoReleasedObject(new MacroOptionsPage);
|
||||
addAutoReleasedObject(new MacroLocatorFilter);
|
||||
new MacroOptionsPage(this);
|
||||
new MacroLocatorFilter(this);
|
||||
|
||||
Core::Context textContext(TextEditor::Constants::C_TEXTEDITOR);
|
||||
m_macroManager = new MacroManager(this);
|
||||
|
Reference in New Issue
Block a user