Fix crash while automatically restoring kits during startup.
Change packages container to set to avoid duplicates.
Use RAII for McuSdkRepository.
Change-Id: I4b3f4156f0bc770c8a5ea8a171b1f22f6ffb8f96
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
New/legacy implementation will be chosen based on contents
of input json file.
Change-Id: I989fa667c43123f831cc77320684413cab7652df
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Before QUL 2.0, path for tools used during compilation were passed as
environment variables. Starting with 2.0, they are passed as CMake
configuration arguments. So, in order to validate a kit, the
dependencies aspect now needs to validate the CMake configuration
aspects. As 1.9 will no longer be supported, starting with this version
of Qt Creator, the environment checking code is removed.
Change-Id: I24991063dcdf9b455bd8f20226756dc2b3637f6d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
rename 'type' to 'toolChainType' in McuToolChainPackage
'addToPath' and 'relativePath' set in McuPackage constructor
put McuToolChainPackage methods together in same source file
'detectionPath' type changed from QString to FilePath
renamed boolean getters
Task-number: QTCREATORBUG-26897
Change-Id: If59c299901a169d08efa8f39614ef7c6d48d44ed
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
It was part of McuPackage, and only used by the SDK instance.
Task-number: QTCREATORBUG-27093
Change-Id: I9d9eaac621e9997129c227fae3ac88b502ba4340
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Several independent classes were mashed together in mcusupportoptions.cpp
This patch moves McuToolChainPackage together with McuPackage,
McuTarget to its own header+source pair, and
McuKitManager to its own header+source pair.
Task-number: QTCREATORBUG-26890
Change-Id: I0b51da4e1cae5a976201dffd290a665eaa318b33
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Introduced Package interface for mocking purposes.
Made some functions visible in headers for testing.
Added basic test skeleton for mcu plugin.
run cmd: `qtcreator -test McuSupport`
Change-Id: I1011d49052bd8c894da393d8a285b241682f1f94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In proactive, the color depth was never changed after setCMakeOptions
was called. This change makes it clear that it is also not intended to
be changed: a board does not suddenly change color depth, and for a new
board configuration a new target is created.
Change-Id: Ie5b99726d833efcdf129655b8e70120a033914e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
And make more use of switch statements without a default case, so each
type is handled explicitly. (Ok, there is a default, but that is
Q_UNREACHABLE).
Change-Id: I30ccc447e55a5aeebebe1a9879ea3136545f5e68
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
This implies that those properties are now passed into the constructor,
and their setters are removed.
Change-Id: I34b4d9d7450897e6a7a72b8edaffdc05961546d1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
Also move `packagePathFromSettings` so it can be used from multiple
places. This function will probably move into a separate utility file
in future changes.
Change-Id: I208a5a7bc8aa689829178809a1f4053a961d93be
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Also, make some functions const and use an alias for QList<ToolChain *>.
Change-Id: I6a1cbcb79bfaa9d252c4b69e00aa93e5d0dabe2f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Autodetection of IAR compiler relies on Windows Registry.
On Linux, without registry we can't autodetect it.
This fallback accepts the user-entered compiler path.
The McuSupport plugin already implements a basic check
that the expected compiler binary is in the given path.
Task-number: QTCREATORBUG-26753
Change-Id: I43ce68f4bc075e60a2f4cd0d906f8389dc0fdfd7
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is a quick fix for the current situation. Proper
support will need a rewrite of part of the plugin code.
QtQuickUltralite SDK 1.x relies on environment variables
for the dependencies. SDK 2.x uses CMake variables for that purpose.
Some of the variables have been renamed, others grouped together.
Here a mapping between those is hardcoded as an urgent solution.
A proper implementation should make the plugin independent of
the existence or lack of specific environment variables. Also,
all the hardcoded information needs to be moved to the json kit
files in the SDK. Otherwise, compatibility breaks between versions
every time the built-in assumptions relating to that information change.
Task-number: UL-4396
Change-Id: I7f40a694a773881f20b29bae9d02c7c1c8bd747b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Prevent non-portable dir delimiters from getting into a FilePath.
Change-Id: I78e4a98e03ffe95e3cef70c9c499af28fa33c25c
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Some places where ghs-specific checks were done, were not modified to
do the same for ghs-arm.
Change-Id: I484f98209188e4c160a13248ca3c3f046b342b22
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Using Ninja not all modified files will be compiled in an incremental
build.
Fixes: UL-4247
Change-Id: I0bdb1e611e54ea6674ccae4d23391ac86f0960b8
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Currently unused, will be useful to detect toolchains in docker
containers.
Change-Id: I0fd7643969ab02c05839332a436147ffb242635d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Saves some code on the user side.
Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Enables re-using existing functionality.
The "Make mutable" functionality is still oddly placed. I doubt people
find and use it actively.
Change-Id: Ic6aae17e3a7df093f0f5f234f1e6e1afc196a087
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Kits are marked as 'manual', so that user has individual control of each one.
'Remove' button replaced with 'Update' button for manual update.
Task-number: QTCREATORBUG-25259
Change-Id: Iadf5f2da3ef7bee7fb051516ffda7fcefe8b56d8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
QUL does not have separate QML import paths, but (re-)uses the include
paths for this purpose. Support this behavior by adding all include
paths to the QML import paths before handing the project information off
to the QML code model.
Change-Id: Ic2e39ab69ac27776f5070b7b8b7c66d53a83210b
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Although QUL has merged the QML import paths and the include paths, the
convention for C/C++ is to have the headers for a project under a
subdirectory of the include path, and do imports relative to the include
path. For example:
#include <qul/SomeHeader.h>
The QML code model doesn't know about this convention, so for the kit
has to supply an extra QML import path for this case.
Change-Id: I82d4375dd8a1f510180f81b011a715dee8c10d60
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>