Commit Graph

348 Commits

Author SHA1 Message Date
Marco Bubke
7976456002 QmlDesigner: Add content item hack
There is no stand content item interface, so try to work around to enable
snapping and anchoring.

Change-Id: Ib2eaf0d6c35e3ba289dd7d55b2ba4c064ad40748
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-22 14:45:43 +02:00
Marco Bubke
4f28228293 QmlDesigner: Fix anchoring for application window
We don't tested that target anchor object are node instances. Now we
search for the parent object recursively.

Change-Id: I2e03e714f858a285309b02f5e88c757f0dcfe7e5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-21 17:13:48 +02:00
Marco Bubke
5847268778 QmlDesigner: Fix value change notification
The return value is always -1.

Change-Id: I19ede339e7557a794069b4dc991cb9f9a711caa9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-21 14:41:04 +02:00
Marco Bubke
f68bd231c8 Revert "QmlDesigner: Remove NodeInstancesSignalSpy"
This is fixing some anchor movement bugs.

This reverts commit ae409f8bdf.

Change-Id: Ibe9b8b2601e2bcd1c249b5feda06fb3a29482f4b
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-21 13:08:10 +02:00
Orgad Shaneh
b1d7d806c0 Fix some compiler warnings
* Unused variables in release build
* Comparison of bool to int

Change-Id: I1ac9b1051b26ae0655d4ff6b92d216926a4785da
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-17 08:13:18 +02:00
Oswald Buddenhagen
6fb94a7b10 Merge branch '2.7'
Conflicts:
	doc/src/qtquick/qtquick-components.qdoc
	doc/src/qtquick/qtquick-designer.qdoc
	qtcreator.pri
	qtcreator.qbs
	src/plugins/cppeditor/cppinsertdecldef.cpp
	src/plugins/qnx/qnxruncontrolfactory.cpp

Change-Id: I0a37a07c42719bc0d9ef5b3ac4641d01a63c0d88
2013-05-15 10:21:47 +02:00
Marco Bubke
3d1102081b QmlDesigner: Fix recursive dirty test
Change-Id: I62cb968eb21bb8399cd1918d68e405c9abe5d6e0
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-06 14:28:01 +02:00
Thomas Hartmann
d4b4353a78 QmlDesigner.qml2puppet: Adding simple test
This test will fail and give an error message, if
inbuild item are missing.

Change-Id: Ib7a33e7d1fbd22f76c8ac31e1dbc68912aa8edaa
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-06 12:54:40 +02:00
Eike Ziller
a2171c2d82 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp

Change-Id: I7f319154d5865c47ccfd5f525f0fd7983733dd0e
2013-05-03 09:49:28 +02:00
Thomas Hartmann
bdeb9371ee QmlDesigner.Instances: The engine does set the QObject parent first
We should follow the engine and set the QObject parent first.
Actually some items (e.g. menus) do not like it differently.

A note: The engine seems to always set the QObject parent even for items.

Change-Id: I700e8802300b8eee093f73ea11e07c4cdb0338aa
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-04-30 13:11:18 +02:00
Thomas Hartmann
7a5836d257 QmlDesigner.Instances: emit component complete signal for 5.1
Emitting the Component.onComplete signal.

This is only available in Qt 5.1

Change-Id: I77503333296cccd9999d2610cca126530f777777
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-04-30 13:11:05 +02:00
Thomas Hartmann
9763e9e325 QmlDesigner.Instances: always set the QObject parent.
We follow the QmlEngine/VME and always set the QObject
parent before reparenting into list properties.

Also we set the QObject parent for all objects.

See qqmlvme.cpp line 622
QQml_setParent_noEvent(o, parent);

Change-Id: If889e6cc07e99ea443b80de13c4be9dce6c2ceee
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-04-30 13:08:22 +02:00
Eike Ziller
bedc477943 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp

Change-Id: I4e0a85795e7f4bfcdc21d106517517b527f85104
2013-04-30 11:43:33 +02:00
Kai Koehne
a6cd9abcd1 QmlDesigner: Fix gcc compilation warnings
Fix warnings from gcc 4.8.

Change-Id: If4fc311ea021d1014141cb123f1d765577efd831
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-04-25 12:52:12 +02:00
Marco Bubke
893020ae5d QmlDesigner: We should test if untracked items are dirty too
Change-Id: I94db08fff3e7e38a9cc377d06a5aabc6d886b64e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-24 17:46:01 +02:00
Marco Bubke
cec82a13e1 QmlDesigner: Fix clipping render bug
Clipping is happen over the bounding rectangle, so should provide the
clipped bounding rectangle.

Change-Id: I602da312a7ca327def378a887a75782c61cc680d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-24 17:45:52 +02:00
Marco Bubke
ea5169a163 QmlDesigner: Improve naming of variables
Change-Id: I8429517b81308f4a6a15b90a1ac7486de49562d9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-24 17:45:44 +02:00
Marco Bubke
a58810ce9e QmlDesigner: Do componentComplete for QObjects with QmlParserStatus
Change-Id: If7ea6c55f4540a8bde113076288c0e9c6dd1210f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-24 12:45:35 +02:00
Eike Ziller
38b61177f6 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h
	tests/auto/treeviewfind/treeviewfind.pro

Change-Id: I1ec788373656c947b50d72df6c26c91312469692
2013-04-23 11:13:25 +02:00
Thomas Hartmann
fd9d39c12a QmlDesigner.Instances: properly disable component complete for 5.1
This is only available in Qt 5.1

Change-Id: I76b7916b4ce64c440c175e77edc2b0a3ef015166
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-04-22 18:19:24 +02:00
Marco Bubke
457566974d QmlDesigner.Instances: adding LayoutNodeInstance
This class wraps a QQuickLayout.

Change-Id: Ib661ccb5bb5deb1acb87b9a4bef8da95cb4e40eb
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-22 17:39:04 +02:00
Marco Bubke
ff4457bb46 QmlDesigner: Prepare for other layout items
Change-Id: I831e68877eb3d785b4bbb99db002ab8e42158d75
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-22 17:03:37 +02:00
Marco Bubke
40b62e1cfa QmlDesigner: Add GraphicalNodeInstance as abstraction for item and window
Change-Id: Icaba711464f672a3bfbb9d83a449d47e72ba11ff
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-22 17:03:23 +02:00
Marco Bubke
06cfc22fe2 QmlDesigner: Remove old function
Change-Id: I065a6febd74e13740117e0a5223fa71648a7c430
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-22 11:23:27 +02:00
Oswald Buddenhagen
d77883c16a Merge remote-tracking branch 'origin/2.7' 2013-04-18 15:18:34 +02:00
Marco Bubke
2557e0f39d QmlDesigner: Remove override from non virtual function
Change-Id: I8d0b782df5e0819d7f20c2294aa4be9b017a6cb9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-18 13:59:22 +02:00
Eike Ziller
55de6a9fb9 Merge remote-tracking branch 'origin/2.7' into HEAD
Conflicts:
	src/plugins/coreplugin/generalsettings.cpp

Change-Id: Ic92d637fb92748b2bb40e1a2895ea5d0644b4646
2013-04-18 12:54:37 +02:00
Thomas Hartmann
58e280de2c QmlDesigner:Instances: Adding instance for QQuickWindow
This allows QuickWindowNodeInstance to return the content item
instead.

The function parentObject() in ObjectNodeInstance now knows
QQuickRootItem, because the parent of the root item should
is the windows (which is just a QObject but treated as item from us).

Change-Id: Ibaa7ccc8dd9346689cc4443ce0b594056feaa0cf
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-18 12:20:41 +02:00
Eike Ziller
44931c0985 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/pythoneditor/tools/lexical/pythonformattoken.h

Change-Id: I7b921cd975aa755166a80d219ed5e8b69888aeb0
2013-04-18 09:22:19 +02:00
Thomas Hartmann
e311761b57 Fix compilation for Mac OS X
CONFIG += c++11
does not work with clang atm.

Change-Id: I7750b333296ccedf999d2610cca126530f737777
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2013-04-17 11:23:33 +02:00
Marco Bubke
ea8c98c2d8 QmlDesigner: Remove stupid code
Change-Id: Ie56c5e26a7ec077b794a4993679ab80a716740ce
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-16 16:52:26 +02:00
Marco Bubke
2b698e31ed QmlDesigner: Add override to qml2puppet
Change-Id: Ibdf07c4a35b40f3fc78300a1675270f8295bec42
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-16 16:52:20 +02:00
Marco Bubke
e13e6550f5 QmlDesigner: qml2puppet is using c++ support
Change-Id: Ie6ac96b713775db13a02cecdc74849ad97f017e5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-16 16:52:15 +02:00
Marco Bubke
de822ec5ca QmlDesigner: Remove old paint function in instances
Change-Id: I5da0c624b467448dc6f16a88fa3ad3682f423c20
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-16 16:52:11 +02:00
Marco Bubke
5d3c1a2a2b QmlDesigner: Remove old functions in instances
Change-Id: If886ca208de775472c4e97e986c2f4df81615959
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-16 16:52:00 +02:00
Marco Bubke
0de9237699 QmlDesigner: Add PropertyName usage in instances
Change-Id: Ia7eb8730c61347833c70a3d62787c10e2a3134ca
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-16 16:51:54 +02:00
Marco Bubke
359ef53280 QmlDesigner: Move implementation code in the node instances
updateDirtyNodeRecursive and renderPreviewImage belongs to quick image and
not in the node instance server.

Change-Id: I629b89c748036c0614e78bcfa0c837cb16ca6374
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-15 13:53:53 +02:00
Eike Ziller
9ff8979da3 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/cpptools/cppchecksymbols.h
	src/plugins/qmldesigner/components/formeditor/resizecontroller.cpp

Change-Id: I887ba071fa637ad44e39bcae581738fa078a6612
2013-04-11 18:27:52 +02:00
Thomas Hartmann
7406761f8f QmlDesigner.Instances: disabling the cursor after completing
The cursor should be disabled after component complete.

Change-Id: I3ee089b23f43b42a478aaacc4073cbdfd0da2323
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-04-11 12:11:14 +02:00
Thomas Hartmann
f42f73492f QmlDesigner.Instances: function should be static
No reason the export the symbol.

Change-Id: I34a42f866333585774129021777265e8a7524555
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-04-11 12:10:58 +02:00
Thomas Hartmann
8a9fc63555 QmlDesigner.Instances: blacklist certain properties
For those properties the QQmlProperty constructor does crash.

Change-Id: Ia78583e080ced936d98517ce0d3244d3040f8ceb
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-04-11 12:10:23 +02:00
Eike Ziller
d3c979dc0f Merge remote-tracking branch 'origin/2.7' 2013-03-28 12:19:45 +01:00
Kai Koehne
d1aa986735 Fix checks for qt modules
The fix in 823d48d218 had a typo
(Qt vs QT). Also fix other places where QT_CONFIG was used to
identify Qt modules.

Change-Id: Ie32b678b959f7b5573574ef87ae7ad92860e8323
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-26 16:41:54 +01:00
Thomas Hartmann
d204ee0b43 QmlDesigner: Type of the propertyname is now PropertyName
And PropertyName is a typedef for QByteArray. Because we don't use the
features of QString and the source would be cluttered with QLatin1Strings
we changed the property name to QByteArray.

Change-Id: Ib70ef136bbc411504b450456bd9bb705ae93dd25
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
(cherry picked from commit ee4bf638ca)
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-03-25 13:35:11 +01:00
Friedemann Kleint
7043a7e01b Fix Krazy warnings about duplicate includes.
Change-Id: Ied32236a84d20225b1ca4a192f3a346fbfbd09b4
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-20 15:04:10 +01:00
Marco Bubke
ae409f8bdf QmlDesigner: Remove NodeInstancesSignalSpy
Not anymore needed.

Change-Id: Ia1f4d20138b43184b78fd4f39c391af524072dd2
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-03-18 16:45:39 +01:00
Eike Ziller
99b2eb1ca9 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	doc/src/debugger/qtquick-debugger-example.qdoc

Change-Id: If9a6ac2db76773c50aae26c5156e6aa2603329b3
2013-03-18 10:19:14 +01:00
Friedemann Kleint
3ec9d6bb64 Fix Krazy warnings about improper include guard in QML debugger.
Change-Id: I14be0beae7f678dc2fc8af4324c846d757d0cd9d
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
2013-03-15 13:23:17 +01:00
Thomas Hartmann
ab675bb143 QmlDesigner: fix memory usage of qml2puppet
In Qt Quick 2 the parent property is writable.
Therefore the InstanceSpy always collected the complete
object tree waisting memory.

Change-Id: I44f2d1ad90ef2bbea34a7cbd414f88cae37e0462
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-03-12 15:17:30 +01:00
Eike Ziller
f60873a24f Merge remote-tracking branch 'origin/2.7'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: Ie71d0d5aebdd1406d94de348bcd4cfcc203a1ba9
2013-03-08 11:39:33 +01:00