forked from qt-creator/qt-creator
TextEditor: Fix snippet editor crash introduced in d85a4f615
The SnippetEditorWidget setup is unusual as it doesn't have an associated SnippetEditorFactory/SnippetEditor creation chain and requires manual intervention. This was lost in the conversion to the new construction scheme. Change-Id: I0919295603432e525c2abd0da762acc8207f996c Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "ui_snippetssettingspage.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <utils/headerviewstretcher.h>
|
||||
@@ -336,7 +337,6 @@ void SnippetsSettingsPagePrivate::configureUi(QWidget *w)
|
||||
foreach (ISnippetProvider *provider, providers) {
|
||||
m_ui.groupCombo->addItem(provider->displayName(), provider->groupId());
|
||||
SnippetEditorWidget *snippetEditor = new SnippetEditorWidget(w);
|
||||
snippetEditor->textDocument()->setFontSettings(TextEditorSettings::fontSettings());
|
||||
provider->decorateEditor(snippetEditor);
|
||||
m_ui.snippetsEditorStack->insertWidget(m_ui.groupCombo->count() - 1, snippetEditor);
|
||||
connect(snippetEditor, SIGNAL(snippetContentChanged()), this, SLOT(setSnippetContent()));
|
||||
|
||||
Reference in New Issue
Block a user