summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/codestyleeditor.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-02-06 15:59:05 +0100
committerhjk <hjk@qt.io>2018-02-07 07:59:05 +0000
commit91c19c2734246dbf528a6076a57b72d924bf0484 (patch)
tree26881f338de3e7f1ffe8229d08915f694b6fe13f /src/plugins/texteditor/codestyleeditor.cpp
parent0c3aed25497267b655794dfb4b3f8b72dfb01d13 (diff)
downloadqt-creator-91c19c2734246dbf528a6076a57b72d924bf0484.tar.gz
TextEditor: Simplify SnippetProvider handling
The group identifier is as good as the actual object, so use that on the generator and the consumer side. Change-Id: I6ccd54a2362631af0b50583f12563b8e41a5dd78 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/codestyleeditor.cpp')
-rw-r--r--src/plugins/texteditor/codestyleeditor.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/texteditor/codestyleeditor.cpp b/src/plugins/texteditor/codestyleeditor.cpp
index 2c9e03a3da..599af2974a 100644
--- a/src/plugins/texteditor/codestyleeditor.cpp
+++ b/src/plugins/texteditor/codestyleeditor.cpp
@@ -54,9 +54,8 @@ CodeStyleEditor::CodeStyleEditor(ICodeStylePreferencesFactory *factory,
DisplaySettings displaySettings = m_preview->displaySettings();
displaySettings.m_visualizeWhitespace = true;
m_preview->setDisplaySettings(displaySettings);
- SnippetProvider *provider = factory->snippetProvider();
- if (provider)
- provider->decorateEditor(m_preview);
+ QString groupId = factory->snippetProviderGroupId();
+ SnippetProvider::decorateEditor(m_preview, groupId);
QLabel *label = new QLabel(
tr("Edit preview contents to see how the current settings "
"are applied to custom code snippets. Changes in the preview "