forked from qt-creator/qt-creator
Snippets: Make it easier for plugins to add snippets groups
Groups are no longer enum values but identified from snippet providers.
This commit is contained in:
@@ -52,6 +52,8 @@
|
||||
#include <cplusplus/BackwardsScanner.h>
|
||||
#include <cplusplus/LookupContext.h>
|
||||
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
@@ -463,7 +465,7 @@ CppCodeCompletion::CppCodeCompletion(CppModelManager *manager)
|
||||
m_automaticCompletion(false),
|
||||
m_completionOperator(T_EOF_SYMBOL),
|
||||
m_objcEnabled(true),
|
||||
m_snippetProvider(TextEditor::Snippet::Cpp,
|
||||
m_snippetProvider(CppEditor::Constants::CPP_SNIPPETS_GROUP_ID,
|
||||
QIcon(QLatin1String(":/texteditor/images/snippet.png")))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <cplusplus/TypeOfExpression.h>
|
||||
|
||||
#include <texteditor/icompletioncollector.h>
|
||||
#include <texteditor/snippets/snippetprovider.h>
|
||||
#include <texteditor/snippets/snippetcollector.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPointer>
|
||||
@@ -153,7 +153,7 @@ private:
|
||||
unsigned m_completionOperator;
|
||||
bool m_objcEnabled;
|
||||
|
||||
TextEditor::SnippetProvider m_snippetProvider;
|
||||
TextEditor::SnippetCollector m_snippetProvider;
|
||||
|
||||
CPlusPlus::Icons m_icons;
|
||||
CPlusPlus::Overview overview;
|
||||
|
||||
Reference in New Issue
Block a user