And implement it for the direct access docker case.
Change-Id: I5c91402630a5b010fdbcaab96c435f66a36f2e3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.
At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.
Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This patch needs to be applied together with the parent change.
There are 3 basic cases:
1. The user doesn't write anything to the write channel:
You don't need to call closeWriteChannel manually anymore.
By default the QtcProcess you create is in ProcessMode::Reader mode.
Internally it opens the process in ReadOnly mode and
closes the write channel just after starting.
2. The user writes some initial data (after being started)
and then closes the write channel:
All what is needed now it to set the write data
(QtcProcess::setWriteData) before calling start.
You also use the default ProcessMode::Reader mode.
Internally it opens the process in ReadWrite mode
and writes the writeData asynchonously when the process
already started. After writing the data it closes the
write channel automatically.
3. The user writes the data also after calling start.
All you need now is to create a process with
ProcessMode::Writer mode. In this mode the write
channel is not closed.
Internally it opens the process in ReadWrite mode
as some writers also read the data from the process.
All the code base is adapted here to the above rules.
Change-Id: Id103019d1d71a3012fd1eade226fe96b9aaa48c2
Reviewed-by: hjk <hjk@qt.io>
If there is no filter accept all instead of nothing.
Fixes e.g. ABI detection on docker image running
on Windows.
Change-Id: I17588f71018952b1087b5b8f700b6c158bf5b89d
Reviewed-by: hjk <hjk@qt.io>
And implement it locally and for docker.
Change-Id: I362f4cae95560836d9300473a286429eb4569329
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Provide way to clean QtcProcess environment which is needed as
e.g. toolchains, build tools, and debugger otherwise run
inside a wrong environment when using docker exec for the
respective process calls.
Change-Id: Ia6de1c90f2134fce260d293a2f6937ab3cfca2ce
Reviewed-by: hjk <hjk@qt.io>
Currently only used inside DockerDevice and it fails to build
when building sdktool with old Qt which is still necessary.
Change-Id: Ic48414f0cb8f0955e7561f7484e3ea1c726c816a
Reviewed-by: hjk <hjk@qt.io>
If there is no local access for the docker container we
create lots of explicit docker calls which take time
to be created and executed as this always fires up
another connection to the container.
Currently we expect the container to have a shell and
we already have it in place, so re-use the shell to
execute at least a couple of commands.
This heavily increases the performance of these commands.
Change-Id: Ic778a250a2b3b8c5ce2a8dd6b7fa8c532bc6d4bf
Reviewed-by: hjk <hjk@qt.io>
Small positive exit codes can result for different reasons.
Real docker issues result in small negative exit codes.
Change-Id: Ibd800b7806f3014ffccd39638c06b2dd93e8a5a1
Reviewed-by: hjk <hjk@qt.io>
Avoid calling the docker daemon again and again
if it is currently not running.
Change-Id: I17afa2eca098589bd362149d18e090252ef83f6e
Reviewed-by: hjk <hjk@qt.io>
- Use more uniform messages for the different kinds of items
- Remove all auto-detected items
Change-Id: I0b0df0bca484337039432b163bd8e19593b1cd22
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This is not supported and anything related to accessing
merged channels on Windows fails due to the need of
using wsl or a named pipe.
On the downside this may crash QC in cases where e.g.
Qt detection still tries to handle qmake as if running
locally, but at the current state this seems to no more
happen automatically (e.g. when using the auto detection).
Change-Id: I983cad66c1210de38a33e26958857a5dcaeef767
Reviewed-by: hjk <hjk@qt.io>
It's also used for manually triggered detection nowadays and
closer in naming to what kit, debugger and kit have.
Change-Id: I68705aafe297d61afc8b5918650e47353d3ccce1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
also renamed the qmlscene* qmlRuntime*
Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This make the code better re-usable from other places that
wish to put a cmake version into a new kit.
Change-Id: I1ef7770a7f8efa36e88b2f3862b011fecd38de98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Mark detected debuggers as such and give them some bonus to match,
overriding other hacks.
Change-Id: Iaf4d88fa22dd50e68124b61087d4c742f7a56d0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In general, the more specific isReadableFile etc are preferred, but for
porting a 1:1 match to QFileInfo functionality is helpful.
Change-Id: I5b575ca9a5053f13f63c0fbe0e3dcc222494280f
Reviewed-by: David Schulz <david.schulz@qt.io>
Some tr functions missing, some places where we need full qualification
because lupdate gets confused with namespaces.
Change-Id: Ic1d6ef3b31960dda02bc0788a255857117acdca9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Also, change the size limit to take a qint64. Contrary to e.g.
Q(6)Hash::size() there is a realistic chance that 31 bits are not
enough.
Change-Id: Idbe6e765a5cac4336b3d64a8e0adb14966fd18a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and rename it to searchOnDevice().
We need to handle additional search directories anyways, so its more uniform
to always pass a list all of them.
Change-Id: I46c7860b51d11c26db58045ff3ab922148af021f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Most of it is independent of the docker device as such, this should be
centralized somehow. This here is a first step.
Change-Id: If32063559a4c7c6c3cecf1973e1ef1f634e5f8f4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Even though the file is accessible in the local path, not mapping
back loses its relation do the docker container used for further
decisions like FilePath::needsDevice().
Change-Id: I7c693d604364b9e42bf7310c072be0f33d149626
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
And implement it for the docker device.
This replaces the previous unused and not really implemented
FilePath::resolveSymLinkTarget.
Change-Id: I9dcb4f8276dbb88b21959276da0d50135742fba0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>