Boot2Qt: Tr::tr

Interestingly, the contexts were predominantly Qdb::*, standardize
on that. Long term we might collapse RemoteLinux descendants anyway.

Change-Id: Id7009ee6b662d6c29f98e3809619b604aeeea7d9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-18 08:42:48 +01:00
parent 88131d4c93
commit 46e660c646
32 changed files with 141 additions and 321 deletions

View File

@@ -44423,7 +44423,7 @@ Doppelklicken Sie einen Eintrag um ihn zu ändern.</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDevice</name>
<name>::Qdb</name>
<message>
<source>Starting command &quot;%1&quot; on device &quot;%2&quot;.</source>
<translation type="unfinished"></translation>
@@ -44488,9 +44488,6 @@ Doppelklicken Sie einen Eintrag um ihn zu ändern.</translation>
<source>Boot2Qt Network Device Setup</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMakeDefaultAppService</name>
<message>
<source>Remote process failed: %1</source>
<translation>Der entfernte Prozess schlug fehl: %1</translation>
@@ -44503,9 +44500,6 @@ Doppelklicken Sie einen Eintrag um ihn zu ändern.</translation>
<source>Reset the default application.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbRunConfiguration</name>
<message>
<source>Full command line:</source>
<translation type="unfinished"></translation>
@@ -50839,7 +50833,7 @@ in &quot;%2&quot; aus.
</message>
</context>
<context>
<name>Qdb::Internal::DeviceDetector</name>
<name>::Qdb</name>
<message>
<source>Device &quot;%1&quot; %2</source>
<translation type="unfinished"></translation>
@@ -50852,16 +50846,10 @@ in &quot;%2&quot; aus.
<source>Device detection error: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDeviceTracker</name>
<message>
<source>Shutting down device discovery due to unexpected response: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMessageTracker</name>
<message>
<source>Shutting down message reception due to unexpected response: %1</source>
<translation type="unfinished"></translation>
@@ -50870,9 +50858,6 @@ in &quot;%2&quot; aus.
<source>QDB message: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbWatcher</name>
<message>
<source>Unexpected QLocalSocket error: %1</source>
<translation type="unfinished"></translation>
@@ -50901,16 +50886,10 @@ in &quot;%2&quot; aus.
<source>Starting QDB host server.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDeployConfiguration</name>
<message>
<source>Deploy to Boot2Qt target</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMakeDefaultAppStep</name>
<message>
<source>Set this application to start by default</source>
<translation type="unfinished"></translation>
@@ -50923,9 +50902,6 @@ in &quot;%2&quot; aus.
<source>Change default application</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb</name>
<message>
<source>Flash wizard &quot;%1&quot; failed to start.</source>
<translation type="unfinished"></translation>
@@ -50938,17 +50914,11 @@ in &quot;%2&quot; aus.
<source>Flash Boot to Qt Device</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtVersion</name>
<message>
<source>Boot2Qt</source>
<comment>Qt version is used for Boot2Qt development</comment>
<translation type="unfinished">Boot2Qt</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbStopApplicationService</name>
<message>
<source>Could not check and possibly stop running application.</source>
<translation type="unfinished"></translation>
@@ -50961,16 +50931,10 @@ in &quot;%2&quot; aus.
<source>Stopped the running application.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbStopApplicationStep</name>
<message>
<source>Stop already running application</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>::Boot2Qt</name>
<message>
<source>Boot2Qt: %1</source>
<translation type="unfinished"></translation>

View File

@@ -45125,7 +45125,7 @@ The name of the release build configuration created by default for a qmake proje
</message>
</context>
<context>
<name>Qdb::Internal::DeviceDetector</name>
<name>::Qdb</name>
<message>
<source>Device &quot;%1&quot; %2</source>
<translation> &quot;%1&quot; %2</translation>
@@ -45138,16 +45138,10 @@ The name of the release build configuration created by default for a qmake proje
<source>Device detection error: %1</source>
<translation>: %1</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDeviceTracker</name>
<message>
<source>Shutting down device discovery due to unexpected response: %1</source>
<translation>: %1</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMessageTracker</name>
<message>
<source>Shutting down message reception due to unexpected response: %1</source>
<translation>: %1</translation>
@@ -45156,9 +45150,6 @@ The name of the release build configuration created by default for a qmake proje
<source>QDB message: %1</source>
<translation>QDB : %1</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbWatcher</name>
<message>
<source>Unexpected QLocalSocket error: %1</source>
<translation> QLocalSocket : %1</translation>
@@ -45187,16 +45178,10 @@ The name of the release build configuration created by default for a qmake proje
<source>Starting QDB host server.</source>
<translation>GDB </translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDeployConfiguration</name>
<message>
<source>Deploy to Boot2Qt target</source>
<translation>Boot2Qt </translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDevice</name>
<message>
<source>Starting command &quot;%1&quot; on device &quot;%2&quot;.</source>
<translation> &quot;%2&quot; &quot;%1&quot; </translation>
@@ -45209,9 +45194,6 @@ The name of the release build configuration created by default for a qmake proje
<source>Device name:</source>
<translation type="unfinished">:</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMakeDefaultAppService</name>
<message>
<source>Remote process failed: %1</source>
<translation>: %1</translation>
@@ -45224,9 +45206,6 @@ The name of the release build configuration created by default for a qmake proje
<source>Reset the default application.</source>
<translation></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMakeDefaultAppStep</name>
<message>
<source>Set this application to start by default</source>
<translation></translation>
@@ -45239,9 +45218,6 @@ The name of the release build configuration created by default for a qmake proje
<source>Change default application</source>
<translation></translation>
</message>
</context>
<context>
<name>Qdb</name>
<message>
<source>Flash wizard &quot;%1&quot; failed to start.</source>
<translation>Flash &quot;%1&quot; </translation>
@@ -45250,9 +45226,6 @@ The name of the release build configuration created by default for a qmake proje
<source>Flash wizard executable &quot;%1&quot; not found.</source>
<translation>Flash &quot;%1&quot; </translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbRunConfiguration</name>
<message>
<source>Executable on device:</source>
<translation>:</translation>
@@ -45265,9 +45238,6 @@ The name of the release build configuration created by default for a qmake proje
<source>Executable on host:</source>
<translation>:</translation>
</message>
</context>
<context>
<name>::Boot2Qt</name>
<message>
<source>Boot2Qt: %1</source>
<translation>Boot2Qt: %1</translation>

View File

@@ -5195,7 +5195,7 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
</message>
</context>
<context>
<name>::Boot2Qt</name>
<name>::Qdb</name>
<message>
<source>Boot2Qt: %1</source>
<translation>Boot2Qt: %1</translation>
@@ -34129,7 +34129,7 @@ The affected files are:
</message>
</context>
<context>
<name>Qdb</name>
<name>::Qdb</name>
<message>
<source>Flash wizard &quot;%1&quot; failed to start.</source>
<translation>Не удалось запустить программатор «%1».</translation>
@@ -34142,9 +34142,6 @@ The affected files are:
<source>Flash Boot to Qt Device</source>
<translation>Запрограммировать устройство Boot to Qt</translation>
</message>
</context>
<context>
<name>Qdb::Internal::DeviceDetector</name>
<message>
<source>Device &quot;%1&quot; %2</source>
<translation>Устройство «%1» %2</translation>
@@ -34157,16 +34154,10 @@ The affected files are:
<source>Device detection error: %1</source>
<translation>Ошибка определения устройства: %1</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDeployConfiguration</name>
<message>
<source>Deploy to Boot2Qt target</source>
<translation>Развёртывание на Boot2Qt</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDevice</name>
<message>
<source>Starting command &quot;%1&quot; on device &quot;%2&quot;.</source>
<translation>Запуск команды «%1» на устройстве «%2».</translation>
@@ -34231,16 +34222,10 @@ The affected files are:
<source>Boot2Qt Network Device Setup</source>
<translation>Настройка сетевого устройства Boot2Qt</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDeviceTracker</name>
<message>
<source>Shutting down device discovery due to unexpected response: %1</source>
<translation>Завершение определения устройств из-за неожиданного ответа: %1</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMakeDefaultAppService</name>
<message>
<source>Remote process failed: %1</source>
<translation>Ошибка внешнего процесса: %1</translation>
@@ -34253,9 +34238,6 @@ The affected files are:
<source>Reset the default application.</source>
<translation>Сбросить приложение по умолчанию.</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMakeDefaultAppStep</name>
<message>
<source>Change default application</source>
<translation>Сменить приложение по умолчанию</translation>
@@ -34268,9 +34250,6 @@ The affected files are:
<source>Reset default application</source>
<translation>Сбросить приложение по умолчанию</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMessageTracker</name>
<message>
<source>Shutting down message reception due to unexpected response: %1</source>
<translation>Завершение приёма сообщения из-за неожиданного ответа: %1</translation>
@@ -34279,9 +34258,6 @@ The affected files are:
<source>QDB message: %1</source>
<translation>Сообщение QDB: %1</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbRunConfiguration</name>
<message>
<source>Full command line:</source>
<translation>Полная командная строка:</translation>
@@ -34306,9 +34282,6 @@ The affected files are:
<source>The remote executable must be set in order to run on a Boot2Qt device.</source>
<translation>Для запуска на устройстве Boot2Qt внешнего приложения, его необходимо задать.</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbStopApplicationService</name>
<message>
<source>Could not check and possibly stop running application.</source>
<translation>Не удалось проверить и, вероятно, остановить работающее приложение.</translation>
@@ -34321,16 +34294,10 @@ The affected files are:
<source>Stopped the running application.</source>
<translation>Работающее приложение остановлено.</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbStopApplicationStep</name>
<message>
<source>Stop already running application</source>
<translation>Остановка работающего приложения</translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbWatcher</name>
<message>
<source>Unexpected QLocalSocket error: %1</source>
<translation>Неожиданная ошибка QLocalSocket: %1</translation>

View File

@@ -5336,7 +5336,7 @@ Local pulls are not applied to the master branch.</source>
</message>
</context>
<context>
<name>::Boot2Qt</name>
<name>::Qdb</name>
<message>
<source>Boot2Qt: %1</source>
<translation type="unfinished"></translation>
@@ -31744,7 +31744,7 @@ The affected files are:
</message>
</context>
<context>
<name>Qdb</name>
<name>::Qdb</name>
<message>
<source>Flash wizard &quot;%1&quot; failed to start.</source>
<translation type="unfinished"></translation>
@@ -31757,9 +31757,6 @@ The affected files are:
<source>Flash Boot to Qt Device</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::DeviceDetector</name>
<message>
<source>Device &quot;%1&quot; %2</source>
<translation type="unfinished"></translation>
@@ -31772,16 +31769,10 @@ The affected files are:
<source>Device detection error: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDeployConfiguration</name>
<message>
<source>Deploy to Boot2Qt target</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDevice</name>
<message>
<source>Starting command &quot;%1&quot; on device &quot;%2&quot;.</source>
<translation type="unfinished"></translation>
@@ -31846,16 +31837,10 @@ The affected files are:
<source>Boot2Qt Network Device Setup</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbDeviceTracker</name>
<message>
<source>Shutting down device discovery due to unexpected response: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMakeDefaultAppService</name>
<message>
<source>Remote process failed: %1</source>
<translation type="unfinished">:%1</translation>
@@ -31868,9 +31853,6 @@ The affected files are:
<source>Reset the default application.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMakeDefaultAppStep</name>
<message>
<source>Set this application to start by default</source>
<translation type="unfinished"></translation>
@@ -31883,9 +31865,6 @@ The affected files are:
<source>Change default application</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbMessageTracker</name>
<message>
<source>Shutting down message reception due to unexpected response: %1</source>
<translation type="unfinished"></translation>
@@ -31894,9 +31873,6 @@ The affected files are:
<source>QDB message: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbRunConfiguration</name>
<message>
<source>Full command line:</source>
<translation type="unfinished"></translation>
@@ -31921,9 +31897,6 @@ The affected files are:
<source>The remote executable must be set in order to run on a Boot2Qt device.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbStopApplicationService</name>
<message>
<source>Could not check and possibly stop running application.</source>
<translation type="unfinished"></translation>
@@ -31936,16 +31909,10 @@ The affected files are:
<source>Stopped the running application.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbStopApplicationStep</name>
<message>
<source>Stop already running application</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Qdb::Internal::QdbWatcher</name>
<message>
<source>Unexpected QLocalSocket error: %1</source>
<translation type="unfinished"></translation>
@@ -39262,7 +39229,7 @@ For more details, see /etc/sysctl.d/10-ptrace.conf
</message>
</context>
<context>
<name>QtVersion</name>
<name>::Qdb</name>
<message>
<source>Boot2Qt</source>
<comment>Qt version is used for Boot2Qt development</comment>

View File

@@ -14,6 +14,7 @@ add_qtc_plugin(Boot2Qt
qdbqtversion.cpp qdbqtversion.h
qdbrunconfiguration.cpp qdbrunconfiguration.h
qdbstopapplicationstep.cpp qdbstopapplicationstep.h
qdbtr.h
qdbutils.cpp qdbutils.h
)

View File

@@ -33,6 +33,7 @@ QtcPlugin {
"qdbplugin.h",
"qdbstopapplicationstep.cpp",
"qdbstopapplicationstep.h",
"qdbtr.h",
"qdbqtversion.cpp",
"qdbqtversion.h",
"qdbrunconfiguration.cpp",

View File

@@ -3,11 +3,13 @@
#include "devicedetector.h"
#include "../qdbutils.h"
#include "../qdbconstants.h"
#include "../qdbdevice.h"
#include "../qdbtr.h"
#include "../qdbutils.h"
#include <projectexplorer/devicesupport/devicemanager.h>
#include <utils/qtcassert.h>
#include <QHash>
@@ -15,8 +17,7 @@
using namespace ProjectExplorer;
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
static bool isAutodetectedQdbDevice(const IDevice::ConstPtr &device)
{
@@ -74,11 +75,11 @@ void DeviceDetector::handleDeviceEvent(QdbDeviceTracker::DeviceEventType eventTy
}
const Utils::Id deviceId = Constants::QdbHardwareDevicePrefix.withSuffix(':' + serial);
const auto messagePrefix = tr("Device \"%1\" %2").arg(serial);
const auto messagePrefix = Tr::tr("Device \"%1\" %2").arg(serial);
DeviceManager * const dm = DeviceManager::instance();
if (eventType == QdbDeviceTracker::NewDevice) {
const QString name = tr("Qt Debug Bridge device %1").arg(serial);
const QString name = Tr::tr("Qt Debug Bridge device %1").arg(serial);
QdbDevice::Ptr device = QdbDevice::create();
device->setupId(IDevice::AutoDetected, deviceId);
device->setDisplayName(name);
@@ -109,7 +110,7 @@ void DeviceDetector::handleDeviceEvent(QdbDeviceTracker::DeviceEventType eventTy
void DeviceDetector::handleTrackerError(const QString &errorMessage)
{
showMessage(tr("Device detection error: %1").arg(errorMessage), true);
showMessage(Tr::tr("Device detection error: %1").arg(errorMessage), true);
stop();
}
@@ -123,5 +124,4 @@ void DeviceDetector::resetDevices()
}
}
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -3,12 +3,10 @@
#pragma once
#include "../qdbdevice.h"
#include "qdbdevicetracker.h"
#include "qdbmessagetracker.h"
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
class DeviceDetector : public QObject
{
@@ -34,5 +32,4 @@ private:
QdbMessageTracker m_messageTracker;
};
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -2,16 +2,15 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "qdbdevicetracker.h"
#include "qdbwatcher.h"
#include "../qdbutils.h"
#include "hostmessages.h"
#include "qdbwatcher.h"
#include "../qdbtr.h"
#include <QJsonDocument>
#include <QJsonObject>
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
QdbDeviceTracker::QdbDeviceTracker(QObject *parent)
: QObject(parent)
@@ -36,7 +35,7 @@ void QdbDeviceTracker::handleWatchMessage(const QJsonDocument &document)
if (type != ResponseType::NewDevice && type != ResponseType::DisconnectedDevice) {
stop();
const QString message =
tr("Shutting down device discovery due to unexpected response: %1");
Tr::tr("Shutting down device discovery due to unexpected response: %1");
emit trackerError(message.arg(QString::fromUtf8(document.toJson())));
return;
}
@@ -61,5 +60,4 @@ void QdbDeviceTracker::handleWatchMessage(const QJsonDocument &document)
emit deviceEvent(eventType, info);
}
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -2,11 +2,11 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <QObject>
#include <QMap>
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
class QdbWatcher;
@@ -35,5 +35,4 @@ private:
QdbWatcher *m_qdbWatcher = nullptr;
};
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -4,6 +4,7 @@
#include "qdbmessagetracker.h"
#include "qdbwatcher.h"
#include "../qdbtr.h"
#include "../qdbutils.h"
#include "hostmessages.h"
@@ -11,8 +12,7 @@
#include <QJsonObject>
#include <QJsonArray>
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
QdbMessageTracker::QdbMessageTracker(QObject *parent)
: QObject(parent)
@@ -39,7 +39,7 @@ void QdbMessageTracker::handleWatchMessage(const QJsonDocument &document)
if (type != ResponseType::Messages) {
stop();
const QString message =
tr("Shutting down message reception due to unexpected response: %1");
Tr::tr("Shutting down message reception due to unexpected response: %1");
emit trackerError(message.arg(QString::fromUtf8(document.toJson())));
return;
}
@@ -58,9 +58,8 @@ void QdbMessageTracker::handleWatchMessage(const QJsonDocument &document)
}
m_messageCache.append(message);
showMessage(tr("QDB message: %1").arg(message), true);
showMessage(Tr::tr("QDB message: %1").arg(message), true);
}
}
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -2,11 +2,11 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <QObject>
#include <QContiguousCache>
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
class QdbWatcher;
@@ -29,5 +29,4 @@ private:
QContiguousCache<QString> m_messageCache = QContiguousCache<QString>(10);
};
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -3,17 +3,17 @@
#include "qdbwatcher.h"
#include "../qdbutils.h"
#include "hostmessages.h"
#include "../qdbtr.h"
#include "../qdbutils.h"
#include <utils/fileutils.h>
#include <utils/filepath.h>
#include <utils/qtcprocess.h>
#include <QFile>
#include <QTimer>
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
const int startupDelay = 500; // time in ms to wait for host server startup before retrying
const QString qdbSocketName = "qdb.socket";
@@ -79,14 +79,14 @@ void QdbWatcher::handleWatchError(QLocalSocket::LocalSocketError error)
if (error != QLocalSocket::ServerNotFoundError
&& error != QLocalSocket::ConnectionRefusedError) {
stop();
emit watcherError(tr("Unexpected QLocalSocket error: %1")
emit watcherError(Tr::tr("Unexpected QLocalSocket error: %1")
.arg(m_socket->errorString()));
return;
}
if (m_retried) {
stop();
emit watcherError(tr("Could not connect to QDB host server even after trying to start it."));
emit watcherError(Tr::tr("Could not connect to QDB host server even after trying to start it."));
return;
}
retry();
@@ -99,7 +99,7 @@ void QdbWatcher::handleWatchMessage()
const auto document = QJsonDocument::fromJson(responseBytes);
if (document.isNull()) {
const QString message =
tr("Invalid JSON response received from QDB server: %1");
Tr::tr("Invalid JSON response received from QDB server: %1");
emit watcherError(message.arg(QString::fromUtf8(responseBytes)));
return;
}
@@ -112,16 +112,16 @@ void QdbWatcher::forkHostServer()
Utils::FilePath qdbFilePath = findTool(QdbTool::Qdb);
QFile executable(qdbFilePath.toString());
if (!executable.exists()) {
const QString message = tr("Could not find QDB host server executable. "
const QString message = Tr::tr("Could not find QDB host server executable. "
"You can set the location with environment variable %1.")
.arg(overridingEnvironmentVariable(QdbTool::Qdb));
showMessage(message, true);
return;
}
if (Utils::QtcProcess::startDetached({qdbFilePath, {"server"}}))
showMessage(tr("QDB host server started."), false);
showMessage(Tr::tr("QDB host server started."), false);
else
showMessage(tr("Could not start QDB host server in %1").arg(qdbFilePath.toString()), true);
showMessage(Tr::tr("Could not start QDB host server in %1").arg(qdbFilePath.toString()), true);
}
void QdbWatcher::retry()
@@ -130,7 +130,7 @@ void QdbWatcher::retry()
{
QMutexLocker lock(&s_startMutex);
if (!s_startedServer) {
showMessage(tr("Starting QDB host server."), false);
showMessage(Tr::tr("Starting QDB host server."), false);
forkHostServer();
s_startedServer = true;
}
@@ -138,5 +138,4 @@ void QdbWatcher::retry()
QTimer::singleShot(startupDelay, this, &QdbWatcher::startPrivate);
}
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -14,12 +14,12 @@ QT_BEGIN_NAMESPACE
class QJsonDocument;
QT_END_NAMESPACE
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
class QdbWatcher : public QObject
{
Q_OBJECT
public:
QdbWatcher(QObject *parent = nullptr);
virtual ~QdbWatcher();
@@ -49,6 +49,5 @@ private:
RequestType m_requestType;
};
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -4,6 +4,7 @@
#include "qdbdeployconfigurationfactory.h"
#include "qdbconstants.h"
#include "qdbtr.h"
#include <projectexplorer/deploymentdataview.h>
#include "projectexplorer/devicesupport/idevice.h"
@@ -15,15 +16,13 @@
using namespace ProjectExplorer;
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
QdbDeployConfigurationFactory::QdbDeployConfigurationFactory()
{
setConfigBaseId(Constants::QdbDeployConfigurationId);
addSupportedTargetDeviceType(Constants::QdbLinuxOsType);
setDefaultDisplayName(QCoreApplication::translate("Qdb::Internal::QdbDeployConfiguration",
"Deploy to Boot2Qt target"));
setDefaultDisplayName(Tr::tr("Deploy to Boot2Qt target"));
setUseDeploymentDataView();
addInitialStep(RemoteLinux::Constants::MakeInstallStepId, [](Target *target) {
@@ -59,5 +58,4 @@ QdbDeployConfigurationFactory::QdbDeployConfigurationFactory()
});
}
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -5,8 +5,7 @@
#include <projectexplorer/deployconfiguration.h>
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

View File

@@ -3,8 +3,9 @@
#include "qdbdevice.h"
#include "qdbutils.h"
#include "qdbconstants.h"
#include "qdbtr.h"
#include "qdbutils.h"
#include <coreplugin/icore.h>
@@ -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("<html><head/><body><it><b>%1</it><p>%2</p></body></html>")
@@ -187,8 +187,8 @@ public:
"<p>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

View File

@@ -3,17 +3,13 @@
#pragma once
#include "qdbconstants.h"
#include <projectexplorer/kit.h>
#include <remotelinux/linuxdevice.h>
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
class QdbDevice final : public RemoteLinux::LinuxDevice
{
Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbDevice)
public:
typedef QSharedPointer<QdbDevice> Ptr;
typedef QSharedPointer<const QdbDevice> ConstPtr;
@@ -45,5 +41,4 @@ public:
QdbLinuxDeviceFactory();
};
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -4,9 +4,8 @@
#include "qdbdevicedebugsupport.h"
#include "qdbconstants.h"
#include "qdbdevice.h"
#include "qdbrunconfiguration.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qmldebug/qmldebugcommandlinearguments.h>

View File

@@ -4,6 +4,7 @@
#include "qdbmakedefaultappstep.h"
#include "qdbconstants.h"
#include "qdbtr.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -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<SelectionAspect>();
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<QdbMakeDefaultAppStep>(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

View File

@@ -5,8 +5,7 @@
#include <projectexplorer/buildstep.h>
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

View File

@@ -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 <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -34,7 +37,6 @@
#include <utils/qtcprocess.h>
#include <QAction>
#include <QFileInfo>
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);

View File

@@ -5,8 +5,7 @@
#include <extensionsystem/iplugin.h>
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

View File

@@ -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<Utils::Id> QdbQtVersion::targetDeviceTypes() const
@@ -19,5 +19,4 @@ QSet<Utils::Id> QdbQtVersion::targetDeviceTypes() const
}
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -5,8 +5,7 @@
#include <qtsupport/baseqtversion.h>
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
class QdbQtVersion : public QtSupport::QtVersion
{
@@ -18,5 +17,4 @@ public:
QSet<Utils::Id> targetDeviceTypes() const final;
};
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -4,6 +4,7 @@
#include "qdbrunconfiguration.h"
#include "qdbconstants.h"
#include "qdbtr.h"
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/buildtargetinfo.h>
@@ -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<ExecutableAspect>();
auto argumentsAspect = rc->aspect<ArgumentsAspect>();
@@ -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<ExecutableAspect>(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<SymbolFileAspect>();
symbolsAspect->setSettingsKey("QdbRunConfig.LocalExecutable");
symbolsAspect->setLabelText(tr("Executable on host:"));
symbolsAspect->setLabelText(Tr::tr("Executable on host:"));
symbolsAspect->setDisplayStyle(SymbolFileAspect::LabelDisplay);
auto envAspect = addAspect<RemoteLinux::RemoteLinuxEnvironmentAspect>(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<ExecutableAspect>()->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

View File

@@ -5,8 +5,7 @@
#include <projectexplorer/runconfigurationaspects.h>
namespace Qdb {
namespace Internal {
namespace Qdb::Internal {
class QdbRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
{
@@ -14,5 +13,4 @@ public:
QdbRunConfigurationFactory();
};
} // namespace Internal
} // namespace Qdb
} // Qdb::Internal

View File

@@ -4,6 +4,7 @@
#include "qdbstopapplicationstep.h"
#include "qdbconstants.h"
#include "qdbtr.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
@@ -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<QdbStopApplicationStep>(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

View File

@@ -5,8 +5,7 @@
#include <projectexplorer/buildstep.h>
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

View File

@@ -5,11 +5,11 @@
#include <QCoreApplication>
namespace Boot2Qt {
namespace Qdb {
struct Tr
{
Q_DECLARE_TR_FUNCTIONS(::Boot2Qt)
Q_DECLARE_TR_FUNCTIONS(::Qdb)
};
} // namespace Boot2Qt
} // namespace Qdb

View File

@@ -3,8 +3,11 @@
#include "qdbutils.h"
#include "qdbtr.h"
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <utils/environment.h>
#include <utils/filepath.h>
#include <utils/hostosinfo.h>
@@ -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

View File

@@ -3,12 +3,9 @@
#pragma once
#include <utils/fileutils.h>
#include <utils/filepath.h>
#include <qglobal.h>
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