Commit Graph

72811 Commits

Author SHA1 Message Date
Cristian Adam
4f4c90f8b0 ExtensionManager: Fix compilation error
Amends 5960bb33ef

Change-Id: Ib20b537791001317a65ee5c63d39cc2775b6ecb0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-27 17:29:19 +00:00
Cristian Adam
b5d6348b67 CMakePM: Update initial CMake variables also on failed CMake runs
A failed CMake run configuration could be the result of an compiler
update which then would cause CMake to fail.

Make sure to offer an upgrade path to the new Kit compiler values.

Change-Id: Ibabeb853259e23fe012d8b00e3d48979deee61a5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-27 16:01:35 +00:00
Cristian Adam
af7382fee8 CMakePM: Fix compiling projects upon MSVC Compiler/Linker update
Visual Studio is getting a fair number of updates. This involves also an
update of the Visual C++ toolchain.

This implies changing directory paths from "MSVC/14.39.33519" to "MSVC/
14.40.33807".

The linker "link.exe" is also stored in the same directory as the
compiler "cl.exe".

This commit makes sure that the linker also gets updated, not just the
compiler.

Change-Id: If8cd6e716604bc948ec8990921a14425ebcc7c30
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-27 16:01:28 +00:00
Cristian Adam
e2be8f9d16 CMakePM: Fix having duplicate CMAKE_CXX_COMPILERS entries
Do not apply the changes directly to the model, cache and then apply at
the right time.

Fixes: QTCREATORBUG-27005
Change-Id: Id099f21196900cd0e9787ac27887f2eec36f8045
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-27 16:01:19 +00:00
Cristian Adam
3572fdce03 CMakePM: Fix Qt SDK Kits when ninja is missing
Qt SDK is setting "Ninja" as default generator, make sure to get a
working generator when CMake is newly registered as a default tool.

Fixes: QTCREATORBUG-31129
Change-Id: I6b93a8904696eedadec04c882495c644db7ddce7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-27 16:01:11 +00:00
Thomas Hartmann
5036c1813d QmlDesigner: Register type for QtQuickDesignerTheme
This was for some reason working before, but should not have worked.
Qt 6.7.2 does require this.

Change-Id: I599e5d8ee3535eb633a08bb0d5605e70cbf42097
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-06-27 15:33:48 +00:00
Thomas Hartmann
57f524fe17 QmlDesigner: Add proper QTC_ASSERT
Change-Id: I946b4af2a405a86970e328f36084b279ef89ba6c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-06-27 15:33:41 +00:00
Alessandro Portale
5960bb33ef ExtensionManager: Draw icon of disabled items with less intensity
Since recently, the green background is used for enabled plugins and
grey is for disabled ones. With that change comes the requirement to
draw the icon for disabled icons with less intensity, to make it really
appear disabled.

I took this opportunity to unify the drawing of small/big enabled/
disabled pack/extension icon variants in a central helper function.

Change-Id: Ia68218c774ccb8e9e7ed48620ac36f4bca0724fd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-27 15:23:26 +00:00
Ali Kianian
a80e45fa15 QmlDesigner: Enable name and id for texture ComboBoxes
Change-Id: Iefe9e68bf9c54753c38c6a43f3a6d3217f2293c0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Shrief Gabr <shrief.gabr@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-06-27 14:59:03 +00:00
Mahmoud Badri
c6531e02cf QmlDesigner: Add child nodes when writing node to qml
Change-Id: Iddf6b70010fe34a292d8b8019c6263a56c383d75
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-06-27 14:57:34 +00:00
Miikka Heikkinen
a9426e1977 QmlDesigner: Fix puppet crash when importing asset with commas in name
Importing 3D assets doesn't need to create Qt5NodeInstanceClientProxy,
so skip that in puppet initialization as it may lead to misinterpreting
some command line parameters given to the puppet.

Fixes: QDS-13123
Change-Id: Ifa6601dfa7da1a613b2c897a287a7baeb07dd712
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-06-27 13:21:13 +00:00
Mahmoud Badri
14b7df7cf2 QmlDesigner: Import bundles directly to project
Change-Id: I75b347d3fa969fe312f35e4c0c770ba03ba3cf85
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
2024-06-27 11:40:32 +00:00
Christian Kandeler
c555801343 CppEditor: Do not expose CppHighlighterTest in header file
Change-Id: Ic0a26ce988fcc29055047268062fb5e1ece5cf26
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-27 11:08:12 +00:00
Alessandro Portale
07b13ed73b ExtensionManager: Add logging for the fetching of images
Change-Id: I87e96ba5ea65d2bf5639b5edc2c82c128d358a26
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-27 10:56:25 +00:00
Alessandro Portale
b9f786fdc5 ExtensionManager: More detailed JSON network request logging
Change-Id: Ic83900fc1344ecb21821813188f340fda9ba0708
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-27 10:56:16 +00:00
Alessandro Portale
a23298b5a3 ExtensionManager: Hide spinner initially
Should only be shown during the network request.

Change-Id: I1cf94281bd251f1fdef21c5e7ebd500e8951db1b
Reviewed-by: hjk <hjk@qt.io>
2024-06-27 10:56:09 +00:00
Burak Hancerli
827ace5c9e QmlProjectManager: Use proper method to get qmlproject files for MCU
This patch replaces the blind traversing in the project root to find
and parse the additional qmlproject files which are used by MCU
projects. Instead it's now using the qmlProjectModules() function to
reliably get the valid ones for the MCU projects.

Task-number: QDS-13068
Change-Id: I4e5e1791714345b69c0b2ac7929ae39c30521224
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2024-06-27 10:42:41 +00:00
Christian Kandeler
262aa37210 CppEditor: Add some logging to the syntax highlighter
Mostly about code folding for now.

Change-Id: I6cfb0c9e40b46172fbcb2b317ba6d0662022cd24
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-27 10:34:53 +00:00
Eike Ziller
d6936ddce5 JsonWizard: Fix compiler warning
about missing fields in initializer

jsonprojectpage.cpp:142:84: warning: missing field 'projectFile'
initializer

Change-Id: I1fe8b937100ac026eb602a65ad7ccf5077430a52
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-27 10:14:41 +00:00
Eike Ziller
8dccc9c59e Merge remote-tracking branch 'origin/14.0'
Conflicts:
	src/plugins/qmljseditor/qmljseditorsettings.cpp

Change-Id: I443424afdfe48cdfc3d083d8e91335e937fcfdb6
2024-06-27 11:41:54 +02:00
Eike Ziller
e7d3842f79 ClangCodeModel: Fix build
At least on Apple Clang there is no default constructor
For Text::Position taking two numbers.

Amends 39a448c62e

Change-Id: Ife3630f53d66be38a52ffeb8693bf7574038d083
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-27 09:34:05 +00:00
Christian Kandeler
1c9563dc18 CppEditor: Prevent offering to create or move function definitions
... when the respective location would be in a different project.

Task-number: QTCREATORBUG-19636
Change-Id: I39a93f030b46ca2f422166ce1e4740e05ff90877
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-27 09:06:04 +00:00
hjk
be84c74cb9 ExtensionManager: Hide ExtensionManagerWidget class in .cpp
And de-pimpl. Smaller overall interface and less indirections.

Change-Id: If6a5c0824581a6478ad6e88410d97e23cc517a53
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-27 09:01:13 +00:00
Christian Kandeler
a48fcfecd4 ClangCodeModel: Prevent adding an already-present closing quote
... when doing completion for header includes.

Fixes: QTCREATORBUG-31103
Change-Id: Ic2d4eb4abce4f6d0f7d08b0ff0f5e0f54669eb65
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-27 08:56:13 +00:00
Ali Kianian
da1c00ca64 QmlDesigner: Show and edit texture name instead of ID in MaterialBrowser
Task-number: QDS-13024
Change-Id: I7cb223caf1577942fc273004f0e08df5569c2af0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-06-27 08:20:13 +00:00
Alessandro Portale
8405b384a3 ExtensionManager: Introduce own SortFilterProxyModel
We want to sort by type and then alphabetically. That requires a custom
lessThan() implementation, thus a custom QSortFilterProxyModel.

Will come handy for further filtering/sorting requirements in the
future.

Change-Id: Iaacd955015d56026e41d404dcf4781a1715dc55a
Reviewed-by: hjk <hjk@qt.io>
2024-06-27 08:08:59 +00:00
Miikka Heikkinen
576e3b7acd QmlDesigner: Fix subfolder imports
Recursion for possible imports was interrupted when an incompatible
folder was detected, even though that folder could have compatible
subfolders.

Fixes: QDS-13067
Change-Id: I61f0ac6265e922c515dcd380a481434a1ddfcc93
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-06-27 07:55:20 +00:00
Eike Ziller
b94c51995d Python: Fix translatable string
Word arithmetic does not work across languages. Provide explicit strings
for the combinations.

Change-Id: I95399f5d528405971d630a464e67a89766351162
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-27 06:03:23 +00:00
Eike Ziller
e20f33cd4c Fix various translatable strings
Change-Id: I08e81f188a68c8e820f20a35249d1b318178a7b9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-27 06:02:04 +00:00
David Schulz
269fc1fd6b LanguageClient: optimize call and type hierarchy
Trigger a fetch from the can fetch function in order to get whether the
item has children. This information is used to show the expansion marker
for items that have children, and not for items that have not been
fetched yet.

Change-Id: Ifc20588aa805368369e72fc8501244f64bbbc91d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-27 04:32:54 +00:00
David Schulz
eeaf1e18e0 LanguageClient: use uniform row height for call and type hierarchy
Change-Id: If035d00766b50cb56ea42796d8399860394bf2d4
Reviewed-by: hjk <hjk@qt.io>
2024-06-27 04:29:12 +00:00
David Schulz
39a448c62e Editor: Simplify TextDocumentManipulator
The TextDocumentManipulatorInterface was introduced to decouple
modification operations from QTextDocument. But nowadays all tests and
production code usages are backed by a QTextDocument, so we can remove
this abstraction layer again. The first step is to merge the interface
and all manipulator implementations.

Change-Id: Idd1609df549d3b120dd516d5161af9aa8aa571ca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-27 04:28:55 +00:00
David Schulz
a53a72044c TextEditor: Allow to open all files with the text editor
Sometimes the mime detection returns unexpected results and defines a
textfile based on the ending as a binary file. We should at least make
it possible for the user to open those files in the plain text editor.

Fixes: QTCREATORBUG-31116
Change-Id: I3139a1013be9fa6f28654434229c62f7a8e79d21
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-27 04:28:19 +00:00
Marco Bubke
7947b18d87 QmlDesigner: Fix model utils
QStringView is easily convertable to std::u16string_view, because data()
is returning QChar* and not char16_t*.

Change-Id: I4dcdceca0c1ee82ea02494d8a45e9ab3011e4dcb
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-06-26 14:24:29 +00:00
Alessandro Portale
6ffe1a8061 ExtensionBrowser: Delay fetching of json data from server
The fetching is postponed until the extension manager is shown.

This also adds a spinner which is shown during the fetching of the data.

Change-Id: Id24ae772bcdfdf885ecfd5341d9a8d02f398c1a0
Reviewed-by: hjk <hjk@qt.io>
2024-06-26 14:18:14 +00:00
Leena Miettinen
a81e4fb277 Extensions: Edit UI text
- Add dots to ends of messages
- Replace "plugin" with "extension" in translatable text
- Fix capitalization of headings and button labels
- Change wording

Change-Id: I24a3ca6de6a5a0a4509bab34ad2f50cbcf40c73a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-26 14:09:17 +00:00
Jarek Kobus
ef3a4fd9e3 CppElementEvaluator: Unbind the function call
Make the code a bit more readable at the cost of verbosity.

Change-Id: If6d83a441b863a027b91e486b676183af6e5a8ea
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-26 13:35:51 +00:00
Jarek Kobus
11905967fe Process: Introduce DetachedChannelMode enum
The default impl of Process::startDetached() forwards
process channels. Make it optional by providing an additional
argument of DetachedChannelMode type for Process::startDetached().

Change-Id: I6cb55377c21dfedacd53117756894d07e354e0fe
Reviewed-by: hjk <hjk@qt.io>
2024-06-26 12:51:50 +00:00
Alessandro Portale
a6b7473834 ExtensionManager: Set icon background green or grey depending of state
This change sets green vs. grey background for extension icons depending
of enabled state.

Change-Id: Id99419544a00acca897aa0ad6c98d2598e4b2210
Reviewed-by: hjk <hjk@qt.io>
2024-06-26 12:26:50 +00:00
Alessandro Portale
3a007ee499 ExtensionManager: Reduce spacing between "cards" from 24px to 16px
Use the dedicated gapSize contant more consistently.

Change-Id: I3d4e27493a758b3bfa1b29988496f53ad0fbd811
Reviewed-by: hjk <hjk@qt.io>
2024-06-26 12:26:42 +00:00
Christian Kandeler
c3d28861da TextEditor: Add some logging for code folding
Change-Id: I95f6c1b370d458602d9d97e36b21d61c1d261e59
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-26 12:06:43 +00:00
Jarek Kobus
38520cd8a5 QtSupport: Simplify startEditorProcess()
Skip pid arg, as it's not used.
Inline error message construction.

Change-Id: I429d2094c2c8117fb79e9c9309036d9573b29f3f
Reviewed-by: hjk <hjk@qt.io>
2024-06-26 10:52:47 +00:00
Cristian Adam
d6efab3c44 LLDB-DAP: Remove usage of "avoid" marked function
Didn't notice the `toStringList` member function of `Environmen`. The
code now is now also nicely indented.

Change-Id: Id570ddc48e915d9090f9975d05761aa908311f0d
Reviewed-by: hjk <hjk@qt.io>
2024-06-26 10:36:02 +00:00
Alessandro Portale
ee1ae662b9 ExtensionManager: Add logging
Log the network request, incl. result and response. And how many
extensions were fetched remotely and added locally.

Change-Id: I634d72462c8076c2fa01e88a1918163f76d28aff
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-26 09:23:18 +00:00
Alessandro Portale
62e37eec42 ExtensionManager: Let QtC developer test data sets explicitly
The extansion query service is currently only reachable from within the
internal network. So far, if the request failed, and if Qt Creator was
configured with WITH_TESTS, a set of test json got loaded.

That test data confuses people in the team.

This change makes loading of test data explicit, and comments it off by
default.

Change-Id: I89236064b6af32be7559bb6d36cbf0d42982085d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-26 09:23:12 +00:00
Alessandro Portale
aefc50f1de ExtensionManager: Prioritize plugin metadata data from service
This change enables the Qt Creator Extension service data to override
data of locally installed plugins (so far it was the other way around).
We might want to add more description text, links, images or tags to
plugins. And we want to be able do that independently of Qt Creator
releases.

This change also allows for substantial simplification of the "data
merging" code.

The parsing of extension plugin dependencies from the json data needed
to be fixed. See dependenciesFromJson()

Change-Id: Ia0433f0e0c7a0f13c43e0569c0915b7d08f7370a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-26 09:23:05 +00:00
Cristian Adam
d9d5b87141 LLDB-DAP: Fix passing program arguments
This way if we pass arguments to the Run configuration, they will reach
the inferior whilst being debugged.

Change-Id: I93d99ff0d69b4ec710887097efc643fb48c8acca
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-26 08:30:43 +00:00
Alessandro Portale
6a192bcce8 ExtensionManager: Hide all details if no extension is selected
Change-Id: I87b901d474ae438c87d26cfa12a644398fd1f950
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-25 17:06:42 +00:00
Cristian Adam
030e3c2cd5 CMakePM: Do not add sources to globbed targets
If a class is being added to a target that has a variable resulted from
a `file(GLOB|_RECURSE)` call, we skip adding the files to the target.

Do not add the files, just run CMake which would gather the new sources
into the project.

Adding sources to a globbed target will no longer open the
CMakeLists.txt file, since nothing has changed.

CMake will be run after adding, renaming and removing of sources files.

Fixes: QTCREATORBUG-30445
Change-Id: I82e126737789f215a6400f5a43f303dcc57de005
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-25 16:08:28 +00:00
hjk
313ed327be ExtensionManager: Make restart string translatable
Change-Id: I1505625e23a1ec67876d34bda0592ee6e9fa47c4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-25 15:32:48 +00:00