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