From a8f97a7a1805359261049df83fc4ad7ba4249a29 Mon Sep 17 00:00:00 2001 From: hjk Date: Sat, 28 Jan 2012 01:24:37 +0100 Subject: [PATCH] texteditor: no need to store the wizard as plugin member Change-Id: I4ce41f516bd361c0c58b6a0f0f3fd541126f0620 Reviewed-by: Leandro Melo --- src/plugins/texteditor/texteditorplugin.cpp | 9 ++++----- src/plugins/texteditor/texteditorplugin.h | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index da996004e4f..9d950eec414 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -79,7 +79,6 @@ TextEditorPlugin *TextEditorPlugin::m_instance = 0; TextEditorPlugin::TextEditorPlugin() : m_settings(0), - m_wizard(0), m_editorFactory(0), m_lineNumberFilter(0), m_searchResultWindow(0) @@ -112,11 +111,11 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe wizardParameters.setDisplayName(tr("Text File")); wizardParameters.setCategory(QLatin1String("U.General")); wizardParameters.setDisplayCategory(tr("General")); - m_wizard = new TextFileWizard(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT), - QLatin1String("text$"), - wizardParameters); + TextFileWizard *wizard = new TextFileWizard(QLatin1String(Constants::C_TEXTEDITOR_MIMETYPE_TEXT), + QLatin1String("text$"), + wizardParameters); // Add text file wizard - addAutoReleasedObject(m_wizard); + addAutoReleasedObject(wizard); m_settings = new TextEditorSettings(this); diff --git a/src/plugins/texteditor/texteditorplugin.h b/src/plugins/texteditor/texteditorplugin.h index 7644a04b741..1c3617efa9c 100644 --- a/src/plugins/texteditor/texteditorplugin.h +++ b/src/plugins/texteditor/texteditorplugin.h @@ -44,7 +44,6 @@ namespace TextEditor { class FontSettings; class PlainTextEditorWidget; class TextEditorSettings; -class TextFileWizard; namespace Internal { @@ -81,7 +80,6 @@ private slots: private: static TextEditorPlugin *m_instance; TextEditorSettings *m_settings; - TextFileWizard *m_wizard; PlainTextEditorFactory *m_editorFactory; LineNumberFilter *m_lineNumberFilter; Find::SearchResultWindow *m_searchResultWindow;