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>
This commit is contained in:
hjk
2018-02-06 15:59:05 +01:00
parent 0c3aed2549
commit 91c19c2734
13 changed files with 28 additions and 64 deletions

View File

@@ -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 "