Commit Graph

189 Commits

Author SHA1 Message Date
Marcus Tillmanns
eb696b4f85 docker: Show error when docker application cannot be found/started
Change-Id: I752ec9fe7bf0db5d26828a175363ef08c5c9bf02
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 15:29:00 +00:00
Christian Kandeler
929e40a9f2 Fix some warnings
Change-Id: Idc12465aa6a3a3d158f17961f902578ca16d0d7b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-01 08:23:25 +00:00
Eike Ziller
b6f679d777 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/webassembly/webassemblytoolchain.cpp

Change-Id: Ia75c783e3ecab1f97de2b5c73a0979c49da82009
2022-03-18 16:07:51 +01:00
hjk
a23c4ce014 Docker: Fix searching compilers in custom directories
Previously, detection (mostly) only used path.

Change-Id: If382205c2ff39cabfe21953e877e152dc952a84c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-18 08:21:51 +00:00
Eike Ziller
9fd2a059f6 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/android/androiddevice.cpp
	src/plugins/docker/dockerdevice.cpp

Change-Id: Id16ba0d9993c9f608242622aceae0a2a6691e05e
2022-03-17 08:48:28 +01:00
hjk
cc51e32b2d Docker: Add a warning when the mount path list is empty
The common use case shares project sources between host and docker
container, in that case, not sharing anything will not be useful.

Change-Id: I44b12089579ead008023caf5134c613fc145b8c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-16 08:53:39 +00:00
Christian Stenger
cd7a0bbef5 Docker: Inform user early if adding device fails
When retrieving the list of images there is no indicator when
something failed, so add one.

Change-Id: I2e0cde4ba33527e1b2abeecb5b3a06507dabf472
Reviewed-by: hjk <hjk@qt.io>
2022-03-15 05:43:02 +00:00
Eike Ziller
3f0c8b2149 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I1ce9876150239751a1187bc0c4b8fc5fef1ab40d
2022-03-14 14:02:14 +01:00
hjk
2eca1c0ffc Docker: Add history to "Search in Selected Directories"
Also set focus to the line edit when this item gets selected,
and remove the arbitrary /usr/bin;/opt default.

Slightly better UX.

Change-Id: Icdc4e81d6cebd7aed1dd4999c4007a60c8ea53a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-14 12:05:27 +00:00
hjk
d439a7a25f ProjectExplorer: Dissolve DeviceProcess
Move remaining device member to subclasses where needed.

Change-Id: I1a872315579c7f6529e8937d57511a9e99e06926
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-02 15:36:02 +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
hjk
fc3b9b5ab3 Docker: Remove traces of direct file access
Change-Id: Id0c11a584a5b75626bb04023893d76fbe2216ade
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-28 13:44:48 +00:00
Jarek Kobus
8af62eb256 DeviceProcess: Minimize the usage of DeviceProcess
DeviceProcess doesn't provide any public API, so
replace all usages of it with QtcProcess.
Keep using DeviceProcess only for reimplementations.

Change-Id: I35a14251a81dd0dde426f56ca2e809b527cc863c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-28 13:10:42 +00:00
Eike Ziller
d295d16ab5 Merge remote-tracking branch 'origin/7.0'
Change-Id: I809383e6c060701a2751197a8bf16add92bfaf0d
2022-02-28 09:21:18 +01:00
hjk
32590af686 Docker: Accept more ways to identify a docker FilePath
Accept (percent-encoded) repo:tag, the image id or the device id as
host() part of a docker FilePath.

Task-number: QTCREATORBUG-26856
Change-Id: I27d374be31d54bab77d129e19884b7f7fd93daa0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-25 15:33:56 +00:00
hjk
4af9842a51 Docker: Remove local file access
I gave up on the idea, and even leaving the dead code in only
complicates the codebase.

Change-Id: If144c69adc8e9aa9b2c88050909e7a20b7218f18
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-23 10:29:02 +00:00
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