Commit Graph

88653 Commits

Author SHA1 Message Date
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
Pino Toscano
7c4fec664c Drop extra executable permissions
Change-Id: I3f6fc3d6df6f705ceedc2daa47f3cad4c19b4706
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-06-27 13:53:17 +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
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
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
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
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
Leena Miettinen
d6eee1e250 Doc: Update supported CMake presets version to 5
Link to the presets docs for version 5, so that users
won't accidentally use fields from newer versions.

Task-number: QTCREATORBUG-30604
Change-Id: Iab548df768d55408dd018e97e2f5c9c1dfc3e594
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-26 13:28:23 +00:00
Leena Miettinen
9cb4e8042a Doc: Replace \badcode with \code to show JSON highlighting
...in the online docs. Does not work in the helps.

Change-Id: I6391ff40be2607eb026153deec418e9389954b7d
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-26 13:11:12 +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
David Schulz
3b7e782bc6 Debugger: remove unneeded check and assignment
If the inner type is null at this point it will also be null when
assigning the same type again.

Change-Id: I4dbad41a60d4853ac016adb54c693ce19d6f65d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-26 07:46:47 +00:00
Leena Miettinen
064f77a5a8 Doc: Update screenshot of Preferences > Axivion
Add the new options and a link to the docs to the change log

Task-number: QTCREATORBUG-30604
Change-Id: I50acab63b6d7a49c5e2dbf7ebd772f88280fb3a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-26 07:09:45 +00:00
hjk
c1b8320ca2 Debugger: Execute all inheritance tests also for LLDB
LLDB 3.8/360.x was not working with multiple inheritance even on
the command line, but looks ok nowadays at least in this simple case.

This does not fix the linked task.

Task-number: QTCREATORBUG-31042
Change-Id: Ibc52c9aaf31513af05487657a229fc4945d7e08f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-26 06:55:27 +00:00
David Schulz
eca562af54 Debugger: remove unused function from cdbbridge
Change-Id: I3e3fe0c89d7ecfa7c727a26998978d07fd9bc390
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-26 05:25:54 +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
Cristian Adam
cc05c16377 CMakePM: Ask for a build configuration name for new configurations
Amends f866b03b19

This would do what the QMake build system does on new build types, it
asks for a name and uses that name in the build directory.

Fixes: QTCREATORBUG-26066
Change-Id: Iec5b4ace1e203affad718b42ec2bcbbc87aef51f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-25 15:30:46 +00:00
Alessandro Portale
c8e1af0292 ExtensionManager: Remove "Install..." button
Change-Id: I0b7a79a1182eca26d0dc97750db2fa84eb444cea
Reviewed-by: hjk <hjk@qt.io>
2024-06-25 15:16:43 +00:00
Alessandro Portale
5be68d7256 ExtensionManager: Enable/disable dependencies, inform users accordingly
This instantiates PluginView in order to use setPluginsEnabled. It
enables dependencies of a plugin that is being enabled. Likewise, it
disables dependent plugins when users disable a plugin.

In both cases, the user sees the familiar info dialog.

On confirmation, a "Restart now" button is shown.

Change-Id: Ie74ed377bfdd1ce3cb06289c2aae78377475bc53
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-06-25 15:09:32 +00:00
Alessandro Portale
bb32b44671 ExtensionManager: Enable opening of external links
Amends: 81163b431e

Change-Id: I512279d86590bc35d7816ff69bb618aea58b4fcb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-25 14:57:51 +00:00
Jarek Kobus
1e0fc74739 CppModelManager: Simplify future template parameter
Since we don't use the future interface for result
reporting, simplify it to be QFutureInterface<void>.

Change-Id: I4d3a2e7f87721c54996894d744e5c43cc6223d47
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-25 14:55:01 +00:00
hjk
828c50d33d ExtensionSystem: Split PluginView in PluginData and view
Change-Id: I7337b83eafe391b4fc46ef9c2e2617a76adf0f5f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-25 14:21:26 +00:00
Eike Ziller
44e36686c8 Fix lupdate issues
Change-Id: Ie71649f38e29c2fd6f644e023772f15865d6e6aa
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
v14.0.0-beta2
2024-06-25 13:51:50 +00:00
hjk
9eaa9b1f66 ExtensionManager: Switch on by default
But keep experimental.

It is currently less functional than the old plugin dialog, it
misses e.g. dependency tracking when disabling plugins and the
design misses a way to restart Creator in the common case where
this is necessary.

Change-Id: Ib6c5aba762426510fc174c99ddc486d31d240484
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit c57d70e242)
Reviewed-by: hjk <hjk@qt.io>
2024-06-25 13:51:18 +00:00