aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppquickfixprojectsettings.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2023-01-11 20:43:10 +0100
committerhjk <hjk@qt.io>2023-01-12 06:46:45 +0000
commitf7bcd4f574491211d73752fb953e5af099dcac0c (patch)
tree03c609df6f91caa84df76049af6eff1d508376be /src/plugins/cppeditor/cppquickfixprojectsettings.cpp
parent85d067af916346d50da515d6f636b29b5dd4dc6c (diff)
CppEditor: Convert to Tr::tr
Change-Id: Ic4025e06e17c45eb6dc2162fb7f21f5b8aebe84d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixprojectsettings.cpp')
-rw-r--r--src/plugins/cppeditor/cppquickfixprojectsettings.cpp21
1 files changed, 13 insertions, 8 deletions
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 <coreplugin/icore.h>
+
#include <QMessageBox>
#include <QPushButton>
#include <QSettings>
@@ -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) {