Commit Graph

72811 Commits

Author SHA1 Message Date
Jarek Kobus
7e4c7aa779 CommandLine: Add a c'tor accepting a list of various types
Make it possible to pass a list of a mixture of QStrings
and QStringLists for command line's "args" argument.

Change-Id: Iafe3249f074b9568537e72a80e46ec4ed143014a
Reviewed-by: hjk <hjk@qt.io>
2024-05-16 12:42:49 +00:00
Christian Kandeler
513bfcbda1 CppEditor: Move RemoveUsingNamespace quickfix to its own files
Change-Id: Iba66511d273bdf6e7fcf913411a38e89f3b8822a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-16 12:39:09 +00:00
Christian Kandeler
8d0025fe09 CppEditor: Move some related quickfixes into dedicated files
The new file is still too large, but these functions and data structures
are so horribly coupled that it will take an extra refactoring round to
split them up.

Change-Id: I421a3db6dfc74ea78a35d0ccf1a88d782d863b9a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-16 11:53:46 +00:00
Marcus Tillmanns
f11c896b7f Core: Add function to expose the "IdeVersion"
Change-Id: Ic6c8fc4de59ee46baa616928c845632d3a1b8809
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-16 11:45:12 +00:00
Marcus Tillmanns
50fbf6056a Lua: Install meta files
Change-Id: I5ea812f9b64fd80d64a3930bc5301c932554ce18
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-16 11:26:22 +00:00
Marcus Tillmanns
1e6b0d3df5 Lua: Remove templates plugin
We decided to stick with the json based templates for now.
Instead we added the ability for lua plugins to add json wizards too.

Change-Id: I71b91264f77e24c9b2b9a3a0c9a11cf0440673a4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-16 11:26:13 +00:00
Mahmoud Badri
379933cb39 QmlDesigner: Hide bundles from the components view
Also few relevant tweaks.

Fixes: QDS-12680
Change-Id: I3d552d9de2d92c0501c7b05d626cad84e3688dc9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-16 10:37:46 +00:00
Marcus Tillmanns
fde45e98b9 Lua: Add Error handling during hook invocation
Change-Id: I63bb062d87126278ad4f6670f5b98e31d59aa8bb
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-16 10:20:28 +00:00
hjk
6aab6f61b5 Debugger: Provider Qt version externally to bridges
Extracting within the bridges is expensive.

Change-Id: Icf69db4b112230cc23e331abc0b3eb0de1323f46
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-16 10:03:08 +00:00
Jarek Kobus
bee7cdfd1e Android: Add AndroidDeviceManager::createAvd()
The createAvd() command is going to turn off the
avd file system watcher during execution, so this needs to be
a part of AndroidDeviceManager.

Change-Id: Ic8038be53d2be34136649b6b8a44435a4fc87a9f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-16 09:56:06 +00:00
Alessandro Portale
46fb01f785 Android: Make avdConfigEditManufacturerTag() more readable
Rename it to modifyManufacturerTag() and use newly introduced enum
to describe the type of modification.

Change-Id: I8e903891e87d7133ec37e9aecfd303b424a36d15
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-16 09:33:59 +00:00
Jarek Kobus
7af6722c07 Android: Simplify listVirtualDevices()
Introduce ParsedAvdList struct and return it from the parseAvdList().
This eliminates passing the errorPaths result by reference.
Simplify listVirtualDevices() implementation by removing some local
variables.
Adapt the tst_AvdManagerOutputParser test accordingly.

Change-Id: If4670bcc81ce36416c1fe35e8ee57e822f82516f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-16 09:33:41 +00:00
Marcus Tillmanns
58f596e36a Lua: Add "printToOutputPane" plugin option
Allows a plugin to automatically forward the "print" command to
the output pane instead of only to qDebug()

Change-Id: I10fb8063bc1713eaaf77368ea7f760270df190b3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-16 09:22:36 +00:00
Marcus Tillmanns
84e706b6da LSP: Remove unused function declaration
Change-Id: Ib8841b7eafb225faaa7952fde6c71cbcf6848c4f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-16 09:22:14 +00:00
Marcus Tillmanns
898203aa6e Lua LSP: Add callback if server fails to start
Change-Id: I422baeffff96cf56a110cbf74716352c9104c5ef
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-16 07:15:48 +00:00
Jarek Kobus
29822d1a2b ThreadUtils: Replace the implementation for Qt 6.8
Change-Id: I8d4890179165bca02af972debfe4f11fae41ebbd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-16 07:05:39 +00:00
Marcus Tillmanns
c00ae02dff LanguageClient: Add "unexpected" argument to clientRemoved() signal
Change-Id: I25b6b13759d6052bfc15fc78ac60c532a55885b8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-16 06:54:42 +00:00
Christian Stenger
609d81b8aa AppStatisticsMonitor: Fix missing include on Linux
Amends de18097cb4.

Change-Id: I91d8fcc76ba3bf464f9fc53eabc39704253bd497
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-16 06:18:53 +00:00
Alessandro Portale
15446c9e3f Android: Don't crash when dis- and reconnecting phone via USB
When ADB signals a change about the list of connected devices, the whole build/run steps tree gets deleted and recreated.

The AndroidBuildApkStep is a part of that tree and starts one or more
"keytool" processes on creation/init. They were started with their own
event loop. Those synthetic event loops caused a change in order of
deletion which led to crashes with obscure backtraces.

This change removes the event loop creation from "keytool" calls. The
crash is avoided.

The calls take ~0.5 seconds. The short UI freeze should be an acceptable
hotfix trade-off for a crash in QtC13. If 0.5 seconds freeze seem too
much, a better fix could be done in QtC 14.

Fixes: QTCREATORBUG-30645
Fixes: QTCREATORBUG-30770
Change-Id: I8842dc87023142ae75572bf255c7f1ec808d9bab
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-05-15 18:52:46 +00:00
Christian Kandeler
b16f4ccdc0 CppEditor: Move MoveClassToOwnFile quickfix into its own files
Change-Id: I1d54263ac55c57e76120924627949b98816aafc3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-15 14:14:17 +00:00
Christian Stenger
ef4f690cef AppStatisticsMonitor: Add to qbs build
Drive-by changes to follow common patterns.
Amends de18097cb4.

Change-Id: I05e1e28a0ca080cd28c55aa3b8d88a66b7e8dbcf
Reviewed-by: hjk <hjk@qt.io>
2024-05-15 13:55:57 +00:00
Christian Kandeler
6a3f66af85 CppEditor: Introduce central function for registering quickfixes
... and use it to register the InsertVirtualMethods quickfix.
The resulting registration pattern encourages the presence of tests and
easily allows minimal visibility of the classes involved.

Change-Id: I85fba0b983b51d84b6fae1f6fe51b63eed0ee336
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-15 12:40:24 +00:00
Christian Kandeler
ce16d58214 CppEditor: Add quickfixes/ subdirectory
We'd like to split up the monster files cppquickfixes.cpp and
cppquickfix_test.cpp by moving non-trivial quickfixes into dedicated files.
Since there will be many of them, we want to have them in a separate
directory. This patch prepares that.

Change-Id: I1e78fab5cce25151662297482582c8043618332e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-15 10:59:01 +00:00
Artem Sokolovskii
de18097cb4 Appstatisticsmonitor: Add statistics monitor plugin
The plugin adds a new tab to Navigation Widget. The tab contains
two charts CPU consumption and Memory consumption for started
applications in QtC. There is a combobox by which a monitored
application can be chosen.

Change-Id: I0747c90e73a289d65aabd31672f3accf74f00749
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-05-15 10:24:16 +00:00
Eike Ziller
ea9f7f27fe AutoTest: Fix capitalization on project settings page
Group boxes are book style and don't have colon

Change-Id: I8e5f1dcc1ac451a3324dc37240cc589431c7057b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-05-15 09:49:21 +00:00
Christian Stenger
06268fe85f Axivion: Fix displaying tags
Change-Id: I5071630c3f62a4c3bb2b01495ec37f45ef7fa0c2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-05-15 04:13:06 +00:00
Tim Jenssen
310abd3b70 TextEditor: use modern approach to delete TextEditorWidgetPrivate
Try to tackle the crash at destruction:

https://the-qt-company-00.sentry.io/issues/5315538277
https://the-qt-company-00.sentry.io/issues/5312380342
https://the-qt-company-00.sentry.io/issues/5237253338

Pick-to: qds/4.5
Change-Id: Id4436bf5adc0c725f9b5538480619ed99428413f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-05-14 19:15:37 +00:00
Thiago Macieira
0c6e1fab95 Tracing: fix build: theme.h: No such file or directory
tracing_qmltyperegistrations.cpp:11:10: fatal error: theme.h: No such file or directory

That comes from src/libs/utils/meta_types/qt6utils_custom_metatypes.json:
    {
        "classes": [
            {
                "className": "Theme",
...
        ],
        "inputFile": "theme.h",
        "outputRevision": 68
    },

That file is probably wrong but I don't know how to fix it.

Change-Id: If05cb740b64f42eba21efffd17cf1c207c139d7e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-05-14 18:13:22 +00:00
Marco Bubke
76ec124698 QmlDesigner: Fix compilation error
Change-Id: Ia49491a7deae085460fe4498cbcc6727cc10db7b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
2024-05-14 14:58:38 +00:00
Mahmoud Badri
2376e008f7 QmlDesigner: Update 3d user bundle imported state on load
Change-Id: I8df19486523cfd25db832ed78f0792095548dfea
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-05-14 14:45:43 +00:00
Mahmoud Badri
f462be8e80 QmlDesigner: Prevent adding component materials to the content lib
Also remove the experimental restriction on the content lib user section

Fixes: QDS-12637
Change-Id: Ice2ac3f32a934d7c65ea7f406a2b5f8c4b5fed0c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-14 14:02:28 +00:00
Eike Ziller
18e817ce3c Fix capitalization of refactoring actions
Consistently use book style for refactoring actions (which appear as
items in drop downs and menus).

Change-Id: I31cfd40dfc5d4d14a5949072168682a12cf566ac
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-05-14 13:52:12 +00:00
Marco Bubke
bfbcf88161 QmlDesigner: Fix crash on exit
Change-Id: I26f3c1154d8cdef9cf76b6f608634067b099ea0e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-05-14 13:48:53 +00:00
Eike Ziller
902dda5b27 C++ settings: Fix missing full stop
Change-Id: I690ac0fc6d517420db5a0116495fb40167ebedfd
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-05-14 13:43:06 +00:00
Mahmoud Badri
c2778b2301 QmlDesigner: Don't override existing content lib user textures
Better solution to ask for overriding or not is for the future.

Fixes: QDS-12626
Change-Id: Ib147121d3b9cb783f45a79a96fa432d371750a0e
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-14 12:47:29 +00:00
Thomas Hartmann
22657af3f0 QmlDesigner: Use reverse iterators to support qualified scopes
Change-Id: I88a4dcbff7a50f399b81a948f273e9cf9e36782d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2024-05-14 11:30:28 +00:00
Mahmoud Badri
7ffd4805ca QmlDesigner: Handle content library user items empty state
- Make sure search is working
- Hide sections with no items
- Other tweaks

Fixes: QDS-12682
Fixes: QDS-12625
Change-Id: Ia304743323c0459dd314752dba0cf1dc5e4c4889
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-14 10:22:15 +00:00
Burak Hancerli
14a191018a QmlBuildSystem: Fix absolute import paths
Task-number: QDS-12732
Change-Id: Ic299731e1bc9b98bc4da82dbb20f6a75299ce72d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-05-14 09:17:40 +00:00
Mahmoud Badri
5bf8845c42 QmlDesigner: Add UniqueName::getpath()
Also relevant tweaks in the same class

Change-Id: I59ca0839a28478028b8aa36b9df500f29d831b90
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-14 08:24:07 +00:00
Mahmoud Badri
f7a39ed57b QmlDesigner: Use UniqueName util in the assets view
Change-Id: I1e27cb55fd1085f36ba8b6b38829baef49040c29
Reviewed-by: Shrief Gabr <shrief.gabr@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-14 07:43:23 +00:00
Mahmoud Badri
54879113f1 QmlDesigner: Ensure unique content lib user item icon names
Also update user materials model to have the improvements
done to the 3D model. Also trying to make the 2 mdoels
as similar as possible to make it easy for further
future refactoring.

Change-Id: I5a32e1dcd7919bdf3cb638b068b0cdb5d4afecd9
Fixes: QDS-12736
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-13 14:48:15 +00:00
Ali Kianian
924019e8c2 QmlDesigner: Use GeneratedComponentsUtils in Model Editor
Change-Id: I567c746eb098c0c64d590ea7fed71f17de5adc76
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-05-13 13:49:22 +00:00
Alessandro Portale
6663f7c9bd ExtensionSystem: Introduce alias PluginSpecs
Change-Id: Ic7b87246cf91328c4291bbce5760a45dfa0b14e5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-13 13:46:53 +00:00
Artem Sokolovskii
465ad7b0fc ProjectExplorer: Introduce "Show All Kits" option to Kits view
By default, the kits view now displays only active kits
relevant to the current project. To access additional kits,
users can now use the "Show All Kits" option.

Change-Id: I41ecd7cbe7e220d564692b3cb16ea176add2b201
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-13 13:34:18 +00:00
Mahmoud Badri
21f00445be QmlDesigner: Add UniqueName class
The class is used for generating a unique name anywhere in QmlDesigner
codebase. The role of this class is generation of next candidate name
when name is not unique. Actual checking of name uniqueness is provided
as a function param.

Also applied the new UniqueName on 1 usecase in
ContentLibraryUserModel::getUniqueLib3DQmlName

Change-Id: I777aeef7c269bed7d999695cf5fcee6a5576222b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-13 12:32:56 +00:00
Tim Jenssen
cf614eca91 StudioWelcome: silent splashscreen if there is a dialog open
Pick-to: qds/4.5
Task-number: QDS-12713
Change-Id: I206f132f526928fb02ea8d2f117c0ba19c08156e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-13 10:59:27 +00:00
Mahmoud Badri
4f23a553d1 QmlDesigner: Enable content lib user 3D context menu
Also some relevant tweaks.

Change-Id: I7bace9ce6bd7b45951cc18f7175b4646251196f0
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-13 09:25:18 +00:00
Eike Ziller
0f9270ed7d Editors: Highlight the view that has focus
If there is more than one editor view, i.e. if the view is split or an
additional editor window open, paint a small line in the highlight color
below the editor tool bar to indicate which view is "current", and
therefore the target for opening files, and keystrokes (if it also has
focus).

Fixes: QTCREATORBUG-23654
Change-Id: I9950c133a6633c6e68943c038669895dce1dd7ef
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-13 08:53:52 +00:00
Eike Ziller
6075904af5 CMake: Fix library build path for MinGW
The code that handled the MinGW case of libFoo.a -> libFoo.dll
broke the case of libFoo.dll.a -> libFoo.dll that is handled
by the code before that.

Amends 0d8a542b4f
Amends 8713919f31

Fixes: QTCREATORBUG-30556
Change-Id: I76f60c5e646bce97169b205860babf6a0d3b08b6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-05-13 08:53:38 +00:00
Christian Kandeler
67e233fefc Update qbs submodule to HEAD of 2.3 branch
Change-Id: Icdbfaf63f9c8e37c00a735c22f6487ec9dd8975b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-13 08:44:35 +00:00