Access is nowadays via DockerApi::instance()
Change-Id: Idc1530358771c3a008182661c263c30b68fe84be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Ideally, this would not be needed on the user code side at all, but
there's no way to ensure the settings are read timing before sibling
constructors might need it. So keep the 'poor man's two-phase
initialization', but make it less intrusive.
Change-Id: Ica7f6510cd05072d7286f4e85cd72c494e8f10f8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Instead of relying (and forgetting...) it in all derived clases.
Change-Id: I5d1dea0ace420d464c39c192278ae6e5db01de90
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
All devices that support it use the same mechanism to gather ports
so this patch removes the individual implementations in favor
of a single one in IDevice.cpp.
This patch also removes:
* canAutodetectPorts() as it was not used.
* Port::parseFrom...Output as they are not used anymore.
Change-Id: I8ecedec2d71e60985402387982c64311c5a651e6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Do not send the marker when running in a PTY. On windows it gets encased
in junk and duplicated otherwise.
Change-Id: I9017066b0f1d22d4700704bfa2120c4f5d66daa9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This allows using dumpers available on the host being used from
remotely running gdb. No lldb/cdb yet.
Task-number: QTCREATORBUG-29000
Task-number: QTCREATORBUG-16246
Change-Id: Ib1a40a8c0284dcf41e8800d70ca3e632c699b2fa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).
Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.
Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Docker and ssh devices need the real process id on the
remote device. The process stub now send this if it receives
it as the first line of output.
Change-Id: I5d3af39651958fc88d21c3854a0fa1d7f51547a6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
DockerDevice::ensureReachable returned false in case a path was
already mounted.
Change-Id: I7b378a063dfe5380a1ead648f89911f2225c6338
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Fixes the following errors that would trigger warnings due to incorrect
QtcProcess/ProcessImpl state synchronization
* Don't emit readyRead when state != Running
* Set result.m_error to FailedToStart if remote pid was not received
* Send stderr data once the pid was received
* Don't call deleteLater() on nullptr
Change-Id: I4b498a860ad27bef1a5b3e26417576431b54e84c
Reviewed-by: hjk <hjk@qt.io>
This re-organizes the buttons on the main device page a bit: The
topmost one still starts the wizard selection, below that are direct
individual buttons to add specific devices.
Change-Id: I52b2803febf658259dde9589544656fd4c8fc889
Reviewed-by: David Schulz <david.schulz@qt.io>
Previously DesktopDevice::openTerminal used custom code to open a
terminal window. This patch changes it to use QtcProcess with
TerminalMode::On.
This also removes the need for "openTerminal.py" on macOS.
Change-Id: Iec978bdd19487ff8e59dcd88c35c2d01b0681022
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Docker will try to download images from the registry if an image is
not available locally. This takes a while, even if the image is not
available remotely. To circumvent the hangs resulting from this we
first check if the image is available locally and if it is not we do
not try to start it.
Fixes: QTCREATORBUG-28880
Change-Id: I6b9de8601b87e3050ae9ac5f1bbe3fa9701d4cc1
Reviewed-by: David Schulz <david.schulz@qt.io>
Make Pty::Data optional. When set, the PtyProcessImpl
implementation is implied.
Change-Id: I7990e9d9016223e6597d876a5d0c4ed177365874
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Previously if a docker container was removed outside of Qt Creator
the shell would not be correctly reset by the dockerdevice and
therefor cause a hang.
Change-Id: I5e84f7c114e525c732f45b701277736d6acc7a11
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Combined local and ssh process list retrieval into LocalProcessList
* Combined QnxProcessList into LocalProcessList
* Renamed LocalProcessList to ProcessList
Change-Id: I230c575375e306c638e4ca3034fa2d7ed243a44c
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Previously error output occurring while the PID marker was
not parsed yet was not passed on to the parent QtcProcess.
Change-Id: Id6cbaa13a7d6c62d7a8612e118092eb2be6e790c
Reviewed-by: hjk <hjk@qt.io>
Since Terminals can now be started for device file paths, there
is no need anymore for IDevice::terminalCommand.
Change-Id: I01c831ea7ee29d53efa6880631e8c6d54a4316aa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Integrating PtyQt directly into QtcProcess allows us to
start Pseudo terminal processes using the existing QtcProcess
functionality such as starting remote process on e.g. docker
or remote linux devices.
This is needed for the new Terminal plugin.
Change-Id: Iaeed5ff9b341ba4646d955b2ed9577a18cd7100f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Calling <Module>::Tr::tr() is preferred over
QCoreApplication::translate("::<Module>", "..."). This changes
occurrences in .cpp files.
Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1
Reviewed-by: hjk <hjk@qt.io>
Environment::searchInPath() does not know from which device it came.
Therefore it will take the PATH variable as it is ( without the
device://... prefix ) and search for files on the local device.
Change-Id: Iecddb5ee1beb4ac821a9ac592f6edb1fc0f68b54
Reviewed-by: David Schulz <david.schulz@qt.io>
Previously only the process mode was checked to decide
whether we need an interactive docker session when starting
a process.
Change-Id: Ia80c78d861107239d0c86c405e06f30e7770ff8e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
That's closer to the intended semantics. The "other" use in docker
will be changed to an optional<Environment> as follow-up to
keep this here mechanical.
Change-Id: I43ef9da6c9c7731b28f9d6fab6413ce9c4f428b4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>