forked from qt-creator/qt-creator
RemoteLinux: Reduce visibility of KillAppStep
Change-Id: Ib90a25ea5d3f2c7636aa099c87a3f71721ab9ea6 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -45632,7 +45632,7 @@ Gemning mislykkedes.</translation>
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
<name>RemoteLinux::Tr</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Trying to kill "%1" on remote device...</source>
|
<source>Trying to kill "%1" on remote device...</source>
|
||||||
<translation>Prøver at dræbe "%1" på fjern-enhed...</translation>
|
<translation>Prøver at dræbe "%1" på fjern-enhed...</translation>
|
||||||
@@ -45645,9 +45645,6 @@ Gemning mislykkedes.</translation>
|
|||||||
<source>Failed to kill remote application. Assuming it was not running.</source>
|
<source>Failed to kill remote application. Assuming it was not running.</source>
|
||||||
<translation>Kunne ikke dræbe fjern-program. Formoder at den ikke kørte.</translation>
|
<translation>Kunne ikke dræbe fjern-program. Formoder at den ikke kørte.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Kill current application instance</source>
|
<source>Kill current application instance</source>
|
||||||
<translation>Dræb aktuelle programinstans</translation>
|
<translation>Dræb aktuelle programinstans</translation>
|
||||||
|
|||||||
@@ -42038,7 +42038,7 @@ Breche ausstehende Operationen ab...
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
<name>RemoteLinux::Tr</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Trying to kill "%1" on remote device...</source>
|
<source>Trying to kill "%1" on remote device...</source>
|
||||||
<translation>Versuche "%1" auf anderem Gerät zu beenden...</translation>
|
<translation>Versuche "%1" auf anderem Gerät zu beenden...</translation>
|
||||||
@@ -42051,9 +42051,6 @@ Breche ausstehende Operationen ab...
|
|||||||
<source>Failed to kill remote application. Assuming it was not running.</source>
|
<source>Failed to kill remote application. Assuming it was not running.</source>
|
||||||
<translation>Anwendung auf anderem Gerät konnte nicht beendet werden. Vermutlich lief sie nicht.</translation>
|
<translation>Anwendung auf anderem Gerät konnte nicht beendet werden. Vermutlich lief sie nicht.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Kill current application instance</source>
|
<source>Kill current application instance</source>
|
||||||
<translation>Aktuelle Instanz der Anwendung beenden</translation>
|
<translation>Aktuelle Instanz der Anwendung beenden</translation>
|
||||||
|
|||||||
@@ -42539,7 +42539,7 @@ If you do not have a private key yet, you can also create one here.</source>
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
<name>RemoteLinux::Tr</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Trying to kill "%1" on remote device...</source>
|
<source>Trying to kill "%1" on remote device...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -42552,9 +42552,6 @@ If you do not have a private key yet, you can also create one here.</source>
|
|||||||
<source>Failed to kill remote application. Assuming it was not running.</source>
|
<source>Failed to kill remote application. Assuming it was not running.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Kill current application instance</source>
|
<source>Kill current application instance</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
|||||||
@@ -58368,7 +58368,7 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
<name>RemoteLinux::Tr</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Trying to kill "%1" on remote device...</source>
|
<source>Trying to kill "%1" on remote device...</source>
|
||||||
<translation>リモート・デバイス上の "%1" を終了中です...</translation>
|
<translation>リモート・デバイス上の "%1" を終了中です...</translation>
|
||||||
@@ -58381,9 +58381,6 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
|||||||
<source>Failed to kill remote application. Assuming it was not running.</source>
|
<source>Failed to kill remote application. Assuming it was not running.</source>
|
||||||
<translation>リモートアプリケーションの強制終了に失敗しました。実行中ではないことと前提にしています。</translation>
|
<translation>リモートアプリケーションの強制終了に失敗しました。実行中ではないことと前提にしています。</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Kill current application instance</source>
|
<source>Kill current application instance</source>
|
||||||
<translation>現在のアプリケーションのインスタンスを強制終了</translation>
|
<translation>現在のアプリケーションのインスタンスを強制終了</translation>
|
||||||
|
|||||||
@@ -46224,7 +46224,7 @@ If you do not have a private key yet, you can also create one here.</source>
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
<name>RemoteLinux::Tr</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Trying to kill "%1" on remote device...</source>
|
<source>Trying to kill "%1" on remote device...</source>
|
||||||
<translation>Попытка уничтожить «%1» на внешнем устройстве...</translation>
|
<translation>Попытка уничтожить «%1» на внешнем устройстве...</translation>
|
||||||
@@ -46237,9 +46237,6 @@ If you do not have a private key yet, you can also create one here.</source>
|
|||||||
<source>Failed to kill remote application. Assuming it was not running.</source>
|
<source>Failed to kill remote application. Assuming it was not running.</source>
|
||||||
<translation>Не удалось уничтожить внешнее приложение. Возможно, оно не было запущено.</translation>
|
<translation>Не удалось уничтожить внешнее приложение. Возможно, оно не было запущено.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Kill current application instance</source>
|
<source>Kill current application instance</source>
|
||||||
<translation>Уничтожение текущего экземпляра приложения</translation>
|
<translation>Уничтожение текущего экземпляра приложения</translation>
|
||||||
|
|||||||
@@ -25,23 +25,25 @@
|
|||||||
|
|
||||||
#include "killappstep.h"
|
#include "killappstep.h"
|
||||||
|
|
||||||
|
#include "abstractremotelinuxdeploystep.h"
|
||||||
#include "abstractremotelinuxdeployservice.h"
|
#include "abstractremotelinuxdeployservice.h"
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
|
#include "remotelinuxtr.h"
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/runcontrol.h>
|
#include <projectexplorer/runcontrol.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class KillAppService : public AbstractRemoteLinuxDeployService
|
class KillAppService : public AbstractRemoteLinuxDeployService
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
public:
|
public:
|
||||||
~KillAppService() override;
|
~KillAppService() override;
|
||||||
|
|
||||||
@@ -61,7 +63,7 @@ private:
|
|||||||
void finishDeployment();
|
void finishDeployment();
|
||||||
|
|
||||||
QString m_remoteExecutable;
|
QString m_remoteExecutable;
|
||||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr m_signalOperation;
|
DeviceProcessSignalOperation::Ptr m_signalOperation;
|
||||||
};
|
};
|
||||||
|
|
||||||
KillAppService::~KillAppService()
|
KillAppService::~KillAppService()
|
||||||
@@ -86,9 +88,9 @@ void KillAppService::doDeploy()
|
|||||||
handleDeploymentDone();
|
handleDeploymentDone();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
connect(m_signalOperation.data(), &ProjectExplorer::DeviceProcessSignalOperation::finished,
|
connect(m_signalOperation.data(), &DeviceProcessSignalOperation::finished,
|
||||||
this, &KillAppService::handleSignalOpFinished);
|
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);
|
m_signalOperation->killProcess(m_remoteExecutable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,41 +116,38 @@ void KillAppService::stopDeployment()
|
|||||||
void KillAppService::handleSignalOpFinished(const QString &errorMessage)
|
void KillAppService::handleSignalOpFinished(const QString &errorMessage)
|
||||||
{
|
{
|
||||||
if (errorMessage.isEmpty())
|
if (errorMessage.isEmpty())
|
||||||
emit progressMessage(tr("Remote application killed."));
|
emit progressMessage(Tr::tr("Remote application killed."));
|
||||||
else
|
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();
|
finishDeployment();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
class KillAppStep : public AbstractRemoteLinuxDeployStep
|
||||||
|
|
||||||
KillAppStep::KillAppStep(BuildStepList *bsl, Id id)
|
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
|
||||||
{
|
{
|
||||||
auto service = createDeployService<Internal::KillAppService>();
|
public:
|
||||||
|
KillAppStep(BuildStepList *bsl, Id id) : AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
|
{
|
||||||
|
auto service = createDeployService<Internal::KillAppService>();
|
||||||
|
|
||||||
setWidgetExpandedByDefault(false);
|
setWidgetExpandedByDefault(false);
|
||||||
|
|
||||||
setInternalInitializer([this, service] {
|
setInternalInitializer([this, service] {
|
||||||
Target * const theTarget = target();
|
Target * const theTarget = target();
|
||||||
QTC_ASSERT(theTarget, return CheckResult::failure());
|
QTC_ASSERT(theTarget, return CheckResult::failure());
|
||||||
RunConfiguration * const rc = theTarget->activeRunConfiguration();
|
RunConfiguration * const rc = theTarget->activeRunConfiguration();
|
||||||
const QString remoteExe = rc ? rc->runnable().command.executable().toString() : QString();
|
const QString remoteExe = rc ? rc->runnable().command.executable().toString() : QString();
|
||||||
service->setRemoteExecutable(remoteExe);
|
service->setRemoteExecutable(remoteExe);
|
||||||
return CheckResult::success();
|
return CheckResult::success();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
KillAppStepFactory::KillAppStepFactory()
|
||||||
|
{
|
||||||
|
registerStep<KillAppStep>(Constants::KillAppStepId);
|
||||||
|
setDisplayName(Tr::tr("Kill current application instance"));
|
||||||
|
setSupportedConfiguration(RemoteLinux::Constants::DeployToGenericLinux);
|
||||||
|
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
|
||||||
}
|
}
|
||||||
|
|
||||||
Id KillAppStep::stepId()
|
} // RemoteLinux::Internal
|
||||||
{
|
|
||||||
return Constants::KillAppStepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString KillAppStep::displayName()
|
|
||||||
{
|
|
||||||
return tr("Kill current application instance");
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
|
||||||
|
|
||||||
#include "killappstep.moc"
|
|
||||||
|
|||||||
@@ -25,21 +25,14 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include <projectexplorer/buildstep.h>
|
||||||
|
|
||||||
#include "abstractremotelinuxdeploystep.h"
|
namespace RemoteLinux::Internal {
|
||||||
|
|
||||||
namespace RemoteLinux {
|
class KillAppStepFactory : public ProjectExplorer::BuildStepFactory
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT KillAppStep : public AbstractRemoteLinuxDeployStep
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
public:
|
public:
|
||||||
explicit KillAppStep(ProjectExplorer::BuildStepList *bsl,
|
KillAppStepFactory();
|
||||||
Utils::Id id = stepId());
|
|
||||||
|
|
||||||
static Utils::Id stepId();
|
|
||||||
static QString displayName();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // RemoteLinux::Internal
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public:
|
|||||||
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
||||||
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
||||||
CustomCommandDeployStepFactory customCommandDeployStepFactory;
|
CustomCommandDeployStepFactory customCommandDeployStepFactory;
|
||||||
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
KillAppStepFactory killAppStepFactory;
|
||||||
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
||||||
|
|
||||||
const QList<Utils::Id> supportedRunConfigs {
|
const QList<Utils::Id> supportedRunConfigs {
|
||||||
|
|||||||
Reference in New Issue
Block a user