Commit Graph

8 Commits

Author SHA1 Message Date
Jarek Kobus
e2599b45ff Fix LauncherInterface's destruction
Change the lifetime of LauncherInterface. Now it's being
constructed when startLauncher() is called and
destructed on stopLauncher(). Before, we hold the
static LauncherInterface object and couldn't control when
it's being destructed, so in fact the destruction
started too late, after the QtSingleApplication's destructor
finished.

Simplify LauncherInterface::isStarted() method.

Change-Id: I91f38212177318746d2530a418eb3efd3d9258cb
Reviewed-by: hjk <hjk@qt.io>
2021-08-24 14:04:37 +00:00
Jarek Kobus
7bc8672968 Assert that startLauncher() was called before starting any QtcProcess
Change-Id: Ieab97f7428c04ba90fc9a637ed8c29c8e97dec69
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-20 10:31:27 +00:00
Jarek Kobus
ef45478707 Assert that we are starting a valid process launcher executable
Change-Id: I48b18bd4ce821d59622de77c602677303c9d7625
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-20 10:17:23 +00:00
Jarek Kobus
a09bedf1cb Conform to Creator's include style
Get rid of <QtModule/qclass.h> style and use <QClass> directly,
like in all other places in Creator. Remove some unneeded
declarations.

Change-Id: I1b5630850c570e5d86df01a341f7352bc1971e48
Reviewed-by: hjk <hjk@qt.io>
2021-08-19 15:59:03 +00:00
Jarek Kobus
9966cc4bcc Start and stop the process launcher in tst_qtcprocess
Change-Id: Ib28450d10c699abe3964f8bef2ff24baae0074f7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-19 07:44:48 +00:00
Jarek Kobus
a7e8ddd725 Add some more comments
Add some developer comments explaining which method
is designed to be called from a certain thread.
Add also some comments about in which thread
certain QObjects live in.

Change-Id: I38b10216cc29f8a86fd784e588e913407f0fb776
Reviewed-by: hjk <hjk@qt.io>
2021-08-18 10:24:18 +00:00
Jarek Kobus
f7cf48bc28 Refactor process launcher
Move launcher process into a separate thread.
Implement blocking API by using wait condition
on the caller's side. Replay all collected
signals from the launcher's thread when leaving
waitingFor* state. In case we were not waiting
for anything deliver the signals asynchronously
from launcher's thread to the caller's thread.

Change-Id: Id44fe5f7ceaac407004984a1dfb6ea65f197d297
Reviewed-by: hjk <hjk@qt.io>
2021-07-16 07:52:58 +00:00
Jarek Kobus
58d00f37d4 Initial import of processlauncher copy from qbs project
Change-Id: I9d646dd1a820e4e69c808998d9f12ff2f5dabe6d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-07-08 12:12:10 +00:00