Since switching to a QProcess based implementation a different
code path is used to interrupt processes (QProcessImpl::sendControlSignal, instead of ProcessLauncherImpl::sendControlSignal).
The QProcess path still used outdated ProcessHelper::interruptProcess.
This patch removes the old path and replaces it with the correct
"ProcessHelper::interruptPid" for QProcess based processes.
This also fixes GdbEngine::interruptInferior2 which could not interrupt
processes during "Attach to running server"
Change-Id: I9e1917100acf89c07cab0d9c687e57bb555d9d83
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Queue the call to start() so that it's executed after the nested
event loop is started, otherwise it fails on Windows with QProcessImpl.
Fixes: QTCREATORBUG-30066
Change-Id: Ibb17ef0f668f52c05b26a521e18c94e637992ba5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Checking the existence of qGuiApp isn't enough, since the
implementation just static_casts qApp to QGuiApplication.
The issue might happen in autotests if some function calls
methods of QGuiApplication. The autotests instantiate just
QCoreApplication by default.
Change-Id: Id384fb21b2a2ad66fac59bf5de35668ce50df1d1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Change the argument of TaskInterface::done() signal
from bool into DoneResult. Make it consistent with
other TaskTree API.
Introduce toDoneResult(bool success) helper.
Change-Id: I7b3041d7c1ed0317c76adbc1fd37448231e85f82
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
It allows to set command/workingDir/env in one go.
Fix condition for setCommand() to match the one for setWorkingDir().
Change-Id: I0aa4639f3357c387a0fe8da321e94e34a3ea232d
Reviewed-by: hjk <hjk@qt.io>
Some places compared the scheme and host of a filepath to
decide whether its the same device. This is incorrect and
leads to false negatives. isSameDevice is the correct way
to decide whether two paths are from the same device.
Fixes: QTCREATORBUG-29474
Change-Id: Iced8f434dadb931f6595f47f95647b341c48d3aa
Reviewed-by: hjk <hjk@qt.io>
Pasting large amounts of data on macos would block the App indefinitely.
The issue was a blocking call to ::write. The first fix for that was to
set O_NONBLOCK on the tty stdout fd. The second fix was to pass the
actual result of the write back to the caller so they can react to it.
In the TerminalSurface we now check if the write was successful and
if not we buffer the data and try again later.
Change-Id: Ibc92cce57fad88b5e9aa325197b42e17bec5e746
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Terminal processes need to add to the stub and not the target app,
so sudo is only automatically added for default processes.
The terminal interface is changed such that sudo is added to the stub.
Task-number: QTCREATORBUG-27519
Change-Id: Ife11e937644c4e946401a5b079e90fa64aee2c52
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>