QmlJSEditor: Convert to using Tr::tr

Change-Id: I7e6bc774cdac0ead8ef944a46db120d290419f18
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2022-08-25 12:46:47 +02:00
parent 016fb66c96
commit 0a6523e7f1
25 changed files with 139 additions and 748 deletions

View File

@@ -6,6 +6,7 @@
#include "qmljseditorconstants.h"
#include "qmljseditordocument_p.h"
#include "qmljseditorplugin.h"
#include "qmljseditortr.h"
#include "qmljshighlighter.h"
#include "qmljsquickfixassist.h"
#include "qmljssemantichighlighter.h"
@@ -690,8 +691,8 @@ void QmlJSEditorDocument::setIsDesignModePreferred(bool value)
if (value) {
if (infoBar()->canInfoBeAdded(QML_UI_FILE_WARNING)) {
Utils::InfoBarEntry info(QML_UI_FILE_WARNING,
tr("This file should only be edited in <b>Design</b> mode."));
info.addCustomButton(tr("Switch Mode"), []() {
Tr::tr("This file should only be edited in <b>Design</b> mode."));
info.addCustomButton(Tr::tr("Switch Mode"), []() {
Core::ModeManager::activateMode(Core::Constants::MODE_DESIGN);
});
infoBar()->addInfo(info);