QMakePM: Use generalized KeywordsCompletionProvider

Change-Id: Iaa6476be9285d814e4357b861c8fd00f1c9adc1c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
David Schulz
2017-07-26 11:12:32 +02:00
parent c7abc41d97
commit 2c5186253f
5 changed files with 283 additions and 351 deletions

View File

@@ -182,16 +182,14 @@ ProFileEditorFactory::ProFileEditorFactory()
setDocumentCreator(createProFileDocument);
setEditorWidgetCreator([]() { return new ProFileEditorWidget; });
ProFileCompletionAssistProvider *pcap = new ProFileCompletionAssistProvider;
setCompletionAssistProvider(pcap);
setCompletionAssistProvider(new KeywordsCompletionAssistProvider(qmakeKeywords()));
setCommentDefinition(Utils::CommentDefinition::HashStyle);
setEditorActionHandlers(TextEditorActionHandler::UnCommentSelection
| TextEditorActionHandler::JumpToFileUnderCursor);
Keywords keywords(pcap->variables(), pcap->functions(), QMap<QString, QStringList>());
addHoverHandler(new ProFileHoverHandler(keywords));
setSyntaxHighlighterCreator([keywords]() { return new ProFileHighlighter(keywords); });
addHoverHandler(new ProFileHoverHandler);
setSyntaxHighlighterCreator([]() { return new ProFileHighlighter; });
const QString defaultOverlay = QLatin1String(ProjectExplorer::Constants::FILEOVERLAY_QT);
Core::FileIconProvider::registerIconOverlayForSuffix(