From 91c19c2734246dbf528a6076a57b72d924bf0484 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 6 Feb 2018 15:59:05 +0100 Subject: 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 --- src/plugins/cpptools/cppcodestylepreferencesfactory.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/plugins/cpptools/cppcodestylepreferencesfactory.cpp') diff --git a/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp b/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp index 599849a302..27b9d3877b 100644 --- a/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp +++ b/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp @@ -31,9 +31,6 @@ #include "cppqtstyleindenter.h" #include -#include - -#include #include @@ -121,9 +118,9 @@ TextEditor::Indenter *CppCodeStylePreferencesFactory::createIndenter() const return new CppQtStyleIndenter(); } -TextEditor::SnippetProvider *CppCodeStylePreferencesFactory::snippetProvider() const +QString CppCodeStylePreferencesFactory::snippetProviderGroupId() const { - return TextEditor::SnippetProvider::snippetProviderForGroupId(CppEditor::Constants::CPP_SNIPPETS_GROUP_ID); + return CppEditor::Constants::CPP_SNIPPETS_GROUP_ID; } QString CppCodeStylePreferencesFactory::previewText() const -- cgit v1.2.1