Commit Graph

68765 Commits

Author SHA1 Message Date
Knud Dollereder
578b66727a QmlProject: Add QML_IMPORT_PATH to the main cmakegen template
Change-Id: Idd55f372701c76f43869abfc3b493247e06ce8f5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-11-08 12:53:16 +00:00
Thomas Hartmann
1b27dd383f QmlDesigner: Allow dropping components and assets to text editor
Task-number: QDS-10868
Change-Id: I8037fd0fdd6060bbf84f0b24a52f18304380dcd2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-11-08 12:48:03 +00:00
Christian Kandeler
e48d365b19 ProjectExplorer: Normalize separators on HeaderPath construction
Fixes a Windows test failure in CompilationDatabaseProjectManager.

Change-Id: Ic373b7a50b1374be4cf028fc304442c3cf077735
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-08 12:27:57 +00:00
Semih Yavuz
ffcbbecf27 reformatter: Do not remove type annotations
Type annotations were being removed by the reformat action. Write out
the relavant annotations in ast to fix it.

Add exclusion mechanism in tst_qml_reformatter test since it performs
line by line comparison which doesn't fit all reformatting cases.
Introduce char-by-char data tests.

Fixes: QTCREATORBUG-29061
Change-Id: Ia52b51e6d7d938bdec325c4f426b11c722f85f8e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-11-08 11:09:02 +00:00
Christian Kandeler
df360704f0 ClangTools: Suppress bogus clazy warning about #pragma once
We don't pass the correct value "c++header" to the -x option, because to
clang that implies building a precompiled header, which apparently
switches on some different mode that breaks clang-tidy and clazy.
On the other hand, with "-x c++" clazy now thinks that this is a source
file and frowns at "#pragma once". Suppress this warning for header files.
Amends 60fca0596a.
We might run into similar "header vs source" problems in the future. I
don't see anything better than suppressing them one by one.

Fixes: QTCREATORBUG-29781
Change-Id: Ia15ac5b278777e2b2e089e9d58bb7537c38955ce
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-08 09:52:29 +00:00
Christian Stenger
210907529f QtSupport: Fix order of setEnabler / readSettings
Silences a soft assert.

Change-Id: Ibd32f2efe75f610bf7e8f6a33a7a84a8da9f7019
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-08 09:13:15 +00:00
Thomas Hartmann
aab09423e4 QmlDesigner: Add more properties for ordering in code
Change-Id: Ie7d65520e273c02b331531c64d666e95bedaa9bd
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2023-11-08 09:12:41 +00:00
Samuli Piippo
2eb73350ab boot2qt: always use GenericUpload
GenericUpload knows if sftp or rsync can be used.

Change-Id: I6f6d478f2da9659777cc5046b4425ae025fdca0a
Reviewed-by: hjk <hjk@qt.io>
2023-11-08 09:08:51 +00:00
Eike Ziller
05ef0d9cb9 Fix crash in QmlOutline related to QmlDesigner
This is a workaround for the ugly hack that QmlDesigner forces the
EditorManager to send a currentEditorChanged signal with QmlDesigner's
custom, internal IEditor.

The currentEditorChanged signal triggered an update/re-creation of the
outline widget *for that editor*. Which is not the intended result in
the first place, but even aggrevated by the fact that QmlDesigner never
calls currentEditorChanged with the actual
EditorManager::currentEditor() again.

Work around that by only ever using the EditorManager::currentEditor()
for the outline widget.

Fixes: QTCREATORBUG-29653
Fixes: QTCREATORBUG-29702
Change-Id: I39c5bee94141a0d86c0e92879eb8b1c2b7ba64b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-08 08:03:10 +00:00
David Schulz
4a081cb386 TextEditor: remove texteditor_p.h
There is no need to have an extra file for one struct that is only used
inside texteditor.cpp

Change-Id: Iee8f7ce5e0d19da7b444660d81c350eb10b501ef
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 15:24:57 +00:00
Marcus Tillmanns
772546453a Utils: Warn if enabler is set before readSettings
Change-Id: If3dd3fc5adbcd73a87f8e57482c7497c3cd11da2
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:35:26 +00:00
Artem Sokolovskii
55227ba829 DAP: Make dap engine less noisy
Change-Id: I97d804511b07640e87045f2007575fb6543bb5be
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:32:43 +00:00
Marcus Tillmanns
d3f5e44ba4 Autotest: Remove unnecessary readSettings() call
Change-Id: Ifa80b240d722c9852a57a08cb5ddc18568db5b47
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-07 14:29:20 +00:00
Artem Sokolovskii
49b773bd25 DAP: Fix launch of an application without run parameters
Now dap gdb debugger takes into account "Command line arguments:".

Change-Id: I5e7630a56a0851e7a0b8356129eb250bb29d5893
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:24:23 +00:00
Christian Stenger
c6d1c962ee CMakePM: Make internal codemodel aware of Qt
In case we have no Qt inside the current kit configured the
code model stumbles upon Qt constructs even if
CMAKE_PREFIX_PATH has been used correctly to allow cmake to
pick up a Qt.
Explicitly look into the found packages to see whether Qt
has been found and use this if possible for the codemodel.

This fixes some inline diagnostics as well as finding all
test information inside Qt Test related projects instead of
just the test cases when using a kit without a Qt.

Change-Id: Id3b5d2e818967cd3121948b818c75c4cf463546f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-07 14:24:07 +00:00
Marcus Tillmanns
437797d1c4 Utils: Fix endless loop when ls iterating subdirs
findUsingLs did try to enter "." and "..", with especially "." leading
to an endless loop.

findUsingLs also did not correctly concatenate the parent folder
for sub directories.

Change-Id: Ieafad4d4ef38d2fb550ddef1d2edf8183ce8032e
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:20:33 +00:00
Marcus Tillmanns
845676f814 Utils: Fix incorrect checks
There is no reason to force m_buffer = m_internal afaik.

Change-Id: I6cab375c9d416d4fbe167c4cfb884e7cc6025381
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:19:51 +00:00
Miikka Heikkinen
97db39c468 QmlDesigner: Remove temporary extraction folder
FileExtractor::extract() creates a temporary folder for extraction
if target path is not specified. This temporary folder was never
cleaned up after it was no longer needed.

Fixes: QDS-11057
Change-Id: I7c39429eb4beeb84fcaee6e8dc4f42d70e4d3fc0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-07 13:21:27 +00:00
Ali Kianian
b357e26758 QmlDesigner: Assign the collection to the selected node
Task-number: QDS-11012
Change-Id: I68b23b276c804b7f95db2972de87583cd115e11f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-07 11:43:29 +00:00
Miikka Heikkinen
f880115faa QmlDesigner: Only add a dragged material once to model
Fixes: QDS-11095
Change-Id: Ia55c3cc906f42b3166b026c2c7447e649090069b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-11-07 11:15:02 +00:00
Ali Kianian
ca84a2afeb QmlDesigner: Apply deleting the collection from source files
Task-number: QDS-11150
Change-Id: Ibe1294b64493594f22a03521e9f9dc2462c526c4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-07 11:11:27 +00:00
Marcus Tillmanns
1998ef19b3 Terminal: Add fallback code to close terminal.app
Fixes: QTCREATORBUG-29246
Change-Id: I67b43a25bcb4ea75d0cfa9a5c88860564af1467a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-07 10:53:40 +00:00
Marcus Tillmanns
a04cb938cb CMakePM: Fix crash if no run device is set
Change-Id: I8b13afcc466f92b93a8ad09ffa1ccc1ced2fcae7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-07 10:53:23 +00:00
Marcus Tillmanns
43f99cb53b DAP: Fix auto copy
Coverity-Id: 1568078
Change-Id: I915f947dee43b78248dcb29fe375954b43344920
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2023-11-07 09:58:34 +00:00
Christian Kandeler
d62309bbb2 Fix various mis-uses of Environment::forEachEntry()
Most of them introduced with 08bacd3f19.

Fixes: QTCREATORBUG-29857
Change-Id: Ia897958865f00cb5f8f141659a652aee05aa1355
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 09:01:53 +00:00
Marcus Tillmanns
824fee183c Fix setEnabler / readSettings order
BaseAspect::setEnabler requires the settings to be read already.
This is because readSettings() does not emit "valueChanged", and so
the connections from the enabler to the target are not triggered.

Change-Id: I0c95e2b516cd03c1dbad653288b44510ec7ea800
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-07 08:54:34 +00:00
Marcus Tillmanns
dce08c5b9e Utils: Fix crash if stub fails to start
If the inferior did not start the TerminalInterface did not send an
error up the chain, which meant that the runcontrol does not exit.
This would lead to a crash.

Change-Id: Icf9f8f913d84a9ed6414e15ce3a3587b1580425e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-07 08:53:31 +00:00
David Schulz
05ce5ea14d CppEditor: Fix crash when calling CppModelManager::projectPart
find and end of QMap potentially detach the container, so we have to use
constFind and constEnd

Fixes: QTCREATORBUG-29716
Change-Id: I2fef46580ff5b58a70201841423e5ca0a7b4d107
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 08:39:05 +00:00
Vikas Pachdha
610394cefb Designer: Merge QtQuick.State nodes while style merging
Fixes: QDS-11107
Change-Id: I676e48d584b233e9d86edc5ec805b79b0965f0eb
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-11-07 08:16:34 +00:00
Jarek Kobus
c617d97c29 TaskTree: Preserve the right order of the 0 TimeoutTask
Like it's done for all other TimeoutTasks.
Before it was flaky on mac.

Change-Id: I2999b1264d313dda5d614d9dbd7ae03b2bf00fb0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 06:57:30 +00:00
Marcus Tillmanns
6cd196511d Utils: Fix Terminal.app script for macOS 14
The "where its tab 1 = newTab" fails on macOS 14.0.

I've also added some logging to make investigating future potential
problems quicker.

I've filed feedback to apple here:
https://feedbackassistant.apple.com/feedback/13341074

Fixes: QTCREATORBUG-29246
Change-Id: I79c6f75daa34a3c346934ee2c21a5dfc9daf3cff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 06:03:13 +00:00
The Qt Project
7e4017e538 Merge "Merge remote-tracking branch 'origin/12.0' into qds/dev" into qds/dev 2023-11-06 19:56:14 +00:00
Tim Jenssen
a28400ec7d Merge remote-tracking branch 'origin/12.0' into qds/dev
Change-Id: Ic0d4bc670cca264cc4013d98f692cdbde70cbaab
2023-11-06 19:55:06 +00:00
Burak Hancerli
d92043e69c ProjectExplorer: Overlay the original icon for missing files
QmlProject could be edited manually to add files into the project.
In case of the files are mising in the file system (or if there's
a typo in the file path) file names still shown in the project
explorer without any information. This patch brings a small overlay
on top of the original icon to notify the users that the file doesn't
exist.

Task-number: QDS-10344
Change-Id: Ia73699b048725bcc70a1ee0f52c34b55b081a779
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-06 19:54:17 +00:00
Thomas Hartmann
c524cf62e1 QmlDesigner: Update item library if QmlJS library info is updated
Change-Id: I12b3aeebda4440c33d6c832f0c6faeba1ee71153
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-11-06 16:04:17 +00:00
Eike Ziller
1058ece953 QmlJsEditor: Fix crash when updating outline view
If the outline view is set to not show all bindings, it can crash after
writing code that temporarily produces an element after the cursor that
is interpreted as the child of a NonElementBindingType. In the bug
report that is a temporary structure of

* Window (element)
  * ...
  * Rectangle (element)
    * ...
    * y (non-element binding)
      * y (element binding)
        * Text (element) <- this gets selected in the global outline

When an element is selected in the global outline, the outline view
searches for the first element in the parent hierarchy for which the
source index is successfully mapped to its filtermodel.
(QmlJSOutlineWidget::updateSelectionInTree)

Since filterAcceptsRow only explicitly filters out items that are non-
element bindings, the "Text" element in the above example is "not
filtered out", and is set as the selection in the outline view, even
though it is not visible because one of its parents is filtered out.
That leads to a crash later on.

Make sure that filterAcceptsRow explicitly filters out any item that has
a NonElementBindingType in its parent hierarchy.

Fixes: QTCREATORBUG-28862
Change-Id: I1091daae140f13ea7fea7bb637953f51348c3b63
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-11-06 15:15:08 +00:00
Miikka Heikkinen
4a9424445a QmlDesigner: Update 3D viewport shading menu and split highlight
Change-Id: Ided78b5e88485ab2bc5500885344cb4fb34c51a5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-11-06 13:57:18 +00:00
Ali Kianian
bf0d95ddb3 QmlDesigner: Force adding id when create a collection source model
Task-number: QDS-11112
Change-Id: I239946d351addbdde3990168666ece7a5b4029e8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-11-06 12:54:46 +00:00
Thomas Hartmann
f36597e1a1 QmlDesigner: Load fonts in qml runtime
Ensure all fonts in the project are always loaded,
even if e.g. the project singleton is not created.
We search for the .qmlproject file and then load all
fonts.

Task-number: QDS-11108
Change-Id: I1117fa6ba9677c75fe8fce96bb349b5e825af7f3
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-11-06 12:37:41 +00:00
Alessandro Portale
aee3b61164 Utils: Fix compilation
Amends: 3a5c22c3ce

Change-Id: I3914e43f9535673a0d7a82e7955565ce5a763c06
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 11:29:33 +00:00
Christian Stenger
566754014b AutoTest: Fix handling of gtest settings
Fixes the initial value of the group mode as well as
storing and retrieving the values.
Also correctly updates the enabled state of the filter.

Change-Id: I083b783a60729cae795f0aaf1638da499737f545
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 10:50:48 +00:00
Marcus Tillmanns
3a5c22c3ce Utils: Disable workaround for 6.6.1
Task-number: QTBUG-118241
Change-Id: I419ec43db8f8a86e74262b36afc9a67e8eb324eb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 10:17:22 +00:00
Amr Essam
0461af4b90 QmlDesigner: Fix texture not updating effect
Task-number: QDS-11064
Change-Id: I39f9baa306af1ccd951f6ab3a4cc5c1b2a5e29f2
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-06 10:05:07 +00:00
Marcus Tillmanns
201857fa68 Terminal: Fix Url handling
FilePath::toUrl does not pass queries correctly to QUrl.
So we use QUrl::fromUserInput directly.

Fixes: QTCREATORBUG-29850
Change-Id: If0706b3b37d03eeea87247b44f07f8a0f8915a95
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-06 08:22:02 +00:00
Cristian Adam
42cc29902b CMakePM: Detect C/C++ object extension for single source build
When using CMake package manager auto-setup the CMAKE_C|
XX_OUTPUT_EXTENSION is stored in the CMake cache.

This way CMake project manager can know about the correct extension when
building a single source file.

If CMAKE_C|XX_OUTPUT_EXTENSION is not found in cache it will only use
".obj" for Clang-Cl/MSVC/MinGW toolchains.

Task-number: QTCREATORBUG-27471
Change-Id: Ib9b75608d5a6834014150c57f3098f79284d8276
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-11-05 11:56:22 +00:00
Amr Essam
05037278bc QmlDesigner: Fix critical cmake issues for effect maker
Qtc12 issues related to how effect maker configured

Task-number: QDS-11064
Change-Id: Ic7768ef41928a97e447e12c0a2c252f87fe82c68
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-11-03 19:09:49 +00:00
Alessandro Portale
18817c4088 Designer: Remove extra contents margins in the settings dialog
Task-number: QTCREATORBUG-29108
Change-Id: If3c6b0bcf9e1f05705c7e85fd814740235dbc7a6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-03 15:19:02 +00:00
Alessandro Portale
68222e6fd3 ExtensionSystem: Open PluginDialog without horizontal scroll bar
This makes the dialog slightly bigger to avoid that horizontal
scrollbar (when using normal font sizes).

Also, the header sizing code is a bit cleaned up. The "Loaded" column
takes less unnecessary space.

Change-Id: Ic7db7595a88a6dcedd52dce608aa1c9c79c8a464
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-03 12:55:08 +00:00
Christian Kandeler
a1b78d4234 ClangCodeModel: Fix shadow document handling
Our approach was not fully thought through: When we got informed of a
file getting created by an ExtraCompiler, we would make it known to the
first client that came along and then forget about it. This means that
e.g. a source file including a UI header would parse fine with the first
client that opened it, but after switching the build configuration or
possibly even just touching the project file, the UI header would not be
found anymore.
Fix this by keeping the information about generated files around and
attaching them to every newly initialized client.
Note that this state should probably be kept somewhere more central.

Change-Id: Ib1d8cca9258d1962513d8d463f5d16f9ff91a048
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-03 12:22:23 +00:00
Brook Cronin
84b0501693 QmlDesigner: Add micro toolbar for connection editor code preview buttons
Task-number: QDS-10732
Change-Id: I67fef29db4b6dfb184a60e39723a6ab9437c694b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-11-03 12:05:20 +00:00