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>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
||||
<name>RemoteLinux::Tr</name>
|
||||
<message>
|
||||
<source>Trying to kill "%1" on remote device...</source>
|
||||
<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>
|
||||
<translation>Kunne ikke dræbe fjern-program. Formoder at den ikke kørte.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
||||
<message>
|
||||
<source>Kill current application instance</source>
|
||||
<translation>Dræb aktuelle programinstans</translation>
|
||||
|
||||
@@ -42038,7 +42038,7 @@ Breche ausstehende Operationen ab...
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
||||
<name>RemoteLinux::Tr</name>
|
||||
<message>
|
||||
<source>Trying to kill "%1" on remote device...</source>
|
||||
<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>
|
||||
<translation>Anwendung auf anderem Gerät konnte nicht beendet werden. Vermutlich lief sie nicht.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
||||
<message>
|
||||
<source>Kill current application instance</source>
|
||||
<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>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
||||
<name>RemoteLinux::Tr</name>
|
||||
<message>
|
||||
<source>Trying to kill "%1" on remote device...</source>
|
||||
<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>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
||||
<message>
|
||||
<source>Kill current application instance</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -58368,7 +58368,7 @@ Stepping into the module or setting breakpoints by file and line is expected to
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
||||
<name>RemoteLinux::Tr</name>
|
||||
<message>
|
||||
<source>Trying to kill "%1" on remote device...</source>
|
||||
<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>
|
||||
<translation>リモートアプリケーションの強制終了に失敗しました。実行中ではないことと前提にしています。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
||||
<message>
|
||||
<source>Kill current application instance</source>
|
||||
<translation>現在のアプリケーションのインスタンスを強制終了</translation>
|
||||
|
||||
@@ -46224,7 +46224,7 @@ If you do not have a private key yet, you can also create one here.</source>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppService</name>
|
||||
<name>RemoteLinux::Tr</name>
|
||||
<message>
|
||||
<source>Trying to kill "%1" on remote device...</source>
|
||||
<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>
|
||||
<translation>Не удалось уничтожить внешнее приложение. Возможно, оно не было запущено.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RemoteLinux::RemoteLinuxKillAppStep</name>
|
||||
<message>
|
||||
<source>Kill current application instance</source>
|
||||
<translation>Уничтожение текущего экземпляра приложения</translation>
|
||||
|
||||
@@ -25,23 +25,25 @@
|
||||
|
||||
#include "killappstep.h"
|
||||
|
||||
#include "abstractremotelinuxdeploystep.h"
|
||||
#include "abstractremotelinuxdeployservice.h"
|
||||
#include "remotelinux_constants.h"
|
||||
#include "remotelinuxtr.h"
|
||||
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
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<Internal::KillAppService>();
|
||||
public:
|
||||
KillAppStep(BuildStepList *bsl, Id id) : AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<Internal::KillAppService>();
|
||||
|
||||
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<KillAppStep>(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
|
||||
|
||||
@@ -25,21 +25,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "remotelinux_export.h"
|
||||
#include <projectexplorer/buildstep.h>
|
||||
|
||||
#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
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
||||
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
||||
CustomCommandDeployStepFactory customCommandDeployStepFactory;
|
||||
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
||||
KillAppStepFactory killAppStepFactory;
|
||||
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
||||
|
||||
const QList<Utils::Id> supportedRunConfigs {
|
||||
|
||||
Reference in New Issue
Block a user