Commit Graph

67787 Commits

Author SHA1 Message Date
hjk
61d6120619 Utils: Port NewClassWidget to QRegularExpression
Task-number: 24098
Change-Id: I6dcc14f474ffe0b25d2a4db948346c2274fcfeea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-10 09:17:48 +00:00
Marco Bubke
acf5329422 Sqlite: Fix null handling
Most of it is only silencing a warning but one is fixing a faulty test. So
writing null values should now be working.

Change-Id: If702e1fc8176a9e0ae82a5589c719d567929202b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-10 09:05:00 +00:00
Henning Gruendl
e330cccbfe QmlDesigner: Add dialog title label in flow view
* Add support for showing the dialog title of a flow decision in the
  flow view.
* Add preconfigured positions for the label to be placed.

Task-number: QDS-2248
Change-Id: Ib113ac44e9bdc084d18a3a6083b767487bd9cde2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-10 08:54:47 +00:00
Christian Kandeler
758f79923f CppEditor: Fix operator refactoring
The refactoring option was not triggered if the operator definition had
a different amount of whitespace after "operator" than the declaration.

Fixes: QTCREATORBUG-6236
Change-Id: Idf6438203e28d3f1effe0a0375d6563f813a9726
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-10 08:27:38 +00:00
hjk
30610b7991 CMake: Remove some now-unused code
Change-Id: I39dd5f8de0ca4e5461cd01885029e1c65ac8ec05
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-10 07:50:01 +00:00
Christian Stenger
d0ecf4537a LSP: Fix missing include
Amends 1f303ffcc5.

Change-Id: I6cf8bf0b1d40c7de1294769bd9a6a406ce74ef92
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-10 07:19:18 +00:00
hjk
afde217f28 Debugger: Convert a QRegExp use in source path map
Task-number: QTCREATORBUG-24098
Change-Id: I1ee441a60cbf362d38459bcef869e02d7fca9b7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-10 07:07:23 +00:00
Christian Stenger
ae0d913e2f CMakePM: Fix compile
Amends 01b0d4f8f5.

Change-Id: I05a65684c51b960eeb4803b5d764bc8ff5a22626
Reviewed-by: hjk <hjk@qt.io>
2020-06-10 06:53:28 +00:00
hjk
1f303ffcc5 LSP: Port to QRegularExpression
Task-number: 24098
Change-Id: Ic7efcf3bb3d268e52ac545a72e5188c5affda004
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-10 06:36:45 +00:00
Aleksei German
e069293a4b QmlDesigner: Variant types for Binding Editor
- Variant and alias types proper support
 - Extended instantiation options for Editor
Task: QDS-2264

Change-Id: I95ff24fb81ce64b4effc64803304ff2b150a7ff6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 18:44:14 +00:00
Aleksei German
def4655042 QmlDesigner: Fix for Binding Editor launch pos
Task: QDS-1418

Change-Id: Id0c051d7187648a1477de70769fb7a47363ccdeb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 18:43:42 +00:00
Tobias Hunger
01b0d4f8f5 CMake: Remove magic configuration from CMake
Get rid of magic configuration handling in the CMakeProjectManager.

* Use CMakeCache.txt as the sole source of truth, do not keep
  a shadow copy of configuration in the .user file
* Have initial CMake arguments that are easy to edit in batch
  (Fixes: QTCREATORBUG-18179) used whenever no CMakeCache.txt
  file is in the build directory. These allow for any thing that
  can be passed to CMake on the command line.
  (Fixes: QTCREATORBUG-16296)
* Ask when changes to CMake configuration were not applied
  (Fixes: QTCREATORBUG-18504)
* Run cmake with arguments effecting its configuration only when
  the CMake settings are changed in the UI, run CMake without any
  special arguments in all other cases.
* Get rid of the confusing dialog used to keep settings in sync between
  what is in CMakeCache.txt and Creator (Fixes: QTCREATORBUG-23218)

Change-Id: I26d55be7df733f084f5691ecf7d7b4352f58b8e7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-09 16:34:00 +00:00
Christian Stenger
c02a0037d5 Sqlite: Fix unit test build
Change-Id: I29c15bbad053a3bac01ea05ad06ff994ce0d8d06
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-06-09 14:50:09 +00:00
Marco Bubke
06866c3ee9 Sqlite: Use a more efficient update hook
Change-Id: Ic6df1f4ba6b914c7751faf7cf89083fa50a92793
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-09 14:48:27 +00:00
Christian Stenger
ebfe03c151 QmlDesigner: Fix compile
Amends 3bd22bd2d7.

Change-Id: I2193d49056a95a818087b48fbf571196627bb3e3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-06-09 14:03:23 +00:00
Miikka Heikkinen
90e7ec8005 QmlDesigner: Insert dragged effect into effects list of environment
When dragging a 3d effect from item library to navigator, if the
parent node is a View3D with SceneEnvironment, or SceneEnvironment
itself, also add the effect to the SceneEnvironment's effects list
inside the same transaction.

Change-Id: Ib7cfd312efabaabb2a1e877fa662feaeb8ee3ac6
Fixes: QDS-2200
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 13:16:16 +00:00
Miikka Heikkinen
bd2e67b4f7 QmlDesigner: Fix possible imports list after import removal
Order of the notifications caused obsolete imports list to be used when
possible imports list was updated, so explicitly update possible
imports on imports change handling, too.

Change-Id: Iea1ae4deecd84c35114a613098e7e5bcf2e86762
Fixes: QDS-2199
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 13:15:27 +00:00
Miikka Heikkinen
a9619b53f3 QmlDesigner: Keep possible imports updated
QmlJS resolves available libraries at its own pace on the background,
which means all possible imports are not necessarily known at the time
the model is attached.
Listen to QmlJS::ModelManagerInterface::libraryInfoUpdated to trigger
reload of document when available libraries change to keep
possible imports list up to date.

Change-Id: Id605a6ee1fe2c43735bb30c9446d2a31ef52fe99
Fixes: QDS-1592
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 13:14:51 +00:00
Cristian Adam
be339abb16 CMake Build: Fix unittests
Change-Id: I4214954d880d19dbe9a070d031c417dc3caf068a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-09 12:44:29 +00:00
Miikka Heikkinen
3bd22bd2d7 QmlDesigner: Persist navigator expand state between model changes
Each qml document has its navigator tree expand state cached at
model detach and the state is restored at subsequent mode attach on
the same document.

Change-Id: I93ff71f500abde44fcc829f53baefc40b68981f6
Fixes: QDS-2222
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:32:28 +00:00
Miikka Heikkinen
29ceaade9c QmlDesigner: Restore the previously active 3D scene on scene creation
Store the last active scene in global 3D tool state and restore it
when a scene is created after puppet relaunch.

Change-Id: Ie2d69f6db6798ab383c66d38b2dea7eba13adc97
Fixes: QDS-2239
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:31:57 +00:00
Miikka Heikkinen
0a83cc4e88 QmlDesigner: Show the scene id in 3D edit view
It's sometimes hard to tell which scene is shown in 3D edit view, so
added the scene id to the upper left corner of the view.

Task-number: QDS-2239
Change-Id: I5999e41c3f92028cd9a0f79ae0c8b72263d9ce42
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:31:37 +00:00
Miikka Heikkinen
0d7ba7a76f QmlDesigner: Fix item library sections expand state persistence
The functionality was already there, but it didn't work, because
non-invokable function was called from qml.

Change-Id: I3e814b859d6f88836476de7aca12bc929aec31d6
Fixes: QDS-2142
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:29:27 +00:00
Christian Stenger
f4157e81d2 QmlJS: Fix superfluous whitespace
When dragging a property on itself inside a "oneline" item
Qt Creator prefixes a single whitespace even if it contains
already whitespace(s).

Change-Id: I3028d8c44d9b91d51c96a6d363e48a877a6a78da
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-09 12:29:08 +00:00
Miikka Heikkinen
279454a54b QmlDesigner: Keep hasActiveTimeline QML context property up to date
Change hasActiveTimeline QML context property setting to be based on
current timeline change notifications instead of timeline node
creation, as the timeline will not be valid at the time of the node
creation. That also failed to detect timeline deletion.

Also fixed the timeline logic to clear current timeline from model
when the timeline is deleted.

Change-Id: I9191300c964bc624a958003b6aa0d5d9e77ddf9a
Fixes: QDS-2139
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:29:03 +00:00
Miikka Heikkinen
5551791077 QmlDesigner: Fix hover hightlight of 3D edit icon gizmos
MouseArea.containsMouse gets confused when the mouse input gets grabbed
by an overlapping 3D mouse area.

Change-Id: I6ee69f217d95c5e4f3f5361e14c932ce0a2feab0
Fixes: QDS-2187
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:28:03 +00:00
Miikka Heikkinen
caf0f6e132 QmlDesigner: Add support for vector2d type qml properties
Change-Id: I418353cf9d5d31241c4c327d41e4457df19fe0bd
Fixes: QDS-2189
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:22:29 +00:00
Miikka Heikkinen
9b91b51285 QmlJS: Return correct default value for vector*d builtin types
This fixes the warning that comes when using "myvec.x: 10" style of
defining  qml vector*d properties.

Task-number: QDS-2189
Change-Id: If77373a4dd8483b65dd782502efb774b95844583
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:21:54 +00:00
Miikka Heikkinen
84cbbb4100 QmlDesigner: Add support for colors defined with vector3d property
Some QtQuick3D effects specify colors as vector3d. Added support for
vector3d colors to ColorEditor. Support can be enabled by setting
isVector3D property to true. The colors are still displayed as
regular "#ffffff" style color strings in the ColorEditor.

Task-number: QDS-2114
Change-Id: If62152b0351e452d753eb6da9d90cd59fe2c4c59
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:20:26 +00:00
Miikka Heikkinen
5b28847648 QmlDesigner: Fix drag-adjusting values not ending up with correct value
When drag-adjusting e.g. brightness or position of the object in 3D
edit view, the value ending up in property editor and qml doc didn't
always match what was displayed on 3D edit view. This happened because
ValuesModifiedCommand was compressed to 100ms intervals, but any
property changes also sent ValuesChangedCommand at 16ms interval,
which changed the instance value at backend, but not the model value.

Fixed by comparing modified value to model value instead of instance
value.

Also made the 100ms compression timer singleshot, so the backend
wouldn't be unnecessarily bombarded with ValuesModifiedCommand when
holding the mouse still while dragging.

Change-Id: If86dcd61bcf0c04735d65648e4c34d9d214c5313
Fixes: QDS-2081
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:18:08 +00:00
Henning Gruendl
dfb61968e3 QmlDesigner: Add configurability for size/radius
Add support for configurable size and radius of decision and wildcard
items in flow view.

Task-number: QDS-2246
Change-Id: I4198828b5e4167a03ec7836ff11dbb1add77602e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:17:32 +00:00
Miikka Heikkinen
47ca3ccd8f QmlDesigner: Fix RotateGizmo and LightGizmo label z-value
Labels went under IconGizmos, so increased the z-value to match that
of MoveGizmo label.

Change-Id: I2620db0cadfadc73808a3a9f9967aadf87c9a863
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:16:24 +00:00
Miikka Heikkinen
b2b590ae24 QmlDesigner: Restart overlay update timer on each request
If timer is not restarted on each request, the update can end up
happening before the next frame has been rendered. This can happen e.g.
at puppet startup, where the delay between first request and first
frame render can easily be more than 16ms.

Change-Id: Ib9555548e8c60799c585d0ab43d0626cfa31a494
Fixes: QDS-2082
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:14:35 +00:00
Miikka Heikkinen
cfa8373ce0 QmlDesigner: Remove unused signal
Change-Id: If0adce20a27575f7b4a39a08836da250d0b7bae6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:13:32 +00:00
Miikka Heikkinen
b441988b58 QmlDesigner: Add fade control handle to point light gizmo
Also changed the point light mesh to just a single camera plane ring
based on discussions with UX.

Change-Id: If9e847440570bbe87483194c0b417cf09c7084a2
Fixes: QDS-2041
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:13:13 +00:00
Miikka Heikkinen
327821220c QmlDesigner: Add handles to light gizmo for adjusting area light
Change-Id: Ic12bd6f5ec8800d7a42064247eecbb742ebea40c
Fixes: QDS-2040
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:12:55 +00:00
Miikka Heikkinen
e4b2e45ea6 QmlDesigner: Implement spotlight drag handles
Inner cone visualization for spotlight was added, as well as drag
handles to adjust inner and outer cone angles and fade.

Fade handle adjusts fades in order: quadratic, linear, constant.
If a specific fade value is zero, the next one in list is chosen
for adjustment.

Change-Id: I921936d9782de511558bc6c24cfa0953cce494f0
Fixes: QDS-2038
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:12:32 +00:00
Miikka Heikkinen
387657b83a QmlDesigner: Add missing camera plane ring to point light model
Task-number: QDS-2037
Change-Id: Ica5a7ec2983da251d2ab75565120423288de27a2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:10:58 +00:00
Miikka Heikkinen
3d162524e4 QmlDesigner: Add brightness control to light gizmo
Brightness can be controlled by dragging on the brightness indicator
arrow of the light gizmo in 3D edit view.

Change-Id: I317f5ee08b59bcc0bebf3fdf59861df15ef13c84
Fixes: QDS-2039
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:09:55 +00:00
Miikka Heikkinen
a3e6e24427 QmlDesigner: Update light gizmos
Directional light model was made constant size, as it doesn't have
actual physical presence.

Spot light cone now shows the cone angle correctly and the length of
the cone is calculated so that 5% of the brightness reaches the
center of the cone bottom.

Area light rectangle matches the area of the light.

Point light mesh changed to three perpendicular circles.
Same formula for size of the circles used as for spotlight length.

All light types share a common brightness indicator arrow.

Task-number: QDS-2037
Change-Id: I534dbcda9cfa2a7768c2537868ba83818979b250
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:09:41 +00:00
Miikka Heikkinen
4d23e6300f QmlDesigner: Update light icons
Task-number: QDS-2037
Change-Id: I0b95034f9ba9f308ba6fde82749b6cbef3f35859
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:07:39 +00:00
Orgad Shaneh
91103ad66d QmlPreview: Fix MSVC warning
C4065: switch statement contains 'default' but no 'case' labels

This amends commit 6079a317b9

Change-Id: I90dc72702d8b8d4c1dbcb08f78f67c8ddf9f6717
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-09 11:37:44 +00:00
Christian Kandeler
84082ca920 FakeToolTip: Enforce "no focus" policy on Windows
Evidently, it's not enough to call setFocusPolicy(), one also needs to
pass a special WindowType flag.

Fixes: QTCREATORBUG-4267
Change-Id: Ic2f377aad9a859443c79b375242bed2166301a3e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-06-09 10:25:22 +00:00
Christian Stenger
128341d4e2 QmlJS: Fix possible duplicate semicolon
When dragging a member inside or onto a "oneliner" item a
duplicate semicolon can appear which makes the code invalid.

Fixes: QTCREATORBUG-12560
Change-Id: Ifa824a64b951fde879625d321dfae48e167a9227
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-09 09:37:29 +00:00
hjk
92942f0f12 ExtensionSystem: Port PluginSpec to QRegularExpression
Task-number: 24098
Change-Id: I8dcdc736962eef949c54e457f06d9dbdb4efb054
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-09 08:54:14 +00:00
Christian Stenger
f1b7fd81f5 Meson: Fix compile for gcc 5.3
Amends 77d7bb5014.

Change-Id: I8aca3c3a95890ec794a8f0f5cadbc6d726559f49
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-06-09 06:05:06 +00:00
Christian Stenger
059c8edf21 Meson fix compile
Amends 77d7bb5014.

Change-Id: I5c0cb8ed10d70795408236acb240c662d7eddbbb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-06-09 05:52:56 +00:00
Christian Kandeler
2433a40def Android: Fix qbs build
Change-Id: Id9adcd458f22a786a60193fea6c01fd7dcc4e8f0
Reviewed-by: hjk <hjk@qt.io>
2020-06-08 14:19:14 +00:00
The Qt Project
ae9ed29608 Merge "Merge remote-tracking branch 'origin/qds-1.59'" 2020-06-08 14:11:10 +00:00
Eike Ziller
c644e7c80a Merge remote-tracking branch 'origin/qds-1.59'
Conflicts:
	src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
	src/plugins/qmlpreview/qmlpreviewconnectionmanager.cpp

Change-Id: Ifa7c66330c1995378280cdb4c57c30015dc11b68
2020-06-08 16:04:15 +02:00