Core: Make IEditorFactory::createEditor use a function object

Also, replace or remove unneeded Q_OBJECTs, and make base
setters and adders protected.

Change-Id: I212257ef53984d8852dc8c478537199fc9483486
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2020-02-04 18:16:57 +01:00
parent ccc2a347a7
commit d7ae3b79f8
24 changed files with 104 additions and 175 deletions

View File

@@ -38,17 +38,15 @@ using namespace Android::Internal;
AndroidManifestEditorFactory::AndroidManifestEditorFactory() AndroidManifestEditorFactory::AndroidManifestEditorFactory()
{ {
setId(Constants::ANDROID_MANIFEST_EDITOR_ID); setId(Constants::ANDROID_MANIFEST_EDITOR_ID);
setDisplayName(tr("Android Manifest editor")); setDisplayName(AndroidManifestEditorWidget::tr("Android Manifest editor"));
addMimeType(Constants::ANDROID_MANIFEST_MIME_TYPE); addMimeType(Constants::ANDROID_MANIFEST_MIME_TYPE);
auto actionHandler = new TextEditor::TextEditorActionHandler( auto actionHandler = new TextEditor::TextEditorActionHandler(
this, id(), Constants::ANDROID_MANIFEST_EDITOR_CONTEXT); this, id(), Constants::ANDROID_MANIFEST_EDITOR_CONTEXT);
actionHandler->setTextEditorWidgetResolver([](Core::IEditor *editor) { actionHandler->setTextEditorWidgetResolver([](Core::IEditor *editor) {
return static_cast<AndroidManifestEditor *>(editor)->textEditor(); return static_cast<AndroidManifestEditor *>(editor)->textEditor();
}); });
} setEditorCreator([] {
auto androidManifestEditorWidget = new AndroidManifestEditorWidget;
Core::IEditor *AndroidManifestEditorFactory::createEditor()
{
auto androidManifestEditorWidget = new AndroidManifestEditorWidget();
return androidManifestEditorWidget->editor(); return androidManifestEditorWidget->editor();
});
} }

View File

@@ -30,14 +30,10 @@
namespace Android { namespace Android {
namespace Internal { namespace Internal {
class AndroidManifestEditorFactory : public Core::IEditorFactory class AndroidManifestEditorFactory final : public Core::IEditorFactory
{ {
Q_OBJECT
public: public:
AndroidManifestEditorFactory(); AndroidManifestEditorFactory();
Core::IEditor *createEditor() override;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -471,10 +471,8 @@ BinEditorFactory::BinEditorFactory()
setId(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID); setId(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::C_BINEDITOR_DISPLAY_NAME)); setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::C_BINEDITOR_DISPLAY_NAME));
addMimeType(Constants::C_BINEDITOR_MIMETYPE); addMimeType(Constants::C_BINEDITOR_MIMETYPE);
}
IEditor *BinEditorFactory::createEditor() setEditorCreator([] {
{
auto widget = new BinEditorWidget(); auto widget = new BinEditorWidget();
auto editor = new BinEditor(widget); auto editor = new BinEditor(widget);
@@ -498,6 +496,7 @@ IEditor *BinEditorFactory::createEditor()
aggregate->add(widget); aggregate->add(widget);
return editor; return editor;
});
} }
///////////////////////////////// BinEditor Services ////////////////////////////////// ///////////////////////////////// BinEditor Services //////////////////////////////////

View File

@@ -44,14 +44,10 @@ class BinEditorPlugin : public ExtensionSystem::IPlugin
void extensionsInitialized() final {} void extensionsInitialized() final {}
}; };
class BinEditorFactory : public Core::IEditorFactory class BinEditorFactory final : public Core::IEditorFactory
{ {
Q_OBJECT
public: public:
BinEditorFactory(); BinEditorFactory();
Core::IEditor *createEditor() final;
}; };
class FactoryServiceImpl : public QObject, public FactoryService class FactoryServiceImpl : public QObject, public FactoryService

View File

@@ -96,6 +96,17 @@ const EditorFactoryList IEditorFactory::preferredEditorFactories(const QString &
return factories; return factories;
} }
IEditor *IEditorFactory::createEditor() const
{
QTC_ASSERT(m_creator, return nullptr);
return m_creator();
}
void IEditorFactory::setEditorCreator(const std::function<IEditor *()> &creator)
{
m_creator = creator;
}
QHash<Utils::MimeType, Core::IEditorFactory *> Core::Internal::userPreferredEditorFactories() QHash<Utils::MimeType, Core::IEditorFactory *> Core::Internal::userPreferredEditorFactories()
{ {
return g_userPreferredEditorFactories; return g_userPreferredEditorFactories;

View File

@@ -52,22 +52,25 @@ public:
static const EditorFactoryList defaultEditorFactories(const Utils::MimeType &mimeType); static const EditorFactoryList defaultEditorFactories(const Utils::MimeType &mimeType);
static const EditorFactoryList preferredEditorFactories(const QString &fileName); static const EditorFactoryList preferredEditorFactories(const QString &fileName);
QString displayName() const { return m_displayName; }
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
Id id() const { return m_id; } Id id() const { return m_id; }
void setId(Id id) { m_id = id; } QString displayName() const { return m_displayName; }
virtual IEditor *createEditor() = 0;
QStringList mimeTypes() const { return m_mimeTypes; } QStringList mimeTypes() const { return m_mimeTypes; }
IEditor *createEditor() const;
protected:
void setId(Id id) { m_id = id; }
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
void setMimeTypes(const QStringList &mimeTypes) { m_mimeTypes = mimeTypes; } void setMimeTypes(const QStringList &mimeTypes) { m_mimeTypes = mimeTypes; }
void addMimeType(const char *mimeType) { m_mimeTypes.append(QLatin1String(mimeType)); } void addMimeType(const char *mimeType) { m_mimeTypes.append(QLatin1String(mimeType)); }
void addMimeType(const QString &mimeType) { m_mimeTypes.append(mimeType); } void addMimeType(const QString &mimeType) { m_mimeTypes.append(mimeType); }
void setEditorCreator(const std::function<IEditor *()> &creator);
private: private:
Id m_id; Id m_id;
QString m_displayName; QString m_displayName;
QStringList m_mimeTypes; QStringList m_mimeTypes;
std::function<IEditor *()> m_creator;
}; };
} // namespace Core } // namespace Core

View File

@@ -45,14 +45,10 @@ FormEditorFactory::FormEditorFactory()
setId(K_DESIGNER_XML_EDITOR_ID); setId(K_DESIGNER_XML_EDITOR_ID);
setDisplayName(QCoreApplication::translate("Designer", C_DESIGNER_XML_DISPLAY_NAME)); setDisplayName(QCoreApplication::translate("Designer", C_DESIGNER_XML_DISPLAY_NAME));
addMimeType(FORM_MIMETYPE); addMimeType(FORM_MIMETYPE);
setEditorCreator([] { return FormEditorW::createEditor(); });
FileIconProvider::registerIconOverlayForSuffix(ProjectExplorer::Constants::FILEOVERLAY_UI, "ui"); FileIconProvider::registerIconOverlayForSuffix(ProjectExplorer::Constants::FILEOVERLAY_UI, "ui");
} }
IEditor *FormEditorFactory::createEditor()
{
return FormEditorW::createEditor();
}
} // namespace Internal } // namespace Internal
} // namespace Designer } // namespace Designer

View File

@@ -30,14 +30,10 @@
namespace Designer { namespace Designer {
namespace Internal { namespace Internal {
class FormEditorFactory : public Core::IEditorFactory class FormEditorFactory final : public Core::IEditorFactory
{ {
Q_OBJECT
public: public:
FormEditorFactory(); FormEditorFactory();
Core::IEditor *createEditor() override;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -62,11 +62,8 @@ DiffEditorFactory::DiffEditorFactory(QObject *parent)
rightHandler->setTextEditorWidgetResolver([](Core::IEditor *e) { rightHandler->setTextEditorWidgetResolver([](Core::IEditor *e) {
return static_cast<DiffEditor *>(e)->rightEditorWidget(); return static_cast<DiffEditor *>(e)->rightEditorWidget();
}); });
}
Core::IEditor *DiffEditorFactory::createEditor() setEditorCreator([] { return new DiffEditor(new DiffEditorDocument); });
{
return new DiffEditor(new DiffEditorDocument);
} }
} // namespace Internal } // namespace Internal

View File

@@ -25,22 +25,15 @@
#pragma once #pragma once
#include "diffeditor_global.h"
#include <coreplugin/editormanager/ieditorfactory.h> #include <coreplugin/editormanager/ieditorfactory.h>
namespace DiffEditor { namespace DiffEditor {
namespace Internal { namespace Internal {
class DiffEditorFactory : public Core::IEditorFactory class DiffEditorFactory : public Core::IEditorFactory
{ {
Q_OBJECT
public: public:
explicit DiffEditorFactory(QObject *parent); explicit DiffEditorFactory(QObject *parent);
Core::IEditor *createEditor() override;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -38,16 +38,12 @@ ImageViewerFactory::ImageViewerFactory()
{ {
setId(Constants::IMAGEVIEWER_ID); setId(Constants::IMAGEVIEWER_ID);
setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::IMAGEVIEWER_DISPLAY_NAME)); setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::IMAGEVIEWER_DISPLAY_NAME));
setEditorCreator([] { return new ImageViewer; });
const QList<QByteArray> supportedMimeTypes = QImageReader::supportedMimeTypes(); const QList<QByteArray> supportedMimeTypes = QImageReader::supportedMimeTypes();
foreach (const QByteArray &format, supportedMimeTypes) for (const QByteArray &format : supportedMimeTypes)
addMimeType(format.constData()); addMimeType(format.constData());
} }
Core::IEditor *ImageViewerFactory::createEditor()
{
return new ImageViewer();
}
} // namespace Internal } // namespace Internal
} // namespace ImageViewer } // namespace ImageViewer

View File

@@ -27,19 +27,14 @@
#pragma once #pragma once
#include <coreplugin/editormanager/ieditorfactory.h> #include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/idocument.h>
namespace ImageViewer { namespace ImageViewer {
namespace Internal { namespace Internal {
class ImageViewerFactory : public Core::IEditorFactory class ImageViewerFactory final : public Core::IEditorFactory
{ {
Q_OBJECT
public: public:
ImageViewerFactory(); ImageViewerFactory();
Core::IEditor *createEditor() override;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -34,37 +34,24 @@
namespace ModelEditor { namespace ModelEditor {
namespace Internal { namespace Internal {
class ModelEditorFactory::ModelEditorFactoryPrivate
{
public:
UiController *uiController = nullptr;
ActionHandler *actionHandler = nullptr;
};
ModelEditorFactory::ModelEditorFactory(UiController *uiController) ModelEditorFactory::ModelEditorFactory(UiController *uiController)
: d(new ModelEditorFactoryPrivate())
{ {
setId(Constants::MODEL_EDITOR_ID); setId(Constants::MODEL_EDITOR_ID);
setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::MODEL_EDITOR_DISPLAY_NAME)); setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::MODEL_EDITOR_DISPLAY_NAME));
addMimeType(Constants::MIME_TYPE_MODEL); addMimeType(Constants::MIME_TYPE_MODEL);
d->uiController = uiController; m_uiController = uiController;
d->actionHandler = new ActionHandler(Core::Context(Constants::MODEL_EDITOR_ID), this); m_actionHandler = new ActionHandler(Core::Context(Constants::MODEL_EDITOR_ID), this);
setEditorCreator([this] { return new ModelEditor(m_uiController, m_actionHandler); });
} }
ModelEditorFactory::~ModelEditorFactory() ModelEditorFactory::~ModelEditorFactory()
{ {
delete d->actionHandler; delete m_actionHandler;
delete d;
}
Core::IEditor *ModelEditorFactory::createEditor()
{
return new ModelEditor(d->uiController, d->actionHandler);
} }
void ModelEditorFactory::extensionsInitialized() void ModelEditorFactory::extensionsInitialized()
{ {
d->actionHandler->createActions(); m_actionHandler->createActions();
} }
} // namespace Internal } // namespace Internal

View File

@@ -30,24 +30,21 @@
namespace ModelEditor { namespace ModelEditor {
namespace Internal { namespace Internal {
class ActionHandler;
class ModelEditor; class ModelEditor;
class UiController; class UiController;
class ModelEditorFactory : class ModelEditorFactory : public Core::IEditorFactory
public Core::IEditorFactory
{ {
Q_OBJECT
class ModelEditorFactoryPrivate;
public: public:
explicit ModelEditorFactory(UiController *uiController); explicit ModelEditorFactory(UiController *uiController);
~ModelEditorFactory(); ~ModelEditorFactory();
Core::IEditor *createEditor() override;
void extensionsInitialized(); void extensionsInitialized();
private: private:
ModelEditorFactoryPrivate *d; UiController *m_uiController = nullptr;
ActionHandler *m_actionHandler = nullptr;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -71,11 +71,6 @@ NimEditorFactory::NimEditorFactory()
setCodeFoldingSupported(true); setCodeFoldingSupported(true);
} }
Core::IEditor *NimEditorFactory::createEditor()
{
return TextEditorFactory::createEditor();
}
void NimEditorFactory::decorateEditor(TextEditorWidget *editor) void NimEditorFactory::decorateEditor(TextEditorWidget *editor)
{ {
editor->textDocument()->setSyntaxHighlighter(new NimHighlighter()); editor->textDocument()->setSyntaxHighlighter(new NimHighlighter());

View File

@@ -36,7 +36,6 @@ class NimEditorFactory : public TextEditor::TextEditorFactory
public: public:
NimEditorFactory(); NimEditorFactory();
Core::IEditor *createEditor() override;
static void decorateEditor(TextEditor::TextEditorWidget *editor); static void decorateEditor(TextEditor::TextEditorWidget *editor);
}; };

View File

@@ -40,8 +40,7 @@ using namespace ResourceEditor::Internal;
using namespace ResourceEditor::Constants; using namespace ResourceEditor::Constants;
ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) : ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) :
Core::IEditorFactory(plugin), Core::IEditorFactory(plugin)
m_plugin(plugin)
{ {
setId(RESOURCEEDITOR_ID); setId(RESOURCEEDITOR_ID);
setMimeTypes(QStringList(QLatin1String(C_RESOURCE_MIMETYPE))); setMimeTypes(QStringList(QLatin1String(C_RESOURCE_MIMETYPE)));
@@ -49,10 +48,8 @@ ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) :
Core::FileIconProvider::registerIconOverlayForSuffix( Core::FileIconProvider::registerIconOverlayForSuffix(
ProjectExplorer::Constants::FILEOVERLAY_QRC, "qrc"); ProjectExplorer::Constants::FILEOVERLAY_QRC, "qrc");
}
Core::IEditor *ResourceEditorFactory::createEditor() setEditorCreator([plugin] {
{ return new ResourceEditorW(Core::Context(C_RESOURCEEDITOR), plugin);
Core::Context context(C_RESOURCEEDITOR); });
return new ResourceEditorW(context, m_plugin);
} }

View File

@@ -26,26 +26,16 @@
#pragma once #pragma once
#include <coreplugin/editormanager/ieditorfactory.h> #include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/icontext.h>
#include <QStringList>
namespace ResourceEditor { namespace ResourceEditor {
namespace Internal { namespace Internal {
class ResourceEditorPlugin; class ResourceEditorPlugin;
class ResourceEditorFactory : public Core::IEditorFactory class ResourceEditorFactory final : public Core::IEditorFactory
{ {
Q_OBJECT
public: public:
explicit ResourceEditorFactory(ResourceEditorPlugin *plugin); explicit ResourceEditorFactory(ResourceEditorPlugin *plugin);
Core::IEditor *createEditor() override;
private:
ResourceEditorPlugin *m_plugin;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -46,10 +46,8 @@ ScxmlEditorFactory::ScxmlEditorFactory(QObject *parent)
addMimeType(ProjectExplorer::Constants::SCXML_MIMETYPE); addMimeType(ProjectExplorer::Constants::SCXML_MIMETYPE);
Core::FileIconProvider::registerIconOverlayForSuffix(":/projectexplorer/images/fileoverlay_scxml.png", "scxml"); Core::FileIconProvider::registerIconOverlayForSuffix(":/projectexplorer/images/fileoverlay_scxml.png", "scxml");
}
Core::IEditor *ScxmlEditorFactory::createEditor() setEditorCreator([this] {
{
if (!m_editorData) { if (!m_editorData) {
m_editorData = new ScxmlEditorData(this); m_editorData = new ScxmlEditorData(this);
QGuiApplication::setOverrideCursor(Qt::WaitCursor); QGuiApplication::setOverrideCursor(Qt::WaitCursor);
@@ -57,4 +55,5 @@ Core::IEditor *ScxmlEditorFactory::createEditor()
QGuiApplication::restoreOverrideCursor(); QGuiApplication::restoreOverrideCursor();
} }
return m_editorData->createEditor(); return m_editorData->createEditor();
});
} }

View File

@@ -32,15 +32,11 @@ namespace Internal {
class ScxmlEditorData; class ScxmlEditorData;
class ScxmlEditorFactory : public Core::IEditorFactory class ScxmlEditorFactory final : public Core::IEditorFactory
{ {
Q_OBJECT
public: public:
explicit ScxmlEditorFactory(QObject *parent); explicit ScxmlEditorFactory(QObject *parent);
Core::IEditor *createEditor() override;
private: private:
ScxmlEditorData* m_editorData = nullptr; ScxmlEditorData* m_editorData = nullptr;
}; };

View File

@@ -8506,8 +8506,7 @@ class TextEditorFactoryPrivate
public: public:
TextEditorFactoryPrivate(TextEditorFactory *parent) : TextEditorFactoryPrivate(TextEditorFactory *parent) :
q(parent), q(parent),
m_widgetCreator([]() { return new TextEditorWidget; }), m_widgetCreator([]() { return new TextEditorWidget; })
m_editorCreator([]() { return new BaseTextEditor; })
{} {}
BaseTextEditor *duplicateTextEditor(BaseTextEditor *other) BaseTextEditor *duplicateTextEditor(BaseTextEditor *other)
@@ -8540,7 +8539,9 @@ public:
TextEditorFactory::TextEditorFactory(QObject *parent) TextEditorFactory::TextEditorFactory(QObject *parent)
: IEditorFactory(parent), d(new TextEditorFactoryPrivate(this)) : IEditorFactory(parent), d(new TextEditorFactoryPrivate(this))
{} {
setEditorCreator([]() { return new BaseTextEditor; });
}
TextEditorFactory::~TextEditorFactory() TextEditorFactory::~TextEditorFactory()
{ {
@@ -8562,6 +8563,21 @@ void TextEditorFactory::setEditorWidgetCreator(const EditorWidgetCreator &creato
void TextEditorFactory::setEditorCreator(const EditorCreator &creator) void TextEditorFactory::setEditorCreator(const EditorCreator &creator)
{ {
d->m_editorCreator = creator; d->m_editorCreator = creator;
IEditorFactory::setEditorCreator([this] {
static DocumentContentCompletionProvider basicSnippetProvider;
TextDocumentPtr doc(d->m_documentCreator());
if (d->m_indenterCreator)
doc->setIndenter(d->m_indenterCreator(doc->document()));
if (d->m_syntaxHighlighterCreator)
doc->setSyntaxHighlighter(d->m_syntaxHighlighterCreator());
doc->setCompletionAssistProvider(d->m_completionAssistProvider ? d->m_completionAssistProvider
: &basicSnippetProvider);
return d->createEditorHelper(doc);
});
} }
void TextEditorFactory::setIndenterCreator(const IndenterCreator &creator) void TextEditorFactory::setIndenterCreator(const IndenterCreator &creator)
@@ -8629,23 +8645,6 @@ void TextEditorFactory::setParenthesesMatchingEnabled(bool on)
d->m_paranthesesMatchinEnabled = on; d->m_paranthesesMatchinEnabled = on;
} }
IEditor *TextEditorFactory::createEditor()
{
static DocumentContentCompletionProvider basicSnippetProvider;
TextDocumentPtr doc(d->m_documentCreator());
if (d->m_indenterCreator)
doc->setIndenter(d->m_indenterCreator(doc->document()));
if (d->m_syntaxHighlighterCreator)
doc->setSyntaxHighlighter(d->m_syntaxHighlighterCreator());
doc->setCompletionAssistProvider(d->m_completionAssistProvider ? d->m_completionAssistProvider
: &basicSnippetProvider);
return d->createEditorHelper(doc);
}
BaseTextEditor *TextEditorFactoryPrivate::createEditorHelper(const TextDocumentPtr &document) BaseTextEditor *TextEditorFactoryPrivate::createEditorHelper(const TextDocumentPtr &document)
{ {
TextEditorWidget *widget = m_widgetCreator(); TextEditorWidget *widget = m_widgetCreator();

View File

@@ -666,8 +666,6 @@ public:
void setParenthesesMatchingEnabled(bool on); void setParenthesesMatchingEnabled(bool on);
void setCodeFoldingSupported(bool on); void setCodeFoldingSupported(bool on);
Core::IEditor *createEditor() override;
private: private:
friend class BaseTextEditor; friend class BaseTextEditor;
friend class PlainTextEditorFactory; friend class PlainTextEditorFactory;

View File

@@ -44,12 +44,18 @@ VcsSubmitEditorFactory::VcsSubmitEditorFactory
(const VcsBaseSubmitEditorParameters *parameters, (const VcsBaseSubmitEditorParameters *parameters,
const EditorCreator &editorCreator, const EditorCreator &editorCreator,
VcsBasePluginPrivate *plugin) VcsBasePluginPrivate *plugin)
: IEditorFactory(plugin), m_editorCreator(editorCreator) : IEditorFactory(plugin)
{ {
setId(parameters->id); setId(parameters->id);
setDisplayName(QLatin1String(parameters->displayName)); setDisplayName(QLatin1String(parameters->displayName));
addMimeType(parameters->mimeType); addMimeType(parameters->mimeType);
setEditorCreator([this, editorCreator] {
VcsBaseSubmitEditor *editor = editorCreator();
editor->registerActions(m_undoAction, m_redoAction, m_submitAction, m_diffAction);
return editor;
});
Context context(parameters->id); Context context(parameters->id);
m_undoAction = new QAction(tr("&Undo"), this); m_undoAction = new QAction(tr("&Undo"), this);
ActionManager::registerAction(m_undoAction, Core::Constants::UNDO, context); ActionManager::registerAction(m_undoAction, Core::Constants::UNDO, context);
@@ -68,11 +74,4 @@ VcsSubmitEditorFactory::VcsSubmitEditorFactory
ActionManager::registerAction(m_diffAction, DIFF_SELECTED, context); ActionManager::registerAction(m_diffAction, DIFF_SELECTED, context);
} }
Core::IEditor *VcsSubmitEditorFactory::createEditor()
{
VcsBaseSubmitEditor *editor = m_editorCreator();
editor->registerActions(m_undoAction, m_redoAction, m_submitAction, m_diffAction);
return editor;
}
} // namespace VcsBase } // namespace VcsBase

View File

@@ -51,10 +51,7 @@ public:
const EditorCreator &editorCreator, const EditorCreator &editorCreator,
VcsBasePluginPrivate *plugin); VcsBasePluginPrivate *plugin);
Core::IEditor *createEditor() override;
private: private:
EditorCreator m_editorCreator;
QAction *m_submitAction = nullptr; QAction *m_submitAction = nullptr;
QAction *m_diffAction = nullptr; QAction *m_diffAction = nullptr;
QAction *m_undoAction = nullptr; QAction *m_undoAction = nullptr;