The RunControl nowadays asks
DeviceManager::deviceForPath(runnable.command.executable) to get the
device, instead of passing that through the runnable.
Since the runnable's command executable is set via
IDevice::filePath(pathOnDevice), where "pathOnDevice" by default is from
the executableAspect, IDevice::filePath should actually return a
"global" path in the form of "device://<device-id>/<path-on-device>".
Since we do not want "device:...." paths for the desktop, return the
simple path in that case only instead.
Fixes: QTCREATORBUG-27709
Change-Id: I75f9406cf3254980e1fee203275b0e72202b7b6d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This replaces the ProcessInterface::waitFor...() methods.
It's not obligatory to provide this interface when
implementing ProcessInterface subclass. In this case
generic blocking implementation will be used.
The generic implementation usually isn't as efficient as
the custom one, however, for some sophisticated implementations
of process interface, like e.g. SshProcessInterface, providing
custom implementation is really difficult and error prone.
That's why we try to keep a balance: we provide two custom
implementations for QProcessImpl and for ProcessLauncherImpl,
as they are relatively easy to implement, and rely on
generic implementation for others.
Change-Id: Ifc8bd354479ec67b2e8f74f1510f8de8883e9b94
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Add a setter and getter for reaper timeout. This makes it
possible to customize the timeout for the reaper after which it
should call kill() when previous terminate() was unsuccessful.
This setting is also used for QtcProcess::stop().
Change-Id: I653a3ad107ae4173bb8254c85cfc07886bf6a9c6
Reviewed-by: hjk <hjk@qt.io>
Use "-b" option of sftp command for providing batch file
instead of setting a standard input file for sftp process.
In order to fix showing the authentication dialog
we explicitly pass -o BatchMode=no before the "-b" option,
which should re-enable the interactive mode before
processing batch file.
Change-Id: Iaf3c93929c08fd61373003e394a08439d05fe27e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make it ready for providing implementations for other devices.
Change-Id: I14eaf167a7b2c1189f4d23f2e9f556204295b9b3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Move it to its own header.
Get rid of SshConnection and SshConnectionManager,
as they are not used anymore.
Change-Id: I52fe20d7816ea57e7a7158ab2ae9565d50a76e21
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Don't delete the TransferInterface directly from stop().
Disconnect from it and delete it later.
Fix emitting done() signal when error occurred.
Fix passing the proper enum to RsyncTransferImpl.
Set proper parent for TransferInterface.
Change-Id: I430f0bf2507de8a9b7fb610641ca86e37ccd80d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The test() method doesn't try to transfer anything,
it just tests if the transfer itself work.
In contrast to start() method, the FilesToTransfer
list may be empty and test() method will not issue
an assert.
Change-Id: I719cfbaddc5e33d6a7cc660ef6aa0bbcb61c5bce
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Prepare the API for rsync implementation.
Change-Id: I13b7def31c2e2b1460d18340f6bd7cbd8e0e9434
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The method returns FileTransfer object. This should substitue
SftpTransfer. It is going to handle rsync transfer, too.
Change-Id: I082cf21581ac387e42bb3594604facafe32d7492
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... by creating them with the right device to start with.
Change-Id: Ib2f0f10b67322fe66a609287a629d3d720d83c93
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
... and drop QtcProcess::removeEnvironment()
This shifts the meaning of the unqualified QtcProcess::environment()
to always refer to (possibly remote) "main" process this QtcProcess
wraps. The controlEnvironment is now referring to secondary helper
processes (if any...) typically(?) running on the host system.
This helps to avoid local/remote distinctions in some places.
Change-Id: Ib7cd15dd226617484b5358acd7deaed29e751883
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
As we are going to remove SshRemoteProcess.
Change-Id: I07cf246791f1adb6cfc454935d7e330c2f1d4dc7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
The SshRemoteProcessRunner is going to be removed soon.
Replace this include with what we are using currently.
Change-Id: I0d13586390b60ca9545f124a4db24eb90f4369d7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
If the master ssh connection can't start, e.g. because
no public key was uploaded to the remote device, report the
standard error of master process as error string.
Fix the "if" condition in handleDisconnected().
Change-Id: I9ba821136a1755d3460e47ce6f25d3684445890f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This is needed when moving ProcessInterface beweeen threads.
Change-Id: I26158c68bdc8e77ecb3e3d4535ba767ef3d0b63c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Don't use SshDeviceProcess anymore for opening linux terminal.
Fix running the empty command so that it opens ssh shell.
Don't leak terminal processes on shutdown.
One issue is that terminals are closed when closing settings,
as settings dialog operate on a copy of device, and in case
of no modifications applied the copy is being deleted.
The current workaround is to press the "Apply" button
before closing the settings dialog. This issue is to be
addressed separately.
Change-Id: I3c48b035daf1d099a1e8fa0762a6d6d0eca9592c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Centralize some boiler plate and warn about best-guessed cases.
Keep the QByteArray based access as writeRaw()
Fixes: QTCREATORBUG-27445
Change-Id: I948d80fba78b36cf85cc73664175ab05eb7707d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This is going to replace SftpFileSystemModel.
That's needed before planed removal of SshConnection in order
to not to use SftpSession class.
Change-Id: I97f0ffd3418f7e71819ac95048a75e4a17901c71
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>