forked from qt-creator/qt-creator
QmlJSEditor Exporting AutoCompleter
One more change for the new Binding Editor Change-Id: I17c9eb02212a29abcc4ef568e7d85cffc14c023d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
#include <QTextBlock>
|
||||
|
||||
using namespace QmlJSEditor;
|
||||
using namespace Internal;
|
||||
using namespace QmlJS;
|
||||
|
||||
static int blockStartState(const QTextBlock &block)
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <texteditor/autocompleter.h>
|
||||
#include <qmljseditor/qmljseditor_global.h>
|
||||
|
||||
namespace QmlJSEditor {
|
||||
namespace Internal {
|
||||
|
||||
class AutoCompleter : public TextEditor::AutoCompleter
|
||||
class QMLJSEDITOR_EXPORT AutoCompleter : public TextEditor::AutoCompleter
|
||||
{
|
||||
public:
|
||||
AutoCompleter();
|
||||
@@ -55,5 +55,4 @@ public:
|
||||
QString insertParagraphSeparator(const QTextCursor &tc) const override;
|
||||
};
|
||||
|
||||
} // Internal
|
||||
} // QmlJSEditor
|
||||
|
||||
@@ -1041,7 +1041,7 @@ QmlJSEditorFactory::QmlJSEditorFactory()
|
||||
setDocumentCreator([]() { return new QmlJSEditorDocument; });
|
||||
setEditorWidgetCreator([]() { return new QmlJSEditorWidget; });
|
||||
setEditorCreator([]() { return new QmlJSEditor; });
|
||||
setAutoCompleterCreator([]() { return new Internal::AutoCompleter; });
|
||||
setAutoCompleterCreator([]() { return new AutoCompleter; });
|
||||
setCommentDefinition(Utils::CommentDefinition::CppStyle);
|
||||
setParenthesesMatchingEnabled(true);
|
||||
setCodeFoldingSupported(true);
|
||||
@@ -1059,7 +1059,7 @@ void QmlJSEditorFactory::decorateEditor(TextEditorWidget *editor)
|
||||
{
|
||||
editor->textDocument()->setSyntaxHighlighter(new QmlJSHighlighter);
|
||||
editor->textDocument()->setIndenter(new Internal::Indenter(editor->textDocument()->document()));
|
||||
editor->setAutoCompleter(new Internal::AutoCompleter);
|
||||
editor->setAutoCompleter(new AutoCompleter);
|
||||
}
|
||||
|
||||
} // namespace QmlJSEditor
|
||||
|
||||
Reference in New Issue
Block a user