From f7bcd4f574491211d73752fb953e5af099dcac0c Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 11 Jan 2023 20:43:10 +0100 Subject: CppEditor: Convert to Tr::tr Change-Id: Ic4025e06e17c45eb6dc2162fb7f21f5b8aebe84d Reviewed-by: Alessandro Portale Reviewed-by: --- .../cppeditor/cppquickfixprojectsettings.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/plugins/cppeditor/cppquickfixprojectsettings.cpp') diff --git a/src/plugins/cppeditor/cppquickfixprojectsettings.cpp b/src/plugins/cppeditor/cppquickfixprojectsettings.cpp index 60968ab207..3dbcf8d204 100644 --- a/src/plugins/cppeditor/cppquickfixprojectsettings.cpp +++ b/src/plugins/cppeditor/cppquickfixprojectsettings.cpp @@ -2,8 +2,12 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "cppquickfixprojectsettings.h" + #include "cppeditorconstants.h" +#include "cppeditortr.h" + #include + #include #include #include @@ -11,10 +15,11 @@ namespace CppEditor { namespace Internal { + using namespace Constants; -static const char SETTINGS_FILE_NAME[] = ".cppQuickFix"; -static const char USE_GLOBAL_SETTINGS[] = "UseGlobalSettings"; +const char SETTINGS_FILE_NAME[] = ".cppQuickFix"; +const char USE_GLOBAL_SETTINGS[] = "UseGlobalSettings"; CppQuickFixProjectsSettings::CppQuickFixProjectsSettings(ProjectExplorer::Project *project) { @@ -103,15 +108,15 @@ bool CppQuickFixProjectsSettings::useCustomSettings() m_settingsFile = defaultLocation; } else if (m_settingsFile != defaultLocation) { QMessageBox msgBox(Core::ICore::dialogParent()); - msgBox.setText(tr("Quick Fix settings are saved in a file. Existing settings file " - "\"%1\" found. Should this file be used or a " - "new one be created?") + msgBox.setText(Tr::tr("Quick Fix settings are saved in a file. Existing settings file " + "\"%1\" found. Should this file be used or a " + "new one be created?") .arg(m_settingsFile.toString())); QPushButton *cancel = msgBox.addButton(QMessageBox::Cancel); - cancel->setToolTip(tr("Switch Back to Global Settings")); - QPushButton *useExisting = msgBox.addButton(tr("Use Existing"), QMessageBox::AcceptRole); + cancel->setToolTip(Tr::tr("Switch Back to Global Settings")); + QPushButton *useExisting = msgBox.addButton(Tr::tr("Use Existing"), QMessageBox::AcceptRole); useExisting->setToolTip(m_settingsFile.toString()); - QPushButton *createNew = msgBox.addButton(tr("Create New"), QMessageBox::ActionRole); + QPushButton *createNew = msgBox.addButton(Tr::tr("Create New"), QMessageBox::ActionRole); createNew->setToolTip(defaultLocation.toString()); msgBox.exec(); if (msgBox.clickedButton() == createNew) { -- cgit v1.2.3