Commit Graph

301 Commits

Author SHA1 Message Date
Jarek Kobus
f301bb3f97 QtcProcess: Fix behavior of kill()
Make it behave more like QProcess::kill().

Before, when QtcProcess::kill() has been called,
the process launcher was putting the process into the
reaper and notified the QtcProcess that it was already killed,
while in fact it could still be alive for a while since it
was in reaper's hands. The current fix makes the behavior
similar to what QProcess does when calling kill(). So now,
in case of a call to kill() the process isn't put into the reaper yet,
so it has a chance to report back the finished signal when the
process was really stopped.

We still use the old behavior of putting the running process
into the reaper in case of a call to QtcProcess::close() and
when d'tor of QtcProcess was called. We don't report back the
confirmation about putting the process into the reaper, since
close() is always called from ProcessLauncherImpl d'tor, so
there is no one to receive this confirmation anyway.

Change-Id: I665e7c8fb1a391dda30c86389259961e715926d6
Reviewed-by: hjk <hjk@qt.io>
2022-06-01 10:32:22 +00:00
Jarek Kobus
ed40753ed1 Utils: Drop unused headers [I-Z]
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>
2022-05-25 07:49:25 +00:00
Jarek Kobus
304ab10642 Utils: More forward declarations / drop unused headers [P-R]
Round 1 - focus on headers.
For classes with initial in range [P-R].
Try to keep the same separators between different kind of headers.

Change-Id: I01fb80b93164a7fe4c0bd2cd8f9e4f27523efefa
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>
2022-05-25 07:18:44 +00:00
Jarek Kobus
f9433c79b7 QtcProcess: Use Utils::Guard instead of self made substitute
Change-Id: I36b6db25998b5c34c2c96cfb5dc8c60537dbb7b6
Reviewed-by: hjk <hjk@qt.io>
2022-05-24 11:46:38 +00:00
Jarek Kobus
0675fe05b9 QtcProcess: Guard emission of done() signal
Add a missing guard for emitting done signal. It was overlooked
during QtcProcess devirtualization.

Amends a717ff71f4

Change-Id: I62c38d2ba9f3e437b5ef088b8362e97d16e576e4
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>
2022-05-20 08:18:55 +00:00
Jarek Kobus
0a8dbaf153 Utils lib: Remove unneeded includes from cpp files
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>
2022-05-19 12:37:20 +00:00
Cristian Adam
8be05ca745 Utils: Remove Debug restriction for useCtrlCStub
process_ctrlc_stub doesn't generate a Ctrl+C event sent via
GenerateConsoleCtrlEvent for the child process to terminate.

So the Debug restriction to workaround QTCREATORBUG-11995 is
no longer needed.

Change-Id: Iafc8b51bce17432c80b0be0c4084978abc1c909f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-05-11 12:35:15 +00:00
hjk
e657bc8781 Utils: Introduce QtcProcess::controlEnvironment()
... 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>
2022-05-10 09:53:53 +00:00
Jarek Kobus
6455d7fcf3 QtcProcess: Make the class final
Currently, as a result of many refactorings, the QtcProcess
is designed so that if you want to customize the behavior
you should implement custom ProcessInterface subclass.
Adding virtual methods directly to QtcProcess caused tons of
unpredicted side effects and nasty bugs, which were hard to
track and hard to fix, as provided fixes were usually fixing
particular case while introducing regressions in not related
code paths.

Consider also aggregating QtcProcess object instead of
deriving from it when some additional methods are required.

This patch removes the last virtual methods from QtcProcess API
and makes the class final in order to prevent from adding
any new virtual methods to this class in the future.

This commit message should make it clear that having subclasses
of QtcProcess is not a desired design. It's a post-mortem
conclusion. So: don't derive from QtcProcess - we mean it!

Change-Id: I1e43ed45be326b366422fd7db6e05ba48ea5fb98
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 07:42:29 +00:00
hjk
ef346779eb Utils: Use some helper function in QtcProcess for common code
Change-Id: Iffa720f5c6b3c86ad80c92566fbe00465d3ed7a4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-06 09:21:54 +00:00
Jarek Kobus
9402841d99 QtcProcess: Fix runBlocking() on remote
There is no need for special handling when running on remote.

Change-Id: If30245d2ece475cb72df2be4390210d6b8c0c1aa
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-03 19:31:50 +00:00
Jarek Kobus
ece39c7c2f QtcProcess: Use generic waitFor...()
Task-number: QTCREATORBUG-27430
Change-Id: I34ecc8a5937204875c235eee285c32d9cb0a0a86
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-03 14:32:41 +00:00
Jarek Kobus
221414c5e8 QtcProcess: Implement waitFor...() in general way
Task-number: QTCREATORBUG-27430
Change-Id: I34aff44258d2c7cabae0b63fe4e9ec55aa7b3b7d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-03 14:32:29 +00:00
Marcus Tillmanns
c8024046f9 Docker: implement process interface
Change-Id: I57dd9e060ee35280b663611ebb5ddef20b7d0eb7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-03 08:26:13 +00:00
Jarek Kobus
703dbd9c79 QtcProcess: Add a warning when starting a process in non-QThread
When a QProcess is being started in a thread that doesn't have
event dispatcher installed, e.g. in a thread started with
std::async(), the process signals are emitted only from inside
QProcess::waitFor...() functions, but not emitted spontaneously.
This may cause issues when adding the running process into the
ProcessReaper, as the implementation of the latter relies on
signal emission and doesn't use blocking API of QProcess.

Currently there is one case like this: ProcessCreator::createProcess()
of clangsupport library.

Change-Id: I823a139b356f62fee9e0e5d6fc8326301c36b449
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-28 20:15:30 +00:00
hjk
b971c27312 Utils: Use a somewhat better fallback when no environment was set
Change-Id: Ic92b7b2bf50ecfed4790393a763b17bb988e892c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-28 16:21:59 +00:00
hjk
aa3bdcb427 Utils: Add a QString-based write to QtcProcess
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>
2022-04-28 08:20:11 +00:00
Jarek Kobus
c81a7b5c70 QtcProcess: Add processChannelMode() getter
Use ProcessInterface's setup data when handling
readyRead signals. In this way the user may still
change this setting, also when QtcProcess is running,
as a preparation for the next run. In this way this
works like all other QtcProcess mutators.

Change-Id: Ie80475e322162ce109fb95468ce858f9c98eefa9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-26 16:29:41 +00:00
David Schulz
11ce6e365f Utils: fix QProcess backend on Windows
Do not return false from QtcProces::waitForStarted if the process is
already running. This causes mayor issues on windows since QProcess
directly emits started and therefore switches to the running state after
calling QProcess::start.

Change-Id: I4604b08a59918d3df11c8a174b57e1e483e78a0d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-25 10:04:48 +00:00
Aaron Barany
df0593b5e1 Utils: Preserve output order with merged channels
Restored the process channel mode members to ProcessSetupData and
StartProcessPacket and forward to the QProcess created in
LaunchSocketHandler. LaunchSocketHandler now avoids reading from stderr
for merged channels since it's guaranteed to not be available.

This avoids asserts in Qt 6.3.0 and warnings in Qt 6.3.1 while
preserving the original output order when an application has a mix of
stdout and stderr output.

Change-Id: I9f4541932cf9d8638b38658a5efea9cb5f1798f3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-19 19:39:24 +00:00
Jarek Kobus
44c7020651 ProcessInterface: Get rid of state() method
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>
2022-04-14 13:49:25 +00:00
Jarek Kobus
bc30523293 ProcessInterface: Get rid of ProcessInterface::Ptr
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>
2022-04-14 12:41:01 +00:00
Jarek Kobus
bfc0d5ec32 ProcessInterface: Get rid of ProcessProxyInterface
It doesn't seem to be useful anymore.
Add some comments to the ProcessInterface API.
Move virtual interface into the private section
in order to not to use it directly from implementation.

Task-number: QTCREATORBUG-27358
Change-Id: Idd9fd39cf153832e6e44e125fbbd5c8236a2d930
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-14 12:13:08 +00:00
Jarek Kobus
a4a651aa32 QtcProcess: Fix StartFailed result
Amends 4ca336762e

Change-Id: I3781bec37b17ea3f86eedc51657db0931a456c39
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-14 07:55:22 +00:00
Jarek Kobus
7c8b5648fe ProcessInterface: Add sendControlSignal() method
It substitutes terminate, kill, interrupt and kickoffProcess
methods.

Task-number: QTCREATORBUG-27358
Change-Id: I9e952c2f4c1a7e76339366566f2c804a3df30347
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-13 14:39:33 +00:00
Jarek Kobus
25be242c6f ProcessInterface: Get rid of close() method
Implement it in general way inside QtcProcess instead.

Task-number: QTCREATORBUG-27358
Change-Id: Ibc4c9753c57cd73afcccb2991282ee459dc69780
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-13 14:39:25 +00:00
Jarek Kobus
267aa92a8a ProcessInterface: Pass processId with started() signal
Pass also applicationMainThreadId optionally (Windows only).
Remove two virtual accessors.

Task-number: QTCREATORBUG-27358
Change-Id: I3b12b642cc3c109653276c0fbf65e7f614ce6b56
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-13 14:39:18 +00:00
Jarek Kobus
aa3f467ee2 ProcessInterface: Add readyRead() signal
And get rid of readyReadStandard[Output/Error]() signals.
Get rid of readAllStandard[Output/Error]() accessors, as
this data is passed with readyRead() signal.

Task-number: QTCREATORBUG-27358
Change-Id: I01341feba650e650761f97e90f83b6042c899251
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-12 14:00:14 +00:00
Jarek Kobus
4ca336762e ProcessInterface: Add done() signal
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>
2022-04-12 14:00:03 +00:00
Jarek Kobus
00acccfd3d QtcProcess: Fix terminate() for process launcher
ProcessLauncherImpl::terminate() was behaving the same as
ProcessLauncherImpl::kill() in case of process launcher
implementation - in both cases the launcher
immediately returned confirmation about receiving the
close request and was putting the corresponding
process into its reaper. However, the issue with this approach
is that we can't receive anymore any potential ready
read signal from the process being terminated after
a call to terminate().

The fix is to diverge the behavior of terminate()
and kill() of ProcessLauncherImpl. The behavior of kill()
remains the same, while terminate() just instructs the
process launcher to start termination without putting
the process into the reaper, yet.

Add a test that checks for any possible zombies.

We run the RecursiveBlockingProcess recursively. The most
nested process blocks. After a short wait we terminate
the outermost process. With this test we are trying to see
if terminating the middle process terminates also its
children and doesn't leave zombies.

Before we execute the test (and also by the end of this test)
we call Singleton::deleteAll() in order to ensure that reaping
of previously running processes has finished. We ensure the
number of running processtestapps is zero. Later, we ensure that
the leaf process was already started and the number of running
processtestapps equals the depth of recursion.

Fix apparent bug in getLocalProcessesUsingProc().

Change-Id: I7e2bc46ad5ca22f26620da86fbaf0fa00a7db3c3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-12 13:59:41 +00:00
Jarek Kobus
2794b5e543 tst_QtcProcess: Get rid of lineCallbackIntern() test
This test introduced some additional private API to QtcProcess.
This makes refactorings of QtcProcess harder, as we need to
handle this artificial code working.

We have a real lineCallback() test instead which doesn't
employ this private API.

Change-Id: Idbc314210cecc2044e1ccc298e5d3e0a9747e811
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-11 15:26:10 +00:00
Jarek Kobus
936c44f367 Introduce ProcessResultData
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>
2022-04-11 06:51:51 +00:00
Jarek Kobus
5b923954c0 QtcProcess: Make exitMessage() a const method
Change-Id: Ibb0aaf0bf3bf216673646ea7b869fd7e55e6b81c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 13:36:48 +00:00
Jarek Kobus
a717ff71f4 QtcProcess: Ensure we don't delete the process from handlers
Guard that we don't delete the QtcProcess directly from
inside its handlers.

This helps in detecting wrong usage of QtcProcess.

Change-Id: Ia5b154b3e1f827d579910ebe81ae230fc797c377
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-05 12:41:13 +00:00
Jarek Kobus
ab11c4373b QtcProcess: Introduce done() signal
Introduce QtcProcess::done() signal. It's similar to
QtcProcess::finished() signal, but also emitted when
process failed to start (so after QProcess::FailedToStart
error occurred).

SshRemoteProcess::finished() signal was already behaving
like this. So, we remove special handling of
FailedToStart error in this class and connect all clients
of SshRemoteProcess to done() signal, instead of finished().

Task-number: QTCREATORBUG-27232
Change-Id: If4240e2172f3f706e812bca669a1d5b24bdc3285
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 13:28:12 +00:00
Jarek Kobus
365a05640b QtcProcess: Get rid of setErrorString() method
It's internal method, not meant to be used outside.
It's only used in case of FailedToStart error.
Remove it also from ProcessInterface.
Leave it inside DefaultImpl and its subclasses only.

Remove m_errorString field from ProcessSetupData.

Change-Id: Ie605b95c2ff605ab1259045f1a5b16049207c1d3
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 10:20:34 +00:00
hjk
6297851f29 Utils: Merge TerminalProcess into TerminalImpl
Change-Id: I60a03f315e84e17877d4ecd809a994f08934bedf
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-01 11:25:46 +00:00
Jarek Kobus
b76b8b1542 ProcessReaper: Implement custom terminate for CtrlCStub case
Move CtrlCStub-specific interrupt into ProcessHelper.

Amends 7d7e4af3afb5ba9d0ed5210018dd6be67abda469

Change-Id: I5cd9a750c4a89587a874515f752b0144df4b8309
Reviewed-by: hjk <hjk@qt.io>
2022-03-31 12:48:42 +00:00
hjk
27c8f00d73 Utils: Un-seat QtcProcess from ProcessInterface
I find it too confusing to have that inheritance only to enforce
similar interfaces.

Change-Id: I9da68ea59c04f709228e0874460e987115b30f56
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-31 10:14:36 +00:00
Jarek Kobus
d7ff76be69 QtcProcess: Drop return value from stopProcess()
It wasn't used at all.

Change-Id: Ife0989c73c67b6106e61c40931f318ee7a5b062d
Reviewed-by: hjk <hjk@qt.io>
2022-03-24 08:12:03 +00:00
hjk
1960799be2 Utils: Add bits of process output when debugging QtcProcess
Change-Id: I03b7825e29be5dd5a78768c5831756703ce7fdf1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-18 15:29:49 +00:00
Jarek Kobus
cfe8b7ad88 Fix handling of unfinished lines by QtcProcess callbacks
Don't detect a call to QtcProcess::kill() from inside the
QtcProcess callback while awaiting inside QtcProcess::waitFor...().
That's not needed, since a call to kill() sends a stop message
to the process launcher, so we wait for confirmation
from process launcher instead. This may bring e.g. new
read data from the running process.

Fix a runBlockingStdOut() test so that when we write to the stdOut
from the running process we flush the unfinished line so that
it's not buffered inside the process.

Change-Id: I7944ac214d8cb9e10a71715a7ef8bfacab6df7c9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-14 07:38:08 +00:00
Jarek Kobus
82108e949a ProcessInterface: Rename interruptProcess() -> interrupt()
Both functionalities meant to do the same.

Change-Id: Idd9373cdb24b7b41f9e4befb09326c339263eeb1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-03-10 08:41:05 +00:00
Jarek Kobus
65dd738a01 Fix a call to endFeed() when process wasn't started
Fixes the tst_qtcprocess::lineCallbackIntern() test.

Change-Id: Id608ab834deaccf854f3d8ff9f4a172de58ef9a2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-09 09:38:20 +00:00
Jarek Kobus
ac3aa805b9 QtcProcess: Ensure we set the data just after creating handle
...instead of ensuring in many functions that m_setup isn't null.
This amends 36c49cd2ea and
solves the issue for other functions like processId(),
exitCode(), etc...

Amends 36c49cd2ea

Change-Id: I986f7b30e90e5825ae2bb57b4bc2aa14f56e401f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-03-03 10:02:36 +00:00
Jarek Kobus
a17374778a Introduce ProcessProxyInterface, enable data sharing
ProcessProxyInterface will be helpful when implementing
public subclasses of ProcessInterface, like
general ssh impl, linux specific impl, qnx specific, etc.

ProcessProxyInterface is sharing private data
between proxy and target.

Change-Id: I8350837bb5f770d6605b860b146604cba5e6b592
Reviewed-by: hjk <hjk@qt.io>
2022-03-02 15:31:13 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
Jarek Kobus
6ff1723c4c ProcessInterface: Move out default impl into separate class
Introduce private DefaultImpl class and base QProcessImpl
and ProcessLauncherImpl on it. Remove default impl specific
methods from ProcessInterface.

Change-Id: Iea964ab19cc0ea8401180f65351b6ef3f595703f
Reviewed-by: hjk <hjk@qt.io>
2022-03-02 13:30:14 +00:00
hjk
92de389a61 QtcProcess: Fix crash when logging process stats
Change-Id: I204366a008dea91d1b2b946689c7598fe9ab009c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-28 14:52:23 +00:00
Jarek Kobus
7b234e0fae QtcProcess: Introduce virtual emit* temporarily
Introduce emitStarted, emitFinished and emitErrorOccurred
virtual protected methods for QtcProcess subclasses.
It makes it easier to connect to self signals and
filter out the unneeded emissions. This is a temporary
change until QtcProcess is de-virtualized.

Amends ff68923846

Change-Id: I784676458e86314e092366e3b3b1244dfe2712f3
Reviewed-by: hjk <hjk@qt.io>
2022-02-28 14:52:15 +00:00