Commit Graph

69993 Commits

Author SHA1 Message Date
Mahmoud Badri
0d4e7599f6 QmlDesigner: Remove warnings caused by Assets.qml
Make sure returned default QVariant() is valid.

Change-Id: I323001df3505bbe740f8f660de9c199aed05aac6
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-31 11:18:45 +00:00
Eike Ziller
b9400784a9 CMake build: Fix litehtml build if BUILD_SHARED_LIBS is forced to ON
Update qlitehtml with the fix.

Fixes: QTCREATORBUG-26192
Change-Id: I20bdd6f8f0d13064154461e6d845393df5e2d6b0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-08-31 07:19:10 +00:00
Eike Ziller
e465d18215 Always set an environment for QtcProcess
Since e755094480 we have a global option
in Qt Creator to set the (base) environment for any tools run by Qt
Creator. So it is expected that any tool actually uses
Environment::systemEnvironment() as a base, which is the system
environment modified by the global option.

QtcProcess already had a fallback to Environment::systemEnvironment for
resolving environment variables in Qt Creator macros in the command
line. Also use it as a fallback for the actual environment for the
process.

Latest occurrence where the global environment setting was ignored was
for starting language servers by our LSP client.

Change-Id: Id1a4141326d8ef3239b37d7f3daf21928605ca92
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-08-31 06:50:15 +00:00
Eike Ziller
99399ab6ee Fix saving of MIME type settings
Was missing a slash after the userResourcePath.
Broke with 8e352af0ec

Change-Id: I2f60e3dcaa07b13cd2459ee6a3aa67b51075545e
Reviewed-by: hjk <hjk@qt.io>
2021-08-31 06:49:51 +00:00
Cristian Adam
f5dd648b3a QmlDesigner: Build fix for Qt 5.15.x
Amends 870b619c85

Change-Id: I049c35a833f25afd01192282c13d2879fdfc9fc6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-30 20:01:23 +00:00
Thomas Hartmann
f6511fb29d QmlDesigner: Fix Model
The correct type in Qt 6 is QtQml.Models.ListModel

Change-Id: Ic6e488eea1feef150bb49d0d4f873f6bd5bac3c5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-30 18:02:48 +00:00
Henning Gruendl
06ea162713 QmlDesigner: Fix typo in property name
Change-Id: I9256a3b1b6010cbab930a000a2bc7deb049f3942
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-30 13:14:04 +00:00
Thomas Hartmann
870b619c85 QmlDesigner: Render effects on document level
Rendering effects requires actually rendering another item.
The effect is defined by another item that is rendered instead
of the original item.

For items that have an effect we do not render the children, since
the effect is only applied to the layer not the individual items.

We set layer.enabled temporarily to false, this ensures the effect
is not rendered as part of its parent item.

To detect the effect we use the source property an check if it points
to the ShaderEffectSource.

If one of the children inside the effect is transformed we have
to update the effect item.

If layer.enabled or layer.effect is changed we set the dirty flag
on the item and all children.

Change-Id: Iff61ef950e62a7a598b4bfa181ea70cb144368f3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-30 12:07:06 +00:00
Thomas Hartmann
3945868670 QmlDesigner: Render item inside the bounding rect
We have to render an item inside the bounding rect, because if
it is a component there might be child items outside its actual size.
The way we calculate the bounding rectangle excludes children
on the document level. We take clipping into account when calculating
the bounding rect.
When rendering the effect we do not have the instance. Therefore
we fall back to the standard bounding rectangle.

Change-Id: I7cd09d08d461d28c49a91fb891a5487185df0245
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-30 12:06:57 +00:00
Eike Ziller
e4995fd6c7 Remove QtScript from condition for building Qbs
It works without nowadays, and even with Qt 6, with its
bundled QtScript version.

Update Qbs to HEAD of 1.20 for a build fix.

Change-Id: I060ddec595c989852dc5861594423d5ffa5f521d
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-30 11:22:52 +00:00
Christian Kandeler
263d8fb5d7 QbsProjectManager: Make C++20 projects work with MSVC
Task-number: QTCREATORBUG-26089
Change-Id: I9f37ca3024f95a41724bf7b4e48ee8dbd340cd75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-30 08:23:43 +00:00
Tim Jenssen
96d7c1fa2f qmldesigner: fix "list is empty" warning
message was: "QFileSystemWatcher::removePaths: list is empty"
now calling that method only if there is something in the list.

Also tried to make the code a bit cleaner

Change-Id: I029d100e63cf42eb58757a144fecaaa8c8c908a0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-30 08:20:42 +00:00
Eike Ziller
a087bda442 LSP: Do not sort completion items if none sets sortText
It is unclear if and how the client should order completion items, but
at least haskell-language-server provides a sensibly sorted list (not
alphabetically) and doesn't set a "sortText".
Sorting the items alphabetically by label messes up the prioritization
of "best" matches that the server correctly does.

Only sort, if any item has a sortText.

Task-number: QTCREATORBUG-26114
Change-Id: I55a966763e21ba8b85085a087c37e6005438d4e3
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-30 08:16:55 +00:00
Eike Ziller
940a203d93 LSP: Set client working directory to project directory
If the server settings specify that a server is to be started "per
project".

This fixes e.g. running the haskell-language-server

Fixes: QTCREATORBUG-26115
Change-Id: If10af71d60786826a9218b4b98818df8d9710adf
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-30 08:16:38 +00:00
Miikka Heikkinen
1d5ddbf8f8 QmlDesigner: Fix update of effects after initial drag from library
Effect source type was set to incorrect after the initial drag to the
scene, so even resetting puppet wouldn't make a newly added effect
show up. Fixed by updating the NodeSourceType when updating the node
source.

Also reset the puppet for now when node source changes, as it doesn't
handle source changes properly.

Change-Id: Id22a298738fb1e7f841b94b473ccb61cc82e0322
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-30 08:02:00 +00:00
Christian Stenger
d96d9c1f3d PE: Fix file pattern regular expression
If the warning contains chained warnings we end up grabbing
too much and the file path is corrupt which also ends up
in strange visual issues on the issues pane.

Change-Id: Id343935ec933026d461d6572e7e5f4e15dc3da74
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-30 04:38:13 +00:00
Christian Stenger
aca5e375f4 Tests: Fix build without ShaderTools
Change-Id: Id22a91c440ea08fdab42e864d54587836e043584
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-27 13:38:45 +00:00
Christian Stenger
eead213d40 Help: Fix cmake build condition
Change-Id: I528df210b5ea56ecb0c5b629876e0eea465d75b2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-27 13:38:17 +00:00
Eike Ziller
28f1519182 Bump version to 5.0.1
Change-Id: Ic4daa60f1cb55a15a6885292cf2928910ae3f563
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-27 12:26:49 +00:00
Leena Miettinen
396a1ed555 Doc: Fix overview topic contents after content was moved around
The Best Practices were moved to the appropriate topics.

Change-Id: I0e525d9e2119158e2c3c8c971e72c062b7f03ca0
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2021-08-27 06:45:22 +00:00
Laszlo Agocs
491bd18d1f Update scenegraph API check in isUsable
Do not test for OpenGL-through-QRhi, but rather for
anything-through-QRhi. The implementation of the profiler
views is not tied to OpenGL anymore. That said, QQuickWidget
implies using OpenGL as of now, so in practice we will always
have OpenGL at best, but update the tests now to be better
prepared for the future.

Change-Id: Ic43eac1c5cf0e2ce2ef35cdd8a29b475884a5af8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-26 16:38:18 +00:00
Thomas Hartmann
30827fe401 QmlDesigner: Implement visibility for unified render path
If the item is set to invisible we set visible to false in
the render and preview puppets. This will have no effect on the
value in the property editor.

Changing the actual value of visible can have side-effects on
the rendering in some rare cases.

Task-number: QDS-4932
Change-Id: I5ce0925ebff8f5e4e64bc71fd5d33d6154b85f91
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-26 14:18:37 +00:00
Laszlo Agocs
90027cd298 Add Qt 6 ifdef for a DesignerWindowManager call
That code path cannot be hit with Qt 6 anyhow.

Change-Id: I6f8e2a1a3606a4e6fbaa10f650fc5f22354f48a8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-26 14:09:55 +00:00
Alessandro Portale
595a4a621d Tests: Avoid Qt6-related deprecation warnings
Qt::AA_EnableHighDpiScaling and Qt::AA_UseHighDpiPixmaps are deprecated

Change-Id: I36a289f00feeaa472ee911a567c2a6160e259317
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-26 14:00:14 +00:00
Assam Boudjelthia
b3a12e1ab9 Android: Don't register multiple debuggers for each ABI
After NDK r10x, there's one common gdb executable instead
of separate for each ABI. Currently, multiple debuggers
are being registered for each ABI although they all share
the same command. Apart from simplifying the list of debuggers,
this will make it less time consuming where each NDK can register
one instead of 4 debuggers.

Also, there was two functions handling debugger registration for
the default NDKs and another for custom ones chosen manually by
the user. Now, they are merged together instead.

Change-Id: I886b6fa8eb2190e630189f9002e7a44cd18c7b71
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-08-26 10:58:04 +00:00
Leena Miettinen
5f432f347b Doc: Update flow component property docs
- Describe new properties
- Update screenshots

Task-number: QDS-4561
Change-Id: I22b33a90581408060871c6d3c09b687796ef26a6
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2021-08-26 10:49:18 +00:00
Assam Boudjelthia
cd8da8fe5f Android: Get the minimum sdk level based on the used Qt version
Currently, Creator gets the minimum sdk version from a hard-coded
value (16) which is used for all projects. However, this is not ideal
because some Qt versions require a specific sdk level to build and run
properly. So, this change ensures that the minimum sdk value is obtained
based the Qt version used in the project.

Fixes: QTCREATORBUG-26127
Change-Id: I948dd18d16c3d9ca587ad7712aa4c9a1bfd53972
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-26 08:03:09 +00:00
Eike Ziller
34a884a52a Android: Clean up messed up kits that were created by Android plugin
No idea how to reproduce, but it can happen [1] that stale Android kits
appear in Qt Creator, which have broken combinations of Qt version and
toolchains. The Android plugin updates the Android kits at startup,
but only updates known "correct" kits, or creates new ones.

Additionally remove any previously auto-created Android kits that
were not recognized to be still usable.

[1]: probably after switching between a working Android setup and a
broken one, with broken toolchains/debuggers brought into the mix

Change-Id: I709f52df62f8998647e4d68bdfe76015e8941ab8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-26 07:19:46 +00:00
Miikka Heikkinen
8aad2c803a QmdDesigner: Enable rendering single items again for render puppet
Change the form editor rendering to be done by item basis instead of
just rendering the entire scene (unified rendering).

Fixes: QDS-2933
Change-Id: I999cbc834791bc6e96334eab8273d97e4f58975f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-25 15:38:17 +00:00
Christian Stenger
ea2b4872a9 QmlDesigner: Fix compile
Amends a9d730dfb9.

Change-Id: I484353822fa42c0857ba4950cbfdddc063f14843
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-25 14:22:09 +00:00
Ivan Komissarov
53019b45dc Update Qbs submodule to the top of 1.20 branch
Change-Id: I7a9c15344b821a9d3773c0a4585cb7e6af0adc37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-25 13:21:35 +00:00
Thomas Hartmann
a9d730dfb9 QmlDesigner: Add support for Vector4D
SpriteParticle3D colorVariation is a Vector4D.

Task-number: QDS-4876
Change-Id: I756f7a688266d67be1b275d4151874befefc0530
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-25 09:52:44 +00:00
Leena Miettinen
0b81fcafc6 Doc: Clarify the use of the distribution buttons in Properties
Task-number: QDS-4139
Change-Id: Ie657b78ee3a4e5c3222efae4b1499d00ac55133b
Reviewed-by: Tanja Remes <tanja.remes@qt.io>
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-08-25 08:52:36 +00:00
Mahmoud Badri
72536eb155 QmlDesigner: Fix assets library theming
Also define the themeUnimportedModuleColor value in the theme files.

Fixes: QDS-4935
Change-Id: I3fc0b2316ebc1b11e4de87c09e2136e768e5cbe2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
v5.0.0
2021-08-24 18:09:23 +00:00
Henning Gruendl
88ee84c5b1 QmlDesigner: Fix splash screen check box color
Task-number: QDS-4934
Change-Id: Ia92675d7c83eb5a94892714fd7889f85182d2e13
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-24 17:57:23 +00:00
Kaj Grönholm
d1d5f47bda Fix building with Quick 3D dev
Adjust to camera changes b74fde27@qtquick3d

Task-number: QTBUG-95932
Change-Id: Id7408541caaebb0ee18240e7bc4208ac416fb0b9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2021-08-24 15:35:30 +00:00
Thomas Hartmann
c7de2a224f QmlDesigner: Fix crash
There may exist components that do not belong to any project.

Task-number: QTCREATORBUG-26166
Change-Id: I77f5ec9c5d718300a38db203f9b5d1b1a4e96d1f
Reviewed-by: Tapani Mattila <tapani.mattila@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-24 13:53:48 +00:00
Aleksei German
c129ecfc3c QmlDesigner: Fix for styles ComboBox
- New styles;
 - Rework to be more reliable with complex names.

Task-number: QDS-4750
Change-Id: I63d89575540a463e8b6786c82a28effa185f10c5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2021-08-24 13:06:11 +00:00
Johanna Vanhatapio
4c6d7c63b7 Doc: Describe Joint and Skeleton components
Task-number: QDS-4888
Change-Id: I9a9664cb327f2ddad2025d5c38bb2f3b1bebb887
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-08-24 13:00:58 +00:00
Mahmoud Badri
da82253095 QmlDesigner: Fix root item size on first launch
Fixes: QDS-4936
Change-Id: I9b25788dcc11c14b5a7ef80dc7aad5f3ec3e636e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-24 12:16:54 +00:00
Eike Ziller
6feed6e656 QmlPreview: Fix socket connection on macOS
With Design Studio branding the temporary path got just too long (107
chars). Make the file name shorter, and add a warning for future
reference.

Change-Id: Id5ff448d55a8b109234b7c113695ea54b1836a2f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-24 11:08:16 +00:00
Eike Ziller
e017eaa3fd Doc: Update information about Qt Creator plugin wizard
After the switch to CMake.
Extends 29f3be1a6e

Change-Id: I626bc7393d290710d7e5d1f2907e6fa1f25a7d21
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-08-24 09:34:27 +00:00
Henning Gruendl
c6483a33bd QmlDesigner: Fix distribution SpinBox drag
* Replace StudioControls.RealSpinBox with a DoubleSpinBox
* Add tooltips to distribution origin buttons
* Add spacer between distribution orientation and origin buttons

Task-number: QDS-4139
Task-number: QDS-4927
Change-Id: I5670494d39cb5b5d3d36428583cde5e7434a8d76
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-24 09:28:03 +00:00
Alessandro Portale
bf2088075d Android: Don't crash in AndroidAvdManager
cancelChecker is an optional parameter.

Change-Id: Ie47ae834a34f8ebf8c901e4dcaf7a9c3af5c0ce4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-24 09:21:20 +00:00
Thomas Hartmann
8c8519853c QmlDesigner: Do not set literals as bindings
Literals like 'true' or '1' are no bindings and should be set
as variant properties. This requires special handling for QVariant.

Task-number: QDS-4684
Change-Id: Ib831fb78e76fbd7563fe3897b8a2c5379ee9a9db
Reviewed-by: Tony Leinonen <tony.leinonen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-24 08:55:04 +00:00
Thomas Hartmann
c0c3920a11 QmlDesigner: Allow bindings in default properties
Task-number: QDS-4704
Change-Id: I7138fb268e52252215f4fde358a9ea43451c0eef
Reviewed-by: Tony Leinonen <tony.leinonen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-24 08:54:55 +00:00
Christian Kandeler
5c6ebf7434 CppEditor: Fix race condition in test
Opening an editor starts a new parser, so we must do that before we wait
for the parsing to finish.

Change-Id: Iee9da8da1fb60bf496a093d8efd878101d91f53f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-24 08:19:54 +00:00
Kai Köhne
ca885ee87a README.md: Document Qt Creator main licenses
Change-Id: I4d5803c746ebfc0a17e6c21745c1c8775e2d50f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-08-24 07:07:47 +00:00
Leena Miettinen
5c8564015e Doc: Fix term used for angle brackets in coding style topic
Change-Id: I73f21a9fd8fbf2e4388b501edbc27371d907b166
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-24 07:04:59 +00:00
Tapani Mattila
4c50ec85b7 QmlDesigner: Show warning icons for each file
Task-number: QDS-3797
Change-Id: Ibcbed1a221e762e0e6a3b4f9f538b8e4b1f144d3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-23 16:21:41 +00:00