-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
class QdbDeployConfigurationFactory final : public ProjectExplorer::DeployConfigurationFactory
{
@@ -14,5 +13,4 @@ public:
QdbDeployConfigurationFactory();
};
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbdevice.cpp b/src/plugins/boot2qt/qdbdevice.cpp
index 2c0e8d6903a..90568f42641 100644
--- a/src/plugins/boot2qt/qdbdevice.cpp
+++ b/src/plugins/boot2qt/qdbdevice.cpp
@@ -3,8 +3,9 @@
#include "qdbdevice.h"
-#include "qdbutils.h"
#include "qdbconstants.h"
+#include "qdbtr.h"
+#include "qdbutils.h"
#include
@@ -27,8 +28,7 @@ using namespace ProjectExplorer;
using namespace RemoteLinux;
using namespace Utils;
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
class QdbProcessImpl : public LinuxProcessInterface
{
@@ -58,7 +58,7 @@ public:
m_appRunner.setCommand(command);
m_appRunner.start();
- showMessage(QdbDevice::tr("Starting command \"%1\" on device \"%2\".")
+ showMessage(Tr::tr("Starting command \"%1\" on device \"%2\".")
.arg(command.toUserOutput(), m_deviceName));
}
@@ -78,18 +78,18 @@ private:
if (failure) {
QString errorString;
if (!m_appRunner.errorString().isEmpty()) {
- errorString = QdbDevice::tr("Command failed on device \"%1\": %2")
+ errorString = Tr::tr("Command failed on device \"%1\": %2")
.arg(m_deviceName, m_appRunner.errorString());
} else {
- errorString = QdbDevice::tr("Command failed on device \"%1\".").arg(m_deviceName);
+ errorString = Tr::tr("Command failed on device \"%1\".").arg(m_deviceName);
}
showMessage(errorString, true);
if (!stdOut.isEmpty())
- showMessage(QdbDevice::tr("stdout was: \"%1\"").arg(stdOut));
+ showMessage(Tr::tr("stdout was: \"%1\"").arg(stdOut));
if (!stdErr.isEmpty())
- showMessage(QdbDevice::tr("stderr was: \"%1\"").arg(stdErr));
+ showMessage(Tr::tr("stderr was: \"%1\"").arg(stdErr));
} else {
- showMessage(QdbDevice::tr("Commands on device \"%1\" finished successfully.")
+ showMessage(Tr::tr("Commands on device \"%1\" finished successfully.")
.arg(m_deviceName));
}
deleteLater();
@@ -104,13 +104,13 @@ private:
QdbDevice::QdbDevice()
{
- setDisplayType(tr("Boot2Qt Device"));
+ setDisplayType(Tr::tr("Boot2Qt Device"));
- addDeviceAction({tr("Reboot Device"), [](const IDevice::Ptr &device, QWidget *) {
+ addDeviceAction({Tr::tr("Reboot Device"), [](const IDevice::Ptr &device, QWidget *) {
(void) new DeviceApplicationObserver(device, {device->filePath("reboot"), {}});
}});
- addDeviceAction({tr("Restore Default App"), [](const IDevice::Ptr &device, QWidget *) {
+ addDeviceAction({Tr::tr("Restore Default App"), [](const IDevice::Ptr &device, QWidget *) {
(void) new DeviceApplicationObserver(device, {device->filePath("appcontroller"), {"--remove-default"}});
}});
}
@@ -170,14 +170,14 @@ class QdbSettingsPage : public QWizardPage
public:
QdbSettingsPage()
{
- setWindowTitle(QdbDevice::tr("WizardPage"));
- setTitle(QdbDevice::tr("Device Settings"));
+ setWindowTitle(Tr::tr("WizardPage"));
+ setTitle(Tr::tr("Device Settings"));
nameLineEdit = new QLineEdit(this);
- nameLineEdit->setPlaceholderText(QdbDevice::tr("A short, free-text description"));
+ nameLineEdit->setPlaceholderText(Tr::tr("A short, free-text description"));
addressLineEdit = new QLineEdit(this);
- addressLineEdit->setPlaceholderText(QdbDevice::tr("Host name or IP address"));
+ addressLineEdit->setPlaceholderText(Tr::tr("Host name or IP address"));
auto usbWarningLabel = new QLabel(this);
usbWarningLabel->setText(QString("%1%2
")
@@ -187,8 +187,8 @@ public:
"The connectivity to the device is tested after finishing."));
auto formLayout = new QFormLayout(this);
- formLayout->addRow(QdbDevice::tr("Device name:"), nameLineEdit);
- formLayout->addRow(QdbDevice::tr("Device address:"), addressLineEdit);
+ formLayout->addRow(Tr::tr("Device name:"), nameLineEdit);
+ formLayout->addRow(Tr::tr("Device address:"), addressLineEdit);
formLayout->addRow(usbWarningLabel);
connect(nameLineEdit, &QLineEdit::textChanged, this, &QWizardPage::completeChanged);
@@ -214,7 +214,7 @@ public:
QdbDeviceWizard(QWidget *parent)
: QWizard(parent)
{
- setWindowTitle(QdbDevice::tr("Boot2Qt Network Device Setup"));
+ setWindowTitle(Tr::tr("Boot2Qt Network Device Setup"));
settingsPage.setCommitPage(true);
enum { SettingsPageId };
@@ -246,7 +246,7 @@ private:
QdbLinuxDeviceFactory::QdbLinuxDeviceFactory()
: IDeviceFactory(Constants::QdbLinuxOsType)
{
- setDisplayName(QdbDevice::tr("Boot2Qt Device"));
+ setDisplayName(Tr::tr("Boot2Qt Device"));
setCombinedIcon(":/qdb/images/qdbdevicesmall.png", ":/qdb/images/qdbdevice.png");
setConstructionFunction(&QdbDevice::create);
setCreator([] {
@@ -259,5 +259,4 @@ QdbLinuxDeviceFactory::QdbLinuxDeviceFactory()
});
}
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbdevice.h b/src/plugins/boot2qt/qdbdevice.h
index eb2e63d97ac..300fe826329 100644
--- a/src/plugins/boot2qt/qdbdevice.h
+++ b/src/plugins/boot2qt/qdbdevice.h
@@ -3,17 +3,13 @@
#pragma once
-#include "qdbconstants.h"
#include
#include
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
class QdbDevice final : public RemoteLinux::LinuxDevice
{
- Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbDevice)
-
public:
typedef QSharedPointer Ptr;
typedef QSharedPointer ConstPtr;
@@ -45,5 +41,4 @@ public:
QdbLinuxDeviceFactory();
};
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbdevicedebugsupport.cpp b/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
index cb95edcf765..97529dfa9fb 100644
--- a/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
+++ b/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
@@ -4,9 +4,8 @@
#include "qdbdevicedebugsupport.h"
#include "qdbconstants.h"
-#include "qdbdevice.h"
-#include "qdbrunconfiguration.h"
+#include
#include
#include
diff --git a/src/plugins/boot2qt/qdbmakedefaultappstep.cpp b/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
index e364f8c94e6..f8b50b22e32 100644
--- a/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
+++ b/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
@@ -4,6 +4,7 @@
#include "qdbmakedefaultappstep.h"
#include "qdbconstants.h"
+#include "qdbtr.h"
#include
#include
@@ -20,14 +21,12 @@ using namespace ProjectExplorer;
using namespace Utils;
using namespace Utils::Tasking;
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
// QdbMakeDefaultAppService
class QdbMakeDefaultAppService : public RemoteLinux::AbstractRemoteLinuxDeployService
{
- Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbMakeDefaultAppService)
public:
void setMakeDefault(bool makeDefault) { m_makeDefault = makeDefault; }
@@ -55,12 +54,12 @@ private:
};
const auto doneHandler = [this](const QtcProcess &) {
if (m_makeDefault)
- emit progressMessage(tr("Application set as the default one."));
+ emit progressMessage(Tr::tr("Application set as the default one."));
else
- emit progressMessage(tr("Reset the default application."));
+ emit progressMessage(Tr::tr("Reset the default application."));
};
const auto errorHandler = [this](const QtcProcess &process) {
- emit errorMessage(tr("Remote process failed: %1").arg(process.errorString()));
+ emit errorMessage(Tr::tr("Remote process failed: %1").arg(process.errorString()));
};
return Group { Process(setupHandler, doneHandler, errorHandler) };
}
@@ -72,8 +71,6 @@ private:
class QdbMakeDefaultAppStep final : public RemoteLinux::AbstractRemoteLinuxDeployStep
{
- Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbMakeDefaultAppStep)
-
public:
QdbMakeDefaultAppStep(BuildStepList *bsl, Id id)
: AbstractRemoteLinuxDeployStep(bsl, id)
@@ -83,8 +80,8 @@ public:
auto selection = addAspect();
selection->setSettingsKey("QdbMakeDefaultDeployStep.MakeDefault");
- selection->addOption(tr("Set this application to start by default"));
- selection->addOption(tr("Reset default application"));
+ selection->addOption(Tr::tr("Set this application to start by default"));
+ selection->addOption(Tr::tr("Reset default application"));
setInternalInitializer([service, selection] {
service->setMakeDefault(selection->value() == 0);
@@ -99,10 +96,9 @@ public:
QdbMakeDefaultAppStepFactory::QdbMakeDefaultAppStepFactory()
{
registerStep(Constants::QdbMakeDefaultAppStepId);
- setDisplayName(QdbMakeDefaultAppStep::tr("Change default application"));
+ setDisplayName(Tr::tr("Change default application"));
setSupportedDeviceType(Qdb::Constants::QdbLinuxOsType);
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
}
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbmakedefaultappstep.h b/src/plugins/boot2qt/qdbmakedefaultappstep.h
index 5f66e5c546e..ff0d8bdf778 100644
--- a/src/plugins/boot2qt/qdbmakedefaultappstep.h
+++ b/src/plugins/boot2qt/qdbmakedefaultappstep.h
@@ -5,8 +5,7 @@
#include
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
class QdbMakeDefaultAppStepFactory final : public ProjectExplorer::BuildStepFactory
{
@@ -14,5 +13,4 @@ public:
QdbMakeDefaultAppStepFactory();
};
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp
index 834ddb23c0e..7e1882c1679 100644
--- a/src/plugins/boot2qt/qdbplugin.cpp
+++ b/src/plugins/boot2qt/qdbplugin.cpp
@@ -4,13 +4,16 @@
#include "qdbplugin.h"
#include "device-detection/devicedetector.h"
+#include "qdbconstants.h"
#include "qdbdeployconfigurationfactory.h"
+#include "qdbdevice.h"
#include "qdbstopapplicationstep.h"
#include "qdbmakedefaultappstep.h"
#include "qdbdevicedebugsupport.h"
#include "qdbqtversion.h"
#include "qdbrunconfiguration.h"
#include "qdbutils.h"
+#include "qdbtr.h"
#include
#include
@@ -34,7 +37,6 @@
#include
#include
-#include
using namespace ProjectExplorer;
using namespace Utils;
@@ -56,8 +58,7 @@ static void startFlashingWizard()
} else if (QtcProcess::startDetached({filePath, {}})) {
return;
}
- const QString message =
- QCoreApplication::translate("Qdb", "Flash wizard \"%1\" failed to start.");
+ const QString message = Tr::tr("Flash wizard \"%1\" failed to start.");
showMessage(message.arg(filePath.toUserOutput()), true);
}
@@ -76,9 +77,8 @@ void registerFlashAction(QObject *parentForAction)
return;
const FilePath fileName = flashWizardFilePath();
if (!fileName.exists()) {
- const QString message =
- QCoreApplication::translate("Qdb", "Flash wizard executable \"%1\" not found.");
- showMessage(message.arg(fileName.toString()));
+ const QString message = Tr::tr("Flash wizard executable \"%1\" not found.");
+ showMessage(message.arg(fileName.toUserOutput()));
return;
}
@@ -92,8 +92,7 @@ void registerFlashAction(QObject *parentForAction)
Core::Context globalContext(Core::Constants::C_GLOBAL);
- const QString actionText = QCoreApplication::translate("Qdb", "Flash Boot to Qt Device");
- QAction *flashAction = new QAction(actionText, parentForAction);
+ QAction *flashAction = new QAction(Tr::tr("Flash Boot to Qt Device"), parentForAction);
Core::Command *flashCommand = Core::ActionManager::registerAction(flashAction,
flashActionId,
globalContext);
diff --git a/src/plugins/boot2qt/qdbplugin.h b/src/plugins/boot2qt/qdbplugin.h
index 5d0c17b264b..ff0b6de5224 100644
--- a/src/plugins/boot2qt/qdbplugin.h
+++ b/src/plugins/boot2qt/qdbplugin.h
@@ -5,8 +5,7 @@
#include
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
class QdbPlugin final : public ExtensionSystem::IPlugin
{
@@ -25,5 +24,4 @@ private:
class QdbPluginPrivate *d = nullptr;
};
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbqtversion.cpp b/src/plugins/boot2qt/qdbqtversion.cpp
index 36b0819fb0b..7f15b32348b 100644
--- a/src/plugins/boot2qt/qdbqtversion.cpp
+++ b/src/plugins/boot2qt/qdbqtversion.cpp
@@ -4,13 +4,13 @@
#include "qdbqtversion.h"
#include "qdbconstants.h"
+#include "qdbtr.h"
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
QString QdbQtVersion::description() const
{
- return QCoreApplication::translate("QtVersion", "Boot2Qt", "Qt version is used for Boot2Qt development");
+ return Tr::tr("Boot2Qt", "Qt version is used for Boot2Qt development");
}
QSet QdbQtVersion::targetDeviceTypes() const
@@ -19,5 +19,4 @@ QSet QdbQtVersion::targetDeviceTypes() const
}
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbqtversion.h b/src/plugins/boot2qt/qdbqtversion.h
index 3bb4f0074e4..3488324074b 100644
--- a/src/plugins/boot2qt/qdbqtversion.h
+++ b/src/plugins/boot2qt/qdbqtversion.h
@@ -5,8 +5,7 @@
#include
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
class QdbQtVersion : public QtSupport::QtVersion
{
@@ -18,5 +17,4 @@ public:
QSet targetDeviceTypes() const final;
};
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbrunconfiguration.cpp b/src/plugins/boot2qt/qdbrunconfiguration.cpp
index d505bba08c9..d288289dfa7 100644
--- a/src/plugins/boot2qt/qdbrunconfiguration.cpp
+++ b/src/plugins/boot2qt/qdbrunconfiguration.cpp
@@ -4,6 +4,7 @@
#include "qdbrunconfiguration.h"
#include "qdbconstants.h"
+#include "qdbtr.h"
#include
#include
@@ -22,19 +23,16 @@
using namespace ProjectExplorer;
using namespace Utils;
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
// FullCommandLineAspect
class FullCommandLineAspect : public StringAspect
{
- Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbRunConfiguration);
-
public:
explicit FullCommandLineAspect(RunConfiguration *rc)
{
- setLabelText(tr("Full command line:"));
+ setLabelText(Tr::tr("Full command line:"));
auto exeAspect = rc->aspect();
auto argumentsAspect = rc->aspect();
@@ -58,8 +56,6 @@ public:
class QdbRunConfiguration : public RunConfiguration
{
- Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbRunConfiguration);
-
public:
QdbRunConfiguration(Target *target, Utils::Id id);
@@ -73,14 +69,14 @@ QdbRunConfiguration::QdbRunConfiguration(Target *target, Id id)
{
auto exeAspect = addAspect(target, ExecutableAspect::RunDevice);
exeAspect->setSettingsKey("QdbRunConfig.RemoteExecutable");
- exeAspect->setLabelText(tr("Executable on device:"));
- exeAspect->setPlaceHolderText(tr("Remote path not set"));
+ exeAspect->setLabelText(Tr::tr("Executable on device:"));
+ exeAspect->setPlaceHolderText(Tr::tr("Remote path not set"));
exeAspect->makeOverridable("QdbRunConfig.AlternateRemoteExecutable",
"QdbRunCofig.UseAlternateRemoteExecutable");
auto symbolsAspect = addAspect();
symbolsAspect->setSettingsKey("QdbRunConfig.LocalExecutable");
- symbolsAspect->setLabelText(tr("Executable on host:"));
+ symbolsAspect->setLabelText(Tr::tr("Executable on host:"));
symbolsAspect->setDisplayStyle(SymbolFileAspect::LabelDisplay);
auto envAspect = addAspect(target);
@@ -103,15 +99,15 @@ QdbRunConfiguration::QdbRunConfiguration(Target *target, Id id)
connect(target, &Target::deploymentDataChanged, this, &RunConfiguration::update);
connect(target, &Target::kitChanged, this, &RunConfiguration::update);
- setDefaultDisplayName(tr("Run on Boot2Qt Device"));
+ setDefaultDisplayName(Tr::tr("Run on Boot2Qt Device"));
}
Tasks QdbRunConfiguration::checkForIssues() const
{
Tasks tasks;
if (aspect()->executable().toString().isEmpty()) {
- tasks << BuildSystemTask(Task::Warning, tr("The remote executable must be set "
- "in order to run on a Boot2Qt device."));
+ tasks << BuildSystemTask(Task::Warning, Tr::tr("The remote executable must be set "
+ "in order to run on a Boot2Qt device."));
}
return tasks;
}
@@ -129,5 +125,4 @@ QdbRunConfigurationFactory::QdbRunConfigurationFactory()
addSupportedTargetDeviceType(Constants::QdbLinuxOsType);
}
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbrunconfiguration.h b/src/plugins/boot2qt/qdbrunconfiguration.h
index 1e73cf283fd..6559daf5586 100644
--- a/src/plugins/boot2qt/qdbrunconfiguration.h
+++ b/src/plugins/boot2qt/qdbrunconfiguration.h
@@ -5,8 +5,7 @@
#include
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
class QdbRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
{
@@ -14,5 +13,4 @@ public:
QdbRunConfigurationFactory();
};
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbstopapplicationstep.cpp b/src/plugins/boot2qt/qdbstopapplicationstep.cpp
index 5c71768774a..f41877f7869 100644
--- a/src/plugins/boot2qt/qdbstopapplicationstep.cpp
+++ b/src/plugins/boot2qt/qdbstopapplicationstep.cpp
@@ -4,6 +4,7 @@
#include "qdbstopapplicationstep.h"
#include "qdbconstants.h"
+#include "qdbtr.h"
#include
#include
@@ -19,15 +20,12 @@ using namespace ProjectExplorer;
using namespace Utils;
using namespace Utils::Tasking;
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
// QdbStopApplicationService
class QdbStopApplicationService : public RemoteLinux::AbstractRemoteLinuxDeployService
{
- Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbStopApplicationService)
-
private:
bool isDeploymentNecessary() const final { return true; }
Group deployRecipe() final;
@@ -46,17 +44,17 @@ Group QdbStopApplicationService::deployRecipe()
});
};
const auto doneHandler = [this](const QtcProcess &) {
- emit progressMessage(tr("Stopped the running application."));
+ emit progressMessage(Tr::tr("Stopped the running application."));
};
const auto errorHandler = [this](const QtcProcess &process) {
const QString errorOutput = process.cleanedStdErr();
- const QString failureMessage = tr("Could not check and possibly stop running application.");
+ const QString failureMessage = Tr::tr("Could not check and possibly stop running application.");
if (process.exitStatus() == QProcess::CrashExit) {
emit errorMessage(failureMessage);
} else if (process.result() != ProcessResult::FinishedWithSuccess) {
emit stdErrData(process.errorString());
} else if (errorOutput.contains("Could not connect: Connection refused")) {
- emit progressMessage(tr("Checked that there is no running application."));
+ emit progressMessage(Tr::tr("Checked that there is no running application."));
} else if (!errorOutput.isEmpty()) {
emit stdErrData(errorOutput);
emit errorMessage(failureMessage);
@@ -65,7 +63,7 @@ Group QdbStopApplicationService::deployRecipe()
const auto rootSetupHandler = [this] {
const auto device = DeviceKitAspect::device(target()->kit());
if (!device) {
- emit errorMessage(tr("No device to stop the application on."));
+ emit errorMessage(Tr::tr("No device to stop the application on."));
return GroupConfig{GroupAction::StopWithError};
}
return GroupConfig();
@@ -81,8 +79,6 @@ Group QdbStopApplicationService::deployRecipe()
class QdbStopApplicationStep final : public RemoteLinux::AbstractRemoteLinuxDeployStep
{
- Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbStopApplicationStep)
-
public:
QdbStopApplicationStep(BuildStepList *bsl, Id id)
: AbstractRemoteLinuxDeployStep(bsl, id)
@@ -102,10 +98,9 @@ public:
QdbStopApplicationStepFactory::QdbStopApplicationStepFactory()
{
registerStep(Constants::QdbStopApplicationStepId);
- setDisplayName(QdbStopApplicationStep::tr("Stop already running application"));
+ setDisplayName(Tr::tr("Stop already running application"));
setSupportedDeviceType(Constants::QdbLinuxOsType);
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
}
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbstopapplicationstep.h b/src/plugins/boot2qt/qdbstopapplicationstep.h
index d84a520b6ee..bd726575106 100644
--- a/src/plugins/boot2qt/qdbstopapplicationstep.h
+++ b/src/plugins/boot2qt/qdbstopapplicationstep.h
@@ -5,8 +5,7 @@
#include
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
class QdbStopApplicationStepFactory final : public ProjectExplorer::BuildStepFactory
{
@@ -14,5 +13,4 @@ public:
QdbStopApplicationStepFactory();
};
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/boot2qttr.h b/src/plugins/boot2qt/qdbtr.h
similarity index 70%
rename from src/plugins/boot2qt/boot2qttr.h
rename to src/plugins/boot2qt/qdbtr.h
index cff48d4e8e5..b0bc7232f9b 100644
--- a/src/plugins/boot2qt/boot2qttr.h
+++ b/src/plugins/boot2qt/qdbtr.h
@@ -5,11 +5,11 @@
#include
-namespace Boot2Qt {
+namespace Qdb {
struct Tr
{
- Q_DECLARE_TR_FUNCTIONS(::Boot2Qt)
+ Q_DECLARE_TR_FUNCTIONS(::Qdb)
};
-} // namespace Boot2Qt
+} // namespace Qdb
diff --git a/src/plugins/boot2qt/qdbutils.cpp b/src/plugins/boot2qt/qdbutils.cpp
index 6eef6191998..fcc6e38da29 100644
--- a/src/plugins/boot2qt/qdbutils.cpp
+++ b/src/plugins/boot2qt/qdbutils.cpp
@@ -3,8 +3,11 @@
#include "qdbutils.h"
+#include "qdbtr.h"
+
#include
#include
+
#include
#include
#include
@@ -12,8 +15,7 @@
using namespace Utils;
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
static QString executableBaseName(QdbTool tool)
{
@@ -63,7 +65,7 @@ QString overridingEnvironmentVariable(QdbTool tool)
void showMessage(const QString &message, bool important)
{
- const QString fullMessage = QCoreApplication::translate("::Boot2Qt", "Boot2Qt: %1").arg(message);
+ const QString fullMessage = Tr::tr("Boot2Qt: %1").arg(message);
if (important)
Core::MessageManager::writeFlashing(fullMessage);
else
@@ -86,5 +88,4 @@ QString settingsKey(QdbTool tool)
QTC_ASSERT(false, return QString());
}
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal
diff --git a/src/plugins/boot2qt/qdbutils.h b/src/plugins/boot2qt/qdbutils.h
index 59768359ff5..1a04007218a 100644
--- a/src/plugins/boot2qt/qdbutils.h
+++ b/src/plugins/boot2qt/qdbutils.h
@@ -3,12 +3,9 @@
#pragma once
-#include
+#include
-#include
-
-namespace Qdb {
-namespace Internal {
+namespace Qdb::Internal {
enum class QdbTool {
FlashingWizard,
@@ -21,5 +18,4 @@ void showMessage(const QString &message, bool important = false);
QString settingsGroupKey();
QString settingsKey(QdbTool tool);
-} // namespace Internal
-} // namespace Qdb
+} // Qdb::Internal