Currently the only place that's using it and the scope is much smaller.
Change-Id: I1a43d14f0e2c69a16f76e6f83b82436bbeeac1c9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
De-facto standard and reduces numbers of warnings.
Change-Id: Ic7758ee30091aaa47650a9697145a302480b31de
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
ConsoleProcess stumbles over the special characters in the remote
command and as a result silently runs the command locally instead.
Prevent that. We can (and should) simply leave these characters alone,
as they have no special meaning on the local machine.
Change-Id: I31b3afe1cf170e51d431372b15f4df3656006959
Reviewed-by: hjk <hjk@qt.io>
The old implementation sent the command over the wire as-is, so we
declared it as a QByteArray and let the caller choose the encoding. This
doesn't make sense anymore, as the command is now passed to an external
process as a QString anyway.
Change-Id: Ib84bc0f871db2b45b93f71d924c4177cc28d3bb0
Reviewed-by: hjk <hjk@qt.io>
Mainly to get rid of the QProcess::finished deprecation warning.
Also adjust coding style in the surrounding connects when needed.
Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... in the settings dialog.
This allows users to poke around in the device they'be just configured,
e.g. for doing quick custom checks.
[ChangeLog] A remote shell can now be started for Linux devices.
Change-Id: I4570ca89d64606029759767a9f771168d7273510
Reviewed-by: hjk <hjk@qt.io>
This is possible now that the remote process is started via a local
tool.
[ChangeLog] Remote Linux applications can be run in a terminal now.
Change-Id: I9f7df87563a18880d85c6d16ad18fb10a4d9f0e0
Reviewed-by: hjk <hjk@qt.io>
A "regular" exit of the ssh binary with exit code 255 means that the
remote process has crashed.
Change-Id: I82e6e44079041459e78e4f8f7e7b6e5cbcaa6c44
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
... instead of our own SSH library.
Advantages:
- Full compatibility with OpenSSH behavior guaranteed.
- Minimal maintenance effort.
- Less code to build.
- Big chunk of 3rd party sources can be removed from our repository.
One the downside, Windows users now need to install OpenSSH for
RemoteLinux support. Hoewever, people doing embedded development
probably have it installed anyway.
[ChangeLog] Switched SSH backend to OpenSSH
Fixes: QTCREATORBUG-15744
Fixes: QTCREATORBUG-15807
Fixes: QTCREATORBUG-19306
Fixes: QTCREATORBUG-20210
Change-Id: Ifcfefdd39401e45ba1f4aca35d2c5bf7046c7aab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Use unique_ptr for all *Private classes, except for those
in singletons.
Change-Id: Ib56c31ddedc6e9cf321f15de1f1e697a27ad4089
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.
Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
With AndroidRunnable gone, there is only one incarnation of
a Runnable left - the StandardRunnable.
It is not expected to ever need a different runnable again,
as platform differences are now handled in the platform specific
RunConfigurations and RunWorkers created there locally, and
global information is typically communicated via
RunConfigurationAspects, so there is no point in keeping the
Runnable::{Concept,Model} machinery.
This patch here essentially makes StandardRunnable a type alias
for Runnable, to allow downstream changing all
if (r.is<StandardRunnable>()) { ... r.as<StandardRunnable>(); }
one by one.
When all downstream is adjusted, the alias can go completely.
Change-Id: I86aa92c7fae8d54ca603484b7e1746c126b0bddb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Killing every process on the system that happens to have the same name
as the one we've started is error prone and dangerous. We might kill
processes we haven't started and other processes might rename
themselves at runtime so that we don't find them anymore.
The process ID is obtained by outputting it as very first thing on
stdout and then starting the process with "exec", so that it isn't
forked.
Change-Id: Icc51bd1968afc47f4dc42f9e90e5dcbd0b1e40a7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
A QLatin1String isn't a StandardRunnable.
This fixes a regression introduced in 58be2708a.
Change-Id: I6b3bb337227631011a6bc26c938945bb0e912e62
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
We cannot technically enforce a remote process to actually terminate,
but we don't want the associated DeviceProcess to "hang" forever.
Therefore, we now
a) check whether the kill operation reports an error and
b) start a timer after starting the kill operation.
If the kill operation either "officially" fails or does not have the
desired effect of actually terminating the process within a given time
frame, we set the DeviceProcess to "finished" manually. This is the same
thing that already happens when the connection gets lost, where we also
report the DeviceProcess as finished, even though the remote process
might still be running.
Change-Id: I5620f90453463c64d3a84abd30f1ec7eec9d492d
Reviewed-by: David Schulz <david.schulz@digia.com>
Every device can now return a DeviceProcessSignalOperation,
which allows to kill or interrupt processes running on the
device.
Change-Id: Idaa04ebc767e09ca167fa033ed93860b9b81479e
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Provide a QProcess-like abstraction that can be used
to implement processes running locally or on a remote
device. Objects of a concrete class implementing the functionality
are created by IDevice objects.
Current implementations are:
- Local execution (QProcess-based), provided via the DesktopDevice.
- Remote execution via SSH.
- A specialized case of the former for remote Linux systems (provided by
LinuxDevice).
The latter is already being used in a number of places. As a result, lots of
code dealing with details such as setting the remote environment could be
moved to a central location. These things are no longer the concern of whoever
is wishing to run a remote process.
Change-Id: I919260ee6e77a020ca47226a4a534e7b8398106f
Reviewed-by: hjk <hjk121@nokiamail.com>