Highlighter: clarify 'Update Definitions' action

by renaming it to Download Definitions and adding a tooltip stating that it
collects all definitions that are missing or were updated after the release and
downloads it to the ksyntax highlighting user folder.
Also adding a separate reload definitions button in the settings behind
the user path.

Change-Id: I059cc98e33147cae910fa4fdb35631d1dca81448
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2019-11-04 10:03:27 +01:00
parent 9a567a48dd
commit 5ece12d4ea
5 changed files with 40 additions and 10 deletions

View File

@@ -3100,11 +3100,11 @@ void TextEditorWidgetPrivate::updateSyntaxInfoBar(const Highlighter::Definitions
&& !TextEditorSettings::highlighterSettings().isIgnoredFilePattern(fileName)) {
InfoBarEntry info(missing,
BaseTextEditor::tr("A highlight definition was not found for this file. "
"Would you like to update highlight definition files?"),
"Would you like to download additional highlight definition files?"),
InfoBarEntry::GlobalSuppression::Enabled);
info.setCustomButtonInfo(BaseTextEditor::tr("Update Definitions"), [missing, this]() {
info.setCustomButtonInfo(BaseTextEditor::tr("Download Definitions"), [missing, this]() {
m_document->infoBar()->removeInfo(missing);
Highlighter::updateDefinitions([widget = QPointer<TextEditorWidget>(q)]() {
Highlighter::downloadDefinitions([widget = QPointer<TextEditorWidget>(q)]() {
if (widget)
widget->configureGenericHighlighter();
});