2.1 is released hence uses legacy creation of packages.
McuSupport refactoring is part of QtMCU 2.2.
Will be finished before qtc 8.
It will be documented before 2.2 and qtcreator 8.
Change-Id: Iab0e85f27186149cb73456983d15b30401d99233
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Most of the code is unit tests for toolchain creation.
Change-Id: I955ba49db38acf6f9e35d366280b710ea0466655
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
Starting with Qt For MCUs 2.0, environment variables are not
used to track dependencies any more, but cmake variables are.
Due to time constraints, we implemented a env-to-cmake mapper
to cover that gap at the moment. This patch removes that hack
and implements tracking dependencies through cmake variables.
Task-number: QTCREATORBUG-26904
Change-Id: Id8553a764d212d9b12e4adc54fc56233bfeb9a5b
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>
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>
... 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>
On 1.x SDKs, if the desktop kit description is missing
we still create a desktop target from a library that is
distributed with the SDK, through a fallback function.
On 2.x SDKs, the library has been renamed, but we don't
want to create the fallback. The kit description is
mandatory. Therefore, we shouldn't show the error
for failed fallback.
Task-number: UL-5092
Change-Id: I469269b2286d33f0f13335eef09ea2467c59be2e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If QtCreator is installed via the Qt Installer, sensible defaults are
provided at installation time. For not provided software, $HOME
is not a useful default. Leaving the field empty signals the
user that they need to provide one manually, more clearly than
providing an invalid path.
Task-number: UL-4939
Change-Id: I8ef79e563366ebdbea53df8183a1eca82bd7be4a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
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>
The library filename has changed in recent versions of the
SDK, which was causing false negatives.
Fixes: QTCREATORBUG-25469
Change-Id: Ie98c75a57efc5384262dbfd17f729b34cdd5f577
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
- added IAR toolchain factory similar to ARM GCC one
- extended kitName with used compiler name
- added Unsupported toolchain type to fix crash after creating kit with not
recognized toolchainID
Fixes: QTCREATORBUG-24898
Change-Id: I28b8376ca4bc88d3d75e17bd242ac49f0ee09845
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <christiaan.janssen@qt.io>
Starting from Qul 1.5 json kit file will be shipped for desktop platform.
This change is backward compatible with previous Qul version - if no
desktop specific json file is found a legacy code is executed.
This change removes "desktop" toolchain, instead "msvc" and "gcc"
toolchains are introduced.
Additional parameter was introduced to the josn kit file: "platformName"
which enables using different strings in kit name and in QUL_PLATFORM
cmake variable.
Change-Id: Ie0a212aaad47a8033e9a81467f60a23c2bc19a51
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>