Commit Graph

173 Commits

Author SHA1 Message Date
Eike Ziller
8259df00d0 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/mcusupport/mcupackage.cpp
	src/plugins/mcusupport/mcusupportoptions.cpp
	src/plugins/mcusupport/mcusupportoptions.h
	src/plugins/mcusupport/mcusupportoptionspage.cpp
	src/plugins/mcusupport/mcusupportplugin.cpp
	src/plugins/mcusupport/mcusupportsdk.cpp

Change-Id: Ib423e9f23877176f01b188104b0a179ed32c4770
2022-02-22 14:06:41 +01:00
Jarek Kobus
48960b5cfc QtcProcess: Extract QtcProcess specific enums into separate header
Change-Id: Ib3498f189000fd8f5501130c0d280b0f5ae83849
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-02-18 10:51:55 +00:00
Leena Miettinen
eb8d84f6de Docker: Fix UI text caps and punctuation
Task-number: QTCREATORBUG-27055
Change-Id: I6b5c2bbd36e34d4444b798e2e5040bff674ad02a
Reviewed-by: hjk <hjk@qt.io>
2022-02-17 12:09:23 +00:00
Eike Ziller
49ecd64b9c Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/docker/dockerdevice.cpp
	src/plugins/mcusupport/mcupackage.cpp
	src/plugins/mcusupport/mcupackage.h
	src/plugins/mcusupport/mcusupportoptions.cpp
	src/plugins/mcusupport/mcusupportoptions.h
	src/plugins/mcusupport/mcusupportoptionspage.cpp
	src/plugins/mcusupport/mcusupportsdk.cpp
	src/plugins/mcusupport/mcusupportsdk.h

Change-Id: I8c8f5953a21729ba9178dbc44ed613eed131a0c8
2022-02-16 10:59:04 +01:00
hjk
91fcec3d79 Docker: Remove unused DOCKER_RUNFLAGS
Change-Id: I42ba6ca949d7397be73b2ede6d9380f6f93e7434
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-15 12:21:12 +00:00
hjk
c87a066087 Docker: Fix endless ping-pong between runnProcess and start
Amends 95c9579c58.

Change-Id: Icee747a578e000a0477dc314500687316f4ecd6b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-15 09:31:57 +00:00
hjk
f7a585fad9 FileUtils: Add some helper to handle ls-style output
Unix-ish device implementations would otherwise repeat that code.

Change-Id: I1265fe1a69e55409ab2875d0b6f6113ec92edd79
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-15 08:57:19 +00:00
hjk
95c9579c58 ProjectExplorer: Normalize DeviceProcess::start() signature
Change-Id: I2915be34d4a1eed64567874dcf0263b7583cc142
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-14 15:10:12 +00:00
Eike Ziller
45b5341cd9 Merge remote-tracking branch 'origin/7.0'
Change-Id: Iab67dffe64bee391bd921ed8832bb17b36ec861b
2022-02-14 09:58:04 +01:00
hjk
e2cb64471a Utils: Move QtcProcess constructor setup data to shared setup data
This includes replacing DeviceProcess terminal handling with base
member.

Change-Id: Id1541bfce33c71dddc71b4816ad0b174dce3879c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-11 17:33:48 +00:00
Christian Kandeler
fde7b90ee9 Fix some warnings
Change-Id: I2991f0ab84b26c93c0dbe2ec79f7638d299e3d39
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-11 12:14:27 +00:00
Christian Stenger
4c7a5b07c1 Docker: Fix and enable open shell in container
So far this had been restricted to Unix, but it works on
all platforms.

Change-Id: I578623341c906eca80a0dbc5fcc9b15e820d3597
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-11 08:57:52 +00:00
hjk
3bdab2f05e Docker: Simplify and fix "Open Shell in Container"
Change-Id: Icce72712a006f524b8a8328904d89f2b0e2b8a3d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 10:02:33 +00:00
hjk
0b131fae72 Docker: Use repo + tag for image identification
Makes configurations a bit better exchangable (sdktool...).

Change-Id: Ia566a516afea2205c973527e02ce5664634ebbdc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 15:02:25 +00:00
hjk
cfbf083089 Docker: Allow use of local access only as compile time switch
That's sufficient for testing/working on the feature and removes
accidental use by users.

Change-Id: Ic0fb3076f769ab9ab7ff74973f0129402db7f142
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 12:23:54 +00:00
hjk
75ef67615d ProjectExplorer: Remove IDeviceFactory::setCanCreate
That's implicit now by using setCreator()

The Android case looks odd as this is (and was) effectively static
information at startup. This will be addressed in a follow-up patch,
for now keep it functionally equivalent.

Change-Id: I4e6082f88dcd21379186340189acb581caef172a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 12:10:07 +00:00
hjk
9ff851a204 Docker/RL: Be more lazy with output decoding
Conversion to QString is often not needed.

Change-Id: I22fe0ec89419f784d2fe02245094fbe6da719f75
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 08:35:48 +00:00
hjk
7c128638ea Docker/Linux: Fix outputForRunInShell
... in case there is embedded NUL in the output.

Change-Id: Ic899bcf8d01cceed4ea6e16d4991fb80b7ac70ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 08:35:21 +00:00
Christian Stenger
eb2fc79a3f Docker: Fix handling of ui applications on macOS
Using graphical applications inside a docker image needs
the same handling on macOS as on Windows.

Change-Id: Ic9fb6a8330164f7acdaab4146a70e7e308192f4e
Reviewed-by: hjk <hjk@qt.io>
2022-02-03 14:13:22 +00:00
hjk
2be0fc2537 ProjectExplorer: Use CommandLine instead of Runnable
Lighter and sufficient for all use cases.

Change-Id: Ic6749a1a9e3e6906ce71b87b237cc94a6d8a4cbf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-03 10:15:44 +00:00
hjk
9ec997b376 ProjectExplorer: Base DeviceProcess on QtcProcess
... instead of having a member.

Change-Id: I75e8d7600eb17c7528fe9525d2e1aa871b282ad9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-31 07:44:24 +00:00
hjk
330dfa7e84 ProjectExplorer: Use a QtcProcess member in DeviceProcess
All derived class have one one way or the other. Mid-term plan
would be to actually base DeviceProcess on QtcProcess and to
potentially dissolve it completely later.

Change-Id: Ie3bc48dcdc30bc2da5557ad26babf6959a3efa04
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-31 07:44:16 +00:00
Christian Stenger
5887d13d46 Docker: Fix crash while removing auto detected toolchains
Change-Id: Id0cf4346b97f54247ad81ae0d93a42935dca8a0f
Reviewed-by: hjk <hjk@qt.io>
2022-01-28 07:09:24 +00:00
Christian Stenger
95595db7d1 Docker: Drop handling of critical pattern again
Drop lately introduced handling of critical pattern and
just drop the critical pattern instead for now.
Brings back gdb when auto detecting debuggers.
Amends 22dd26bc76 and 181e74ebc3.

Change-Id: Icde46e9bfa82d5cf1252e46f1e0a84b638927473
Reviewed-by: hjk <hjk@qt.io>
2022-01-27 10:53:48 +00:00
hjk
4e34921451 ProjectExplorer: Rename DeviceProcess::error to errorOccured
That's what QProcess favors nowadays and QtcProcess uses.

Change-Id: Ie9492ae62f23e35a8a70f72196c3d1b6bc50cbdc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-27 10:12:38 +00:00
hjk
0813a08b1e Docker: Re-do auto-detection of Qt
This now properly iterates into subdirectories when selecting the
"Search in selected directories" option for the auto-detection
so it works with Boot2Qt images that don't put Qt in PATH, but
somewhere under /opt

Change-Id: Ifc337c0169d4b98b4e894a5d7e8286f171e0c569
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-27 09:08:33 +00:00
Christian Stenger
181e74ebc3 Docker: Fix iterateWithFind()
Amends 22dd26bc76.

Change-Id: I0be8d8236795a9e93ab93f89df56fd14e378e6e6
Reviewed-by: hjk <hjk@qt.io>
2022-01-27 08:24:08 +00:00
hjk
2b6f26dee2 ProjectExplorer: Use a lambda for DeviceFactory::create()
Somewhat slimmer interface on the user code side and follows
existing practice.

Change-Id: I20ed8f5a00591265d32ea9ce93e1f1bbc76d2437
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-26 14:51:09 +00:00
hjk
1fc83d2a56 Utils: Wrap various file system iteration flags and filters
... into a single class.

This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.

Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-26 13:13:41 +00:00
Christian Stenger
01d199ea82 Docker: Register only matching toolchains
Change-Id: I0d5b0f9686b4a8256167fc4f1b2b464885590e20
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 15:09:28 +00:00
hjk
a48a96e05c QtSupport: Introduce a type alias for QList<BaseQtVersion *>
Change-Id: I96b0eccc04da2f4a1a4e5ea9bdceb91b3fa3d724
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 14:38:20 +00:00
Christian Stenger
22dd26bc76 Docker: Improve iterateWithFind
Handle critical file pattern after we got the results from find
to avoid finding to many false positives.
File patterns like "lldb-[1-9]*" end up using "lldb-?*" inside
find and will basically find anything starting with "lldb-"
which includes lots of additional lldb tools that cannot be
used as debugger at all and slows down the detection unnecessarily.

Change-Id: I0c816ae6b6e472b710ffede532c97c55a9d698fa
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 13:10:45 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
hjk
e695109078 ProjectExplorer: Make ToolchainManager::toolchains() overloads explicit
Saves a few cycles for the plain access.

Also sprinkle a few 'const'.

Change-Id: I238dfd9352ee39caa3aa48cd04a9f1cf827b029e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-20 06:13:09 +00:00
Jarek Kobus
d6f56254d1 Get rid of QtcProcess::workingDirectory() overload
Adapt all callers' code so that it passes the FilePath
instead of QString. As a consequence introduce
TemporaryDirectory::masterDirectoryFilePath() and use
it where easily possible.

Change-Id: I14564949b3b916921e32a2957c84c03d1da43af2
Reviewed-by: hjk <hjk@qt.io>
2022-01-18 17:18:34 +00:00
hjk
f9c97d23c7 Utils: Add optional recursion for file system iteration
Change-Id: Icded897b129aebd7132376cff55717e16dffc040
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-18 11:52:29 +00:00
hjk
5cfe69b049 ProjectExplorer: Use a struct for toolchain autodetection parameters
Also, make some functions const and use an alias for QList<ToolChain *>.

Change-Id: I6a1cbcb79bfaa9d252c4b69e00aa93e5d0dabe2f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-18 11:25:34 +00:00
hjk
d4b2f18c5e Docker: Split tryCreateLocalFileAccess() function
... into a parts updating the container access (i.e. shell process)
and the potential local file system access on Linux.

Change-Id: I0d3e7d9e859f15f9e22182fbe7ae1188b0c9ff57
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-12 06:51:54 +00:00
hjk
3342d4477c Docker: Switch Linux file handling to docker --exec by default
Also on Linux, where there's actually a choice.

It's slower, but less fragile when it comes to user ids
and/or file system permissions.

Change-Id: I811612fcff65fad50be18bed21150f6ca7fae93c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-11 15:00:08 +00:00
hjk
20d19aa5bf RemoteLinux: Implement some of the remote file API
Implementation of remote file API for correct FilePath
work with RemoteLinux.
Added tests for this functionality

Run ssh shell in separate thread.
The linux device instance keeps its own thread for running
SshRemoteProcess. In this way all calls to filepath
interface of linux device coming from different threads
are executed in one thread (SshRemoteProcess is reentrant,
but not thread safe). The redirection to the device thread
is done by invoking SshRemoteProcess' methods through
BlockingQueuedConnection.

Done-by: Artem Sokolovskii
Change-Id: Id8756738d3a4597f175c8ef000c148d0c8536eeb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-04 11:16:14 +00:00
hjk
7677dc4ba0 Utils: Use callbacks when iterating remote file systems
This will make recursion easier and has the potential to avoid creating
big intermediate lists.

Change-Id: I44d42925dae9c0048338c7d0a6aa26606f314c28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-17 06:57:46 +00:00
hjk
16c25d99c8 Docker: Provide a means to select search paths for auto-detection
A combobox in the device dialog to select between the (docker image's)
system path and a semicolon-separated set of user defined paths.

Use it for cmake and gdb detection; qmake and toolchains currently missing.

Change-Id: I3c478ca914a1bf02dcb69ebcb9ea6e358d24aaf9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-14 11:15:21 +00:00
David Schulz
442ce3e019 Docker: prevent endless loop after shell stopped
Change-Id: Id2ee7193ab7b646e85f2a84f673cb3022fec4dba
Reviewed-by: hjk <hjk@qt.io>
2021-12-14 09:27:10 +00:00
hjk
353314a777 Docker: Add a way to force file access via docker itself
Use a QTC_DOCKER_DENY_LOCAL_ACCESS environment variable.

On Linux we usually try to access the container file system directly
as part of the host file system. In some cases this fails, and in some
cases we might want to disable it for testing purposes.

Change-Id: Iebc8e7fbbc968cd6dfbc6da2d08d71dd53bfa097
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-14 07:45:21 +00:00
Christian Stenger
420b5bf541 Docker: Start making it work on macOS
Change-Id: I450c7b19de1694da456e16e95b698c1476623a97
Reviewed-by: hjk <hjk@qt.io>
2021-12-09 10:16:30 +00:00
hjk
e64ce914f9 Utils/Ssh: Move SshRemoteProces::isRunning() to QtcProcess base
... and use it on a few places.

Change-Id: Id2cea709e355a46821a720e593740ac032888ced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-12-06 13:44:23 +00:00
Leena Miettinen
6739266a8e Docker: Fix UI text
Task-number: QTCREATORBUG-26458
Change-Id: I6dcdbf199259259416e4bfb11c3488f8594b0c0b
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 15:18:14 +00:00
David Schulz
12bc192422 Docker: mount python dumpers to device
Change-Id: Ic0d67b4a18247439f5797a0dcf74df945ef6f61e
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 08:56:16 +00:00
David Schulz
d84de31384 Docker: Map command executables to device path
Change-Id: Ia8edf686a546f57b42ed0141e2986eded6f96ec1
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 07:33:03 +00:00
David Schulz
6e6753a064 Docker: use mapped working directory for remote processes
Change-Id: Ibbc89f963ca42510cf072b242a5cdfdc0d4c23ff
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 09:35:57 +00:00