summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcodestylepreferencesfactory.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/cpptools/cppcodestylepreferencesfactory.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/cpptools/cppcodestylepreferencesfactory.cpp')
-rw-r--r--src/plugins/cpptools/cppcodestylepreferencesfactory.cpp7
1 files changed, 2 insertions, 5 deletions
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 <cppeditor/cppeditorconstants.h>
-#include <texteditor/snippets/snippetprovider.h>
-
-#include <extensionsystem/pluginmanager.h>
#include <QLayout>
@@ -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