forked from qt-creator/qt-creator
Give TextEditorActionHandler an explicit parent and unify usage.
The action handler implicitly passed ownership to ICore, which is non- to the action handler. We now consistently create the action handler in the editor factory, give ownership to the editor factory, and don't hold a reference to it. Change-Id: I4372f8de966e3ceff87c06c5528c6b54522c1d57 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
#include <QStringList>
|
||||
|
||||
namespace TextEditor {
|
||||
class TextEditorActionHandler;
|
||||
namespace Internal {
|
||||
|
||||
class PlainTextEditorFactory : public Core::IEditorFactory
|
||||
@@ -44,17 +43,12 @@ class PlainTextEditorFactory : public Core::IEditorFactory
|
||||
|
||||
public:
|
||||
PlainTextEditorFactory(QObject *parent = 0);
|
||||
~PlainTextEditorFactory();
|
||||
|
||||
using Core::IEditorFactory::addMimeType;
|
||||
Core::IEditor *createEditor(QWidget *parent);
|
||||
TextEditor::TextEditorActionHandler *actionHandler() const { return m_actionHandler; }
|
||||
|
||||
private slots:
|
||||
void updateEditorInfoBar(Core::IEditor *editor);
|
||||
|
||||
private:
|
||||
TextEditor::TextEditorActionHandler *m_actionHandler;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user