Commit Graph

401 Commits

Author SHA1 Message Date
Thomas Hartmann
1900276c17 QmlDesigner: Enable 3D Edit View in Qt Quick Designer
If we find a QQuick3DViewport or the root node is a QQuick3DNode,
we create an 3D Edit View QQuickView for 3D editing in the 'editmode'.

This requires to not use the DesignerWindowManager for the 'editmode'.

The current implementation for the 3D Edit View is done in EditView3D.qml,
but can be replaced by a custom EditView class later. At this point in time
there is no hard dependency on QtQuick3D. Once we start to implement
more advanceded editing features, EditView3D.qml has to be replaced by a
custom C++ class with a hard dependency on QtQuick3D.

Currently the scene can be rotated around the 'y' axis, it is possible
to move the camera on the 'z' axis and the custom light can be turned
on and off. This is simply a proof of concept that the 3D Edit View
already allows some user interaction.

Change-Id: I96400e72b0853dde7939c693d1d7300f9c2ab142
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-10-09 10:07:11 +00:00
Eike Ziller
a81c1aab2c Merge remote-tracking branch 'origin/4.10'
Change-Id: I273a1e8f5f9e54756befbc398c2c2754534ff128
2019-08-09 09:43:16 +02:00
Tim Jenssen
c9b91e7e6b QmlDesigner: reduce enumeration to header only
It is used in some other external qmldesigner plugin and
these are built against current dev packages, which
are not contain this cpp file.
Different solution would be to add:
  r"^share/qtcreator/qml/qmlpuppet/types/enumeration.cpp$",
to scripts/createDevPackage.py which feels not that clean.


Change-Id: Ia1fb5c02f457d98474218689ebf6483706265dde
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-07 14:48:04 +00:00
hjk
2e14df7561 Some clang-tidy -use-modernize-nullptr
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-01 13:20:26 +00:00
Eike Ziller
e5543eaebf Merge remote-tracking branch 'origin/4.10'
Change-Id: Id9cab641788f93cda9a81da9f156614b91d87b2a
2019-08-01 11:58:56 +02:00
Thomas Hartmann
0f3c8a3c7b QmlDesigner: Fix custom qml2puppet build
The build of a custom qml2puppet was failing, because
of utils/algorithm.h missing.
We should minimize Qt Creator dependencies in the puppet.

Change-Id: Iba8dd1a3979dbeeb1bfa860b50ba586bea20c7a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-31 10:38:28 +00:00
hjk
e3b1106afa Compile fix with recent Qt dev
The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.

Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-29 08:54:18 +00:00
hjk
a34bf6a23b QmlPuppet: Replace some foreach
Change-Id: I59b4049282564762f75aa5e9a7a0b7eba055db48
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-26 12:59:41 +00:00
hjk
6a58666f44 More Utils::toSet/toList
... and unrelated cosmetic changes.

Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-04 12:28:38 +00:00
Thomas Hartmann
2831f601fa QmlDesigner: Use OpenGL 4.1 surface for puppet
Change-Id: I520adbb54fc264e738ca5eb630f5cc7bc80ee4bd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-12 13:48:56 +00:00
hjk
92a52a7181 Use Qt's QFileInfoList instead of QList<QFileInfo>
Helps to adapt to potential upstream changes in Qt 6

Change-Id: Ie154bd4fd513d46cb0493758be8943fc4581d71c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-28 07:19:45 +00:00
Orgad Shaneh
1e138fbe10 Remove excess blank lines after namespace
Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 06:50:16 +00:00
Thomas Hartmann
f8202239d6 QmlProject: Implement basic support for QmlFileSelector
This patch adds support for QmlFileSelector for
QmlProject and Qt Quick Designer.

Task-number: QDS-590
Change-Id: I0cc043d3ec9578008ec879b36fe834b70fb8c5ad
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-04-25 13:55:29 +00:00
Thomas Hartmann
4c746531d8 QmlDesigner: Add support for Dialog
Change-Id: I8a2972f80ae79835018870eda7b11a817353bf94
Task-numbner: QTCREATORBUG-22120
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-03-20 12:09:24 +00:00
Eike Ziller
eeaa02bc27 Merge remote-tracking branch 'origin/4.8' into 4.9
Conflicts:
	src/plugins/android/androidbuildapkstep.cpp

Change-Id: Id6dfda480c23706089ab38aa6277cd37599b5167
2019-02-28 12:39:09 +01:00
Thomas Hartmann
0f6e5a56cb QmlDesigner: Avoid puppet crash
If the property is invalid the propertyTypeName is a nullptr.
Calling strcmp on nullptr is undefined and can result in a nullptr access.

Change-Id: I270091fa1d2635019ad2e41c4a5eab9985227dcf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-02-15 06:50:14 +00:00
Thomas Hartmann
d4726589f1 QmlDesigner: Fix error for Connections
Connections is actually in QtQml.

Change-Id: I88d33e273efa542535ef7f87a4020c23f172b15e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-02-05 17:05:57 +00:00
Thomas Hartmann
80a92d55d3 QmlDesigner: Fix gradients in Qt 5.12.1
In Qt 5.12.1 gradient is a QJSValue.
See commit 1771d298f33543a3fe47decfe0fff10609b01ab1
This patch adds QJSValue support.

Change-Id: I1c37b82bf033c38646564d5453e297258dd4b056
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-25 14:56:08 +00:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
Thomas Hartmann
7bff611ee1 QmlDesigner: Call all Component complete handlers
We have to ensure to properly call all Component complete handlers.
A single component usually has QQmlComponentAttached objects,
which we have to iterate over.

Therefore emitComponentCompleteSignalForAttachedProperty() is not correct.

Task-number: QDS-269
Change-Id: I4aed5d511f9f6e21f72efb955fc6db21b70e7c42
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-10-18 14:41:57 +00:00
Tim Jenssen
8d8aa62e4d QmlDesigner: change the import path to QtQuick2 path
Change-Id: I8adb6fdd334647dd85a8a9f95738ac22fc690363
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-10-10 08:36:04 +00:00
Alessandro Portale
9e221f6ff7 QmlDesigner: Improve the quality of state thumbnails
The ImageProvider needs a correct sourceSize. And the puppet needs to
consider the devicePixelRatio.

Change-Id: I408f956fdb4adb23f272c879878e44e88ca76321
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-09-13 07:08:09 +00:00
Thomas Hartmann
4fd17b6604 QmlDesigner: Fix clazy warning
Use nullptr

Change-Id: I787794c67e89af7bc7a2d82def580bea3c8f2653
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-08-01 14:38:47 +00:00
Christian Kandeler
e968513036 QmlDesigner: Fix typo in file name
Change-Id: I06086caeaa2144e93203bc0cea902259be5d73c5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-01 11:52:35 +00:00
Thomas Hartmann
2cb238471a QmlDesigner: Modernize
modernize-use-using

Change-Id: Ia8eef3d97db7b99ec813a030e1f39ee492d6cf9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-08-01 07:42:47 +00:00
Thomas Hartmann
ca42e48dac QmlDesigner: Keep Qt 3D scenes from crashing
If we do not set the source property of the Q3DSPresentationItem
nothing is actually rendered.

If a scene is rendered in the puppet we get an invalid OpenGL context
when rendering in the qml2puppet.

Change-Id: I74db0df7de759e830499967bc6985745be291856
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-07-31 12:41:54 +00:00
Orgad Shaneh
1958c2129e Revert "Windows: Match the name case of included files"
It breaks cross-compilation on linux/mingw.

This reverts commit 1c014ed3d9.

Change-Id: I3e8183ec318541a4393ad242eefbdeaa78b7be44
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-07-19 05:44:06 +00:00
Alessandro Portale
1c014ed3d9 Windows: Match the name case of included files
Although Windows is case insensitive, and lower case always works, Clang
complains:

Lexical or Preprocessor Issue: warning: non-portable path to file
'<FooBar.h>'; specified path differs in case from file name on disk

Change-Id: I8f94e9fb62f6afec8aa6b9d08a7c78f6ba8a4435
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-07-12 20:12:30 +00:00
Tobias Hunger
0e71ed1bfc QmlPuppet: Use override consistently
clang-tidy fixes from modernize-use-override check.

Change-Id: Ia9785ef4d5d236d9740abec26359495eaea2fad1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-07 15:43:28 +00:00
Eike Ziller
428fcb476b Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/libs/utils/settingsaccessor.cpp
	src/plugins/autotest/autotestplugin.cpp
	src/plugins/git/gitclient.cpp
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qbsprojectmanager/qbsrunconfiguration.h

Change-Id: I65f143cad18af509a2621d6c5925abbd038ea70f
2018-04-13 10:54:42 +02:00
Thomas Hartmann
45dfa5658b QmlDesigner: Increase size of states editor
Change-Id: I5541214ca8aa518a59d0fa6563e59f69f8048eda
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-10 13:19:32 +00:00
Thomas Hartmann
906d2ac9b5 QmlDesigner: Read contentItem after completing
This avoids issues with deferred properties.

Change-Id: Ie9cc0eaa3468bcb21e4817f8c5e3c1b97c8fc99c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-05 09:20:31 +00:00
Thomas Hartmann
8a8b8c4602 QmlDesigner: Add meta hint if item renders children directly
In some cases items render their children directly using an effect.
In this case we do not want to hide the children when calling
refFromEffectItem().
If the hint takesOverRenderingOfChildren is set in the .metainfo hints
for a parent item we forward a flag to the puppet and refFromEffectItem()
is not hiding this item,

Change-Id: I37a8c0ad8a15bc914c220e03b1b744779431d655
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-09 15:05:22 +00:00
Eike Ziller
f2ef88aada QmlDesigner: Avoid some unneeded QFileInfo constructions
Change-Id: I0289c3187f07e26d05a7ca591cc8b12b767c3502
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-10-19 06:38:41 +00:00
Tobias Hunger
d366944519 QmlPuppet: Modernize (nullptr and member initialization)
Change-Id: Ifac20a48df8702f9d31042eb8765cbaadb60b25b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:40:18 +00:00
Thomas Hartmann
6745536f1e QmlDesigner: Fix @NodeInstance
With @NodeInstance we can override the value of any property.

Change-Id: Ib64d8b6823b82f0a809092b2468c008d73a5525c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:18:43 +00:00
Marco Bubke
4beaae0f79 Introduce Breakpad crash handler
Google Breakpad (https://chromium.googlesource.com/breakpad/breakpad) is a
widely used crash handler framework, e.g. by Mozilla and Chromium. It is
providing a platform neutral solution to generate mini dumps, collect
debug information and generate stack traces from those.

Done-with: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Change-Id: I09382e7db0dc9e29b228e7b554fda7b6f5684349
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:24:11 +00:00
Eike Ziller
5a1a20f2ee Merge remote-tracking branch 'origin/4.3' into 4.4
Change-Id: Ifb1dcc847ba4b32a79b349955fad5207e402cb7b
2017-07-12 10:50:49 +02:00
Marco Benelli
6c41fafbb6 Qmlpuppet: add missing includes
Task-number:  QTCREATORBUG-18498
Change-Id: Ie40a066508bb52f53b8ad528f9d4cf6969fc0632
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-07-10 08:48:46 +00:00
Thomas Hartmann
567a99c5aa QmlDesigner: Replace SwipeView with StackLayout
In the designer we replace a SwipeView with a StackLayout.
Form the perspektive of the designer they are the same
and StackLayout is easier to handle.

Change-Id: I308ec209024e22db9f56e363e27588a40283603c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-15 15:50:48 +00:00
Eike Ziller
6e8ee7479e Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/debugger/cdb/cdbengine.cpp

Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
2017-05-09 15:07:30 +02:00
Thomas Hartmann
cf3454d7fd QmlDesigner: Add flag to check for designer
The property runningInDesigner can be checked to find out
if a component is running in the designer.

Change-Id: Ibf35daba4bb30c7d919b1ff149c92b348d7e8059
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-04 12:34:32 +00:00
Tim Jenssen
a991ecec95 QmlDesigner: use initilizer_lists for pairs
Change-Id: I3a1ef67d8af255604494695807331576540b8afa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-04-28 08:58:19 +00:00
Montel Laurent
d29396b164 Use qEnvironmentVariableIsEmpty or qEnvironmentVariableIsSet directly
Change-Id: I4f2e61e4bade9e7b4518d144db8163e596ab6264
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-04-19 08:00:14 +00:00
Montel Laurent
5d27bc747b Use QFileInfo::exists(...) which is faster that QFileInfo(..).exists
Change-Id: I0d2e61d84c74e60ef4f54074a4ca00f2d0835562
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-04-14 13:18:28 +00:00
Thomas Hartmann
4ca71590db QmlDesigner: Fix warning
Change-Id: Iff2c50439521e602bd2703716590a3e95c8ab2b1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:00:42 +00:00
Thomas Hartmann
fdb40645a4 QmlDesigner: Unite the bounding rectangle with actual size
This is required to correctly render text elements with padding,
since the bounding rect seems incorrect.

Change-Id: Ifcef2607089a7a2cec071814d5d87bd27da7ace3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-17 13:02:54 +00:00
Thomas Hartmann
bf3008292f QmlDesigner: Add support for high dpi to form editor and puppet
We forward the device pixel ratio to the qml2puppet and
render items in higher resolutions.
We have to set the device pixel ratio on the pixmap manually,
since it is not serialized.
The option IgnoreDevicePixelRaio allows disabling high dpi awareness.
Rendering in high dpi affects performance, but since we
use shared memory this does not seem to be a serious issue.

Change-Id: Ie9219b8fdb37841c24d4fb3f0ca259f0194ef65c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-13 12:04:18 +00:00
Thomas Hartmann
6e30faba73 QmlDesigner: Quick fix for Popup
This is a quickfix for Controls 2 Popup, Drawer, Menu and Dialog.
We pretend everything derived from QtQuick.Controls.Popup
is an item instead of a QQObject.

Change-Id: I603dce8a1a1b08df3e2c1dccc0fa57e7ccef0800
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-22 12:58:20 +00:00
Thomas Hartmann
d942111ace QmlDesigner: Fix manual puppet build
The overload for the "+" operator is ambiguous.

Change-Id: Iaebd889ef2eaed6e2d4261ecbd9555a6ba73c521
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-22 16:14:04 +00:00