diff --git a/share/qtcreator/translations/qtcreator_da.ts b/share/qtcreator/translations/qtcreator_da.ts
index 4cfd3841b60..7a603fdb40d 100644
--- a/share/qtcreator/translations/qtcreator_da.ts
+++ b/share/qtcreator/translations/qtcreator_da.ts
@@ -45632,7 +45632,7 @@ Gemning mislykkedes.
- RemoteLinux::RemoteLinuxKillAppService
+ RemoteLinux::Tr
Trying to kill "%1" on remote device...
Prøver at dræbe "%1" på fjern-enhed...
@@ -45645,9 +45645,6 @@ Gemning mislykkedes.
Failed to kill remote application. Assuming it was not running.
Kunne ikke dræbe fjern-program. Formoder at den ikke kørte.
-
-
- RemoteLinux::RemoteLinuxKillAppStep
Kill current application instance
Dræb aktuelle programinstans
diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts
index 8013bb9b20e..52ca1873aa5 100644
--- a/share/qtcreator/translations/qtcreator_de.ts
+++ b/share/qtcreator/translations/qtcreator_de.ts
@@ -42038,7 +42038,7 @@ Breche ausstehende Operationen ab...
- RemoteLinux::RemoteLinuxKillAppService
+ RemoteLinux::Tr
Trying to kill "%1" on remote device...
Versuche "%1" auf anderem Gerät zu beenden...
@@ -42051,9 +42051,6 @@ Breche ausstehende Operationen ab...
Failed to kill remote application. Assuming it was not running.
Anwendung auf anderem Gerät konnte nicht beendet werden. Vermutlich lief sie nicht.
-
-
- RemoteLinux::RemoteLinuxKillAppStep
Kill current application instance
Aktuelle Instanz der Anwendung beenden
diff --git a/share/qtcreator/translations/qtcreator_hr.ts b/share/qtcreator/translations/qtcreator_hr.ts
index e7a14f06a9c..fe908b5b806 100644
--- a/share/qtcreator/translations/qtcreator_hr.ts
+++ b/share/qtcreator/translations/qtcreator_hr.ts
@@ -42539,7 +42539,7 @@ If you do not have a private key yet, you can also create one here.
- RemoteLinux::RemoteLinuxKillAppService
+ RemoteLinux::Tr
Trying to kill "%1" on remote device...
@@ -42552,9 +42552,6 @@ If you do not have a private key yet, you can also create one here.
Failed to kill remote application. Assuming it was not running.
-
-
- RemoteLinux::RemoteLinuxKillAppStep
Kill current application instance
diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts
index c46be3c404b..2ae3ffb1690 100644
--- a/share/qtcreator/translations/qtcreator_ja.ts
+++ b/share/qtcreator/translations/qtcreator_ja.ts
@@ -58368,7 +58368,7 @@ Stepping into the module or setting breakpoints by file and line is expected to
- RemoteLinux::RemoteLinuxKillAppService
+ RemoteLinux::Tr
Trying to kill "%1" on remote device...
リモート・デバイス上の "%1" を終了中です...
@@ -58381,9 +58381,6 @@ Stepping into the module or setting breakpoints by file and line is expected to
Failed to kill remote application. Assuming it was not running.
リモートアプリケーションの強制終了に失敗しました。実行中ではないことと前提にしています。
-
-
- RemoteLinux::RemoteLinuxKillAppStep
Kill current application instance
現在のアプリケーションのインスタンスを強制終了
diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts
index ca1e07984e3..9991fe97151 100644
--- a/share/qtcreator/translations/qtcreator_ru.ts
+++ b/share/qtcreator/translations/qtcreator_ru.ts
@@ -46224,7 +46224,7 @@ If you do not have a private key yet, you can also create one here.
- RemoteLinux::RemoteLinuxKillAppService
+ RemoteLinux::Tr
Trying to kill "%1" on remote device...
Попытка уничтожить «%1» на внешнем устройстве...
@@ -46237,9 +46237,6 @@ If you do not have a private key yet, you can also create one here.
Failed to kill remote application. Assuming it was not running.
Не удалось уничтожить внешнее приложение. Возможно, оно не было запущено.
-
-
- RemoteLinux::RemoteLinuxKillAppStep
Kill current application instance
Уничтожение текущего экземпляра приложения
diff --git a/src/plugins/remotelinux/killappstep.cpp b/src/plugins/remotelinux/killappstep.cpp
index 03d40e31666..7e9b1c8fe48 100644
--- a/src/plugins/remotelinux/killappstep.cpp
+++ b/src/plugins/remotelinux/killappstep.cpp
@@ -25,23 +25,25 @@
#include "killappstep.h"
+#include "abstractremotelinuxdeploystep.h"
#include "abstractremotelinuxdeployservice.h"
#include "remotelinux_constants.h"
+#include "remotelinuxtr.h"
#include
+#include
#include
#include
+
#include
using namespace ProjectExplorer;
using namespace Utils;
-namespace RemoteLinux {
-namespace Internal {
+namespace RemoteLinux::Internal {
class KillAppService : public AbstractRemoteLinuxDeployService
{
- Q_OBJECT
public:
~KillAppService() override;
@@ -61,7 +63,7 @@ private:
void finishDeployment();
QString m_remoteExecutable;
- ProjectExplorer::DeviceProcessSignalOperation::Ptr m_signalOperation;
+ DeviceProcessSignalOperation::Ptr m_signalOperation;
};
KillAppService::~KillAppService()
@@ -86,9 +88,9 @@ void KillAppService::doDeploy()
handleDeploymentDone();
return;
}
- connect(m_signalOperation.data(), &ProjectExplorer::DeviceProcessSignalOperation::finished,
+ connect(m_signalOperation.data(), &DeviceProcessSignalOperation::finished,
this, &KillAppService::handleSignalOpFinished);
- emit progressMessage(tr("Trying to kill \"%1\" on remote device...").arg(m_remoteExecutable));
+ emit progressMessage(Tr::tr("Trying to kill \"%1\" on remote device...").arg(m_remoteExecutable));
m_signalOperation->killProcess(m_remoteExecutable);
}
@@ -114,41 +116,38 @@ void KillAppService::stopDeployment()
void KillAppService::handleSignalOpFinished(const QString &errorMessage)
{
if (errorMessage.isEmpty())
- emit progressMessage(tr("Remote application killed."));
+ emit progressMessage(Tr::tr("Remote application killed."));
else
- emit progressMessage(tr("Failed to kill remote application. Assuming it was not running."));
+ emit progressMessage(Tr::tr("Failed to kill remote application. Assuming it was not running."));
finishDeployment();
}
-} // namespace Internal
-
-KillAppStep::KillAppStep(BuildStepList *bsl, Id id)
- : AbstractRemoteLinuxDeployStep(bsl, id)
+class KillAppStep : public AbstractRemoteLinuxDeployStep
{
- auto service = createDeployService();
+public:
+ KillAppStep(BuildStepList *bsl, Id id) : AbstractRemoteLinuxDeployStep(bsl, id)
+ {
+ auto service = createDeployService();
- setWidgetExpandedByDefault(false);
+ setWidgetExpandedByDefault(false);
- setInternalInitializer([this, service] {
- Target * const theTarget = target();
- QTC_ASSERT(theTarget, return CheckResult::failure());
- RunConfiguration * const rc = theTarget->activeRunConfiguration();
- const QString remoteExe = rc ? rc->runnable().command.executable().toString() : QString();
- service->setRemoteExecutable(remoteExe);
- return CheckResult::success();
- });
+ setInternalInitializer([this, service] {
+ Target * const theTarget = target();
+ QTC_ASSERT(theTarget, return CheckResult::failure());
+ RunConfiguration * const rc = theTarget->activeRunConfiguration();
+ const QString remoteExe = rc ? rc->runnable().command.executable().toString() : QString();
+ service->setRemoteExecutable(remoteExe);
+ return CheckResult::success();
+ });
+ }
+};
+
+KillAppStepFactory::KillAppStepFactory()
+{
+ registerStep(Constants::KillAppStepId);
+ setDisplayName(Tr::tr("Kill current application instance"));
+ setSupportedConfiguration(RemoteLinux::Constants::DeployToGenericLinux);
+ setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
}
-Id KillAppStep::stepId()
-{
- return Constants::KillAppStepId;
-}
-
-QString KillAppStep::displayName()
-{
- return tr("Kill current application instance");
-}
-
-} // namespace RemoteLinux
-
-#include "killappstep.moc"
+} // RemoteLinux::Internal
diff --git a/src/plugins/remotelinux/killappstep.h b/src/plugins/remotelinux/killappstep.h
index f26161e26ad..0a6d86ec81e 100644
--- a/src/plugins/remotelinux/killappstep.h
+++ b/src/plugins/remotelinux/killappstep.h
@@ -25,21 +25,14 @@
#pragma once
-#include "remotelinux_export.h"
+#include
-#include "abstractremotelinuxdeploystep.h"
+namespace RemoteLinux::Internal {
-namespace RemoteLinux {
-
-class REMOTELINUX_EXPORT KillAppStep : public AbstractRemoteLinuxDeployStep
+class KillAppStepFactory : public ProjectExplorer::BuildStepFactory
{
- Q_OBJECT
public:
- explicit KillAppStep(ProjectExplorer::BuildStepList *bsl,
- Utils::Id id = stepId());
-
- static Utils::Id stepId();
- static QString displayName();
+ KillAppStepFactory();
};
-} // namespace RemoteLinux
+} // RemoteLinux::Internal
diff --git a/src/plugins/remotelinux/remotelinuxplugin.cpp b/src/plugins/remotelinux/remotelinuxplugin.cpp
index b79fc79eb45..29aabd18d19 100644
--- a/src/plugins/remotelinux/remotelinuxplugin.cpp
+++ b/src/plugins/remotelinux/remotelinuxplugin.cpp
@@ -79,7 +79,7 @@ public:
GenericDeployStepFactory genericDirectUploadStepFactory;
GenericDeployStepFactory rsyncDeployStepFactory;
CustomCommandDeployStepFactory customCommandDeployStepFactory;
- GenericDeployStepFactory killAppStepFactory;
+ KillAppStepFactory killAppStepFactory;
GenericDeployStepFactory makeInstallStepFactory;
const QList supportedRunConfigs {