Commit Graph

95 Commits

Author SHA1 Message Date
Erik Verbruggen
2361f26732 Support merged QML import paths with header paths
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>
2021-03-18 14:33:55 +00:00
Christiaan Janssen
edba0ca838 McuSupport: track if kit dependencies go missing
Task-number: QTCREATORBUG-25262
Change-Id: Icf95a418216ae94fcfc76784a10eb23e403f3d52
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-15 07:25:17 +00:00
Erik Verbruggen
9d90efee8b Add QML import path supplied by the kit
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>
2021-03-10 14:33:06 +00:00
Christiaan Janssen
b5781e6028 McuSupport: Improvements with version detection
Task-number: QTCREATORBUG-25261
Change-Id: I1b378eb4a4d132b64e4c36e0a0cdafd402570785
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-09 08:31:16 +00:00
Christiaan Janssen
3e08210998 McuSupport: Detect dependency versions when building MCU kits
Task-number: QTCREATORBUG-25261
Change-Id: I79d24aa2e26a3f647bd2251c0407c7d09eea73b3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-02 14:36:40 +00:00
Erik Verbruggen
7dc82b1af9 MCU: Do not add fall-back path for QUL kits
Fixes: UL-3609
Change-Id: I9912c7476f3b45346835d60be61fed7399046162
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-16 10:33:52 +00:00
Erik Verbruggen
3b1bc1d053 Add Qt for MCUs examples to the welcome page
Fixes: QTCREATORBUG-25320
Change-Id: Ic770e55f41b50d384f9964cabfa7ef031dcacc13
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-10 13:14:55 +00:00
Christiaan Janssen
4b6f1c1366 McuSupport: Display errors when generating kits automatically
Fixes: QTCREATORBUG-25260
Change-Id: I5e45a56d08920886b2f654a1c98a7451e1c9dc3f
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-10 09:29:56 +00:00
Christiaan Janssen
5b7a3fba27 McuSupport: Display errors when configuring Qt for MCUs SDK
Fixes: QTCREATORBUG-25258
Change-Id: I6f445bddb51f3bc1850793966f049c4b7ce7889f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2021-02-09 13:10:07 +00:00
Orgad Shaneh
dad2b3d84b Merge remote-tracking branch 'origin/4.14'
Change-Id: I7d55c01489dfcdd26fcf3ced9f26539a09073e8c
2021-02-08 12:56:36 +02:00
Alessandro Portale
c25afb1b59 McuSupport: Remove explicit appointment of Jom as CMAKE_MAKE_PROGRAM
Detecting the presence of Jom, setting CMAKE_MAKE_PROGRAM to it and
choosing "NMake Makefiles JOM" as CMake generator was implemented in a
time where the Qt SDK did not yet ship ninja.

By now, ninja is shipped and it *should* be automatically installed as
dependency of Qt for MCUs. Qt Creator will by default prefer ninja as
generator/buildtool if it is installed.

Task-number: QTMCU-18
Change-Id: Ia83ac3a454b90bb5b5b69ddefb3fbb8f23fa15c9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-04 15:27:58 +00:00
Eike Ziller
b54ab67705 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/mcusupport/mcusupportoptions.cpp
	src/plugins/qmldesigner/assetexporterplugin/componentexporter.cpp

Change-Id: I337d1b86f54ad4433a3ed0d73e2011654ef6b950
2021-02-02 12:20:00 +01:00
Christiaan Janssen
70670cad23 McuSupport: Do not add clang to PATH when creating a new kit (1.7+)
Fixes: UL-3591
Change-Id: I7ec618aeb28bb8e79733267056d5c4c0ff7ba382
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-02 07:34:52 +00:00
Eike Ziller
1283b15117 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	doc/qtdesignstudio/examples/loginui1/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui2/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui3/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui4/qtquickcontrols2.conf
	share/qtcreator/debugger/dumper.py
	share/qtcreator/debugger/qttypes.py

Change-Id: Id44a67cdeeb0889ff96eddcdf409d20ca7cbdd0b
2020-12-10 13:02:02 +01:00
Alessandro Portale
df482e27b7 McuSupport: Identify kits also by toolchain
Fixes: QTCREATORBUG-25052
Fixes: QTCREATORBUG-25053
Change-Id: I87e51fbdb8d01cb564574f996bdfb51420f28584
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-08 15:06:02 +00:00
Eike Ziller
3f0e7bcbe1 Merge remote-tracking branch 'origin/4.14'
Change-Id: I9d1931b7862f4541ac7a064ff987128afd835cbe
2020-12-07 12:29:44 +01:00
Alessandro Portale
79c4df1ea1 McuSupport: Register all .qch files in the SDK's docs/ directory
Instead of having a hard-coded list of .qch file names to register,
register all .qch files that are present in the Qt for MCUs SDK's docs/
directory.

Turning docs registration into a self-maintaining feature.

Fixes: QTCREATORBUG-25043
Change-Id: Idc7afb78b256bcbb3e8cd7f80fab6a356eb47aa3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-04 17:58:38 +00:00
Eike Ziller
41b73594ad Add API for saving settings with default value
We should never actually write default values into the settings, because

- if the default value changes in a later Qt Creator version, the new
  default should automatically take effect if the user didn't change the
  value
- it senselessly grows the settings file

Add a QtcSettings class that extends QSettings by a
"setValueWithDefault" method, which does not write default values to the
settings, and actually removes the settingskey if the user switches back
to the default.

Use it at the places where we already do this manually.

Task-number: QTCREATORBUG-24762
Change-Id: Ia76414cb21e8521f3aeed1e37b43ae4fb3393ea3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-04 08:25:17 +00:00
Eike Ziller
8245523653 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/designer/cpp/formclasswizard.h
	src/plugins/designer/cpp/formclasswizarddialog.h

Change-Id: I9f9d166e1a9249022305503f9cbe571136c2a2b1
2020-11-25 11:25:34 +01:00
Eike Ziller
f534624fce Fix build with newest Qt 6
No implicit casts from QString to QFileInfo anymore, and a few more
QChar(int) fixes.

Task-number: QTCREATORBUG-24098
Change-Id: I3326fc0701a9259c7bdd2d8c3025de0a4774f8aa
Reviewed-by: hjk <hjk@qt.io>
2020-11-20 15:43:25 +00:00
Dawid Sliwa
3929917ecb McuSupport: Add support for kits with IAR compiler defined
- 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>
2020-11-20 12:50:11 +00:00
Alessandro Portale
871c8e3ffd Don't access static functions via Utils::HostOsInfo instance
Change-Id: Ic45b8f324cb7c6a4691545fc8d668eed69dfeced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-18 22:08:42 +00:00
Christiaan Janssen
9cd5fb927d McuSupport: generate kits automatically on plugin initialization
Fixes: QTCREATORBUG-24354
Change-Id: I26587102bd24d1678707ca1d9160c84149e77c8e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-30 11:07:27 +00:00
Eike Ziller
423ea729f8 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/mcusupport/mcusupportoptions.cpp

Change-Id: I3fd0d0a6a3ff30bb990da3dc0f78e69f9e1247ef
2020-09-23 10:11:44 +02:00
Jacek Nijaki
08541305b6 McuSupport: Add support for desktop backend JSON file
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>
2020-09-22 08:32:00 +00:00
Christian Stenger
c2d49bfa5f Mcu: Fix compile
Amends: 6400aab190

Change-Id: I0c027b4f02f9f1472f3a1b938844e9ffb8c611b0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-17 11:52:41 +00:00
hjk
6400aab190 McuSupport: Some code cosmetics
Namespaces, spacing, connect object guards, ...

Change-Id: I64bcab14f52d990adab938ebcdef535f1c09b061
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-17 10:14:55 +00:00
Alessandro Portale
bbbb7d421b McuSupport: Use platform specific case for referencing "Path" value
... in the build environment of the generated Kit.

Change-Id: Ia0b8f8dba03a9a91c8435a3b2a4a1410f3459da8
Reviewed-by: hjk <hjk@qt.io>
2020-09-01 11:23:54 +00:00
Alessandro Portale
4e1434d51a McuSupport: Grant kits a Qt version on non Windows host
The qul libraries for the Desktop Backend are statically linked against
Qt on Windows. Also, the qul host tools are shipped with the Qt runtime
libraries (on Windows).

Not so on Linux, so a Qt version is required, there.

Change-Id: Id49ed2ef01926abc71291751eae03263317a56d4
Reviewed-by: hjk <hjk@qt.io>
2020-09-01 11:23:48 +00:00
Eike Ziller
2a05186194 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	CMakeLists.txt

Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
2020-08-21 10:08:55 +02:00
Jacek Nijaki
8c227dea1d McuSupport: Update json kit processing to match Qt for MCUs 1.4
FreeRTOS backend is now a separate platform and requires dedicated json
kit file. Starting form Qul 1.4 there is no option to produce BareMetal
and FreeRTOS kits out of one json file.

This change is backward compatible with Qul 1.3.

Change-Id: Ic50b566a7f1a01fad4b00c07e723dfe1343fc2b0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-08-18 14:31:49 +00:00
Federico Guerinoni
cf025f550a McuSupport: Make string translatable
Change-Id: I522700d383cc79bad79ade73fe3cebcbe7b451b1
Reviewed-by: hjk <hjk@qt.io>
2020-07-15 08:43:05 +00:00
Eike Ziller
b18711da91 Merge remote-tracking branch 'origin/4.12' into 4.13
Conflicts:
	share/qtcreator/debugger/lldbbridge.py

Change-Id: Ia444f6424fb35b9a539e157afcee868161535272
2020-07-06 16:23:13 +02:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Alessandro Portale
dd505ef413 McuSupport: Change version checking from exact == to >= minimum
So far, one Qt Creator version supported exactly one Qt for MCUs
version, mainly because of incompatibilities in-between Qt for MCUs
versions.

The compatibility of 1.2 with 1.3 and further is now deemed stable
enough to loosen the version checking.

This change replaces the exact versions comparison (between Qt for MCUs
SDK version and what Qt Creator supports) to a minimum version check of
what Qt Creator supports.

One limitation that remains is that you can only have one kit per target,
across the supported Qt for MCUs versions. To mend this, UI changes are
required (in a separate commit).
Workaround for now: If you want e.g. Desktop Kits for different Qt for
MCUs versions at the same time, you need to work with kit clones.

Task-number: QTCREATORBUG-24293
Change-Id: Ifd31cd2eadbc1d7fa02415e1928d0047cf007f7c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 08:24:20 +00:00
Alessandro Portale
6fec04d6de McuSupport: Find default FreeRTOS dir inside pre-installed board SDK
Qt for MCUs 1.3 ships the board/MCU SDKs, and also adds the subdir to
the FreeRTOS component inside the board/MCU SDKs as "boardSdkSubDir" to
the .json files (see: UL-2760).

Task: Qt Creator needs to lookup that "boardSdkSubDir" value and use it
to construct a default path for the FreeRTOS path.

Task-number: QTCREATORBUG-24300
Change-Id: Ie3c8186b76443d5fe3640226ea61aa8b14779d54
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 07:51:48 +00:00
Alessandro Portale
dccdd41ab9 McuSupport: Adjust license headers
Change-Id: I00ce0c63c59f6d20f8244ea9c693259044d0f7b8
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-07-03 07:48:51 +00:00
Alessandro Portale
a6bf71a327 McuSupport: Bump supported Qt for MCUs version from 1.2 to 1.3
Task-number: QTCREATORBUG-24203
Change-Id: I259a4bfba49624d313fd1a2562f6288e047a16da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-30 12:47:46 +00:00
Alessandro Portale
97ac63b401 Android, McuSupport: Change "download" icons to "online"
The download icon might suggest that clicking that button causes an
automated download/installation. Since we have similar automation in the
Android settings, that could be misleading.

Change-Id: Ia1e4f1cfe15f79daf090546ee7c991f93b23fd13
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-06-26 11:18:40 +00:00
Eike Ziller
8b8ecfa28f Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/fileapiparser.cpp

Change-Id: I39f8c2be859be043f506bef77de9bb5b42d38165
2020-06-15 11:30:34 +02:00
Alessandro Portale
e4ded6a08f McuSupport: Enable resetting of path choosers to the default path
This change adds a "reset" button to the path choosers. Pressing it
sets the path to the default path.

The default path is now overwritable by the system settings value (if
present). This way, there is only one and only default path, which
allows us to again simplify McuPackage::writeToSettings().

Task-number: QTCREATORBUG-23860
Change-Id: I192663f3487250b9eba4773d2510abf3f9e66127
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-11 09:47:04 +00:00
Eike Ziller
623e607b23 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I19a7406f7e387b53f1e7b3f08a0b4c89a377ab82
2020-06-08 08:22:10 +02:00
Alessandro Portale
81e0d9da11 McuSupport: Fix a bug in the writing of settings
The plugin wants to only store settings if they differ from the defaults
(e.g. a path was edited by the user).
The original attempt failed. If the user changed the path, stored it,
and then changed the path back to the default, the last change was not
stored.

Therefore, this change actually removes the settings entry if it equals
either the default or the install settings value.

Task-number: QTCREATORBUG-24048
Change-Id: I6ab11f276ae270bb8bbf50ad6d2bc7ea3dba2d7b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-04 06:59:57 +00:00
Eike Ziller
aa2aa9bf2a Merge remote-tracking branch 'origin/4.12'
Change-Id: Id1c063ae716c3acf5e6201c15663637040aa9a35
2020-06-03 12:22:18 +02:00
Alessandro Portale
2ba2a0d1d4 McuSupport: Qul v1.2 adjustments
- Bump supported version from 1.1 to 1.2
- Look in Qul_DIR/kits for boards json files (UL-2390)
- Remove "pragma main;" from app template main qml (UL-1708)
- Add a main.cpp for BareMetal and FreeRTOS each (QTCREATORBUG-24063)
- Removed ambiguous armgcc download link (QTCREATORBUG-24052)

Task-number: UL-1708
Task-number: UL-2390
Task-number: QTCREATORBUG-24063
Task-number: QTCREATORBUG-24052
Task-number: QTCREATORBUG-24079
Change-Id: Ieb3d0c22b9099b12f91096b5a90c6e84698be788
Reviewed-by: Christian Kamm <mail@ckamm.de>
2020-05-27 11:47:57 +00:00
Eike Ziller
52b7ec058b Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/mcusupport/mcusupportsdk.cpp

Change-Id: I1583fa81adc0218ad4657baa347c08e9e29f88e6
2020-05-15 14:49:11 +02:00
Alessandro Portale
f08fe165ab McuSupport: Read supported targets from SDK .json files
... Replace the current hard-coded list of supported (non-Desktop)
targets.

Task-number: UL-2012
Change-Id: I65851d11eea9f62635d56c42788caeae8a77a4f3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-14 13:37:46 +00:00
Eike Ziller
20ef5c6de3 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ibbf9f16677a58bdcdd3ce63701ffa34db6f44916
2020-05-11 11:36:22 +02:00
Alessandro Portale
eccf1269ac McuSupport: Add support for creating FreeRTOS kits
Besides Baremetal, Qt for MCUs also supports FreeRTOS for a few targets.
This change:

- shows the FreeRTOS source path chooser
- set the FreeRTOS source path as kit environment variable
- sets OS=FreeRTOS in the kit CMake configuration and kit meta data

Task-number: QTCREATORBUG-23938
Change-Id: I69cbd4f9b6b4a842788a8dad57905ef517b8b1d5
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-05-06 16:36:24 +00:00
Eike Ziller
e9661e43cb Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp

Change-Id: If6963d1ef7b5a1ea6343f68c8e7ce6fb5f482f21
2020-04-28 15:48:36 +02:00