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;
|
||||||
using namespace Macros::Internal;
|
using namespace Macros::Internal;
|
||||||
|
|
||||||
MacroLocatorFilter::MacroLocatorFilter():
|
MacroLocatorFilter::MacroLocatorFilter(QObject *parent)
|
||||||
m_icon(QPixmap(":/macros/images/macro.png"))
|
: Core::ILocatorFilter(parent), m_icon(QPixmap(":/macros/images/macro.png"))
|
||||||
{
|
{
|
||||||
setId("Macros");
|
setId("Macros");
|
||||||
setDisplayName(tr("Text Editing Macros"));
|
setDisplayName(tr("Text Editing Macros"));
|
||||||
|
@@ -30,8 +30,6 @@
|
|||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
|
||||||
namespace Macros {
|
namespace Macros {
|
||||||
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class MacroLocatorFilter : public Core::ILocatorFilter
|
class MacroLocatorFilter : public Core::ILocatorFilter
|
||||||
@@ -39,7 +37,7 @@ class MacroLocatorFilter : public Core::ILocatorFilter
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MacroLocatorFilter();
|
explicit MacroLocatorFilter(QObject *parent);
|
||||||
~MacroLocatorFilter();
|
~MacroLocatorFilter();
|
||||||
|
|
||||||
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
|
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(arguments);
|
||||||
Q_UNUSED(errorMessage);
|
Q_UNUSED(errorMessage);
|
||||||
|
|
||||||
addAutoReleasedObject(new MacroOptionsPage);
|
new MacroOptionsPage(this);
|
||||||
addAutoReleasedObject(new MacroLocatorFilter);
|
new MacroLocatorFilter(this);
|
||||||
|
|
||||||
Core::Context textContext(TextEditor::Constants::C_TEXTEDITOR);
|
Core::Context textContext(TextEditor::Constants::C_TEXTEDITOR);
|
||||||
m_macroManager = new MacroManager(this);
|
m_macroManager = new MacroManager(this);
|
||||||
|
Reference in New Issue
Block a user