Qt Creator plugin: undefined reference to snippets
-
Hi,
I try to write a plugin for QtCreator and wanted to use the snippets in my plugin. Defined in namespace Internal in TextExitor plugin I suspect that I'm not able to use them.
Is this right?
I only get a n error like this:
undefined reference to `TextEditor::Internal::SnippetsCollection::instance()
I added the dependency to texteditor, but that did not change anything regarding this error.
I'm currently bound to Creator 3.0.1 and Qt4.8.5, but I hope you can still give me some information about it.Thanks and regards, Marc
-
@Marc-Ladnar said in Qt Creator plugin: undefined reference to snippets:
I added the dependency to texteditor
How? Can you show?
-
In my plugin.pro i added it in dependencies section:
QTC_PLUGIN_NAME = KSClassGenerator
QTC_LIB_DEPENDS += \
# nothing here at this timeQTC_PLUGIN_DEPENDS += \
coreplugin \
projectexplorer \
texteditorQTC_PLUGIN_RECOMMENDS += \
# optional plugin dependencies. nothing here at this time=====================================================0
I want to do something like this and further more:
TextEditor::Internal::SnippetsCollection *collection = TextEditor::Internal::SnippetsCollection::instance(); const int size = collection->totalActiveSnippets("C++");