From 2c112a51c31f015a8e1759500814bb94a2c79fb5 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 4 Nov 2019 10:08:08 +0100 Subject: [PATCH] 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 --- src/plugins/texteditor/highlighter.cpp | 1 + src/plugins/texteditor/texteditor.cpp | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/texteditor/highlighter.cpp b/src/plugins/texteditor/highlighter.cpp index 09f9b88ff91..19f0656a152 100644 --- a/src/plugins/texteditor/highlighter.cpp +++ b/src/plugins/texteditor/highlighter.cpp @@ -260,6 +260,7 @@ void Highlighter::downloadDefinitions(std::function callback) { Core::MessageManager::write(tr("Highlighter updates: done"), Core::MessageManager::ModeSwitch); downloader->deleteLater(); + reload(); if (callback) callback(); }); diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index b03cef1de39..570d29362eb 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -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(q)]() { - if (widget) - widget->configureGenericHighlighter(); - }); + Highlighter::downloadDefinitions(); }); infoBar->removeInfo(multiple);