- Do not assume that the PID string is the first output.
- Do not assume output has already been read when the process finishes.
Fixes: QTCREATORBUG-25306
Change-Id: Ia7cec6113e7f86469da2e6e0c62e08b38213093a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The Environment class is supposed to support values with references to
other variables, but we failed to actually expand them in most places.
Fixes: QTCREATORBUG-22687
Change-Id: I108cb59d3b4571471423455240f6f4f1cf64bf05
Reviewed-by: hjk <hjk@qt.io>
There may be additional output being retrieved after the process is
finished. We don't want that to get mangled by the processId mechanism.
Change-Id: I9ad3146ace66288de1a4d8f1e94b9999719862c8
Reviewed-by: Christian Kandeler <christian.kandeler@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>
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>
This is used to get a platform-agnostic handle on "command line
arguments". It essentially wraps a single QString on Windows,
and a QStringList everywhere else.
As a consequence, several occurrences of #ifdef Q_OS_*
can be removed from the codebase.
Change-Id: Ic93118c1bd0bce0ebb58f416d395dbaebb861772
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Using "source" to source a script isn't defined by POSIX sh, while "."
is. Using the more portable "." makes it work with QNX's sh.
Change-Id: I948fc562c62789184553d57b949697c2525771f3
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.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>