Fixes 30 seconds freeze when stopping the terminal
during debugging (when being interrupted on some
breakpoint).
Fixes also the freeze on closing the preferences
dialog after opening the remote shell via
"Open Remote Shell" and keeping it open.
Fixes: QTCREATORBUG-28365
Change-Id: I15dfd9cba02d03e0ba65878c5285ea8cc96d8aad
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Also fixes an issue where "Open Shell In Container" would fail if
the container has not been started yet.
Previously only "An Error occurred" was displayed to the user if
starting the terminal failed.
With this fix it gives more info about what went wrong, and a
specific error message is created if the openTerminal.py script
is not executable.
Change-Id: I49ae0d9b2aa7d5a27a9b100830b4fdefa5a279b8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).
Change-Id: I50e457bab2d3495e5c69676fe1a0257a5fea3e52
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When we call QtcProcess::stop(), the terminal process invokes
stopProcess() method. However, if it doesn't emit done() then
subsequent call to waitForFinished() will timeout with 30 s.
This should fix the 30 seconds hang when debugging in terminal
after pressing the red square button.
Change-Id: Iea1f9ade85dc8a4414dc49d7c8a2cbe80f0b5756
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: David Schulz <david.schulz@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>
Round 2 - focus on sources.
For classes with initial in range [I-Z].
Try to keep the same separators between different kind of headers.
Change-Id: I8a7ab99bab8120ee72cda6433ee3dc6f260a4d76
Reviewed-by: hjk <hjk@qt.io>
Round 1 - focus on headers.
For classes with initial in range [T-Z].
Replace QT_FORWARD_DECLARE_CLASS with QT_BEGIN_NAMESPACE and
QT_END_NAMESPACE and forward declare inside.
Change-Id: I4ac3a8391e6167aa2db3973a9f94a45ac3c8ebd1
Reviewed-by: hjk <hjk@qt.io>
ProcessInterface subclasses may be moved between threads,
that's why we need to make them children of ProcessInterface.
Change-Id: Ia58f1ea05f85e22315dc22dbafce06ee6bcf0be6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
It's a result of a team work consisting of yellow triangle and me.
Change-Id: I8b4812766da70e0785ae71bf0cb71357379e2514
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is fully controlled by QtcProcess itself, so provide
general implementation of state() inside QtcProcess.
Task-number: QTCREATORBUG-27358
Change-Id: Id6f0b771ed933f870b80d6856c6d94896f946516
Reviewed-by: hjk <hjk@qt.io>
Keep the setup data on stack instead on heap.
Task-number: QTCREATORBUG-27358
Change-Id: I0fffd525e2bd4f46533804e3b88fe5b330d02a91
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
And get rid of errorOccurred() and finished() signals.
Get rid of resultData() accessor, as this data is passed
with done() signal.
Task-number: QTCREATORBUG-27358
Change-Id: I677bbd174cceea6d8f5a989f961222c417992b60
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
It should be useful when reimplementing ProcessInterface.
It replaces 4 virtual methods with just 1.
Task-number: QTCREATORBUG-27358
Change-Id: I2dafbfbc25f8f016ff2aa19c1a176335a4a7498c
Reviewed-by: hjk <hjk@qt.io>
Replace only internally used functions by direct access.
Change-Id: I3daff0596ef6fb6e1c5b5711928f14d590e4e56c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This includes replacing DeviceProcess terminal handling with base
member.
Change-Id: Id1541bfce33c71dddc71b4816ad0b174dce3879c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
There is no need for TerminalRunner::setRunAsRoot()
as debugger is already being run as root.
Implement runAsRoot for non-terminal QtcProcess, too.
Fixes: QTCREATORBUG-26964
Change-Id: Id5110db86b7b809a5608714464241cee73875f2b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This is needed for transition period. Make a copy of
ConsoleProcess and name it TerminalProcess. Make it a private,
non-exported class. The ConsoleProcess is going to be removed
after unification of TerminalProcess and QtcProcess classes
is over.
Change-Id: Ib2d4bc8e8fd7ff714d891c57f695dd0debcb5a11
Reviewed-by: hjk <hjk@qt.io>