forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user