platform/upstream/qtdeclarative.git
9 years agoAlso remove the QQmlValueTypeProvider::destroyValueType interface
Frank Meerkoetter [Thu, 30 Jul 2015 19:57:24 +0000 (21:57 +0200)]
Also remove the QQmlValueTypeProvider::destroyValueType interface

After the removeal of the QQmlVMEVariant there is no user left.

Change-Id: I97224127aac57aba9a80827f9292018d03609b85
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove the QQmlVMEVariant implementation
Frank Meerkoetter [Fri, 24 Jul 2015 18:57:17 +0000 (20:57 +0200)]
Remove the QQmlVMEVariant implementation

This code is now obsolete.

Change-Id: Id34e8663d0398286e8ce34db7d83c6957e779c30
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove the QQmlVMEVariant array member
Frank Meerkoetter [Sat, 25 Jul 2015 17:57:11 +0000 (19:57 +0200)]
Remove the QQmlVMEVariant array member

All properties have been move into the varProperties JS array.

Change-Id: Ib39a603d43ab5ef23aad3e6ccbdbc9b981c9da18
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdapt the ValueTypeProvider interface and port its types
Frank Meerkoetter [Sat, 25 Jul 2015 17:43:43 +0000 (19:43 +0200)]
Adapt the ValueTypeProvider interface and port its types

The ValueTypeProvider system allows non-QML modules to add new basic
QML types. It needs to be changed when porting away from QQmlVmeVariant
as underlying type of properties.

Change-Id: I2b52d7e6f578647a39832896c28553404b9a679f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPort QVariant away from QQmlVMEVariant
Frank Meerkoetter [Fri, 24 Jul 2015 20:33:23 +0000 (22:33 +0200)]
Port QVariant away from QQmlVMEVariant

QVariants are now stored as QV4::VariantObject inside a javascript
array.

Change-Id: Idcc65eed6845b561038e224d74e5efdf0c9e1c28
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPort QObject* away from QQmlVMEVariant
Frank Meerkoetter [Mon, 20 Jul 2015 20:06:40 +0000 (22:06 +0200)]
Port QObject* away from QQmlVMEVariant

QObjects are now stored as QV4::QObjectWrapper in a javascript array.
This is part of a series of patches slimming down the memory usage
of QML properties.

Change-Id: I270831d0f0f7bc17842cd2f8d2eb9661e09a3364
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove QQmlValueTypeProvider::copyValueType
Frank Meerkoetter [Mon, 20 Jul 2015 18:47:22 +0000 (20:47 +0200)]
Remove QQmlValueTypeProvider::copyValueType

While reworking the QQmlValueTypeProvider interface I noticed that this
code isn't used.

Change-Id: I30a279ffabf3a1c70eaa1327e69b774f5e5981f0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPort list properties away from QQmlVmeVariant
Frank Meerkoetter [Mon, 20 Jul 2015 18:35:34 +0000 (20:35 +0200)]
Port list properties away from QQmlVmeVariant

The index into the list of list properties (an int) is now also
stored as a QV4::Value.

Change-Id: I16809c5027ed3c4264aab6dfed8b4519adf83e2a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPort QDate/QDateTime/QRectF away from QQmlVmeVariant
Frank Meerkoetter [Thu, 16 Jul 2015 20:34:42 +0000 (22:34 +0200)]
Port QDate/QDateTime/QRectF away from QQmlVmeVariant

Store QDate/QDateTime/QRectF in a javascript array. The values are wrapped
inside a QV4::Variant. This is part of a series sliming down the memory
usage of properties.

Change-Id: I1b5c4e24c1e46d19c5c861941655efb7a972a6a5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPort QUrl/QSizeF away from QQmlVmeVariant
Frank Meerkoetter [Thu, 16 Jul 2015 20:04:39 +0000 (22:04 +0200)]
Port QUrl/QSizeF away from QQmlVmeVariant

Store QUrl/QSizeF in a javascript array. The values are wrapped inside
a QV4::Variant. This is part of a series sliming down the memory
usage of properties.

Change-Id: I62338fe7fe101496340a8d89f33030d0df5121b7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoStore all properties in one Javascript array
Frank Meerkoetter [Wed, 15 Jul 2015 21:13:48 +0000 (23:13 +0200)]
Store all properties in one Javascript array

Store both "normal" properties and var properties in the same js array.
The second array which is removed by this patch was scaffolding for the
initial brinup.

Change-Id: I24f72a1d880a54f68f5562e5077dbc26e7db864a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoStore int/bool/double/string and sizef as QV4::Value in a Javascript array
Frank Meerkoetter [Tue, 14 Jul 2015 20:38:51 +0000 (22:38 +0200)]
Store int/bool/double/string and sizef as QV4::Value in a Javascript array

This is the first patch in a series of patches removing the QQmlVMEVariant
used for the storage of non-var properties. The overall goal is to reduce the
memory usage of QML. The QQmlVMEVariant has a size of 8*sizeof(void*) +
sizeof(int) which is quite an overhead for types such as int/bool or double.

Change-Id: I301661d134724300942911a3d75258fe45356a7a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6
Simon Hausmann [Tue, 18 Aug 2015 11:21:13 +0000 (11:21 +0000)]
Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6

9 years agoQmlDevTools: Define QML export macros as empty.
Friedemann Kleint [Mon, 17 Aug 2015 15:08:26 +0000 (17:08 +0200)]
QmlDevTools: Define QML export macros as empty.

Since QmlDevTools is a static library, no exports
(Q_QML_EXPORT/Q_QML_PRIVATE_EXPORT) should be specified.

Fixes link errors in qmlimportscanner and lupdate
with MSVC2015:

Qt5QmlDevToolsd.lib(qv4value.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct QV4::VTable * __cdecl QV4::Heap::Base::vtable(void)const " (__imp_?vtable@Base@Heap@QV4@@QEBAPEAUVTable@3@XZ) referenced in function "public: bool __cdecl QV4::Managed::isEqualTo(struct QV4::Managed const *)const " (?isEqualTo@Managed@QV4@@QEBA_NPEBU12@@Z)
D:\dev\5-vs15-56\qt-56\qtbase\bin\qmlimportscanner.exe : fatal error LNK1120: 1 unresolved externals

Change-Id: I6125b3d1eaacadba65a90047867779252dab6fbc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMerge remote-tracking branch 'origin/5.5' into 5.6
Ulf Hermann [Tue, 18 Aug 2015 08:29:10 +0000 (10:29 +0200)]
Merge remote-tracking branch 'origin/5.5' into 5.6

Conflicts:
src/qml/debugger/qv4debugservice.cpp
src/qml/jsruntime/qv4value_inl_p.h
src/qml/jsruntime/qv4value_p.h
src/qml/memory/qv4mm.cpp
src/qml/memory/qv4mm_p.h
src/qml/qml/qqmlnotifier_p.h
src/qml/qml/qqmlproperty.cpp
src/quick/items/qquickflickable.cpp
src/quick/items/qquicktextedit.cpp
tests/auto/quick/qquickwindow/BLACKLIST

The extra changes in qqmlbinding.cpp are ported from changes to
qqmlproperty.cpp that occurred in parallel with writeBinding() being
moved to qqmlbinding.cpp.

Change-Id: I16d1920abf448c29a01822256f52153651a56356

9 years agoMerge dev into 5.6
Oswald Buddenhagen [Mon, 17 Aug 2015 18:09:49 +0000 (20:09 +0200)]
Merge dev into 5.6

Change-Id: I9ec05838f3c4cbc11fb969c71daf5c2a5a8df360

9 years agoFix casing in Models and Views documentation.
Mitch Curtis [Fri, 14 Aug 2015 09:02:28 +0000 (11:02 +0200)]
Fix casing in Models and Views documentation.

Change-Id: I461c5a55e3dbb2dc713640ec4d7aa00397a4415d
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoqml: Don't build OpenGL support if OpenGL is not available in Qt.
Robin Burchell [Tue, 28 Jul 2015 12:41:46 +0000 (12:41 +0000)]
qml: Don't build OpenGL support if OpenGL is not available in Qt.

Change-Id: I66c841778eb0ae662c3951a26665c83e233851b5
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoSupport QSGGeometry::lineWidth also in the batched code path.
Gunnar Sletta [Tue, 11 Aug 2015 16:33:01 +0000 (18:33 +0200)]
Support QSGGeometry::lineWidth also in the batched code path.

Change-Id: Ifc664b9c718744b9549953e42ac3450a88403dea
Task-number: QTBUG-47090
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoAvoid firing up the JS parser/JIT/interpreter when instantiating objects
Simon Hausmann [Fri, 14 Aug 2015 00:57:45 +0000 (02:57 +0200)]
Avoid firing up the JS parser/JIT/interpreter when instantiating objects

For setting the initial properties there's no need to run a JavaScript
function.

Change-Id: I129fa8e7128cd7aa784e34912ce636cd33b1dd66
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
9 years agoChange TestEvent key default event routing behavior
Filippo Cucchetto [Tue, 4 Aug 2015 17:29:51 +0000 (19:29 +0200)]
Change TestEvent key default event routing behavior

The current behavior of the TestEvent is to send all the
key events to the test window. For this reason is not possible routing
events to custom windows created inside the test suite.
The new behavior is to send the key events to the current focused window

[Change][QuickTest][TestCase]
Changed default routing behavior for key events in TestCase.
The key events are sent to the window with active focus

Change-Id: I6ff3113eb9f1cbc25f6cfd2dd7bfdff178ee6ac3
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
9 years agoSmaller cleanups
Lars Knoll [Mon, 22 Jun 2015 16:30:06 +0000 (18:30 +0200)]
Smaller cleanups

Change-Id: I14eb7e2b4031c8a033740ed1ef34f3b2efdc3649
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove Q_ALWAYS_INLINE definition, as it is now in qglobal.h
Erik Verbruggen [Wed, 12 Aug 2015 07:56:55 +0000 (09:56 +0200)]
Remove Q_ALWAYS_INLINE definition, as it is now in qglobal.h

Change-Id: Ie37194a8a02dd43cdcf2b97670fffe21da04cbf3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
9 years agoqml: Avoid heap allocations due to QString::fromLatin1()
Sérgio Martins [Wed, 12 Aug 2015 12:17:58 +0000 (13:17 +0100)]
qml: Avoid heap allocations due to QString::fromLatin1()

By using QStringLiteral when the argument is a literal.

Change-Id: Ib25042d10f3d9d0aca81af74cde0107aba4f9432
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
9 years agoAdd the GPLv3 license text
Thiago Macieira [Wed, 8 Jul 2015 00:35:11 +0000 (17:35 -0700)]
Add the GPLv3 license text

LGPLv3 refers to it but does not include it in its body.

Change-Id: Ib056b47dde3341ef9a52ffff13eed18cf3504738
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
9 years agoAvoid rebuiding batches during a material animation
Jocelyn Turcotte [Sun, 2 Aug 2015 17:43:23 +0000 (19:43 +0200)]
Avoid rebuiding batches during a material animation

Animating a complete batch of geometries bound by property
bindings will cause an unnecessary rebuild of the batch on
each animation step even though it will end up with the
same batch as in the previous frame.

Since the invalidation happens in nodeChanged, any node
change in an updatePaintNode might trigger an invalitation
if it is compared with a material that hasn't been updated yet.

Delay the verification of the DirtyMaterial flag until all
materials have been updated, later on in visitNode, to
make sure that we call compare only on up-to-date materials.

Change-Id: I03c095efc20817813508d959c74b41eae57beedc
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoAllow specification of loadable debug services via command line
Ulf Hermann [Wed, 5 Aug 2015 15:27:08 +0000 (17:27 +0200)]
Allow specification of loadable debug services via command line

We don't want to load the debugger when profiling and vice versa. This
makes it easier to prevent unwanted services from getting loaded.

Task-number: QTBUG-47623
Change-Id: I28893b6218110274a6d30b27805d89dbb443add3
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoParse debug server arguments in ctor
Ulf Hermann [Wed, 5 Aug 2015 14:39:33 +0000 (16:39 +0200)]
Parse debug server arguments in ctor

We will need them to determine which services to load. Also, drop all
the complicated indirection. With all relevant code in one place we
don't need the actions anymore. Setting the server's blocking mode only
makes sense before the thread starts. Afterwards the result is
undefined, so we don't have to specially protect it.

Change-Id: I58135cd598c31d3a02ccd3f67b238da01a176934
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoCanvas: add a testcase for QSGSimpleTextureNode crash.
Mitch Curtis [Wed, 12 Aug 2015 08:27:07 +0000 (10:27 +0200)]
Canvas: add a testcase for QSGSimpleTextureNode crash.

Task-number: QTBUG-47714
Change-Id: I8ecf2673ebc5de3d0fe1dec8a67bee81f5d4fb8f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
9 years agoAccess the id objects through a specialized runtime method
Lars Knoll [Mon, 22 Jun 2015 14:33:40 +0000 (16:33 +0200)]
Access the id objects through a specialized runtime method

This brings us one step closer to getting rid of the
QQmlContextWrapper.

Change-Id: Ied57f4c174c2ebd95096310a4ad4c0c28787e7a4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoDo not sort the vector of chunks
Frank Meerkoetter [Tue, 11 Aug 2015 20:01:55 +0000 (22:01 +0200)]
Do not sort the vector of chunks

I don't see why the vector needs to be sorted by the base()
addresses of the contained PageAllocations.

Change-Id: I31946a50075c64d01c6de98964ea42ebfc936c68
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix crash in QQuickCanvasItem::updatePaintNode()
Tobias Koenig [Tue, 11 Aug 2015 15:55:00 +0000 (17:55 +0200)]
Fix crash in QQuickCanvasItem::updatePaintNode()

QQuickCanvasItem manages the life time of the texture
already, so it shouldn't set the ownsTexture flag on the
QSGSimpleTextureNode, because that would result in a double deletion
when QSGSimpleTextureNode::setTexture() is called.

Change-Id: I7c1cc949b664d1a8b64bab092250439171e66233
Task-number: QTBUG-47714
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix incorrectly formatted code in QQmlEngine documentation.
Mitch Curtis [Tue, 11 Aug 2015 10:49:10 +0000 (12:49 +0200)]
Fix incorrectly formatted code in QQmlEngine documentation.

Change-Id: I70832871cbd697b77cfcbbe425ba5936be1c01d5
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoMove DataCollector into debugger plugin
Ulf Hermann [Wed, 22 Jul 2015 16:50:34 +0000 (18:50 +0200)]
Move DataCollector into debugger plugin

The data collector and all the jobs it uses to interact with the engine
are only used from the debugger plugin. We can as well move them there.

Change-Id: Ia48251f08b48c7e1e607b8ae2a3d1de29f80f742
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoMove V4 debugger agent into the debugger plugin
Ulf Hermann [Tue, 21 Jul 2015 16:56:32 +0000 (18:56 +0200)]
Move V4 debugger agent into the debugger plugin

The debugger is the only thing that actually needs it. Note that for
this to work we need to make QV4::Debugging::Debugger a QObject and
add some signals. The net effect is still a reduction in binary size
of about 1kb.

Change-Id: Ibecb8cfa140fc26fc13c8cbefb3d027ebdcd28a4
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoChange data collection for debugging to use QV4::Value.
Ulf Hermann [Mon, 27 Jul 2015 12:40:26 +0000 (14:40 +0200)]
Change data collection for debugging to use QV4::Value.

This patch changes the variable collection to store QV4::Value values
into a JS array, which is retained by the collector. This prevents any
GC issues, and gives a nice mapping from handle (used in the debugging
protocol) to JS value. It also allows for easy "shallow" object
serialization: any lookup can start with the QV4::Value, and add any
values it encounters to the array.

Testing is changed to use this collector directly, thereby testing the
class that is actually used to generate protocol data.

Task-number: QTBUG-47061
Change-Id: Iec75c4f74c08495e2a8af0fedf304f76f8385fd7
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoFont matching by font stylename
Allan Sandfeld Jensen [Wed, 13 May 2015 13:31:37 +0000 (15:31 +0200)]
Font matching by font stylename

Some fonts may have styles that does not directly match to QFont
properties. To support those QFontDatabase supports matching by style
name. This patch exposes that to QML.

Change-Id: I9896f2e3d9f6b56fb51f5694b018b456bcd05ed6
Task-number: QTBUG-30851
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
9 years agodestruct qobject wrappers before sweeping the GC heap
Lars Knoll [Fri, 7 Aug 2015 12:26:43 +0000 (14:26 +0200)]
destruct qobject wrappers before sweeping the GC heap

The wrappers emit a destroyed signal, and it's important
that the GC heap is in a well defined state when these signals
are emitted.

Change-Id: I423c4241b1e2fd3de727277d26bbe64f08862193
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoEncapsulate and protect all accesses to the vtable of Heap objects
Lars Knoll [Fri, 7 Aug 2015 11:56:31 +0000 (13:56 +0200)]
Encapsulate and protect all accesses to the vtable of Heap objects

This is required, so we can safely access the vtable even while
we're marking objects during GC.

Change-Id: I34f56b61b4bca0d0742faf607eb5ab8b2c30685e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAccess context properties through the qml context
Lars Knoll [Mon, 22 Jun 2015 05:46:32 +0000 (07:46 +0200)]
Access context properties through the qml context

And get rid of another temp in the IR.

Change-Id: I039393e020e5141f1986aee276246c30fd8057f3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoUse the QmlContext to access properties of the scope object
Lars Knoll [Fri, 19 Jun 2015 12:18:13 +0000 (14:18 +0200)]
Use the QmlContext to access properties of the scope object

Add some runtime methods to access properties of the scope
object directly (using the QmlContext), and generate proper
code to call those.

Change-Id: I0b29357c9a3b9ad53ba568ec6cb763e8ecb10f21
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix a crash when m_file is 0
Lars Knoll [Fri, 19 Jun 2015 12:18:29 +0000 (14:18 +0200)]
Fix a crash when m_file is 0

Change-Id: If26e00877521c78a9d48b9798fe64e1d587bc10a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdd ability to retrieve and use the QmlContext from our generated code
Lars Knoll [Thu, 18 Jun 2015 11:12:31 +0000 (13:12 +0200)]
Add ability to retrieve and use the QmlContext from our generated code

Our generated code (JIT and interpreter) should operate on the
QML context to retrieve QML related things. That's better than
operating on 4 different temps.

So this commit introduces the QML context as a temp in the
code we generate for QML. The next commits will move things over
to use that context with specialized runtime methods instead of
using generic subscript/get calls on the different subobjects.

Change-Id: Ia05cf339de9cdd23003f35cf78ede17d2590f8de
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoDon't call the test method assert
Lars Knoll [Fri, 7 Aug 2015 15:25:45 +0000 (17:25 +0200)]
Don't call the  test method assert

Mac OS X apparently uses a macro for assert(), completely
breaking compilation of this file

Change-Id: I51379da6e0c702e4d021dcd9a84af39889d24c2d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoProspective build fix for autotest on mac os x
Lars Knoll [Sun, 9 Aug 2015 19:06:38 +0000 (21:06 +0200)]
Prospective build fix for autotest on mac os x

Change-Id: I6b3182ed8b59e889fd11da08d8240ee5cf7d0e91
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMake QQmlExtensionPlugin documentation clearer.
Mitch Curtis [Wed, 5 Aug 2015 08:47:38 +0000 (10:47 +0200)]
Make QQmlExtensionPlugin documentation clearer.

I spent too long wondering why my plugin wasn't being loaded, until I
realized that the directory I was installing the qmldir into was not
named the same as the module. This is already documented in the
"Module Definition qmldir Files" documentation:

http://doc.qt.io/qt-5/qtqml-modules-qmldir.html#contents-of-a-module-definition-qmldir-file

But as I was writing a plugin, I was following this documentation:

http://doc.qt.io/qt-5/qtqml-modules-cppplugins.html

Where it was not at all obvious that they should be named the same.

Change-Id: I3e20bc31f8b42c7141b4c22c8cb1750ba9782971
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoV4: add int32 codepath to Runtime::div.
Erik Verbruggen [Mon, 3 Aug 2015 10:02:52 +0000 (12:02 +0200)]
V4: add int32 codepath to Runtime::div.

Mirrors Runtime::mod, and prevents unnecessary conversion to double.

Change-Id: Ib550ed3bc31aaf5bc5fd53524b396cce154d20a9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
9 years agoDoc: Fix QtQuick::EnterKey QML type documentation
Topi Reinio [Tue, 4 Aug 2015 11:41:12 +0000 (13:41 +0200)]
Doc: Fix QtQuick::EnterKey QML type documentation

Fix QDoc warnings and edit language/formatting.

Change-Id: I38f4683c582e444079bff488d0d2e0d9682a7085
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoMove QQmlConfigurableDebugService into qmltooling/shared
Ulf Hermann [Tue, 21 Jul 2015 14:39:57 +0000 (16:39 +0200)]
Move QQmlConfigurableDebugService into qmltooling/shared

It's only used by plugins now.

Change-Id: Ia73a2a22ba6bccbd85bbca6eda2fb9f5a8d6dd3b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove debugger-specific services into a common plugin
Ulf Hermann [Tue, 21 Jul 2015 14:11:16 +0000 (16:11 +0200)]
Move debugger-specific services into a common plugin

Change-Id: Icd4e6a6c57bc3ac65cb43d2329d236012b988678
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove profiler and engine control services into a plugin
Ulf Hermann [Mon, 20 Jul 2015 16:09:42 +0000 (18:09 +0200)]
Move profiler and engine control services into a plugin

Change-Id: I12627a07ceedea4aceafa6f0e630c0cab69d156d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoClean up QQmlDebugConnector's addService() and removeService()
Ulf Hermann [Thu, 16 Jul 2015 14:17:17 +0000 (16:17 +0200)]
Clean up QQmlDebugConnector's addService() and removeService()

As we look up services by name we should also add and remove them by
name. As the thread doesn't run during adding and removing of services
we don't have to check the client plugins for the initial state.
It's also a good idea to eventually disconnect any signals that we
connect on addService().

Change-Id: I9acd17d2caafe15831f32b7b959dc2dea9cab08c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoDon't ask QQmlDebugService for name() when we already know it
Ulf Hermann [Thu, 16 Jul 2015 09:04:39 +0000 (11:04 +0200)]
Don't ask QQmlDebugService for name() when we already know it

Change-Id: Ibae6602bd1725d98ddaa751bfc00391a20a1460e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoHide QQmlInspectorServiceImpl in .cpp file
Ulf Hermann [Wed, 15 Jul 2015 16:09:54 +0000 (18:09 +0200)]
Hide QQmlInspectorServiceImpl in .cpp file

Nobody needs to access it anymore.

Change-Id: Ib782037ac0a8721997f6d36995d03f42c060602b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove extra layer of indirection from inspector service
Ulf Hermann [Wed, 15 Jul 2015 16:01:53 +0000 (18:01 +0200)]
Remove extra layer of indirection from inspector service

We are not loading any secondary inspector plugins anymore, so the
logic to select them is unnecessary now.

Change-Id: Ic44c49e41c6bff4b19ce527df4657c6d73c0c82b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPass QQmlDebugService to AbstractViewInspector
Ulf Hermann [Wed, 15 Jul 2015 15:36:28 +0000 (17:36 +0200)]
Pass QQmlDebugService to AbstractViewInspector

This way we don't have to look up the implementation in order to send
messages.

Change-Id: I70cb122785875cf8b4ba6f7f2afd62cca77c8abb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove inspector service and QtQuick2 inspector into a common plugin
Ulf Hermann [Wed, 15 Jul 2015 15:00:22 +0000 (17:00 +0200)]
Move inspector service and QtQuick2 inspector into a common plugin

The inspector service doesn't do anything useful without the QtQuick2
plugin and vice versa. This way we can also use the
QQmlDebugPluginManager.

Change-Id: I78f154dcc9103ec9ec3d2eda216bfb293231583e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdd a factory for QQmlDebugService and use it to load plugins
Ulf Hermann [Wed, 15 Jul 2015 14:17:26 +0000 (16:17 +0200)]
Add a factory for QQmlDebugService and use it to load plugins

Debug services can now be added as plugins in qmltooling/ .
QQmlDebugConnector will load any service plugins matching the factory's
iid before open()'ing the connector.

Change-Id: I2e4cabd714018f62cf4d60b0ebd2827a85431964
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove pimpl from debug server connections
Ulf Hermann [Wed, 15 Jul 2015 13:42:10 +0000 (15:42 +0200)]
Remove pimpl from debug server connections

Now that they are self-contained plugins there is no reason for the
indirection anymore.

Change-Id: Ic2e2fe2075796c758057235e12981c8d40ce97c2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoUse QQmlDebugPluginManager for loading connection plugins
Ulf Hermann [Wed, 15 Jul 2015 13:19:50 +0000 (15:19 +0200)]
Use QQmlDebugPluginManager for loading connection plugins

Also remove all the hacks that deal with static builds, QT_NO_LIBRARY
and friends. QQmlDebugPluginManager handles those cases.

Change-Id: I62f13b787292108fa25d09fabc775332394989be
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoDeduplicate debug server connection code.
Ulf Hermann [Tue, 16 Jun 2015 11:40:08 +0000 (13:40 +0200)]
Deduplicate debug server connection code.

The packet protocol can be part of the server, now that the server is
not part of QtQml anymore. This enables us to remove some duplicated
code from the connections.

As an added benefit, with more control over the sending process,
QQmlDebugServer can now efficiently send single packets, without
creating a QList<QByteArray> first.

Change-Id: I13cc831e254c02b737e64816d6d3ab051d760995
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove QT_NO_QML_DEBUGGER ifdefs from QQmlDebugServer
Ulf Hermann [Tue, 14 Jul 2015 16:37:44 +0000 (18:37 +0200)]
Remove QT_NO_QML_DEBUGGER ifdefs from QQmlDebugServer

Plugins in qmltooling won't get built if that is set.

Change-Id: Ideced675064e74ccb78b9ac8c8fff2536150810c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove QQmlDebugServer into a plugin
Ulf Hermann [Tue, 14 Jul 2015 16:35:02 +0000 (18:35 +0200)]
Move QQmlDebugServer into a plugin

Change-Id: I8dc95f64c6df7303e8f580f191ee35da2284718b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoSimplify QQmlDebugServer::enableFromArguments
Ulf Hermann [Wed, 15 Jul 2015 10:01:05 +0000 (12:01 +0200)]
Simplify QQmlDebugServer::enableFromArguments

We can use the command line arguments already retrieved by
QQmlDebugConnector and we can return early in error conditions.

Also, make sure we don't pass QStringLiterals to QRegExp.

Change-Id: I06ce6eec9ea3adeabb9f4d35de8024eab8729d35
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoEliminate QQmlDebugServerInstanceWrapper
Ulf Hermann [Wed, 15 Jul 2015 09:43:37 +0000 (11:43 +0200)]
Eliminate QQmlDebugServerInstanceWrapper

As QQmlDebugServer is not accessible from outside we can just make the
constructor public now.

Change-Id: I06633330db861fcc78f9c1c0362755987c4ffed2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRetrieve services from debug connector, not via static instance()
Ulf Hermann [Tue, 14 Jul 2015 13:32:33 +0000 (15:32 +0200)]
Retrieve services from debug connector, not via static instance()

This will allow us to remove the instance() methods and create the
services from factories in plugins. Also, it allows us to remove the
isDebugging member from QQmlEnginePrivate.

Change-Id: Id9d9820a910902ecfdb1e8175e215093ce3d0965
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoExtract minimal abstract interfaces from debug services.
Ulf Hermann [Tue, 14 Jul 2015 12:45:50 +0000 (14:45 +0200)]
Extract minimal abstract interfaces from debug services.

We will access the services' functionality through those interfaces
once they live in their own plugins.

Change-Id: I0a0d7e73c07cb874b3b507cc4a9d304588c87bca
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPeriodically flush profiling data to client.
Ulf Hermann [Tue, 28 Jul 2015 11:22:33 +0000 (13:22 +0200)]
Periodically flush profiling data to client.

This reduces memory usage as the data can be deleted once it is sent.
It also reduces the time it takes to transmit the data when profiling
is stopped. It does incur a runtime cost as the sending now takes place
while the application is running. The decision to periodically flush or
not is left to the client, who can specify a flush interval when
starting profiling.

Usage of the flushing feature also relaxes the guarantees regarding the
sorting of events before they are sent. Events with higher timestamps
are now allowed to arrive before events with lower timestamps. Any
clients implementing the flushing need to take this into account. This
will eventually allow us to do away with the server-side ordering
altogether.

Task-number: QTBUG-39756
Change-Id: Idaf4931dc17f224c2bd492078b99e88b1405234e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoProfile eval() and global script execution
Ulf Hermann [Mon, 27 Jul 2015 13:33:43 +0000 (15:33 +0200)]
Profile eval() and global script execution

Change-Id: If2d71a74e836a5f689567a0230a8d4d9fc339f91
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAvoid QVector::pop_front()
Ulf Hermann [Tue, 4 Aug 2015 09:26:52 +0000 (11:26 +0200)]
Avoid QVector::pop_front()

Change-Id: Id2de4ab8c17f7e0412b44a1d30c6238861464989
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAvoid multisampled contexts in QQuickWidget
Laszlo Agocs [Wed, 29 Jul 2015 11:16:14 +0000 (13:16 +0200)]
Avoid multisampled contexts in QQuickWidget

Like with QOpenGLWidget, not requesting a multisampled context
unnecessarily avoids crashing with Mesa/Intel/EGL (f.ex. in the
qquickviewcomparison example when enabling multisampling).

Task-number: QTBUG-47509
Change-Id: Ia22110332f639a238cfb3b2c36916f65c00a7bbc
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
9 years agoDoc: added documentation to undocumented methods
Nico Vertriest [Thu, 30 Jul 2015 10:33:32 +0000 (12:33 +0200)]
Doc: added documentation to undocumented methods

Task-number: QTBUG-36985
Change-Id: Idc6f7961f4f02f66dc3d4a8e5d09dd15d43b7757
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoFix selections in tables that span over several cells
Eskil Abrahamsen Blomfeldt [Tue, 28 Jul 2015 11:00:48 +0000 (13:00 +0200)]
Fix selections in tables that span over several cells

In the code that converts text layouts to subtrees in the scene
graph specifically for TextEdit, there was a cutoff to treat
text tables as single nodes in the graph (for simplicity).
However, this breaks selections, since the ranges spanned by
each cell will be interpreted as overlapping, messing up the
selection merging logic. We need the same approach here as for
any other text frame where we check frame boundaries.

[ChangeLog][TextEdit] Fixed issues with selections that spanned
several cells in a table.

Change-Id: I789041d84b5d163e209488f8f2f1f83a6471389f
Task-number: QTBUG-46928
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
9 years agoFix namespaces in inspector plugin
Ulf Hermann [Wed, 15 Jul 2015 15:54:11 +0000 (17:54 +0200)]
Fix namespaces in inspector plugin

Defining things outside the Qt namespace and then accessing Qt
internals is just asking for trouble. The redundant QtQuick2
namespace can be dropped, though.

Change-Id: Ifa83733a3f98704b7b51697dbca9486d0f504f65
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdd EnterKey attached property
Kai Uwe Broulik [Thu, 28 May 2015 13:26:27 +0000 (15:26 +0200)]
Add EnterKey attached property

This adds an attached property EnterKey allowing to manipulate the
Enter key appearance.

[ChangeLog][QtQuick][Item] Added EnterKey attached property that allows
to change the appearance of the Enter key on an on-screen keyboard

Change-Id: Ic9a01b0217c317e4ed3a9eef1fa01f2f113f0294
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoSend the mouse events to the correct window
Albert Astals Cid [Tue, 21 Jul 2015 09:36:22 +0000 (11:36 +0200)]
Send the mouse events to the correct window

That is the window with the item, not the window that contains the TestUtil Item

Change-Id: I13f5bfd0556e594843d499d014e92bcc41850f45
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoRephrase sentence about versioning in QQmlExtensionPlugin documentation
Mitch Curtis [Mon, 3 Aug 2015 11:44:10 +0000 (13:44 +0200)]
Rephrase sentence about versioning in QQmlExtensionPlugin documentation

The original sentence (885735d0) is better than the new one (2c4c7a38).
Some small adjustments were made in this patch as well.

Change-Id: I2cc62c2ffcde7df289b07486439456350a2f60ab
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoConsolidate duplicated QQmlExtensionPlugin documentation.
Mitch Curtis [Mon, 3 Aug 2015 11:37:28 +0000 (13:37 +0200)]
Consolidate duplicated QQmlExtensionPlugin documentation.

There have already been doc improvements made to one of the duplicated
pieces and not the other. This patch uses the improved one.

Change-Id: I12a6cb013e61f63e67fb9d691ee58ba12e21054d
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoFix typo in plugin documentation.
Mitch Curtis [Mon, 3 Aug 2015 11:03:36 +0000 (13:03 +0200)]
Fix typo in plugin documentation.

Change-Id: I5cd851e493b6663bd0a7d09a1c5435c37a4ad7d6
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoFix shared example header.
Friedemann Kleint [Tue, 28 Jul 2015 11:07:29 +0000 (13:07 +0200)]
Fix shared example header.

Use new connection syntax and return -1 on load failures, which
avoids hanging processes and empty windows in case some module is not
installed.

Change-Id: I4966c9657b752eee8612fa893a0489bc8a64ccfc
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
9 years agoFix selecting single character in middle of string
Eskil Abrahamsen Blomfeldt [Wed, 29 Jul 2015 12:27:58 +0000 (14:27 +0200)]
Fix selecting single character in middle of string

The fix for QTBUG-46829 revealed a bug in the code to handle
selecting part of ligatures. The ranges were assumed to be
[start, end], while they are in fact [start, end>. This would
cause the engine to assume the previous node overlapped completely
with the selected node and that the node had thus already been
added to the graph.

Due to the bug in QTBUG-46829, this accidentally worked before,
but when that bug was fixed, this bug appeared.

Change-Id: I517d260de9f58db4504dd4320b7113fbbe305a81
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix disappearing selection spanning different scripts
Eskil Abrahamsen Blomfeldt [Wed, 29 Jul 2015 11:47:45 +0000 (13:47 +0200)]
Fix disappearing selection spanning different scripts

Due to the way itemization is currently done in Qt,
Cyrillic text (and other writing systems) separated by
spaces will become separate items because the spaces
are itemized as Script_Common. In the Scenegraph's text
node engine, we should merge these items into a single node
as long as the same font is used for all the text. But
a bug in the engine caused this to fail when the text
was selected. The symptom of this was that in some rare
cases one of the items would vanish if it were in the
middle of a selection.

In order to support the bearing of selected text leaning outside
the selection rect, I previously added a hack which would add
all selected text as unselected text as well in
b0783c21fb54b939f07ddf5658cc51113b8014e6. This was an awkward
way of doing it and caused said regression. A less intrusive way
is just to add the text to the scene graph twice, as this does not
interfere with the logic needed to support selecting part of
ligatures nor the engine's ability to merge nodes correctly.

[ChangeLog][Text] Fixed regression with selections spanning
different scripts.

Task-number: QTBUG-46829
Change-Id: I0faed76fb2cd1ac0b2e5cc54b81008b5e2550733
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoRemove unused code
Frank Meerkoetter [Sat, 1 Aug 2015 19:11:00 +0000 (21:11 +0200)]
Remove unused code

There are no users of this visitor interface left.

Change-Id: I8d912c3441bd8a67293eee443451dcea392308ee
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoWork around ICC 16 beta compiler bug in SFINAE expansion
Thiago Macieira [Fri, 31 Jul 2015 07:30:00 +0000 (00:30 -0700)]
Work around ICC 16 beta compiler bug in SFINAE expansion

Calling std::vector<int>'s constructor (or assign()) with two ints can
select one of two different overloads: the (size_t, value_type) overload
which fills with n copies of the value or (iterator, iterator) overload,
which would copy a range.

libstdc++ had some workarounds for this scenario, by using an indirect
dispatch to determine whether it was a pair of integrals or not. But
ever since the resolution of DR1234 (https://gcc.gnu.org/bugzilla/
show_bug.cgi?id=43813) with C++11's more expressive SFINAE, the
dispatching is done actually by the outer template by adding an extra
template parameter that requires std::iterator_traite<T> to expand.

That's where ICC fails: it expands std::iterator_traits<int> and that
fails. It should have ignored the expansion and discarded that overload.

The workaround is simple: pass different types as the parameters, which
means the compiler cannot select the overload containing a pair of
iterators.

/usr/include/c++/5/bits/stl_iterator_base_types.h(154): error: name followed by "::" must be a class or namespace name
        typedef typename _Iterator::iterator_category iterator_category;
                         ^
          detected during:
            instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" at line 163
            instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 876 of "compiler/qv4ssa.cpp"

Change-Id: I52dd43c12685407bb9a6ffff13f5f783820213a5
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoMake QQmlConfigurableDebugService a template
Ulf Hermann [Thu, 16 Jul 2015 12:18:54 +0000 (14:18 +0200)]
Make QQmlConfigurableDebugService a template

We will need to derive from service-specific interfaces once we move
the services into plugins and QQmlConfigurableDebugService doesn't need
to live in QtQml.

Change-Id: I151f32ea0f8be9719b245fc19164269c6e62a84a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove pimpl from all classes derived from QQmlDebugService
Ulf Hermann [Thu, 16 Jul 2015 12:12:04 +0000 (14:12 +0200)]
Remove pimpl from all classes derived from QQmlDebugService

There is no point in using pimpl for purely internal classes,
especially when we move them to their own plugins.

Change-Id: I2ee8bf2ded2242d91bab89f589a131dc3bcc9a55
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove superfluous check
Frank Meerkoetter [Thu, 30 Jul 2015 10:48:52 +0000 (12:48 +0200)]
Remove superfluous check

The same check is done ~3 lines above.

Change-Id: I8e6aeff89a7b0f3805afdf453b133dc98da59066
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove unused QQmlPool
Frank Meerkoetter [Mon, 27 Jul 2015 19:54:45 +0000 (21:54 +0200)]
Remove unused QQmlPool

This code is no longer in use.

Change-Id: If0cb009ac6622ed36cba5886d6685d3f242c3c87
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoUse signal/slot for passing messages through QQmlDebugServer
Ulf Hermann [Mon, 13 Jul 2015 13:56:25 +0000 (15:56 +0200)]
Use signal/slot for passing messages through QQmlDebugServer

This results in much cleaner code than the previous implementation
using QMetaObject::invokeMethod().

We have to use read locks now for adding and removing engines, as we
should have done already before. If a condition is waiting on a write
lock you cannot acquire a read lock from another thread. So, if we kept
the write locks we wouldn't be able to receive messages while the engines
are waiting.

Change-Id: Icfe641601dec2f8d7181ae579146ed603d57a4c2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoSimplify thread synchronization in QQmlDebugServer
Ulf Hermann [Thu, 16 Jul 2015 14:02:35 +0000 (16:02 +0200)]
Simplify thread synchronization in QQmlDebugServer

m_clientPlugins will only be accessed from the server thread, so it
doesn't need to be protected by a mutex. m_plugins will only be
modified before the server thread starts and after it ends. During the
runtime of the thread it is constant and thus doesn't need to be
protected, either.

Engines are supposed to be added and removed after any waiting for
connections and hello messages is done, so we can reuse the hello mutex
for synchronization there.

Change-Id: I09037430804c264a5f784c4b5a85668d87851b12
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove QQmlDebugServer::advertisePlugins()
Ulf Hermann [Wed, 15 Jul 2015 12:08:48 +0000 (14:08 +0200)]
Remove QQmlDebugServer::advertisePlugins()

As all services have to register before the server starts and cannot
unregister until after the thread is stopped, we don't need any
additional service advertisement anymore.

Change-Id: I20977560b4f7a3acb08a6cc703916bebf61d0220
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdd some diagnostics to pixmap cache test
Ulf Hermann [Thu, 30 Jul 2015 15:59:02 +0000 (17:59 +0200)]
Add some diagnostics to pixmap cache test

This test is failing frequently and it's unclear why.

Change-Id: Ib06582d9d515b3cd571f643077b7e8382f6a98a4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMake QQmlDebugService::registerService() private and part of ctor
Ulf Hermann [Mon, 13 Jul 2015 14:38:25 +0000 (16:38 +0200)]
Make QQmlDebugService::registerService() private and part of ctor

By forcing all debug services to register before the thread starts we
can get rid of the complicated thread synchronization and have a more
natural API for the services.

We can also better enforce the thread situation when registering
services in QQmlDebugServer now. QQmlProfilerService should not
moveToThread() in its constructor as the thread has not been started,
yet. The thread affinity of QQmlProfilerService doesn't make any
difference anyway, as all relevant methods are protected by mutexes
and it doesn't have any slots.

Change-Id: I57db9e2bf94ec6884ede694715dadf5bfd687334
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMake sure QQmlDebugServer does not deadlock in blocking mode
Ulf Hermann [Wed, 29 Jul 2015 10:51:23 +0000 (12:51 +0200)]
Make sure QQmlDebugServer does not deadlock in blocking mode

Previously, the server could wake the helloCondition before the main
thread was waiting on it. This would lead to the main thread then
waiting forever once it hit the wait() statement.

Change-Id: I694d65f72cf6be6e4c5a0c65ea4aea8a5878bf5b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove debugger initialization out of QQmlDebugServer and QQmlEngine
Ulf Hermann [Wed, 29 Jul 2015 10:28:10 +0000 (12:28 +0200)]
Move debugger initialization out of QQmlDebugServer and QQmlEngine

QQmlDebugConnector has to check the parameters before deciding if (and
what kind of) instance to create. It also has to add the services
itself as we don't want to tie a specific implementation of
QQmlDebugConnector to a specific set of services. Logic to load the
services from plugins will be added in a separate change. Integrating
the service initialization with the connector initialization enables us
to load the services before the server thread startsi, which will
simplify the thread synchronization.

QQmlConfigurableDebugService has to recheck for blockingMode once it
gets enabled as it cannot rely on being enabled right away anymore. It
should have done that already before as it's possible to disable and
re-enable services.

Change-Id: I9d161d78836bae10d688a90b4c2a32efed320412
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoExtract minimal interface from QQmlDebugServer and use it.
Ulf Hermann [Tue, 14 Jul 2015 14:36:32 +0000 (16:36 +0200)]
Extract minimal interface from QQmlDebugServer and use it.

This will allow us to move QQmlDebugServer into a plugin. The new QQmlDebugServer
is the interface exposed to connection plugins. The interface exposed to services
is renamed to QQmlDebugConnector, as technically it doesn't have to be a
"server".

Change-Id: Id508b8c0a6960228e889f45a437b73060392db39
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix trailing comma at end of enumerator list
Eskil Abrahamsen Blomfeldt [Mon, 6 Jul 2015 13:45:41 +0000 (15:45 +0200)]
Fix trailing comma at end of enumerator list

Breaks compilation with gcc.

Change-Id: I0e48e37b4e67ae522338b17dfe996f455e0e5027
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix warnings
Thomas Hartmann [Tue, 28 Jul 2015 11:53:43 +0000 (13:53 +0200)]
Fix warnings

Change-Id: I4acbf9bdc09ef2d906c1ae1894e5f5995b93ae72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
9 years agoAdd namespace declarations to qv4debugging.cpp
Ulf Hermann [Tue, 28 Jul 2015 17:18:24 +0000 (19:18 +0200)]
Add namespace declarations to qv4debugging.cpp

Change-Id: Ia7c4e6e29726276bbfe8888b2b2902abc971cad3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoImprove QV4DebugService debug output
Ulf Hermann [Wed, 22 Jul 2015 09:51:25 +0000 (11:51 +0200)]
Improve QV4DebugService debug output

JSON Payloads look better without the quotes.

Change-Id: I5a7954ab58449cccabc29b0d3b499838dafe9338
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>