Commit Graph

36 Commits

Author SHA1 Message Date
Alessandro Portale
f99a340ea4 McuSupport: Tr::tr
Change-Id: Ia2f0e523a378bea82887bdb212acfdab47b408e9
Reviewed-by: hjk <hjk@qt.io>
2023-01-23 09:03:07 +00:00
hjk
118b84ffd6 Use simpler Plugin::initialize() when feasible
Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-20 12:13:10 +00:00
hjk
3171064ee2 McuSupport: use a dedicated class to create flash run worker
Change-Id: I26a403755f2ae57a43bbac2439359831a8d59431
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-11 14:46:18 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Eike Ziller
e46357a220 Adapt to move of options to Edit > Preferences
Change-Id: I6881f658db9eec5059b434bce12093667535d5ac
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-06-28 08:32:22 +00:00
hjk
2496ffe3ce Code cosmetics
Mostly unused #include's, also sort them or reduce scope.

A few namespaces, ...

Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-06-24 14:44:13 +00:00
hjk
6250cf20a1 McuSupport: Delay creation of SettingsHandler
There should be no significant activity in a plugin before
the initialization phase.

Change-Id: Iee2bcff4644ac07c3867fa59ce6613e128bd0390
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-23 11:59:12 +00:00
Piotr Mućko
7cef593ec0 McuSupport: Extract settings handling to a class
Change-Id: I671098f14d7bc13255dc130a4de1ab97d5bdab94
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-28 10:29:20 +00:00
Piotr Mućko
a3fbfac814 McuSupport: Automatic memory management for mcu sdk
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>
2022-04-01 13:55:34 +00:00
David Schulz
2b286c755b Utils: allow passing data via info bar combo box
Change-Id: I47daa83a533a76eb4ad0ab3f5cf8c04faf389b98
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-21 07:57:10 +00:00
Christiaan Janssen
e293aab725 McuSupport: remove cmake mapper
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>
2022-03-11 14:24:34 +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
Christiaan Janssen
2834e90930 McuSupport: split mcusupportoptions
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>
2022-02-18 09:14:29 +00:00
Erik Verbruggen
c755de0823 McuSupport: Move kit methods out of McuSupportOptions
... and into McuKitManager

Task-number: QTCREATORBUG-26890
Change-Id: Ic5ed689458d3ef004ebb42a549c48a6326c2f45d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-17 10:41:59 +00:00
Piotr Mućko
76453511cc McuSupport: plugin code formatting
Change-Id: I2d1c3dfad3fddce7706056997d284292e13d3ad2
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 27cadc86ba)
2022-02-16 11:18:28 +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
Piotr Mućko
27cadc86ba McuSupport: plugin code formatting
Change-Id: I561bd66431ff3da7819bb9b2ff780197b5593708
Reviewed-by: hjk <hjk@qt.io>
2022-02-15 11:50:33 +00:00
Piotr Mućko
9917166b2e McuSupport: basic test & required refactoring
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>
2022-02-15 11:03:30 +00:00
Erik Verbruggen
250f4fb72f McuSupport: Move McuDependenciesKitAspectWidget into its own file
Change-Id: I41a2a6ec48c5c02ca655cb09ad08080d73d336fe
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-10 20:42:59 +00:00
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +00:00
hjk
7c28c4f744 Utils: Introduce a FilePath constructor from char arrays
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.

At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.

Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 05:34:10 +00:00
Christian Kandeler
b1837036b3 Fix some warnings about unused lambda captures
Change-Id: Icfb1b963b3c55656c760497e4ae3ece2bdccbbc7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-24 12:07:31 +00:00
Christiaan Janssen
5dcf2ba0fa McuSupport: manage kits for different SDK versions side-by-side
Task-number: QTCREATORBUG-25044
Change-Id: I6fbadd1e4192e9958ec4bb1a5bbbfe82c168fc2d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-31 07:30:08 +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
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
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
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
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
Eike Ziller
7c5ed6f7d9 Move InfoBar to Utils
The only reason it was required to be in Core plugin, was its use of Id,
which now is available in Utils.

Change-Id: I66ce863c24924e6448d339b3422538a7fe167336
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-06-18 06:39:54 +00:00
Alessandro Portale
02efd43199 McuSupport: If kits are missing, provide an InfoBar that opens settings
When installing Qt for MCUs via the SDK installer, the user (in many
cases first-time evaluator) has to create the kits for Qt for MCUs. For
those who see Qt Creator for the first time, it is difficult to find out
where to search for the UI that generates those kits.

Let's help the user with an InfoBar entry that in case of ...

 * McuSupport plugin being enabled (by SDK installer)
 * Settings key [McuSupport]/Package_QtForMCUsSdk set (by SDK installer)
 * Absence of valid Qt for MCUs Kits

... helps to directly open the right page and tab of the Options dialog.

Task-number: QTCREATORBUG-23943
Change-Id: I7d4834633b1b94ef663d62cd395ee071bd123f1f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-06 06:43:24 +00:00
Alessandro Portale
ff925d85e9 McuSupport: Remove outdated kits on KitManager::kitsLoaded
... instead while creating other kits.

Task-number: QTCREATORBUG-23891
Change-Id: I7ef3a6c92d94d8e6dd7499490a694be1d91ed35e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-05 07:09:40 +00:00
Alessandro Portale
a02b6e3e7d McuSupport: Register Qt for MCUs examples
This change introduces the registration of examples (or rather demos) of
the Qt for MCUs SDK at the launch time of Qt Creator.

This presumes that either the SDK installer set the Qt for MCUs SDK path
(which is the default use-case) or that the user selected/changed the
SDK path in a prior run of Qt Creator.

Task-number: UL-1218
Change-Id: I6484d3e3065f501da4cd6faccfe02605003f6cbf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-06 14:12:46 +00:00
Alessandro Portale
23dc065327 McuSupport: Register Qt for MCUs .qch files
At plugin initialization and along with the creation of a Qt for MCUs
Kit (which currently happens when the user presses "Apply"), these .qch
files get registered:

  <Qul_DIR>/docs/quickultralite.qch
  <Qul_DIR>/docs/quickultralitecmake.qch

In order not to duplicate the code for retrieving package paths (e.g.
the one for "QtForMCUsSdk") from the settings, some refactoring was
done.
As a result McuSupportOptions::qulDirFromSettings() has been introduced.
It will be also used in further changes.

Task-number: UL-1685
Change-Id: I82e638e129120cdadcf2f4812f467fce34b32ec9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-25 12:05:02 +00:00
Alessandro Portale
d65c61ffcb McuSupport: Fix name of McuSupportRunConfigurationFactory
Was a remainder of initial clone&rename action.

Change-Id: Ifd06626cf2c895a1e20289ebd7ce711432f0a23a
Reviewed-by: hjk <hjk@qt.io>
2019-11-22 17:25:55 +00:00
hjk
b0ea4311e8 Short live McuSupport
Medium term to be merged with BareMetal/RemoteLinux/...

Change-Id: I444c65bcfa8e3cf8642ff64e964459720814860a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-09-30 15:04:32 +00:00