From 2b46d1943cde354b45e31ff0c04775661cd82409 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 8 Feb 2023 15:01:31 +0100 Subject: [PATCH] QmlPreview: Tr::tr() Change-Id: Ie80134c114da277ab16e4305c57ae35e37adafb2 Reviewed-by: hjk --- share/qtcreator/translations/qtcreator_de.ts | 2 +- share/qtcreator/translations/qtcreator_hr.ts | 2 +- share/qtcreator/translations/qtcreator_ru.ts | 5 +---- share/qtcreator/translations/qtcreator_zh_CN.ts | 2 +- src/plugins/qmlpreview/qmlpreviewplugin.cpp | 8 +++++--- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 6a0b9a47275..a44d7c4e773 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -54366,7 +54366,7 @@ fails because Clang does not understand the target architecture. - QmlPreview::QmlPreviewPlugin + ::QmlPreview QML Preview QML-Vorschau diff --git a/share/qtcreator/translations/qtcreator_hr.ts b/share/qtcreator/translations/qtcreator_hr.ts index 9766ed4df67..56c1d622ead 100644 --- a/share/qtcreator/translations/qtcreator_hr.ts +++ b/share/qtcreator/translations/qtcreator_hr.ts @@ -31097,7 +31097,7 @@ ID oznake moraju započeti malim slovom. - QmlPreview::Internal::QmlPreviewPlugin + ::QmlPreview QML Preview diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index faf6b5d7dfc..910a8920755 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -38089,7 +38089,7 @@ the QML editor know about a likely URI. - QmlPreview::Internal::QmlPreviewPlugin + ::QmlPreview QML Preview Предпросмотр QML @@ -38102,9 +38102,6 @@ the QML editor know about a likely URI. Preview File Файл предпросмотра - - - QmlPreview::ProjectFileSelectionsWidget Files to test: Тестируемые файлы: diff --git a/share/qtcreator/translations/qtcreator_zh_CN.ts b/share/qtcreator/translations/qtcreator_zh_CN.ts index 9b94b3bf048..169af21ca7a 100644 --- a/share/qtcreator/translations/qtcreator_zh_CN.ts +++ b/share/qtcreator/translations/qtcreator_zh_CN.ts @@ -36789,7 +36789,7 @@ the QML editor know about a likely URI. - QmlPreview::QmlPreviewPlugin + ::QmlPreview QML Preview diff --git a/src/plugins/qmlpreview/qmlpreviewplugin.cpp b/src/plugins/qmlpreview/qmlpreviewplugin.cpp index 194d9bcc6a5..9323bf617c0 100644 --- a/src/plugins/qmlpreview/qmlpreviewplugin.cpp +++ b/src/plugins/qmlpreview/qmlpreviewplugin.cpp @@ -2,7 +2,9 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "qmlpreviewplugin.h" + #include "qmlpreviewruncontrol.h" +#include "qmlpreviewtr.h" #ifdef WITH_TESTS #include "tests/qmlpreviewclient_test.h" @@ -146,8 +148,8 @@ QmlPreviewPluginPrivate::QmlPreviewPluginPrivate(QmlPreviewPlugin *parent) Core::ActionContainer *menu = Core::ActionManager::actionContainer( Constants::M_BUILDPROJECT); - QAction *action = new QAction(QmlPreviewPlugin::tr("QML Preview"), this); - action->setToolTip(QLatin1String("Preview changes to QML code live in your application.")); + QAction *action = new QAction(Tr::tr("QML Preview"), this); + action->setToolTip(Tr::tr("Preview changes to QML code live in your application.")); action->setEnabled(SessionManager::startupProject() != nullptr); connect(SessionManager::instance(), &SessionManager::startupProjectChanged, action, &QAction::setEnabled); @@ -166,7 +168,7 @@ QmlPreviewPluginPrivate::QmlPreviewPluginPrivate(QmlPreviewPlugin *parent) Constants::G_BUILD_RUN); menu = Core::ActionManager::actionContainer(Constants::M_FILECONTEXT); - action = new QAction(QmlPreviewPlugin::tr("Preview File"), this); + action = new QAction(Tr::tr("Preview File"), this); action->setEnabled(false); connect(q, &QmlPreviewPlugin::runningPreviewsChanged, action, [action](const QmlPreviewRunControlList &previews) {