Commit Graph

72811 Commits

Author SHA1 Message Date
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
hjk
bbbc9d3fa9 AutoTools: Remove dependency from CppEditor
Not needed anymore.

Change-Id: Ie1b6faffc1cde6348d37c0f7c32f9621f6442b69
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:53:12 +00:00
hjk
2a5a2ca9f0 Meson: Remove dependency from CppEditor
Not needed anymore.

Change-Id: I597821a56d374a8d800f2fde43b78805ee1e0278
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 14:53:03 +00:00
hjk
b89baec2c1 ProjectExplorer: Promote CppProjectUpdaterInterface
... to ProjectExplorer::ProjectUpdaterInterface and generalize it
regarding language, but create a convience function for the C++
case, as that's the only user right now.

Also add the self-registering factory boilerplate and adapt all
buildsystems.

Change-Id: If928512609d41c25fad2aa58633c8bffabc4c48f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 14:50:10 +00:00
Jarek Kobus
0fa16f8489 TaskTree: Use common done handler
Instead of specifying two separate done and error handlers,
specify just one that takes additional "bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Ie4f92236a38b03dac3dd33b2c80a317b62772a12
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:33:27 +00:00
Jarek Kobus
0e7ecee489 VcsBase: Use common done handler
Instead of specifying two separate done and error handlers,
specify just one that takes additional "bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Ib92ef2dcd960372d9db6c8f50d4017a33c49ccd3
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:33:20 +00:00
Jarek Kobus
6059164299 TaskTree: Make setup handler optional
Change-Id: Idfcaaf5cc5f69895d8cf9bf6e4ee673e524b61fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:33:14 +00:00
Jarek Kobus
d35d0b5100 TaskTree: Add Task c'tor taking one handler for done and error
The overloaded c'tor takes one done handler with an additional
"bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Id579d055721a2a07a5a9f0900aa4a73655f21610
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:33:06 +00:00
Jarek Kobus
09c4aad0eb TaskTree: Keep just one done handler
Instead of having separate handlers for done and errorOccurred.
This will enable setting just one common done handler with an
additional "bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: I52d826dd89461ff93772a6fe7a85e432d1e84665
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:29:46 +00:00
Jarek Kobus
aef960a68c TaskTree: Get rid of the fluent interface
It wasn't really used and it interferes when refactoring.

Change-Id: I8b8ba1740fef24502855e896e9b33ba816e1229f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:29:35 +00:00
Jarek Kobus
790f7deb08 TaskTree: Allow custom deleter for custom task
This will enable employing ProcessReaper automatically
for QProcess tasks.

Change-Id: I54b1d4604a9dfb11698e23bd66cf94d34675f722
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:22:48 +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
hjk
f8bbdf6f07 Core: Inline ICore::init() into ICore constructor
More natural setup.

Change-Id: I5a51cdec3f955e4b887613bd3dea4b25d485e844
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 13:38:40 +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
Eike Ziller
4bd29f741c Merge remote-tracking branch 'origin/12.0'
Change-Id: I517dc84e975a570edd363253ad444a01799dbc4b
2023-11-06 10:51:11 +01: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
Alessandro Portale
e006d4e86d Android: Avoid "Empty filename passed to function" warning
When launching Qt Creator with clean settings on Windows, the Android
plugin might cause an "Empty filename passed to function" warning that
comes from deep inside Qt.

This hack works around that.

Change-Id: Id668b981a1467a54d852082e95963e34554006e9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-04 18:11:04 +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
Volodymyr Zibarov
d0203a39fa ClangCodeModel: Add menu action to re-index files
... that depend on changed headers.
When changing a header file the clangd code model is not updated for
files that including it if they are not opened in editor.
This is not to be done automatically, as it would be a performance
hazard to rescan many files, for example when changing a widely used
header.
Add a menu action to trigger such re-indexing manually to solve the
issue.

Task-number: QTCREATORBUG-27387
Change-Id: Ia8033401f847627cee041b102f9ac6f3af3dd709
Reviewed-by: Volodymyr Zibarov <gogan419@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-03 15:36:16 +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
Eike Ziller
f9d4697371 Merge remote-tracking branch 'origin/12.0'
Change-Id: Ice9c78147917fc13b6cf81ba781a37bdcd870e17
2023-11-03 14:58:00 +01: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
Marcus Tillmanns
5f7be10349 Locator: Handle file create error
Coverity-Id: 1561120
Change-Id: Iefa1f6e7bc7a28d9f0d7427051896c49a413f027
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-03 12:20:31 +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
Miikka Heikkinen
23f12f7b42 QmlDesigner: Add shader overrides for materials and models in 3D view
It is now possible to override all materials and models used in the
scene with options available in QtQuick3D.DebugSettings. The overrides
are assigned per-split.

Fixes: QDS-11068
Change-Id: I3a3bc372e860d7f61942eb40166464c9c86efd8e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2023-11-03 10:41:54 +00:00
Marcus Tillmanns
32f69227f1 IOS: Unify error handling
Instead of using some flags in some struct, we convert the error handling
to use expected_str<ResponseData> to clean up the error handling with
the outside.

Change-Id: I0f8d10c99715989e0069568ebc1d799d412a0600
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-03 10:01:45 +00:00
Marcus Tillmanns
d2b7f9d27c IOS: Fix infinite timeout
Previously the "runCommand" function would never exit if the child process
hangs. This fix makes it so that the caller can specify a function
that determines whether we want to continue to wait.
In this function we then check if the promise has been cancelled.

We also let runCommand return an expected_str to better reflect actual
error reason.

We also early-error in various places to keep indentation low, and
make it easier to track where something returns an error.

Task-number: QTCREATORBUG-29564
Change-Id: I71ee4568d87c6b21c3ba9c71b81d028d517b553a
Reviewed-by: Serg Kryvonos <serg.kryvonos@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-03 09:56:06 +00:00
Aleksei German
47c7f22107 QmlDesigner: Fix hardcoded qtquick style config
Task-number: QDS-11097
Change-Id: I0ebd531ee04420eae4d42de4c03205b592ff59af
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-03 09:06:02 +00:00
Aleksei German
52e652c986 QmlDesigner: Extend ToolBar backend for MCUs
Task-number: QDS-10338
Change-Id: I552cb25b9690a0c5dd202d99e8220453225bcd3b
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 09:05:57 +00:00
Brook Cronin
0899c540be QmlDesigner: Make kit settings button a toggle
Task-number: QDS-10258
Change-Id: If680778b6cc1f5795887ac9da69f35ae9858308c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2023-11-03 08:51:34 +00:00
Thomas Hartmann
4d1a210060 QmlDesigner: Use isInteger, isFloat in isNumber
Change-Id: I20b81b54c0f7758e9e864ff50174ac2d7527fb38
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-03 08:39:15 +00:00
Christian Kandeler
e6799e4e7f QbsProjectManager: Fix importing Qt projects on macOS
On macOS, qbs always sets the sysroot to the xcode directory, while Qt
Creator's kits do not have a sysroot entry for Desktop targets.

Fixes: QTCREATORBUG-29829
Change-Id: I3f11c45fdcd94e67be1b6ef6c50cd33834c74f40
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-03 08:32:59 +00:00
Eike Ziller
45d99c2cee Fix running tests if system language is not english
Force built-in tr strings when running tests. Some tests rely on these,
e.g. the JSON wizard tests in ProjectExplorer.

Change-Id: I27836adce0bd2f8c6919a8b1948e41f719c08b3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-03 08:11:38 +00:00
David Schulz
024f653806 Python: initialize run configuration with kit python
Change-Id: I85ebe906bee2d9bc88c443f0189a685ac97ee30d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-03 08:09:17 +00:00
David Schulz
f5e12237a2 Python: avoid detecting pythonw on windows
Change-Id: I75fcba53fa671904405d3411409c6ea67335e81b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-03 07:37:54 +00:00
Mike Chen
10a390c3d2 StyleHelper: fix floating-point DPR icon pixelated
set the DPR as a floating point number for the pixmap.

Change-Id: I354e27556dbd8a0d53cfc3e0c2b708f06406aaf5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-11-03 02:55:14 +00:00
Marcus Tillmanns
89da353746 Debugger: Don't copy unnecessarily
Coverity-Id: 1525663
Change-Id: Ic6abd81fbf3255700aac8e08592a5a59f08ea4ab
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-11-02 14:42:59 +00:00
Marcus Tillmanns
4593089bdc Debugger: Check return value
Coverity complains about not checking the return value of f.open()

Coverity-Id: 1359453
Change-Id: I9e6b7f5d3ab6ec58e99131e8a0d84d8f17863fed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-02 14:42:52 +00:00
Thomas Hartmann
f466ac7ce2 QmlDesigner: Add real as number type
Task-number: QDS-11098
Change-Id: I2825215f0ce9c57f2f88318bcdf1ecc11defa793
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2023-11-02 14:12:40 +00:00
Thomas Hartmann
4d55d6be18 QmlProject: Fix crash
If no replacment kit is created we have to return.

Task-number: QTCREATORBUG-29717
Change-Id: I7c91eeb5a3710640adfa0a561aaac4fefc8f1431
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-11-02 12:46:44 +00:00
Thomas Hartmann
fc1c720aec QmlDesigner: Move the functions to handle assets drops
Moving those functions to ModelNodeOperations allows reuse in
other views like e.g. the TextEditor.

Change-Id: I7eee1c6080b4208ffaab6637f0debf78ec648c8e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-11-02 12:34:09 +00:00