platform/upstream/qtdeclarative.git
9 years agoMove readonly accessors into Heap::ArrayData
Lars Knoll [Mon, 17 Nov 2014 20:08:13 +0000 (21:08 +0100)]
Move readonly accessors into Heap::ArrayData

these methods don't modify the object, so it's safe to have them
there and this simplifies quite a bit of the code.

Change-Id: I2f591758efba9cb8d17b956bc7c02e2d7a468ea4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove function definition where it belongs
Lars Knoll [Mon, 24 Nov 2014 08:52:23 +0000 (09:52 +0100)]
Move function definition where it belongs

Change-Id: I93e98813d2ffaf7dc648ad81b15e907dfdc276d0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMerge remote-tracking branch 'origin/5.4' into dev
Simon Hausmann [Tue, 9 Dec 2014 14:09:20 +0000 (15:09 +0100)]
Merge remote-tracking branch 'origin/5.4' into dev

Conflicts:
src/qml/jsruntime/qv4arraydata.cpp
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4globalobject.cpp
src/qml/jsruntime/qv4internalclass.cpp
src/quick/items/qquicktext_p.h
src/quick/items/qquicktextedit_p.h
src/quick/items/qquicktextinput_p.h

Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c

9 years agoCleanup: Remove unused code
Simon Hausmann [Mon, 8 Dec 2014 14:51:47 +0000 (15:51 +0100)]
Cleanup: Remove unused code

isConcurrent is not virtual and always returns true, so we can remove
it and remove the if() on the caller side.

Change-Id: Ie750fdeddaf8c339e1fcab99ebd967e3446bd975
Reviewed-by: Michael Brasser <michael.brasser@live.com>
9 years agoCleanup: Merge QQmlDataLoader and QQmlTypeLoader
Simon Hausmann [Mon, 8 Dec 2014 14:48:17 +0000 (15:48 +0100)]
Cleanup: Merge QQmlDataLoader and QQmlTypeLoader

There exists only one sub-class of QQmlDataLoader and there are no virtual
functions.

This also clears up a confusion reported in Jira that suggested QQmlDataLoader
should get a virtual destructor as it is being subclassed and somebody might
have a pointer only to a QQmlDataLoader and deleting that would not do proper
polymorphic destruction.

Change-Id: I34611be5a95522bc85a87fb7df97b6d1de7a3d37
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
9 years agoQML: fix warning in tests
Erik Verbruggen [Mon, 8 Dec 2014 09:25:09 +0000 (10:25 +0100)]
QML: fix warning in tests

Remove unused function that wouldn't be emitted anyway.

Change-Id: I623d5d44bca9a1358cf9e66ff557992aba9ae451
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQML: fix warning in tests
Erik Verbruggen [Mon, 8 Dec 2014 09:24:42 +0000 (10:24 +0100)]
QML: fix warning in tests

Remove unused constant.

Change-Id: I3fb3512f7ea54102450eeeda1a56c73fe6b26025
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4
Simon Hausmann [Tue, 9 Dec 2014 08:53:01 +0000 (09:53 +0100)]
Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4

9 years agoQML: fix warning in tests
Erik Verbruggen [Mon, 8 Dec 2014 09:24:06 +0000 (10:24 +0100)]
QML: fix warning in tests

Remove unused class field.

Change-Id: I90981546e33d4839a91c418a8746e6f2ebc3bf46
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQuick: fix test
Erik Verbruggen [Mon, 8 Dec 2014 09:22:47 +0000 (10:22 +0100)]
Quick: fix test

/Users/erik/dev/qt5-stable/qtdeclarative/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp:1561:60: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
                    items << qMakePair(QString("new item " + j), QString::number(j));
                                               ~~~~~~~~~~~~^~~

Change-Id: I94bd952abf82a8f174772482330b5fdd636578ad
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMay it rest in pieces.
Robin Burchell [Mon, 8 Dec 2014 10:33:57 +0000 (02:33 -0800)]
May it rest in pieces.

Change-Id: I58a2ac56e099da44314feb1614067626b015710a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAvoid inadvertent copies of the windows list
Roger Maclean [Thu, 4 Dec 2014 21:28:42 +0000 (16:28 -0500)]
Avoid inadvertent copies of the windows list

There are a couple of ways in which this code creates
temporary copies of the window list, m_windows.  This is often
benign but there are also places (e.g. startOrStopAnimationTimer)
which get non-const references to items which results
in m_windows being detached from the temporary resulting in a real
copy of the list items.  Again the copy is often fairly benign,
however, as the code also relies heavily on pointers to items
in the list, it can also result in crashes.

I think it might be advisable to store a list of pointers to
Window structures rather than store the structure themselves as
it appears really easy to introduce copies of the list accidentally.
The removal of the use of foreach for example is not made here for
aesthetics but because it introduces a hidden temporary copy of
the list.

Change-Id: I504951a897c4fb0cf106f5a4792b5cfcd532ba8f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoAvoid string-based connect in QQuickImageBase.
Michael Brasser [Sat, 6 Dec 2014 16:38:34 +0000 (10:38 -0600)]
Avoid string-based connect in QQuickImageBase.

String-based connect is relatively slow, and should be avoided in core
items. This improves performance of the

tst_librarymetrics_performance::instantiation_cached(043) image - empty

test case (approximately halving the time).

Task-number: QTBUG-43096
Change-Id: I02485c515435eceacc95c55f877fc8566e7406d7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix \inqmlmodule usage: only use one parameter
Alejandro Exojo [Fri, 5 Dec 2014 19:14:20 +0000 (20:14 +0100)]
Fix \inqmlmodule usage: only use one parameter

Since the command just links back to the corresponding module page, only the
first parameter is used, and the version causes more confusion.

Change-Id: I73ed289550c576747132f77b83c1257094059cd1
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
9 years agoFix crash with when evaluating bindings with QQmlExpression that throw exceptions
Simon Hausmann [Mon, 1 Dec 2014 11:27:28 +0000 (12:27 +0100)]
Fix crash with when evaluating bindings with QQmlExpression that throw exceptions

We must handle a thrown exception and cannot pass the undefined value back to
QV8Engine::toVariant.

Change-Id: Ia466b175706dccd513895ef5bb166b811fbdc26b
Task-number: QTBUG-41860
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoQmlDebug: Provide public method for starting a debug server
Ulf Hermann [Fri, 10 Oct 2014 11:32:38 +0000 (13:32 +0200)]
QmlDebug: Provide public method for starting a debug server

With QQmlDebuggingEnabler::startTcpDebugServer you can create a debug
server for debugging or profiling also without the qmljsdebugger
command line argument.

Change-Id: I642f73680585f9c7578762bcc0b247c736fe1338
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQmlDebug: Allow tests to ignore a number of bind errors
Ulf Hermann [Fri, 10 Oct 2014 14:14:57 +0000 (16:14 +0200)]
QmlDebug: Allow tests to ignore a number of bind errors

Like this we can effectively test the port range feature of the debug
server.

Change-Id: Id0d0b47525177f0cfbb8c35a267962a82338f047
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQmlDebug: Test the debugging enabler
Ulf Hermann [Fri, 10 Oct 2014 14:15:58 +0000 (16:15 +0200)]
QmlDebug: Test the debugging enabler

Change-Id: I7c9aff4474850139fe96afc4b300fa0e2ded8874
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMark parameter to QQmlDebuggingEnabler as unused if it isn't used.
Ulf Hermann [Tue, 2 Dec 2014 13:37:16 +0000 (14:37 +0100)]
Mark parameter to QQmlDebuggingEnabler as unused if it isn't used.

Change-Id: I6e843dee8e25b3aacfe3de7c584effd36efdb708
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoSkip failing test temporarily
Simon Hausmann [Fri, 5 Dec 2014 11:25:59 +0000 (12:25 +0100)]
Skip failing test temporarily

Skip this until commit 155306ffee1941194d44dd632a7993fce4a05606 from qtbase
has hit the dev branch through merges.

Change-Id: I3e58d288fcc45c511bc1b8b4e7dbb6c41d367eba
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoMerge remote-tracking branch 'origin/5.4.0' into 5.4
Simon Hausmann [Fri, 5 Dec 2014 10:58:05 +0000 (11:58 +0100)]
Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: I5978bab8a4fde4c2ee33907fd81f49cb69e4fb26

9 years agoQQmlInspectorService: handle views only with supported plugins. v5.4.0
Ulf Hermann [Tue, 2 Dec 2014 17:26:46 +0000 (18:26 +0100)]
QQmlInspectorService: handle views only with supported plugins.

Task-number: QTBUG-43048
Change-Id: I5b32bd0a1e28fdf56b5346580daf21e7ec1b9f8c
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
9 years agoqttest: make findChild available only for QtTest 1.1
Fawzi Mohamed [Thu, 4 Dec 2014 17:00:40 +0000 (18:00 +0100)]
qttest: make findChild available only for QtTest 1.1

Change-Id: I4ceb1a969bd4296b82f899088b02b5e8cf100bcd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoUpdate plugins.qmltypes
Kai Koehne [Thu, 4 Dec 2014 08:50:44 +0000 (09:50 +0100)]
Update plugins.qmltypes

Change-Id: I9b6c54b572d4653d609b154000e274b9e64d591f
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAdd string::arg method in installTranslatorFunctions
Kai Koehne [Thu, 4 Dec 2014 13:19:09 +0000 (14:19 +0100)]
Add string::arg method in installTranslatorFunctions

QJSEngine::installTranslatorFunctions install the translator functions
to any given JS object. However, the custom string::arg() method is only
added in qqmlbuiltinfunctions.cpp, making the use of qsTr() in other
pure-JS programs quite hard.

Task-number: QTBUG-43113
Change-Id: Ia9ed97a4c07a4d167c792f3ea13e4f6e96c97423
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCorrect QtQml.Models \qmlmodule version.
Mitch Curtis [Tue, 18 Nov 2014 09:16:52 +0000 (10:16 +0100)]
Correct QtQml.Models \qmlmodule version.

For example, the following documentation [1] says:

Import Statement:   import QtQml.Models 2.0

This should be:

Import Statement:   import QtQml.Models 2.1

The module documentation [2] is correct, but there's no visible link to
that page from [1].

[1] http://qt-project.org/doc/qt-5/qml-qtqml-models-objectmodel.html
[2] http://qt-project.org/doc/qt-5/qtqml-models-qmlmodule.html

Change-Id: Ib2ab7b821ad7e98c20b396b26f745ee39434b7fb
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoFix QtQuick2 module unload support
Chris Adams [Mon, 1 Dec 2014 04:32:57 +0000 (14:32 +1000)]
Fix QtQuick2 module unload support

This commit ensures that the value type providers installed by the
QtQuick2 QML module during initialization are uninstalled when the
plugin is unloaded.

It also fixes a bug in the type compiler so that it now works with
types from plugins which get unloaded and then reloaded.

Task-number: QTBUG-43004
Change-Id: I4b3fb75aae65dfbc5de9c88701ed82514087ab7d
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
9 years agoError out when trying to set an item as its own parent
Frederik Gladhorn [Wed, 3 Dec 2014 13:42:12 +0000 (14:42 +0100)]
Error out when trying to set an item as its own parent

Task-number: QTBUG-43063
Change-Id: I92a33047ac7fa2afeff4986b6e42c07afbc59918
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
9 years agoFix crashes on QNX/x86
Simon Hausmann [Wed, 3 Dec 2014 09:37:16 +0000 (10:37 +0100)]
Fix crashes on QNX/x86

On x86 we assume that ebx holds the address of the global offset table for
position independent code. So before placing a run-time call we restore the
register from it's position we saved it on earlier on the stack. However after
commit d9f33ccdef985badc56fd8940373748626beffc7 the register wasn't saved on the
stack anymore in the prologue because we skipped because it's caller saved. So
when we seemingly reloaded ebx with the GOT from the stack, we loaded it from a location
we never saved it to. This patch makes sure to always save it on the stack so that
we can always restore it.

Change-Id: I8f6a8e38779151fff517f17220f29a7cb45ca89d
Task-number: QTBUG-43036
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoFix application build when combining with Mac OS X Cocoa headers
Simon Hausmann [Mon, 1 Dec 2014 12:11:03 +0000 (13:11 +0100)]
Fix application build when combining with Mac OS X Cocoa headers

OSX's AssertMacros.h unconditionally defines macros like "check" and that
clashes with qml's type discovery templates that define a check function
and that are used by qmlRegisterType and friends.

There's a comment in the OS X headers suggesting that this will be fixed
in the "next" release, but that hasn't happened for a while and the bug
is still present in 10.10. So let's work around it and make life easier
for people using Qml and Cocoa at the same time.

Change-Id: I005d21188f92deaebd45bce2e6484cd4deeb9a34
Task-number: QTBUG-36309
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix conditional breakpoints in QML
Simon Hausmann [Mon, 1 Dec 2014 14:51:05 +0000 (15:51 +0100)]
Fix conditional breakpoints in QML

We need to set "inheritContext" to true for the QV4::Script that's used during
conditional break point evaluation, because that will also disable fast
property lookups, which is still required for QML lookups to work.

Change-Id: I8976df1c827b5058eae9bdce6e86e5ea856cbfe1
Task-number: QTBUG-43018
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix expression evaluation in specific frames in the debugger
Simon Hausmann [Fri, 28 Nov 2014 08:24:35 +0000 (09:24 +0100)]
Fix expression evaluation in specific frames in the debugger

Expressions from the QML/JS console are intended to be executed in a specific
frame / context. However that wasn't implemented properly, we should pop the
current context frameNr times.

[ChangeLog][QtQml] Fix inspecting objects in QML/JS console in different frames.

Change-Id: If575d4005c52a9fe6805538a7b1a02b9e32049d6
Task-number: QTBUG-42831
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoRemove dead code
Simon Hausmann [Thu, 27 Nov 2014 14:45:02 +0000 (15:45 +0100)]
Remove dead code

The eval code tracking was used last time for the old exception handling,
but that's long gone :)

Change-Id: I6fa80a5197745fde461e4da66cd65a50149c6048
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoQtQuick.Window: add missing documentation for Window methods
Shawn Rutledge [Fri, 7 Nov 2014 11:55:03 +0000 (12:55 +0100)]
QtQuick.Window: add missing documentation for Window methods

Several more methods/slots are inherited from QWindow but are not
documented for the QML Window type.  Also some other documentation
improvements.

Task-number: QTBUG-40093
Task-number: QTBUG-42426
Change-Id: Ib753be269cbc41ee540e6556e0ef483758eefe62
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4
Simon Hausmann [Tue, 2 Dec 2014 18:56:43 +0000 (19:56 +0100)]
Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4

9 years agoMerge remote-tracking branch 'origin/5.4.0' into 5.4
Simon Hausmann [Tue, 2 Dec 2014 12:41:31 +0000 (13:41 +0100)]
Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: I89bbb2977350a03c156d531f810d08a5560ffbb3

9 years agoFix permissions of files
Kai Koehne [Wed, 26 Nov 2014 08:59:11 +0000 (09:59 +0100)]
Fix permissions of files

Change-Id: I22958892d846da348325ba608084f8d9a05473d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAdded change log for 5.4.0
Simon Hausmann [Sat, 29 Nov 2014 08:55:50 +0000 (09:55 +0100)]
Added change log for 5.4.0

Change-Id: Ie3e238a3ccac1d95978229316977d131be3010d6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoRegression: Fix array data corruption
Simon Hausmann [Mon, 1 Dec 2014 09:21:27 +0000 (10:21 +0100)]
Regression: Fix array data corruption

When inserting into a sparse JS array, we may have to re-allocate the
underlying data vector. When that happens we must reload the ArrayData
pointer, to avoid returning a wrong pointer in ArrayData::insert.

This patch also fixes the valgrind support in the memory allocator by correctly
marking the mmap'ed memory region as inaccessible.

Change-Id: I86aabc2cec74a4f3c8396463910d90c8968a741d
Task-number: QTBUG-42956
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoSkip tst_qquickwindow::headless() when using ANGLE/Windows.
Friedemann Kleint [Mon, 1 Dec 2014 09:45:00 +0000 (10:45 +0100)]
Skip tst_qquickwindow::headless() when using ANGLE/Windows.

The test crashes frequently.

Task-number: QTBUG-42967
Change-Id: Ic17c6187bfa657154a9b04eb9c5b9a3de291cb1e
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoFix loading of .ui.qml form files with cached compilation units
Simon Hausmann [Mon, 24 Nov 2014 14:52:42 +0000 (15:52 +0100)]
Fix loading of .ui.qml form files with cached compilation units

Simplify the type loading logic and try the Type -> Type.qml and Type ->
Type.ui.qml mapping in a simple loop that tries off-disk and cached
compilation unit loading.

Change-Id: I537feabd0a158a71f330bede9e6988291298ae81
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoDon't default to HighQualitySubPixelAntialiasing on WinRT
Andrew Knight [Fri, 28 Nov 2014 11:43:12 +0000 (13:43 +0200)]
Don't default to HighQualitySubPixelAntialiasing on WinRT

The subpixel shader is probably not a good default here because most
devices are mobile (can change screen orientation) and have high pixel
densities. Furthermore, it breaks text rendering on the Surface RT, where
the graphics hardware is too weak to support the number of uniforms the
subpixel shader uses.

Task-number: QTBUG-41769
Change-Id: I10210af91976ab55e611025c0452a1ee1f3114a9
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
9 years agoMake effectiveDevicePixelRatio() return a qreal.
Morten Johan Sørvig [Tue, 25 Nov 2014 13:22:15 +0000 (14:22 +0100)]
Make effectiveDevicePixelRatio() return a qreal.

Fractional scale factors are not as broken as previously
believed, especially for Qt Quick. Keep the door open
for finding a way to support it at some point in the
future.

Change-Id: Ifeadcc53175ac6c25ea0288d5fe1966e3de408f9
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoAdd missing call to rendercontrol
Laszlo Agocs [Sat, 22 Nov 2014 20:17:34 +0000 (21:17 +0100)]
Add missing call to rendercontrol

Change-Id: Ic8c8e6d7a9d99216292b8b4faa2926d849333a05
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
9 years agoAdd since 5.4 markers
Albert Astals Cid [Tue, 25 Nov 2014 21:56:30 +0000 (22:56 +0100)]
Add since 5.4 markers

Change-Id: Ic0e594cb53016e6f68fbfb6e6064707344afefef
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoStabilize tst_qquickflickable.
Friedemann Kleint [Wed, 26 Nov 2014 09:01:15 +0000 (10:01 +0100)]
Stabilize tst_qquickflickable.

- Use one engine per test
- Use QQuickView for the margins test
- Verify QWindow cleanup.

Change-Id: Id2a10b56101832c362822963a2a7bd1d66daa143
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoDocument Qt.application.supportsMultipleWindows property.
Mitch Curtis [Thu, 13 Nov 2014 15:30:03 +0000 (16:30 +0100)]
Document Qt.application.supportsMultipleWindows property.

The documentation was not added in
0df606e2ab8f3b60e1ad57dba245acf2e7810612.

Change-Id: I0a5802a66021e17d1280f3969981c9e8a62c8119
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoDoc: Remove text that claims aliases cannot be read-only
Simon Hausmann [Mon, 24 Nov 2014 12:10:04 +0000 (13:10 +0100)]
Doc: Remove text that claims aliases cannot be read-only

It's very well possible to have read-only aliases :)

Task-number: QTBUG-33709
Change-Id: I2ad8854cd0b412d1d2e7afde6dfd585519b69e27
Reviewed-by: Michael Brasser <michael.brasser@live.com>
9 years agoOperate directly on Heap::ArrayData where possible
Lars Knoll [Mon, 17 Nov 2014 13:54:52 +0000 (14:54 +0100)]
Operate directly on Heap::ArrayData where possible

Change-Id: I87dfb3e9a07673b5c405619eab8b6ee292d5c097
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoReduce usage of Object::arrayData()
Lars Knoll [Mon, 17 Nov 2014 13:33:40 +0000 (14:33 +0100)]
Reduce usage of Object::arrayData()

This will simplify porting over to returning Heap::ArrayData
from the method (as required for the new GC).

Change-Id: I5fb9ca7dfeab1aa63cc17c8948ef0966716f1bcb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove the indexing methods from SimpleArrayData to Heap::SimpleArrayData
Lars Knoll [Mon, 17 Nov 2014 10:45:24 +0000 (11:45 +0100)]
Move the indexing methods from SimpleArrayData to Heap::SimpleArrayData

Change-Id: I7d126999fb813bd9c0f224f7229d66854079f793
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove two reinterpret_casts in Object
Lars Knoll [Fri, 14 Nov 2014 08:31:59 +0000 (09:31 +0100)]
Remove two reinterpret_casts in Object

Change-Id: I921cd8129acb47cffd58be9551a6925c4f296d41
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoLet the memory manager operate on Heap::Base objects, not Managed
Lars Knoll [Thu, 13 Nov 2014 20:53:27 +0000 (21:53 +0100)]
Let the memory manager operate on Heap::Base objects, not Managed

Change-Id: Ib5c9b51dbf9c69abeda088094e6348dd545bf3c8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanup destruction of heap objects
Lars Knoll [Thu, 13 Nov 2014 20:38:25 +0000 (21:38 +0100)]
Cleanup destruction of heap objects

Generate the code from a macro instead of duplicating boiler
plate code. Operate on Heap::Base instead of Managed.

Change-Id: I84c5a705980899be3e5b931a093645e50d3923bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMake QV4::RegExpObject header independent from masm headers
Oleg Shparber [Fri, 21 Nov 2014 06:16:53 +0000 (22:16 -0800)]
Make QV4::RegExpObject header independent from masm headers

Also remove pointless uint32_t for uint values and replace
a few inconsistent uint16_t uses with quint16. MSVC was using uintN_t
defined in masm headers instead of cstdint, so this change eliminates
such situation.

Change-Id: Ibd7dd50fc047dcdc78e057299883311a24dd3960
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoWe should never construct a managed derived type directly anymore
Lars Knoll [Thu, 13 Nov 2014 11:25:08 +0000 (12:25 +0100)]
We should never construct a managed derived type directly anymore

Change-Id: I77e4065429a49bb3409bd1518ce910298d6141ee
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove the executioncontext in a few more places where it's not needed
Lars Knoll [Thu, 13 Nov 2014 11:14:09 +0000 (12:14 +0100)]
Remove the executioncontext in a few more places where it's not needed

Change-Id: I4c92c7bc9d94d8265e306f45d863fdc080a5e2a6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix the qmlProperty accessors to not require a context anymore
Lars Knoll [Thu, 13 Nov 2014 10:41:52 +0000 (11:41 +0100)]
Fix the qmlProperty accessors to not require a context anymore

Change-Id: Ied5ad5b2fef494de77aefdb4a7ee25aff4d7722a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoChanged InternalClass to store Identifier* instead of String*
Simon Hausmann [Wed, 12 Nov 2014 19:07:27 +0000 (20:07 +0100)]
Changed InternalClass to store Identifier* instead of String*

All members are identifiers anyway, so this gets rid of a ### and
also simplifies some of the call sites by removing the need for a
scoped string.

Change-Id: Ic6b550cdb97afa5a4b0fa7e9b13e7768ed3f6bd8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4
Frederik Gladhorn [Fri, 21 Nov 2014 12:47:31 +0000 (13:47 +0100)]
Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4

9 years agoMerge remote-tracking branch 'origin/5.4.0' into 5.4
Frederik Gladhorn [Fri, 21 Nov 2014 12:45:07 +0000 (13:45 +0100)]
Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: I2e7fc085663e00dd0390593a91c30d23d1369c4e

9 years agoFix run-time string handling with regards to the new heap
Simon Hausmann [Wed, 12 Nov 2014 15:07:56 +0000 (16:07 +0100)]
Fix run-time string handling with regards to the new heap

Changed runtimeStrings to be an array of Heap::String pointers instead of
indirect String pointers. Later that member along with other GC related members
will go into a managed subclass. Meanwhile the generated code no more loads
String pointers directly but just passes the index into the run-time strings to
the run-time functions, which in turn will load the heap string into a scoped
string.

Also replaced the template<T> Value::operator=(T *m) with a non-template
overload that takes a Managed *, in order to help the compiler choose the
non-template operator=(Heap::Base *) overload. This allows removing a bunch
of Value::fromHeapObject calls.

Change-Id: I20415c0549d33cca6813441a2495976b66d4c00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix multirow spritesheet rendering in paused state
Joni Poikelin [Thu, 20 Nov 2014 12:10:03 +0000 (14:10 +0200)]
Fix multirow spritesheet rendering in paused state

Task-number: QTBUG-42777
Change-Id: I8027f100c593ae7c57df7c952e66cc2b3fae1dd9
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoGet rid of one PersistentValue usage
Simon Hausmann [Wed, 19 Nov 2014 14:07:30 +0000 (15:07 +0100)]
Get rid of one PersistentValue usage

We don't need to store a PersistentValue in a place that is reachable through
regular object marking.

Change-Id: I2a8764970e6d37b707921c65e6066d33c558576c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoExpose a getter for the QSGEnginePrivate
Jocelyn Turcotte [Fri, 17 Oct 2014 16:14:30 +0000 (18:14 +0200)]
Expose a getter for the QSGEnginePrivate

This allows getting its underlying QSGContext and QSGRenderContext.

Change-Id: If0773d09b6faa360e706949757db1a6ddbe244e1
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoAllow setting the source rect on QSGSimpleTextureNode
Jocelyn Turcotte [Fri, 17 Oct 2014 15:36:57 +0000 (17:36 +0200)]
Allow setting the source rect on QSGSimpleTextureNode

This allows the QtQuick 2D Renderer to get this information without
having to extract it from the QSGGeometry.

Change-Id: Iec99c4bc910fea9c7d0e6712a418787254a70cb2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
9 years agoUpdate qml to use new QMetaType::registerNormalizedType signature
Jędrzej Nowacki [Thu, 13 Nov 2014 10:03:20 +0000 (11:03 +0100)]
Update qml to use new QMetaType::registerNormalizedType signature

Change-Id: Ia2ead9768669db4ee9c7b7c8fc14d0e4b09420b0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoDo not send deferred deletes from QQuickRenderControl::invalidate()
Laszlo Agocs [Mon, 17 Nov 2014 15:11:22 +0000 (16:11 +0100)]
Do not send deferred deletes from QQuickRenderControl::invalidate()

Leave it up to the clients of QQuickRenderControl to do this, if they
want it. It is usually not necessary.

In the single-threaded widget world forcing deferred deletes to execute
on every invalidate(), so for example from the hide event handler of
QQuickWidget, is dangerous because widget apps tend to deleteLater()
all sorts of widgets which can then be destroyed at unexpected times.

From windowDestroyed() we continue to send the deferred deletes, just
like all the render loops do.

Task-number: QTBUG-42618
Task-number: QTBUG-40435
Change-Id: I8189124e2e7675361ee97bd8ba3e88b10ef193fa
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoDoc: removed reference to sizeHint
Nico Vertriest [Mon, 27 Oct 2014 13:58:40 +0000 (14:58 +0100)]
Doc: removed reference to sizeHint

sizeHint is not a property of QQuickView
Task-number: QTBUG-39044
Change-Id: I6e19e975ab71f73ddaf703956afb90f2e607b6f8
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoChange test data from 6.7 to 6.5
Thiago Macieira [Tue, 18 Nov 2014 07:14:19 +0000 (23:14 -0800)]
Change test data from 6.7 to 6.5

6.5 is an exact binary number (4 + 2 + 0.5), so all conversions to
string will result in "6.5", regardless of how many digits of precision
are used.

This is done in advance of changing QVariant to add more digits of
precision, which would cause toString() of 6.7 to result in
"6.7000000000000002".

Change-Id: I19ea4c5bb02b99f0655c0b9bc9dc09f06ec654e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix render control docs
Laszlo Agocs [Thu, 13 Nov 2014 13:47:21 +0000 (14:47 +0100)]
Fix render control docs

Fix a typo and add a note to the signals.

Change-Id: Ia8810562c5b5f192d7e54bc965807b8e78a26985
Reviewed-by: Karim Pinter <karim.pinter@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
9 years agoAdd hint regarding alpha fbo's in the textureinthread example.
Gunnar Sletta [Mon, 10 Nov 2014 18:45:36 +0000 (19:45 +0100)]
Add hint regarding alpha fbo's in the textureinthread example.

Change-Id: I92e6a7c2ca9e9f229b1fc463feea9f657ae18db9
Task-number: QTBUG-42486
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoUse the engine instead of the context where it makes sense
Lars Knoll [Wed, 12 Nov 2014 13:23:18 +0000 (14:23 +0100)]
Use the engine instead of the context where it makes sense

Change-Id: I17a3b6f4b3c076107dc9a8de667ac526566ea6e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix usage of ExecutionContext in the json parser
Lars Knoll [Wed, 12 Nov 2014 13:17:12 +0000 (14:17 +0100)]
Fix usage of ExecutionContext in the json parser

Change-Id: I9b2d1389dd66ad74507dd16c4bdf7b57491c1cfb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanup qv4executionengine header
Lars Knoll [Wed, 12 Nov 2014 13:12:40 +0000 (14:12 +0100)]
Cleanup qv4executionengine header

Change-Id: I7312005a8d8e301ab4d8960c5f7579ace0a19a73
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanup exception catching code
Lars Knoll [Wed, 12 Nov 2014 12:55:55 +0000 (13:55 +0100)]
Cleanup exception catching code

Change-Id: I85afd5758f72e19c280dc196601ee145f0c25f01
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove ExecutionContext from the array sorting code
Lars Knoll [Wed, 12 Nov 2014 12:55:44 +0000 (13:55 +0100)]
Remove ExecutionContext from the array sorting code

Change-Id: I3c59fdb2413664f1c541264a89613a325ecefd2a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove ExecutionContext from the Runtime codegenerator
Lars Knoll [Wed, 12 Nov 2014 12:55:19 +0000 (13:55 +0100)]
Remove ExecutionContext from the Runtime codegenerator

Change-Id: Ic62ae1cbd24c0089e0df6bc6758d262cf49d0b91
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoChange signature of defineOwnProperty to take an engine instead of a context
Lars Knoll [Wed, 12 Nov 2014 12:32:41 +0000 (13:32 +0100)]
Change signature of defineOwnProperty to take an engine instead of a context

Change-Id: Ib0d558d17162a205974c6f2f0daf8af5b0b9547b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanup: remove Value::toString/Object overloads taking a context
Lars Knoll [Wed, 12 Nov 2014 08:21:41 +0000 (09:21 +0100)]
Cleanup: remove Value::toString/Object overloads taking a context

Change-Id: I4cb63c3cc4eb9bb81f10f9826f80e581b4e1990c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove the remaining uses of Returned<T>
Simon Hausmann [Tue, 11 Nov 2014 22:30:54 +0000 (23:30 +0100)]
Remove the remaining uses of Returned<T>

Change-Id: I493b75365d3c6fbf6965986d73e7aa0b659ded67
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoChanged MemoryManager::alloc<T> to return Heap::T* instead of T*
Simon Hausmann [Tue, 11 Nov 2014 17:08:20 +0000 (18:08 +0100)]
Changed MemoryManager::alloc<T> to return Heap::T* instead of T*

Change-Id: Iede1ba624d1313fbe2f8e5e979e936f1f32efdc9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoPorted the WebSQL module to the new V4 heap layout
Simon Hausmann [Tue, 11 Nov 2014 17:05:33 +0000 (18:05 +0100)]
Ported the WebSQL module to the new V4 heap layout

Change-Id: I5c6e36f80ebab29c86fed51bac3d4fd9b0126fb0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoReplaced more usages of Returned<T> with Heap::T*
Simon Hausmann [Tue, 11 Nov 2014 16:27:49 +0000 (17:27 +0100)]
Replaced more usages of Returned<T> with Heap::T*

Change-Id: I451128ee71610bfeb71139c28da89a00a8209ec6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoInvalidate font caches when switching between threads
Eskil Abrahamsen Blomfeldt [Thu, 16 Oct 2014 14:57:08 +0000 (16:57 +0200)]
Invalidate font caches when switching between threads

The font caches can only be used from a single thread at a time.
QFontEngineFT for instance, uses a global static thread storage
which is accessed on releasing and creating engines, and this
causes a crash if the font engine is created on one thread and
released on another.

We use the updatePolish() function to make sure the caches are
empty before entering updatePaintNode(), and then we invalidate
the cache again after updatePaintNode() is done.

[ChangeLog][Text] Fixed uncommon crash in text nodes.

Change-Id: I01dbc2ed58aeebd03d77a157c700330334bdb385
Task-number: QTBUG-38800
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
9 years agoexample, touchinteraction: use forceActiveFocus to gain focus
Richard Moe Gustavsen [Wed, 12 Nov 2014 19:47:23 +0000 (20:47 +0100)]
example, touchinteraction: use forceActiveFocus to gain focus

Use forceActiveFocus to gain focus when the user clicks on
a note. Just setting focus on an item is not enough to gain
keyboard focus.

Change-Id: Ia4a68a17df0df4b321cc6edb646b39c36167e982
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
9 years agoPorted ExecutionEngine::newString and newIdentifier to Heap::String
Simon Hausmann [Tue, 11 Nov 2014 14:08:30 +0000 (15:08 +0100)]
Ported ExecutionEngine::newString and newIdentifier to Heap::String

Avoid the use of Returned<String> for newString and changed the identifier
table to use Heap::String. This required moving some code back into
Heap::String, but that's code that doesn't call back into the GC, so
allocations and therefore future object moves aren't possible.

Change-Id: I1dca3e9c12a9c56f09419af8cc8cba39fe04f720
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoPorted most ExecutionEnginew::new* factory methods away from Returned<T>
Simon Hausmann [Tue, 11 Nov 2014 12:34:18 +0000 (13:34 +0100)]
Ported most ExecutionEnginew::new* factory methods away from Returned<T>

We don't need Returned<T> anymore with the QV4:: vs. Heap:: separation.
Eliminating Returned<T> simplifies also some code.

Change-Id: Ic2a9cd3c1a94f2ea37b539d3984d63997121c2b9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoChange signature or runtime methods to take an engine pointer
Lars Knoll [Tue, 11 Nov 2014 15:07:54 +0000 (16:07 +0100)]
Change signature or runtime methods to take an engine pointer

This makes a lot more sense in the long term and is the
more maintainable solution, once the GC starts moving
objects around in memory

Change-Id: I8f327c0f5b5b0af38c5fe1a217852ee8c4a5c2fc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoUse heap objects in the remaining managed objects
Lars Knoll [Mon, 10 Nov 2014 20:27:52 +0000 (21:27 +0100)]
Use heap objects in the remaining managed objects

Change-Id: Id6dc6e34113a287a40e0122dfbdf977f0fc1f3b3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoUse Heap objects inside argumentsobject, arraybuffer and errorobject
Lars Knoll [Mon, 10 Nov 2014 15:21:38 +0000 (16:21 +0100)]
Use Heap objects inside argumentsobject, arraybuffer and errorobject

Change-Id: Iad76a1351dcca1fd46303a1072540c23a8ef6722
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoStore Heap objects in the qml binding wrapper
Lars Knoll [Mon, 10 Nov 2014 15:06:43 +0000 (16:06 +0100)]
Store Heap objects in the qml binding wrapper

Change-Id: I7fae0710d148a2b07ec5f36a7fb96c2b645e564e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanups
Lars Knoll [Fri, 7 Nov 2014 18:07:54 +0000 (19:07 +0100)]
Cleanups

Remove a few reinterpret_cast's

Change-Id: I800b8c41123eaa22cf879571c747b4de0375e8cb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoConvert methods in RuntimeHelpers to take an engine pointer
Lars Knoll [Fri, 7 Nov 2014 17:51:19 +0000 (18:51 +0100)]
Convert methods in RuntimeHelpers to take an engine pointer

This is safer and cleaner than to use a context pointer.

Change-Id: Id5ef4e6667571897cd029125a0bdc18ce299da6d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanup debugger to be safe for the new GC
Lars Knoll [Mon, 10 Nov 2014 09:50:37 +0000 (10:50 +0100)]
Cleanup debugger to be safe for the new GC

Added a bit of convenience to PersistentValue as well.

Change-Id: I5a858079543b41ce1ef48a84e9350a7d6fa64501
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoStore all data members in FunctionObject as heap data
Lars Knoll [Fri, 7 Nov 2014 17:10:30 +0000 (18:10 +0100)]
Store all data members in FunctionObject as heap data

Change-Id: Ic061baaf7f5ff08c5e6e7130abd6a650148d3d2d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove unused method
Lars Knoll [Fri, 7 Nov 2014 05:00:07 +0000 (06:00 +0100)]
Remove unused method

Change-Id: I3ec2f9b70d5285ff088f4fc498ccb14de7f8838c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoConvert ExecutionContext::parent/outer to use a heap object
Lars Knoll [Fri, 7 Nov 2014 04:46:20 +0000 (05:46 +0100)]
Convert ExecutionContext::parent/outer to use a heap object

Change-Id: I1b8ee831cfcdd5b1904ce24a341f5a796dce41cf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix regression in handling of arguments objects
Lars Knoll [Tue, 11 Nov 2014 17:47:17 +0000 (18:47 +0100)]
Fix regression in handling of arguments objects

Make sure the mappedArguments object gets properly created and is
large enough before using it.

Change-Id: Icb3c937483b49a7856d8d075d53fc10a11044840
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoDoc: Change the div classes for three-column layout
Topi Reinio [Wed, 5 Nov 2014 11:24:53 +0000 (12:24 +0100)]
Doc: Change the div classes for three-column layout

The new documentation style for publishing docs under qt.io
requires dedicated div classes for pages that use a three-
column layout.

The new divs enable the columns to stack and react to changes
in the window width.

Task-number: QTBUG-42086
Change-Id: Id0ccb0ef7e0be237789b8c891db05413efc1f8aa
Reviewed-by: Martin Smith <martin.smith@digia.com>