Commit Graph

76958 Commits

Author SHA1 Message Date
Yasser Grimes
7938a8a80f McuSupport: Store macros as part of McuSdkRepository
To support extending the macros and calling the
McuTargetFactory::expandVariables function statically, the macros are
added as part of the SdkRepository.

This commit also adds helper functions to extend macros other than the
ones created from the packages.

Change-Id: Ie7d2a9ad626782eec18738bdd3472ffd202e7a36
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-28 11:57:37 +00:00
Sivert Krøvel
a08c49b321 McuSupport: Fix version warnings
Packages without version detection should not get a version warning,
even if the json contains a version list. With this change, a package
without version detection will not get a status with invalid version.

Additionally, in the case of failed version detection, it would be
helpful for the user to list the acceptable versions. The status text
was updated to list these.

Change-Id: I814a86c741d573732072206ef1e969790f175e6a
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-28 11:50:46 +00:00
Christian Kandeler
eabf13b478 Update qbs submodule to HEAD of 1.24 branch
Change-Id: I3a991428981c95abd92a7e95f70aac5d3f008b7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
2022-10-28 10:11:47 +00:00
Daniele Bortolotti
6f837e258a McuSupport: Inform only after actual kit creation
Previously, a message about successful kit creation was printed
for every kit without verification. So move the print to the
actual kit creation function. Issue also reported in
QTCREATORBUG-28281

Change-Id: I0e2cb463188210164a3582e7fa465a4ebb79b812
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-28 08:27:28 +00:00
Mahmoud Badri
2a4de97a84 QmlDesigner: Fix toggle section expand after choosing expand all
Fixes: QDS-8104
Change-Id: I6191a7b249490e6193acdd8b618c0817a3fc6ab3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-10-28 08:20:26 +00:00
Tim Jenssen
564298bba5 qmldesigner: fix crash while switching modes
Task-number: QDS-7984
Change-Id: Ia1803ce062c3956390c12f0da5b86577593fd721
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-10-28 08:02:55 +00:00
Tim Jenssen
ad3169bedd qds: fix mobile scroll projects template
I guess this was removed by accident at
d99a6d2efe
so I just adding it back now.

Task-number: QDS-8111
Change-Id: Ib42ce5cc0cf13608f07b0671adce149c15878ef0
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-10-27 15:06:40 +00:00
Marco Bubke
2bbae7d499 QmlDesigner: Detach views outside of model destructor
modelAboutToBeDetached can still calling the model. So calling the
function from inside the model destructor is a little bit undefined. To
get around it we add a custom delete which call the detachAllViews()
before it deletes the model.

Change-Id: I38ff8283f4e1ac48b256aeb9fd5bb9f3fb6bfed1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-10-27 14:48:31 +00:00
Miikka Heikkinen
bc370aecfd QmlDesigner: Hide material bundle if QtQuick3D version too low
Most materials in the material bundle require at least QtQuick3D 6.3,
so we hide the bundle materials from material browser when the detected
module version is less than 6.3.

Fixes: QDS-8100
Change-Id: I9f50b507c3c3c50f821fa6a902995b999da24464
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-10-27 14:35:07 +00:00
Leena Miettinen
5759da754e Doc: Use filename extension of ok.png to fix qdoc warnings
Change-Id: Ic33d9c4e8a3af523e087fc1284cb374e7fd37ec0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-10-27 14:31:23 +00:00
Daniele Bortolotti
afb3c09289 McuSupport: Fix version detection for GHS toolchains
The GHS compiler invoked without a valid input source file returns
an error code. Use gversion instead, a utility part of the toolchain,
with -help to retrieve the version string.

Change-Id: I289f462d322db045368cfb5a02b6644838559639
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-27 13:59:23 +00:00
Sivert Krøvel
db7674307d McuSupport: Only store valid paths to settings
The plugin currently requires valid packages before updating kits.
Invalid packages are ignored. This change makes writing to settings
consistent with this approach. If any of the given paths are invalid,
changes are not applied.

In order to not accidentally include changes made to packages for
other targets than the one visible in the UI, the Apply-button in the
Devices page now only stores the current target. This also avoids
unpredictable behavior when more than one target in the repo track
the same dependencies. The path shown in the UI is the one which is
applied, not a hidden path currently stored in another target.

Change-Id: Id0a6ec1aebd53357d0ee2fb68f14529f34ae887f
Reviewed-by: Daniele Bortolotti <daniele.bortolotti@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-27 13:52:15 +00:00
Sivert Krøvel
8afdb62564 McuSupport: Fix error in McuPackage validity check
The recently added McuPackage::Status::ValidPackageVersionNotDeteced is
supposed to be a valid status for an McuPackage, similar to
ValidPackageMismatchedVersion. It produces a warning symbol, but is not
supposed to block kit creation.

Task-number: QTCREATORBUG-28246
Change-Id: Ifdc8488d28019ec76d29114501876c6d7d5e700c
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Daniele Bortolotti <daniele.bortolotti@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-27 13:49:09 +00:00
Sivert Krøvel
ca3de9c3c7 McuSupport: Add missing settings keys
The JSON entry "setting" contains the key under which the path to a
dependency is persistently stored by QtCreator. Some packages were
missing this entry, and as such changes to their settings were not made
permanent.

This patch updates test jsons to match Qt for MCUs repo.

Task-number: QTCREATORBUG-28246
Change-Id: Iaa3eaf28648e97e677a2dd3f1ab5580c18586ca2
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-27 13:48:45 +00:00
Marcus Tillmanns
6936f23328 CMake: Fix settings display not updated
Fixes: QTCREATORBUG-28267
Change-Id: Icf2fb7e5d7a8cd44d7a61ade36be41106aba2138
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-27 13:11:29 +00:00
Knud Dollereder
211f53ceba Prevent a crash on close
The Destructor of the class Model::Private indirecly called
modelAboutToBeDetached which did lead the FormEditor to try
to access the already deleted ModelPrivate.
This patch is a quick-crash-fix that prevents this by moving
the detachAllViews call from the destructor of ModelPrivate
to the destructor of Model.
Note that a clean fix would probably make the access of
ModelPrivate outside of Model impossible but this is outside
the scope of this fix and left for a later exercise.

Fixes: QDS-7587
Change-Id: I0d03423ae6eaf4d86eddba26ec5edb643ea5a51e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-10-27 13:10:44 +00:00
Marcus Tillmanns
24fcdd9c16 Core: Hide Scrollbar highlight
This patch hides the scrollbar overlay when the Scrollbar itself
gets hidden, for example on mac for documents that fit into the
viewport.

Fixes: QTCREATORBUG-28336
Change-Id: I2cb61affe38d0066a3d6f3ca012f97674b3d1539
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-27 13:09:00 +00:00
Miikka Heikkinen
d72f5674b5 QmlDesigner: Fix dynamic properties on material library init
Nodes with dynamic properties cannot be reparented under a newly
created node in the same transaction without breaking said properties.

To work around this issue, ensureMaterialLibraryNode() was split into
two transactions. This also meant removing ensureMaterialLibraryNode()
call from materialLibraryNode(), so now material library will only be
created in response to model attach or qtquick3d import addition.
This should still cover all cases where user doesn't manually remove
the material library node.

Fixes: QDS-8095
Change-Id: Icff449b2bee0da2b43b02bbf5e0d28189aa2b3a9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-10-27 13:07:49 +00:00
Leena Miettinen
596529651b Doc: Fix link to Qt 6 based Qt Design Viewer
Change-Id: I68a10b4508feb6760f28ef63d29fa54bc1ae37f3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-10-27 13:06:17 +00:00
Orgad Shaneh
e61e92d016 Git: Fix focus issue in LogChangeWidget
Workaround QTBUG-89156.

Change-Id: Ia128db1c0c2ee85985b6a725b6cb849d87844668
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-10-27 10:08:10 +00:00
Marcus Tillmanns
b65205ed97 Texteditor: Fix text with underline black background
If text was given an underline and the background was unset,
it was drawn with a black background. This had been implemented
for QTCREATORBUG-18101. Removing that patch does not seem
to re-introduce that bug.

Fixes: QTCREATORBUG-19191
Change-Id: Iaad05abbc7c673d233601ef72d1641e2edc530c5
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-27 10:01:37 +00:00
Miikka Heikkinen
90e5ca4748 QmlDesigner: Fix duplicating materials with dynamic properties
Fixes: QDS-8091
Change-Id: I0f9a710214850326d1cda179c1a2aa6332b98510
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-10-27 08:53:12 +00:00
Daniele Bortolotti
bd812b6feb McuSupport: Remove MSVC2017 from supported toolchains
According to our documentation we support MSVC2019 (16.0)
https://doc-snapshots.qt.io/qtformcus-dev/qtul-msvc-compiler.html

Change-Id: I45fd8cda40f1775be3c575e5b4ac55c3a714c4fe
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-27 07:40:26 +00:00
Daniele Bortolotti
f7b5e9dcc8 McuSupport: Fix MSVC toolchain in legacy mode
Wrong executable argument for version detector was not allowing
for Desktop MSVC kit creation in legacy mode.

Task-number: UL-6597
Change-Id: If64472002e3aace6240c91cf9c303a2f01febe50
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-27 07:00:28 +00:00
Christian Stenger
ba99a7f921 AutoTest: Fix crash
Remove the unneeded stunt when clearing cache which only led
to crashes.

Fixes: QTCREATORBUG-28269
Change-Id: I908bcbee0f49369a589862cd8fbd3253444246c3
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-27 06:54:52 +00:00
Marcus Tillmanns
87cf82cf06 Utils: Fix inconsistent debug output
Change-Id: Iccfae5e70e4f0992cbf16e05688547e54c637a27
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-27 06:53:40 +00:00
Marcus Tillmanns
af0797f0cc Utils: Workaround for slow data upload
The deviceshell script is slow to upload large amounts of stdin data.

Use QtcProcess directly if the size of the data exceeds 100kb.

Change-Id: Ide63bfd973d31f7f076ab7cd4be73cc85c9239ea
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-27 06:53:36 +00:00
Leena Miettinen
86a24b707d Doc: Add info and examples of using CMake presets
Task-number: QTCREATORBUG-27876
Change-Id: Iaaea164d7a8395d6ddc7580db72790187b719eda
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-27 06:44:48 +00:00
Orgad Shaneh
913c6f037c VCS: Remove export for inline functions
vcsenums.h:29:28: warning: inline function 'void VcsBase::operator|=(VcsBase::RunFlags&, VcsBase::RunFlags)' declared as dllimport: attribute ignored [-Wattributes]
   29 | inline void VCSBASE_EXPORT operator|=(RunFlags &p, RunFlags r)
      |                            ^~~~~~~~

Change-Id: I0490965260302009bb49ed1c4be994496cbe186f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-10-27 06:32:58 +00:00
Christian Stenger
774b74583e Cppcheck: Do not start non-existing tool
Just pollutes the General Messages pane, so skip
execution if tool is not existing.

Change-Id: Ib78e3a8ccd992ff2d58f183102c778c800156b89
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-27 06:25:47 +00:00
David Schulz
26bb95331b Editor: fix FontSettings::lineSpacing for zoomed fonts
Change-Id: Ia7ad3a877c56fb9cd962592b6d3e967beb9002dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-27 06:12:12 +00:00
Orgad Shaneh
e003a02721 VCS: Fix resolving active directory for temp editors
Amends c666c93882.

Change-Id: Ib7aeb9616d3d527f829ece2a39eb5ddf77f9431e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-10-26 20:57:39 +00:00
Thomas Hartmann
565bb8052f QmlDesigner: Add option to allow multiple projects
Setting QML/Designer/AllowMultipleProjects to true
allows multiple projects.

Task-number: QDS-7865
Change-Id: Ib44653e48cfbdb439c18dc2d3c57a4ae2ab0ee43
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-10-26 15:05:27 +00:00
Christian Kandeler
5b7729a21a QbsProjectManager: Fix displayed build variant in build step
The initialization was lost in 2ecfda056b.

Change-Id: I40db0ea26de74aa6420ecc50c473bbcb22891238
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-10-26 15:02:40 +00:00
Christian Kandeler
134c84b502 ProjectExplorer: Remove MakeStep::jobCount()
It's unused and should also not be exposed, as it's misleading; the
actual job count passed to make depends on various other factors.

Change-Id: I09cffd5e37abe797a965ffa994e2e8df5b537723
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-26 14:33:43 +00:00
Thomas Hartmann
ed0727e88f QmlDesigner: Add option for Qt 6.4
Change-Id: I7548a680a5773d7d2799fa5998bdc0956fb2e9c2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-10-26 14:05:17 +00:00
David Schulz
37640257db Editor: Fix painting highlights on scrollbar
The document layout rounds up the height of lines in
QTextLayout::boundingRect, so we have to do the same for calculating the
position of highlights on the scrollbar.

Fixes: QTCREATORBUG-28299
Change-Id: I36496ebec7fe7861feff7cb8a2647a11ee078b8f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-26 12:56:40 +00:00
Marcus Tillmanns
38c8e20071 QMake: Remove unnecessary build dir changed
Previously every time a qmake project was built, the
"buildDirectoryChanged()" was emitted, leading to a complete
reparse of the project file, tests, qml files and qml imports.

To keep "QmakeBuildConfiguration::updateProblemLabel" be called,
we re-introduce the "buildDirectoryInitialized" signal.

Task-number: QTCREATORBUG-27785
Change-Id: I32d881eacb8cf26050c33da643c74c2cab4dc22d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-26 11:47:49 +00:00
David Schulz
91257b3e76 Bump version to 9.0.0-rc1
Change-Id: If9f046539e70e8aba9af367472b76bac853198b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-26 11:46:35 +00:00
Marcus Tillmanns
a2c052089b Autotest: Don't parse tests without files
Previously the "Scan for tests" dialog would pop up
momentarily during project loading, even though no
files were loaded yet.

Partial fix for: QTCREATORBUG-27785

Change-Id: I4087ba23d00a628465dd1532a725d9bcc37dec30
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-26 10:51:03 +00:00
Knud Dollereder
0482db7a1b QmlDesigner: Fix EasingCurve editor
Due to a behavioral change in QTabBar the tabs to choose between the curve editors "factory presets" and "custom presets" got lost.
Reordering the function calls made it appear again.
Prevent the user from assigning the same name to different easing curves.

Fixes: QDS-7720
Fixes: QDS-7721
Change-Id: I247309824868625d2e581f54590dd4c3d99528dd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-10-26 10:12:16 +00:00
Rainer Keller
9257a15a68 McuSupport: The armgcc version string does not contain 'v'
Change-Id: Ic259bed17a97bccb64f427ce2054efc9d05b55f2
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-26 09:26:58 +00:00
Kwangsub Kim
d1a9cecf59 McuSupport: Fix crash when there is no proper desktop toolchain
Desktop toolchain is picked up from the registered toolchains
in Qt Creator, but it can be failed, for instance when there
is no toolchain for MinGW, and it causes crash for now. An
error handling is added to avoid it and inform to a user.

Task-number: QTCREATORBUG-28296
Change-Id: Ie16cd6c75df9be510bb49b765ad61ddf189a41db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-26 08:45:43 +00:00
Jarek Kobus
a0835dd3d3 ClassView: Remove unneeded includes
Substitute some includes with forward declarations.

Change-Id: I7638a2759b680cfc4e3dfb10631200bb46453998
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-26 08:42:19 +00:00
Leena Miettinen
642ba31f8b Doc: Describe "Show subfolders inside source group folders"
...in Preferences > CMake.

Task-number: QTCREATORBUG-27876
Change-Id: I0d71e0281413433e6acfdd7023c138c422a8712f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-26 08:32:26 +00:00
Robert Löhning
5039ebff70 Help: SquishTests: Updates for tst_WELP01
Change-Id: I2e25f8c3368c4c00c13827f5eb70d9e3a4fc5a9e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-26 07:33:16 +00:00
Artem Sokolovskii
afed126ba1 ClangFormat: Fix wrong comment indentation
Fixes: QTCREATORBUG-25539
Change-Id: Ifecc4bc2c0984319d858720d5bcd1788a9008e90
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-26 07:21:07 +00:00
Kwangsub Kim
02024303b1 McuSupport: Specify MSVC type for toolchain pick up
The current criteria allows to select LLVM so that it can cause
an unexpected behavior. Explicit toolchain type check will prevent
the invalid toolchain setup.

Change-Id: Ib0afa4304650dd451c12d7a8d950b26115661862
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Daniele Bortolotti <daniele.bortolotti@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
v9.0.0-beta2
2022-10-26 00:11:22 +00:00
Cristian Adam
4fdbfe1641 CMakePM: Proper handling of relative toolchain files in CMakePresets
Previously it was only tested with absolute paths.

Change-Id: I3871da60f3f1b17ae4d2d4cfb69d1be60da1435b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-25 20:56:24 +00:00
Cristian Adam
fb94873765 CMakePM: Use Utils::Environment for Presets environment
Utils::Environment takes care of the case insesitivity of the key of
environment variables on Windows.

Change-Id: I624340d30c6b170b5d0a86791f26a4841a0b2fb7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-25 20:56:15 +00:00