forked from qt-creator/qt-creator
Highlighter: update all editors after downloading additional definitions
Instead of just the editor with the info bar that was triggering the download action or none editor if the action was triggered from the settings dialog. Change-Id: I4158eeb7fdb0a763d082c6d801b400e8635c7f38 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -260,6 +260,7 @@ void Highlighter::downloadDefinitions(std::function<void()> callback) {
|
||||
Core::MessageManager::write(tr("Highlighter updates: done"),
|
||||
Core::MessageManager::ModeSwitch);
|
||||
downloader->deleteLater();
|
||||
reload();
|
||||
if (callback)
|
||||
callback();
|
||||
});
|
||||
|
@@ -3104,10 +3104,7 @@ void TextEditorWidgetPrivate::updateSyntaxInfoBar(const Highlighter::Definitions
|
||||
InfoBarEntry::GlobalSuppression::Enabled);
|
||||
info.setCustomButtonInfo(BaseTextEditor::tr("Download Definitions"), [missing, this]() {
|
||||
m_document->infoBar()->removeInfo(missing);
|
||||
Highlighter::downloadDefinitions([widget = QPointer<TextEditorWidget>(q)]() {
|
||||
if (widget)
|
||||
widget->configureGenericHighlighter();
|
||||
});
|
||||
Highlighter::downloadDefinitions();
|
||||
});
|
||||
|
||||
infoBar->removeInfo(multiple);
|
||||
|
Reference in New Issue
Block a user