forked from qt-creator/qt-creator
Translations: Replace QCoreApplication::translate() with Tr::tr()
Calling <Module>::Tr::tr() is preferred over
QCoreApplication::translate("::<Module>", "..."). This changes
occurrences in .cpp files.
Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/utilstr.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
@@ -951,9 +952,7 @@ namespace ADS
|
||||
QString errorString;
|
||||
const bool success = write(workspace, data, &errorString);
|
||||
if (!success)
|
||||
QMessageBox::critical(parent,
|
||||
QCoreApplication::translate("::Utils", "File Error"),
|
||||
errorString);
|
||||
QMessageBox::critical(parent, ::Utils::Tr::tr("File Error"), errorString);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "clangmodelmanagersupport.h"
|
||||
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
#include <cppeditor/cppeditortr.h>
|
||||
#include <cppeditor/cpplocatorfilter.h>
|
||||
#include <cppeditor/cppmodelmanager.h>
|
||||
#include <cppeditor/indexitem.h>
|
||||
@@ -122,8 +123,7 @@ ClangGlobalSymbolFilter::ClangGlobalSymbolFilter(ILocatorFilter *cppFilter,
|
||||
: m_cppFilter(cppFilter), m_lspFilter(lspFilter)
|
||||
{
|
||||
setId(CppEditor::Constants::LOCATOR_FILTER_ID);
|
||||
setDisplayName(QCoreApplication::translate("::CppEditor",
|
||||
CppEditor::Constants::LOCATOR_FILTER_DISPLAY_NAME));
|
||||
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::LOCATOR_FILTER_DISPLAY_NAME));
|
||||
setDefaultShortcutString(":");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
@@ -186,8 +186,7 @@ ClangClassesFilter::ClangClassesFilter()
|
||||
: ClangGlobalSymbolFilter(new CppClassesFilter, new LspClassesFilter)
|
||||
{
|
||||
setId(CppEditor::Constants::CLASSES_FILTER_ID);
|
||||
setDisplayName(QCoreApplication::translate("::CppEditor",
|
||||
CppEditor::Constants::CLASSES_FILTER_DISPLAY_NAME));
|
||||
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::CLASSES_FILTER_DISPLAY_NAME));
|
||||
setDefaultShortcutString("c");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
@@ -196,8 +195,7 @@ ClangFunctionsFilter::ClangFunctionsFilter()
|
||||
: ClangGlobalSymbolFilter(new CppFunctionsFilter, new LspFunctionsFilter)
|
||||
{
|
||||
setId(CppEditor::Constants::FUNCTIONS_FILTER_ID);
|
||||
setDisplayName(QCoreApplication::translate("::CppEditor",
|
||||
CppEditor::Constants::FUNCTIONS_FILTER_DISPLAY_NAME));
|
||||
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::FUNCTIONS_FILTER_DISPLAY_NAME));
|
||||
setDefaultShortcutString("m");
|
||||
setDefaultIncludedByDefault(false);
|
||||
}
|
||||
@@ -253,9 +251,7 @@ public:
|
||||
ClangdCurrentDocumentFilter::ClangdCurrentDocumentFilter() : d(new Private)
|
||||
{
|
||||
setId(CppEditor::Constants::CURRENT_DOCUMENT_FILTER_ID);
|
||||
setDisplayName(
|
||||
QCoreApplication::translate("::CppEditor",
|
||||
CppEditor::Constants::CURRENT_DOCUMENT_FILTER_DISPLAY_NAME));
|
||||
setDisplayName(::CppEditor::Tr::tr(CppEditor::Constants::CURRENT_DOCUMENT_FILTER_DISPLAY_NAME));
|
||||
setDefaultShortcutString(".");
|
||||
setPriority(High);
|
||||
setDefaultIncludedByDefault(false);
|
||||
|
||||
@@ -12,12 +12,11 @@
|
||||
#include <cppeditor/clangdiagnosticconfigsselectionwidget.h>
|
||||
|
||||
#include <debugger/analyzer/analyzericons.h>
|
||||
#include <debugger/debuggertr.h>
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace CppEditor;
|
||||
using namespace Utils;
|
||||
|
||||
@@ -116,7 +115,7 @@ ClangToolsOptionsPage::ClangToolsOptionsPage()
|
||||
setId(Constants::SETTINGS_PAGE_ID);
|
||||
setDisplayName(Tr::tr("Clang Tools"));
|
||||
setCategory("T.Analyzer");
|
||||
setDisplayCategory(QCoreApplication::translate("::Debugger", "Analyzer"));
|
||||
setDisplayCategory(::Debugger::Tr::tr("Analyzer"));
|
||||
setCategoryIconPath(Analyzer::Icons::SETTINGSCATEGORY_ANALYZER);
|
||||
setWidgetCreator([] { return new SettingsWidget; });
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectexplorertr.h>
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/xcodebuildparser.h>
|
||||
@@ -246,7 +247,7 @@ bool CMakeBuildStep::init()
|
||||
RunConfiguration *rc = target()->activeRunConfiguration();
|
||||
if (!rc || rc->buildKey().isEmpty()) {
|
||||
emit addTask(BuildSystemTask(Task::Error,
|
||||
QCoreApplication::translate("::ProjectExplorer",
|
||||
::ProjectExplorer::Tr::tr(
|
||||
"You asked to build the current Run Configuration's build target only, "
|
||||
"but it is not associated with a build target. "
|
||||
"Update the Make Step in your build settings.")));
|
||||
|
||||
@@ -308,9 +308,7 @@ static void localizedText(const QStringList &locales, QXmlStreamReader *reader,
|
||||
}
|
||||
} else {
|
||||
if (*currentLocale < 0 && currentText->isEmpty()) {
|
||||
*currentText = QCoreApplication::translate("::Core",
|
||||
reader->readElementText().toUtf8().constData(),
|
||||
"");
|
||||
*currentText = Tr::tr(reader->readElementText().toUtf8().constData(), "");
|
||||
} else {
|
||||
reader->skipCurrentElement();
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
|
||||
UnixUtils::substituteFileBrowserParameters(app, folder));
|
||||
QString error;
|
||||
if (browserArgs.isEmpty()) {
|
||||
error = QApplication::translate("::Core", "The command for file browser is not set.");
|
||||
error = Tr::tr("The command for file browser is not set.");
|
||||
} else {
|
||||
QProcess browserProc;
|
||||
browserProc.setProgram(browserArgs.takeFirst());
|
||||
@@ -86,7 +86,7 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
|
||||
const bool success = browserProc.startDetached();
|
||||
error = QString::fromLocal8Bit(browserProc.readAllStandardError());
|
||||
if (!success && error.isEmpty())
|
||||
error = QApplication::translate("::Core", "Error while starting file browser.");
|
||||
error = Tr::tr("Error while starting file browser.");
|
||||
}
|
||||
if (!error.isEmpty())
|
||||
showGraphicalShellError(parent, app, error);
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/treemodel.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QHash>
|
||||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
@@ -430,7 +429,7 @@ void LocatorSettingsWidget::removeCustomFilter()
|
||||
LocatorSettingsPage::LocatorSettingsPage()
|
||||
{
|
||||
setId(Constants::FILTER_OPTIONS_PAGE);
|
||||
setDisplayName(QCoreApplication::translate("::Core", Constants::FILTER_OPTIONS_PAGE));
|
||||
setDisplayName(Tr::tr(Constants::FILTER_OPTIONS_PAGE));
|
||||
setCategory(Constants::SETTINGS_CATEGORY_CORE);
|
||||
setWidgetCreator([] { return new LocatorSettingsWidget; });
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <debugger/analyzer/analyzericons.h>
|
||||
#include <debugger/debuggertr.h>
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QFormLayout>
|
||||
@@ -126,7 +127,7 @@ CppcheckOptionsPage::CppcheckOptionsPage(CppcheckTool &tool, CppcheckTrigger &tr
|
||||
setId(Constants::OPTIONS_PAGE_ID);
|
||||
setDisplayName(Tr::tr("Cppcheck"));
|
||||
setCategory("T.Analyzer");
|
||||
setDisplayCategory(QCoreApplication::translate("::Debugger", "Analyzer"));
|
||||
setDisplayCategory(::Debugger::Tr::tr("Analyzer"));
|
||||
setCategoryIconPath(Analyzer::Icons::SETTINGSCATEGORY_ANALYZER);
|
||||
|
||||
CppcheckOptions options;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "cppcurrentdocumentfilter.h"
|
||||
|
||||
#include "cppeditorconstants.h"
|
||||
#include "cppeditortr.h"
|
||||
#include "cppmodelmanager.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
@@ -20,8 +21,7 @@ CppCurrentDocumentFilter::CppCurrentDocumentFilter(CppModelManager *manager)
|
||||
: m_modelManager(manager)
|
||||
{
|
||||
setId(Constants::CURRENT_DOCUMENT_FILTER_ID);
|
||||
setDisplayName(QCoreApplication::translate("::CppEditor",
|
||||
Constants::CURRENT_DOCUMENT_FILTER_DISPLAY_NAME));
|
||||
setDisplayName(Tr::tr(Constants::CURRENT_DOCUMENT_FILTER_DISPLAY_NAME));
|
||||
setDefaultShortcutString(".");
|
||||
setPriority(High);
|
||||
setDefaultIncludedByDefault(false);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <coreplugin/find/itemviewfind.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QCoreApplication>
|
||||
#include <QToolButton>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
@@ -256,8 +255,7 @@ void Console::evaluate(const QString &expression)
|
||||
m_scriptEvaluator(expression);
|
||||
} else {
|
||||
auto item = new ConsoleItem(
|
||||
ConsoleItem::ErrorType,
|
||||
QCoreApplication::translate("::Debugger", "Can only evaluate during a debug session."));
|
||||
ConsoleItem::ErrorType, Tr::tr("Can only evaluate during a debug session."));
|
||||
m_consoleItemModel->shiftEditableRow();
|
||||
printItem(item);
|
||||
}
|
||||
|
||||
@@ -1063,19 +1063,19 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
|
||||
debugMenu->addSeparator();
|
||||
|
||||
act = new QAction(this);
|
||||
act->setText(QCoreApplication::translate("::Debugger", "Move to Calling Frame"));
|
||||
act->setText(Tr::tr("Move to Calling Frame"));
|
||||
act->setEnabled(false);
|
||||
act->setVisible(false);
|
||||
ActionManager::registerAction(act, Constants::FRAME_UP);
|
||||
|
||||
act = new QAction(this);
|
||||
act->setText(QCoreApplication::translate("::Debugger", "Move to Called Frame"));
|
||||
act->setText(Tr::tr("Move to Called Frame"));
|
||||
act->setEnabled(false);
|
||||
act->setVisible(false);
|
||||
ActionManager::registerAction(act, Constants::FRAME_DOWN);
|
||||
|
||||
act = new QAction(this);
|
||||
act->setText(QCoreApplication::translate("::Debugger", "Operate by Instruction"));
|
||||
act->setText(Tr::tr("Operate by Instruction"));
|
||||
act->setEnabled(false);
|
||||
act->setVisible(false);
|
||||
act->setCheckable(true);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/coreplugintr.h>
|
||||
#include <coreplugin/designmode.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -65,8 +66,7 @@ void FormEditorPlugin::initialize()
|
||||
IWizardFactory::registerFactoryCreator([]() -> IWizardFactory * {
|
||||
IWizardFactory *wizard = new FormClassWizard;
|
||||
wizard->setCategory(Core::Constants::WIZARD_CATEGORY_QT);
|
||||
wizard->setDisplayCategory(
|
||||
QCoreApplication::translate("::Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
|
||||
wizard->setDisplayCategory(::Core::Tr::tr(Core::Constants::WIZARD_TR_CATEGORY_QT));
|
||||
wizard->setDisplayName(Tr::tr("Qt Designer Form Class"));
|
||||
wizard->setIcon({}, "ui/h");
|
||||
wizard->setId("C.FormClass");
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
#include "formtemplatewizardpage.h"
|
||||
|
||||
#include <projectexplorer/jsonwizard/jsonwizardpagefactory.h>
|
||||
#include <projectexplorer/projectexplorertr.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/wizard.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDesignerNewFormWidgetInterface>
|
||||
#include <QDebug>
|
||||
#include <QXmlStreamReader>
|
||||
@@ -46,8 +46,8 @@ bool FormPageFactory::validateData(Utils::Id typeId, const QVariant &data, QStri
|
||||
{
|
||||
QTC_ASSERT(canCreate(typeId), return false);
|
||||
if (!data.isNull() && (data.type() != QVariant::Map || !data.toMap().isEmpty())) {
|
||||
*errorMessage = QCoreApplication::translate("::ProjectExplorer",
|
||||
"\"data\" for a \"Form\" page needs to be unset or an empty object.");
|
||||
*errorMessage = ::ProjectExplorer::Tr::tr(
|
||||
"\"data\" for a \"Form\" page needs to be unset or an empty object.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorertr.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
@@ -976,7 +977,7 @@ public:
|
||||
m_log->setVisible(dockerDeviceLog().isDebugEnabled());
|
||||
|
||||
const QString fail = QString{"Docker: "}
|
||||
+ QCoreApplication::translate("::Debugger", "Process failed to start.");
|
||||
+ ::ProjectExplorer::Tr::tr("The process failed to start.");
|
||||
auto errorLabel = new Utils::InfoLabel(fail, Utils::InfoLabel::Error, this);
|
||||
errorLabel->setVisible(false);
|
||||
|
||||
|
||||
@@ -20,19 +20,19 @@
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/coreplugintr.h>
|
||||
#include <coreplugin/findplaceholder.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/locator/locatormanager.h>
|
||||
#include <coreplugin/minisplitter.h>
|
||||
#include <coreplugin/sidebar.h>
|
||||
#include <coreplugin/minisplitter.h>
|
||||
#include <coreplugin/sidebar.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/styledbar.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QCoreApplication>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QMenu>
|
||||
@@ -223,18 +223,15 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
|
||||
if (style != SideBarWidget) {
|
||||
m_toggleSideBarAction
|
||||
= new QAction(Utils::Icons::TOGGLE_LEFT_SIDEBAR_TOOLBAR.icon(),
|
||||
QCoreApplication::translate("::Core",
|
||||
Core::Constants::TR_SHOW_LEFT_SIDEBAR),
|
||||
toolBar);
|
||||
Tr::tr(Core::Constants::TR_SHOW_LEFT_SIDEBAR), toolBar);
|
||||
m_toggleSideBarAction->setCheckable(true);
|
||||
m_toggleSideBarAction->setChecked(false);
|
||||
cmd = Core::ActionManager::registerAction(m_toggleSideBarAction,
|
||||
Core::Constants::TOGGLE_LEFT_SIDEBAR, context);
|
||||
connect(m_toggleSideBarAction, &QAction::toggled, m_toggleSideBarAction, [this](bool checked) {
|
||||
m_toggleSideBarAction->setText(
|
||||
QCoreApplication::translate("::Core",
|
||||
checked ? Core::Constants::TR_HIDE_LEFT_SIDEBAR
|
||||
: Core::Constants::TR_SHOW_LEFT_SIDEBAR));
|
||||
m_toggleSideBarAction->setText(::Core::Tr::tr(
|
||||
checked ? Core::Constants::TR_HIDE_LEFT_SIDEBAR
|
||||
: Core::Constants::TR_SHOW_LEFT_SIDEBAR));
|
||||
});
|
||||
addSideBar();
|
||||
m_toggleSideBarAction->setChecked(m_sideBar->isVisibleTo(this));
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <texteditor/outlinefactory.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/texteditortr.h>
|
||||
#include <utils/dropsupport.h>
|
||||
#include <utils/itemviews.h>
|
||||
#include <utils/navigationtreeview.h>
|
||||
@@ -388,8 +389,7 @@ OutlineComboBox::OutlineComboBox(Client *client, TextEditor::BaseTextEditor *edi
|
||||
setMaxVisibleItems(40);
|
||||
|
||||
setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
const QString sortActionText
|
||||
= QCoreApplication::translate("::TextEditor", "Sort Alphabetically");
|
||||
const QString sortActionText = ::TextEditor::Tr::tr("Sort Alphabetically");
|
||||
auto sortAction = new QAction(sortActionText, this);
|
||||
sortAction->setCheckable(true);
|
||||
sortAction->setChecked(sorted);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "perfprofilertr.h"
|
||||
|
||||
#include <debugger/analyzer/analyzericons.h>
|
||||
#include <debugger/debuggertr.h>
|
||||
|
||||
namespace PerfProfiler {
|
||||
namespace Internal {
|
||||
@@ -16,7 +17,7 @@ PerfOptionsPage::PerfOptionsPage(PerfSettings *settings)
|
||||
setId(Constants::PerfSettingsId);
|
||||
setDisplayName(Tr::tr("CPU Usage"));
|
||||
setCategory("T.Analyzer");
|
||||
setDisplayCategory(QCoreApplication::translate("::Debugger", "Analyzer"));
|
||||
setDisplayCategory(::Debugger::Tr::tr("Analyzer"));
|
||||
setCategoryIconPath(Analyzer::Icons::SETTINGSCATEGORY_ANALYZER);
|
||||
setWidgetCreator([settings] { return new PerfConfigWidget(settings); });
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/coreplugintr.h>
|
||||
#include <coreplugin/diffservice.h>
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <coreplugin/editormanager/documentmodel.h>
|
||||
@@ -3358,8 +3359,7 @@ void ProjectExplorerPluginPrivate::updateRecentProjectMenu()
|
||||
// add the Clear Menu item
|
||||
if (hasRecentProjects) {
|
||||
menu->addSeparator();
|
||||
QAction *action = menu->addAction(QCoreApplication::translate(
|
||||
"::Core", Core::Constants::TR_CLEAR_MENU));
|
||||
QAction *action = menu->addAction(::Core::Tr::tr(Core::Constants::TR_CLEAR_MENU));
|
||||
connect(action, &QAction::triggered,
|
||||
this, &ProjectExplorerPluginPrivate::clearRecentProjects);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <coreplugin/actionmanager/commandbutton.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/coreicons.h>
|
||||
#include <coreplugin/coreplugintr.h>
|
||||
#include <coreplugin/find/optionspopup.h>
|
||||
#include <coreplugin/findplaceholder.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
@@ -619,10 +620,8 @@ public:
|
||||
m_toggleRightSidebarAction.setCheckable(true);
|
||||
m_toggleRightSidebarAction.setChecked(true);
|
||||
const auto toolTipText = [](bool checked) {
|
||||
return checked ? QCoreApplication::translate("::Core",
|
||||
Core::Constants::TR_HIDE_RIGHT_SIDEBAR)
|
||||
: QCoreApplication::translate("::Core",
|
||||
Core::Constants::TR_SHOW_RIGHT_SIDEBAR);
|
||||
return checked ? ::Core::Tr::tr(Core::Constants::TR_HIDE_RIGHT_SIDEBAR)
|
||||
: ::Core::Tr::tr(Core::Constants::TR_SHOW_RIGHT_SIDEBAR);
|
||||
};
|
||||
m_toggleRightSidebarAction.setText(toolTipText(false)); // always "Show Right Sidebar"
|
||||
m_toggleRightSidebarAction.setToolTip(toolTipText(m_toggleRightSidebarAction.isChecked()));
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "qmldesignerplugin.h"
|
||||
#include "qmldesignertr.h"
|
||||
#include "coreplugin/iwizardfactory.h"
|
||||
#include "designmodecontext.h"
|
||||
#include "designmodewidget.h"
|
||||
@@ -63,7 +64,6 @@
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QScreen>
|
||||
@@ -254,8 +254,7 @@ bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *e
|
||||
.toBool());
|
||||
|
||||
Exception::setShowExceptionCallback([&](QStringView title, QStringView description) {
|
||||
QString composedTitle = title.isEmpty() ? QCoreApplication::translate("::QmlDesigner", "Error")
|
||||
: title.toString();
|
||||
const QString composedTitle = title.isEmpty() ? Tr::tr("Error") : title.toString();
|
||||
Core::AsynchronousMessageBox::warning(composedTitle, description.toString());
|
||||
});
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <debugger/analyzer/analyzericons.h>
|
||||
#include <debugger/debuggertr.h>
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
|
||||
@@ -82,7 +83,7 @@ QmlProfilerOptionsPage::QmlProfilerOptionsPage()
|
||||
setId(Constants::SETTINGS);
|
||||
setDisplayName(Tr::tr("QML Profiler"));
|
||||
setCategory("T.Analyzer");
|
||||
setDisplayCategory(Tr::tr("Analyzer"));
|
||||
setDisplayCategory(::Debugger::Tr::tr("Analyzer"));
|
||||
setCategoryIconPath(Analyzer::Icons::SETTINGSCATEGORY_ANALYZER);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
#include <cppeditor/cppeditortr.h>
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
|
||||
@@ -117,8 +118,7 @@ CodeGenSettingsPage::CodeGenSettingsPage()
|
||||
setId(Constants::CODEGEN_SETTINGS_PAGE_ID);
|
||||
setDisplayName(Tr::tr("Qt Class Generation"));
|
||||
setCategory(CppEditor::Constants::CPP_SETTINGS_CATEGORY);
|
||||
setDisplayCategory(
|
||||
QCoreApplication::translate("::CppEditor", CppEditor::Constants::CPP_SETTINGS_NAME));
|
||||
setDisplayCategory(::CppEditor::Tr::tr(CppEditor::Constants::CPP_SETTINGS_NAME));
|
||||
setCategoryIconPath(":/projectexplorer/images/settingscategory_cpp.png");
|
||||
setWidgetCreator([] { return new CodeGenSettingsPageWidget; });
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ QList<Snippet> SnippetsCollection::readXML(const FilePath &fileName, const QStri
|
||||
} else if (isGroupKnown(groupId) && (snippetId.isEmpty() || snippetId == id)) {
|
||||
Snippet snippet(groupId, id);
|
||||
snippet.setTrigger(trigger);
|
||||
snippet.setComplement(QCoreApplication::translate("::TextEditor",
|
||||
snippet.setComplement(Tr::tr(
|
||||
atts.value(kComplement).toString().toLatin1(),
|
||||
atts.value(kId).toString().toLatin1()));
|
||||
snippet.setIsRemoved(toBool(atts.value(kRemoved).toString()));
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "valgrindtr.h"
|
||||
|
||||
#include <debugger/analyzer/analyzericons.h>
|
||||
#include <debugger/debuggertr.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
@@ -90,7 +91,7 @@ ValgrindOptionsPage::ValgrindOptionsPage()
|
||||
setId(ANALYZER_VALGRIND_SETTINGS);
|
||||
setDisplayName(Tr::tr("Valgrind"));
|
||||
setCategory("T.Analyzer");
|
||||
setDisplayCategory(Tr::tr("Analyzer"));
|
||||
setDisplayCategory(::Debugger::Tr::tr("Analyzer"));
|
||||
setCategoryIconPath(Analyzer::Icons::SETTINGSCATEGORY_ANALYZER);
|
||||
setWidgetCreator([] { return new ValgrindConfigWidget(ValgrindGlobalSettings::instance()); });
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "basevcseditorfactory.h"
|
||||
|
||||
#include "vcsbaseeditor.h"
|
||||
#include "vcsbasetr.h"
|
||||
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
@@ -11,7 +13,6 @@
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QStringList>
|
||||
|
||||
using namespace TextEditor;
|
||||
@@ -33,7 +34,7 @@ VcsEditorFactory::VcsEditorFactory(const VcsBaseEditorParameters *parameters,
|
||||
std::function<void (const Utils::FilePath &, const QString &)> describeFunc)
|
||||
{
|
||||
setId(parameters->id);
|
||||
setDisplayName(QCoreApplication::translate("::VcsBase", parameters->displayName));
|
||||
setDisplayName(Tr::tr(parameters->displayName));
|
||||
if (QLatin1String(parameters->mimeType) != QLatin1String(DiffEditor::Constants::DIFF_EDITOR_MIMETYPE))
|
||||
addMimeType(QLatin1String(parameters->mimeType));
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ void VcsBaseSubmitEditor::setParameters(const VcsBaseSubmitEditorParameters &par
|
||||
d->m_file.setMimeType(QLatin1String(parameters.mimeType));
|
||||
|
||||
setWidget(d->m_widget);
|
||||
document()->setPreferredDisplayName(QCoreApplication::translate("::VcsBase", d->m_parameters.displayName));
|
||||
document()->setPreferredDisplayName(Tr::tr(d->m_parameters.displayName));
|
||||
|
||||
// Message font according to settings
|
||||
CompletingTextEdit *descriptionEdit = d->m_widget->descriptionEdit();
|
||||
|
||||
Reference in New Issue
Block a user