Commit Graph

80529 Commits

Author SHA1 Message Date
Miikka Heikkinen
34b966c21d QmlDesigner: Show informative message when texture library is not found
Fixes: QDS-8444
Change-Id: Ief36595fda27b075ef3362d6f393655c56fd9940
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-29 12:03:28 +00:00
Miikka Heikkinen
26c1747ae6 QmlDesigner: Fix issues with adding texture as light probe
Changed resolving the currently active scene environment to be done
on demand instead of trying to track it realtime, since resolving it
is relatively cheap operation, so it doesn't cause noticeable delay
at context menu opening. The alternative would be to implement multiple
different notification handlers in ContentLibraryView, which would slow
down all operations and would be much more complex to ensure all edge
cases are covered.

Fixes: QDS-8437
Change-Id: Ib33cd1ad549d836b9d780f9b0f92e70d223e2a25
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-29 11:06:54 +00:00
Aleksei German
86ed12e729 QmlDesigner: Add StateGroups to Connections
Task-number: QDS-8027
Change-Id: I72ce5bfd2505269ad750ee5fbd5b13669891290f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-29 10:54:17 +00:00
hjk
8249eabbad Utils: FsEngine micro-optimizations
Mostly for shorter code, but also save a few cycles due to less
string construction and run time dispatch.

Also, make testFilePathFromToString() test two paths instead one path
twice.

Change-Id: I50a3145bca1a4b262a15e96173ea7ebd9cb678ad
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-29 10:17:41 +00:00
hjk
f7d022009b QMake: Use FilePath for sysroot
Less roundtrips.

Change-Id: I0f98629398170f5d1d4ccd60cfaa0d54f8e2b9f3
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-29 10:11:18 +00:00
hjk
669242b9d8 QMakeProjectManager: Progress towards reading remote .pro files
Change-Id: I26d6d47ac7cd44ec2877243d562de1d90ba45054
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-29 10:10:52 +00:00
hjk
3537c9974e Utils: Use .path() instead of .toString() in some local cases
Same effect, but "better" conceptionally.

Change-Id: Ic33bdc097b38176e81413736b2eb44d1fb7d0a3f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-29 10:10:27 +00:00
Marcus Tillmanns
452e1ca232 Docker: Ensure workdir for processes is reachable
When starting a process, make sure that the working directory is
reachable.

Change-Id: I911239d03afd916411d7fb03da806211349ff7e4
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-29 10:03:34 +00:00
hjk
50f6afe4d0 QmlProjectManager: Use a PathChooser for the fallback qmlscene
Allows to browse for binaries on the target instead of having to
specify a proper fully qualified remote path manually.

Change-Id: Iaf9dc5c4fe921a7188ef2178f10403fa01e69d03
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-29 09:51:08 +00:00
Riitta-Leena Miettinen
49546c4f48 Doc: Add M401 and M402 code syntax error and warning messages
Fixes: QTCREATORBUG-28482
Change-Id: I3a8976c0c96c102c9f745a1643d3a02e062658ac
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-29 09:50:58 +00:00
Eike Ziller
c3b05f1ef1 German translation: CMake
Change-Id: Ied82a653d6e1cc6336e501c79728ceb085c7d49d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-29 09:13:57 +00:00
hjk
9a9061a04a QmlDesigner: Fix warning about unused parameters
Change-Id: Ia244ae89613e67d7baede8b3e55b0ca981e60056
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-29 09:02:43 +00:00
hjk
03a91f9f98 CppEditor: Remove Snapshot::remove(QString) overload
... and fix fallout.

Change-Id: Ibbf865c3e4158fc98bb9b5372ce0633807b85576
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-29 08:25:16 +00:00
Xavier BESSON
3694d00dce Optionally use qmlformat for Qt Quick auto format on save
Task-number: QTCREATORBUG-28192
Task-number: QTCREATORBUG-26602
Change-Id: I22a3917e8a4de4aaf297e9d9d622bdede782c6a6
Reviewed-by: Xavier BESSON <developer@xavi-b.fr>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-29 08:06:34 +00:00
hjk
a157de7877 Utils: Fix expansion of macros in FilePath
In the New Project wizards, we do have e.g. %{ProFile} that should
expand to {scheme}://{device}//{path-to-pro}, not to
{}://{}//{schemedevicepath-to-pro} or similar.

Task-number: QTCREATORBUG-28355
Change-Id: Idbad709f3fce583f21186a1d43f27ecac15be2ea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-29 07:28:50 +00:00
David Schulz
0bd6d7a69f LanguageClient: move completion rerequest logic
...from the code assistant to the language client specific assist
implementation. This further reduces the complexity of the code
assistant.

Change-Id: I08ba5eecea826d3ccfe7f1f5a8791a085299d6ef
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-29 06:04:30 +00:00
David Schulz
8ff969d149 Core: optimize search result item text generation
Do not append an alignment string if no additional information needs
to be aligned.

Change-Id: Ia40c1b683fe20af275974d98a74d56b10970e908
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-29 06:03:55 +00:00
Cristian Adam
5b6bf29143 CMake: Add a preset for a minimal CMake configuration
This "cmake-plugin-minimal" preset contains the set of plugins that
I usually need to build to be able to test the CMakeProjectManager
plugin.

Change-Id: I8bb02879df38c40be38c4a2bf4e85e0623f2dca5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-28 18:22:45 +00:00
Thomas Hartmann
5705194bc7 QmlDesigner: Fix build for tests
Updating the NodeMetaInfo mock.

Change-Id: Ia3a87095413bb58430d978bb831ed8b808596093
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-28 15:56:16 +00:00
Mahmoud Badri
397e5f3022 QmlDesigner: Prevent content lib scroll when context-menu is open
Fixes: QDS-8441
Change-Id: Idfc3400fac43668d14cd5ff85cb42d745ef97dfe
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-28 15:42:45 +00:00
Orgad Shaneh
157f2bcd39 Merge remote-tracking branch 'origin/9.0'
Change-Id: I231d35f492713f317773b79478b5f7fb97a4fe50
2022-11-28 17:29:19 +02:00
Andre Hartmann
8e5c84e3dd Git: Disable instant blame for modified files
Change-Id: Iae24a8bbcbdb3663367ee863e8cc27ad92942e17
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-28 14:37:11 +00:00
hjk
196e73fa16 CppEditor: Convert AbstractEditorSupport interface to FilePath
Change-Id: I47439e154bc28d40e112b7eef46fa1f57a8b3fce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-28 14:02:05 +00:00
Cristian Adam
d852ec53a1 GitHub Actions / COIN: Update Qt to 6.4.0
Amends 169f2c4af6 due to the task
number QTBUG-108593.

Change-Id: Id3ab685632e32fad953d837d2f7ab357b034d739
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-28 13:53:25 +00:00
hjk
f68db427ef CPlusPlus: Migrate Macro to FilePath
Change-Id: I94e8702e81e809e4d8318572cc070a0531edaefa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-28 13:11:28 +00:00
hjk
3c8c5b08a8 Android: Simplify 32bit detection logic
Change-Id: I379e8903294dce644bd9f0214b596b56e5d7d81e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-28 12:34:13 +00:00
Christian Kandeler
aed633712f CppEditor: Prevent /TC and /TP with Objective-C files
This is relevant when clang-cl is used to compile Objective-C projects.

Task-number: QTCREATORBUG-28369
Change-Id: If8ae4dfaa07bf2ec81fbbec358663617c430b9e2
Reviewed-by: Frederik Seiffert <frederik@algoriddim.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-28 12:32:41 +00:00
Henning Gruendl
5b19c034ed QmlDesigner: Remove error states editor
Remove the error "Unable to assign [undefined] to QUrl" thrown by the
states editor.

Change-Id: Ic48deddbe698f161f486003ccaf9eb22d0ee65a9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-28 11:46:24 +00:00
Henning Gruendl
4b72ac3022 QmlDesigner: Fix states editor dialog not closing
Task-number: QDS-8439
Change-Id: Idf633b345de6e4f124b2f621699615ac6d764ceb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-28 11:45:57 +00:00
Thomas Hartmann
84104499b7 QmlDesigner: Add missing ItemLibraryItem property
Change-Id: Iab3a50ac67002e4a2f3807ee920bce892cd087cc
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-28 11:32:13 +00:00
hjk
a146403596 Utils: Make FilePath::refersToExe(...) return the found item
... and use in on the CMake side.

Change-Id: Ib215ebc4f87beb67b6a302d0c42e7b955a2fa5b7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-11-28 11:30:38 +00:00
hjk
9e0ed9eeac QMake: Remove one occurrence of QDir::cleanPath
Depends on host system.

Task-number: QTCREATORBUG-28355
Change-Id: I2f44bbbb96a080154838d9677e3c8aee2dba5e18
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-28 11:17:08 +00:00
Jarek Kobus
12b639970f MathUtils: Add exponential interpolation
Change-Id: I58bb26a6e921cbd1f5532bddcd6a6700ff80b94f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-28 10:45:13 +00:00
Christian Kandeler
ed06978830 ClangCodeModel: Switch off clangd persistently
... after failed machine suitability check.

Fixes: QTCREATORBUG-28441
Change-Id: Ic0fb956168204d8023ff96f92ae3fcd7cea8b0e9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-28 10:43:43 +00:00
Thomas Hartmann
ee10ba1909 QmlDesigner: Add support for tooltip in item library
This allows to define tool tips in the .metainfo files.

Change-Id: I3236c6e9f374a052e99b18d8c3983bfd0f072162
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-28 10:35:25 +00:00
Miikka Heikkinen
5544cdc276 QmlDesigner: Don't create duplicate default texture instance
Whenever an operation involving an asset image would result in
creation of a new texture node, it now checks first if
a matching texture node already exists and uses that instead.

Fixes: QDS-8435
Change-Id: I3d091aafcd09afdec897bc4da79789c1d84056e8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-28 10:20:44 +00:00
Jarek Kobus
23f53dcbda MathUtils: Add tangential interpolation
Reuse it in TaskProgress and in ProgressTimer.
Rename MathUtils::interpolate() into interpolateLinear()

Change-Id: Iff4cda1e3b8782cd26277ec75046ca5526be92c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-28 10:07:30 +00:00
Jarek Kobus
6f299f19ac Utils: Move DiffUtils::interpolate into MathUtils
Change-Id: Iac4a21a6c760d8fbf0dce380b1a9a587a9d3468e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-28 10:07:18 +00:00
Henning Gruendl
7d13c82750 QmlDesigner: Expose realValue from SpinBox
Task-number: QDS-8191
Change-Id: I265c4a95e84f6ef10a4c69f9a0089970f16f4bbf
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-28 10:06:25 +00:00
Henning Gruendl
62d86837e9 QmlDesigner: Fix states editor none visual items
When using any none visual item as root (e.g. Window) which don't have
a state property the support for adding a state on the root item needs
to be deactivated otherwise QtDS is crashing. The new states editor was
missing that.
On the other hand the use of StatesGroup with none visual items is
supported.

Change-Id: I194913719a13099ce8ac7cde5f78083ef84dc37f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-28 10:06:08 +00:00
Mahmoud Badri
ea55e01051 QmlDesigner: Focus material browser's sections separately
Focus is shown by a thicker selection border for material and
texture items. Delete shortcut works on the selected focused item.

Fixes: QDS-8401
Change-Id: I1ddbbd595a0da3f0e2b7cf2bb9e611532770bc3c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-28 09:32:58 +00:00
Eike Ziller
ef6bf3cb52 UpdateInfo: Merge "new Qt" and "updates" available
if both are availabe. Instead of showing two info bars, show just one
with a combined title.

Change-Id: I31c1c53459209492c5f62277829bc761a36f63a1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-11-28 08:46:15 +00:00
Fabian Kosmale
d15c102af8 InfoBar: Do not synchronously delete widgets in update
Deleting the widgets can trigger use after free errors if those widgets
are stil supposed to handle events.
This can for instance be observed with an ASAN build of Qt when pressing
the "Link Qt" button - the button still has a pending MouseReleaseEvent,
when update is called, and by deleting the InfoBarWidget that contains
the button, we run into the use-after-free.

That might also be relevant to the comment about a "complictated crash"
in infoBarDestroyed.

Change-Id: I9f807aa26db1169a5a749692922e580dc5874254
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-28 08:34:34 +00:00
Tim Jenssen
98a40b3690 CMake build: Make errors of execute_process fail the build
Instead of silenty failing and resulting in broken builds/packages.

The property is only available since CMake 3.19, so limit the feature to
that.

Change-Id: I82b06e78540e81a809f7fdfe130648becfc9672e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-28 08:29:42 +00:00
Miikka Heikkinen
ddecd338a8 QmlDesigner: Unify texture image providers
Texture editor, material browser, and UrlChooser all had separate
texture providers that served nearly identical purpose.
Unified all use cases to use same PropertyEditorImageProvider.
This provider is asynchronous, which combined with enabling caching on
Image elements, significantly improves responsiveness of the material
browser UI when there are many textures shown in the browser.

Fixes: QDS-8387
Change-Id: I2888aee2f4320dba9456fa046c9ede319673a3d9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-25 15:31:04 +00:00
Eike Ziller
e24ad7ac55 JSON wizards: Print parsing issues only with -customwizard-verbose
Some wizards will miss required components when corresponding plugins
are disabled. That is fine, and not an error per se. When actually
developing a wizard, these kind of errors should of course be posted,
but that is what -customwizard-verbose is for.

Fixes: QTCREATORBUG-28502
Change-Id: I3647d37ef7ca4dace7592c5443bdd13720290016
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-25 15:04:52 +00:00
Miikka Heikkinen
3a899b34c7 QmlDesigner: Skip imported files that already exist and are the same
When importing files to project, if the target file already exists
and has the same modified timestamp, silently skip copying the file
instead of asking if it should be overwritten.

Fixes: QDS-8402
Change-Id: If963e997c6bcfb3e46db6e74c46081784bdddc7e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-25 14:54:22 +00:00
Miikka Heikkinen
674ad1ead1 QmlDesigner: Fix compiler warnings
Removed unused code.

Change-Id: I40f94b6be1f9a1700c4024e78bae5df67513c839
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-25 14:51:42 +00:00
Christian Stenger
c210ffb2d6 AutoTest: Fix debugging of gtest based tests
Amends 6ae6390661.

Fixes: QTCREATORBUG-28504
Change-Id: I7617b080f4ac872c1f806a8e89fa9084a0ac948f
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-25 14:47:25 +00:00
Tim Jenssen
c071547aa5 qmljs: fix warning
Change-Id: I69714d6626d9135c5489258346f79b1c4bfbcd19
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-25 14:47:20 +00:00