platform/upstream/qtdeclarative.git
9 years agoFix and improve links to Component::completed
Alejandro Exojo [Mon, 8 Dec 2014 16:58:50 +0000 (17:58 +0100)]
Fix and improve links to Component::completed

Change-Id: I39771b861c529550c59f142c054b108f7a8bc7ff
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoScale mipmapped npot images when not supported
Laszlo Agocs [Fri, 16 Jan 2015 10:01:58 +0000 (11:01 +0100)]
Scale mipmapped npot images when not supported

Task-number: QTBUG-43847
Task-number: QTBUG-40789
Change-Id: Iceacaa49bafffb31752a9fb26c896df570153fec
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoBump version
Oswald Buddenhagen [Fri, 16 Jan 2015 20:06:16 +0000 (21:06 +0100)]
Bump version

Change-Id: I76075ba7fb535febe7a723ec80451eb9d61cf1ec

9 years agoFix failing assertion in debug builds for JS that calls constants
Simon Hausmann [Tue, 13 Jan 2015 15:59:22 +0000 (16:59 +0100)]
Fix failing assertion in debug builds for JS that calls constants

For
    true()

we generate IR that looks like this:

    temp = true
    result = call temp()

and therefore the move at isel time has IR::Call as source and a temp
as base for the call. However constant propagation in the optimizer transforms
this to

    result = call true()

and that's a case we didn't handle in the IR visitor. Since we have
Runtime::callValue we can however handle this case as well and the run-time
will consequently produce the expected run-time error.

Change-Id: Ia94a8116388e66f9f339913307f68e33a5c18a19
Task-number: QTBUG-43819
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Jan Kundrát <jkt@kde.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agodoc: The correct enum name is 'Time', not 'LastModified'.
Gunnar Sletta [Sun, 11 Jan 2015 15:38:19 +0000 (16:38 +0100)]
doc: The correct enum name is 'Time', not 'LastModified'.

Change-Id: I4e75b97e9e70a440a2e2ec96af04d004323f09bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoMake opengl context current in context2d's toImage if necessary
Ulf Hermann [Mon, 17 Nov 2014 13:43:27 +0000 (14:43 +0100)]
Make opengl context current in context2d's toImage if necessary

With the basic render loop the scene graph thread is the render thread
and thus we don't get a different opengl context for context2d in
immediate/fbo mode. We have to make sure the opengl context is current
when we call flush() from functions exposed to JS.

Change-Id: Idd91cf1ce9c299a7645cf3b78d4498652376b17e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix timing output from windows render loop
Laszlo Agocs [Thu, 8 Jan 2015 12:51:01 +0000 (13:51 +0100)]
Fix timing output from windows render loop

Print the frame time, not the total, and in milliseconds.

Change-Id: Ia7fe3bea8efafcce475c49517d7adab1b3841729
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoPrint exceptions in JS slots
Kai Koehne [Mon, 5 Jan 2015 14:31:20 +0000 (15:31 +0100)]
Print exceptions in JS slots

Do print JS exceptions raised in slots to the console, and clear the
status afterwards. Otherwise exceptions raised might silently propagate
to later JS calls.

Change-Id: I122f3026aa18028415c5a4672cb3287e7d58ac4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix grammatical error in Text and TextEdit documentation.
Mitch Curtis [Thu, 8 Jan 2015 15:48:01 +0000 (16:48 +0100)]
Fix grammatical error in Text and TextEdit documentation.

Change-Id: I6fd68166108a060931cd6bcd64ccd865d251a4c3
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoTextEdit: fix construction time text cache
J-P Nurmi [Mon, 17 Nov 2014 11:36:30 +0000 (12:36 +0100)]
TextEdit: fix construction time text cache

QQuickTextEdit does not apply cached text to the underlying document
until component construction is complete. However, if text() was called
during the construction (eg. because of a binding), it would blindly
overwrite the cached text with (still) empty document content.

Task-number: QTBUG-41583
Change-Id: I6c5c1b6283d70d8a5ec2c8bd986095ee3c35a14c
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
9 years agoParse dates as Qt::RFC2822Date too
Albert Astals Cid [Mon, 5 Jan 2015 13:44:36 +0000 (14:44 +0100)]
Parse dates as Qt::RFC2822Date too

[ChangeLog][QtQml] Fix JavaScript Date parsing to correctly accept RC2822 dates.

Task-number: QTBUG-38011
Change-Id: Ic7d3f5b8c624d6780d4c3595fd2efe22c427ffd3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agodoc: Fixed copy/paste errors in DSM snippets
Alejandro Exojo [Sat, 27 Dec 2014 09:31:05 +0000 (10:31 +0100)]
doc: Fixed copy/paste errors in DSM snippets

The comments make sense only for the first button, the one that changes
the text label.

Change-Id: I984f3eff7c797cbccafcba2a0eeaaff9001094e6
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove unnecessary QString::toUtf8 method call
Nobuaki Sukegawa [Sun, 14 Dec 2014 06:39:50 +0000 (15:39 +0900)]
Remove unnecessary QString::toUtf8 method call

Change-Id: Idc4c5466e23e72d33441bbc19f03fbc27348b09f
Reviewed-by: Alejandro Exojo Piqueras <suy@badopi.org>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix invalid assertion
Nobuaki Sukegawa [Sat, 13 Dec 2014 13:17:04 +0000 (22:17 +0900)]
Fix invalid assertion

Change-Id: Ifd26d6863ad396e15d0097ed560eee8d281caccd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix GC crash with conditional breakpoints and JS console
Simon Hausmann [Fri, 19 Dec 2014 11:39:21 +0000 (12:39 +0100)]
Fix GC crash with conditional breakpoints and JS console

We may choose to execute an expression in a specific frame within the
debugger, which is where we pop context's until we reached the frame
in question. If we are trying to execute an expression at the top of the
stack (or with a conditional breakpoint expression), then we don't have
a frame and don't need to pop contexts. But also also don't need to call
Scope::alloc(-1).

Change-Id: I1f6754a3d77d943aed9bf4468e817a5269a3c547
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoQMLJS: remove unused/unsupported command-line options
Erik Verbruggen [Thu, 18 Dec 2014 10:46:37 +0000 (11:46 +0100)]
QMLJS: remove unused/unsupported command-line options

Change-Id: I9710a20752c318a0572aef43779c0289bedf0aa5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix compile issue with -opengl dynamic on Windows
Andy Shaw [Thu, 18 Dec 2014 08:21:28 +0000 (09:21 +0100)]
Fix compile issue with -opengl dynamic on Windows

Change-Id: I2b17482c0e8d04718e91b9772784afce4ebdc101
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoV4: fix reverse type propagation
Erik Verbruggen [Tue, 16 Dec 2014 10:40:24 +0000 (11:40 +0100)]
V4: fix reverse type propagation

Only do integer add/sub/mul when all operands are known to be integers.

[ChangeLog][QtQml] Fixed invalidly opportunistic truncating of non-integer values for additions/subtractions/multiplications in JavaScript and binding expressions.

Change-Id: I21b3bede2fb3e8033305591110b98cc9e6bf52f8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoV4: only optimize out to-int32 conversions when the operands are int32.
Erik Verbruggen [Thu, 18 Dec 2014 09:24:22 +0000 (10:24 +0100)]
V4: only optimize out to-int32 conversions when the operands are int32.

The operands of bit-ops are not typed as int32 when no type-inference is
done, like for the interpreter.

Task-number: QTBUG-43309
Change-Id: I67af18e14ddbc0649530ac23601332ee7d7a1f34
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoDoc: Updated the snippet to call the right function
Venu [Wed, 17 Dec 2014 14:17:56 +0000 (15:17 +0100)]
Doc: Updated the snippet to call the right function

Change-Id: I0ac6424e728b8a06f6bcbe30d036a22f649129bb
Task-number: QTBUG-43406
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
9 years agorendercontrol example: calculate fbo size correctly
Laszlo Agocs [Tue, 16 Dec 2014 12:59:10 +0000 (13:59 +0100)]
rendercontrol example: calculate fbo size correctly

Take device pixel ratio into account.

Change-Id: I729d562ad9523e11ee304136f668f496d4e00f37
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
9 years agoFix build with MinGW due to -Werror
Sérgio Martins [Wed, 10 Dec 2014 22:55:02 +0000 (22:55 +0000)]
Fix build with MinGW due to -Werror

On Windows the correct format is %I64d and %I64u:
https://stackoverflow.com/questions/2844/how-do-you-printf-an-unsigned-long-long-int

Similar ifdefs are found in testlib/qtestcase.cpp

Change-Id: Ic65e60f7d391285e292ac8c65944d8af3be205f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix QQuickText alignment when lineHeight is set
Daiwei Li [Mon, 15 Dec 2014 05:31:30 +0000 (21:31 -0800)]
Fix QQuickText alignment when lineHeight is set

Text is always aligned to the top of the lineHeight rectangle,
and no offset is added when verticalAlignment is set to AlignVCenter
or AlignBottom. This change adds an offset based on the lineHeight
and font height in those cases.

Task-number: QTBUG-42050
Change-Id: Ibc63c80d4178b0f5c498cc126156df828855fd76
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
9 years agoChange Qt bugtracker URL to qt.io
Alex Blasche [Thu, 11 Dec 2014 13:23:01 +0000 (14:23 +0100)]
Change Qt bugtracker URL to qt.io

Change-Id: I3dde034b2a36c324df9f4e1fd2e05a07a7237c04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
9 years agoMark qmlRegisterCustomExtendedType as \internal
Alejandro Exojo [Fri, 12 Dec 2014 09:42:02 +0000 (10:42 +0100)]
Mark qmlRegisterCustomExtendedType as \internal

The function was added in 5.4, but it makes use of QQmlCustomParser,
which at the moment is private API. This way Qt3D or bleeding edge users
can still use the function, while keeping freedom to change
QQmlCustomParser.

Since 5.4.0 had the typo in the \relates, users won't see a change from
5.4.0 to 5.4.1.

Change-Id: I7f791f5b39e2a2c9fc83f4c450e6da9eec5b5e46
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
9 years agoBump version
Oswald Buddenhagen [Fri, 12 Dec 2014 12:47:54 +0000 (13:47 +0100)]
Bump version

Change-Id: Id0e49a99f2862d6dcc05f176769fdee0643524ee

9 years agoInput method support for QQuickWidget
Paul Olav Tvete [Wed, 10 Dec 2014 14:11:59 +0000 (15:11 +0100)]
Input method support for QQuickWidget

Make sure QGuiApplication::focusObject() returns the QQuickItem
that has focus, and forward input method events.

Task-number: QTBUG-42677
Change-Id: Ic07f93a2529c3dde67272b489bdc61fd25582a69
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
9 years agoRestore extension types documentation
Alejandro Exojo [Wed, 10 Dec 2014 11:47:46 +0000 (12:47 +0100)]
Restore extension types documentation

The documentation on QML extension types was accidentally removed on the
big restructuring of commit 28def0bdd084989c17a157e0c4ab80c259081caa.
This restores it to a section on the "Defining QML Types from C++" page
mostly unchanged, and makes the source of the example that was already
there visible.

The reference documentation of the qmlRegisterExtendedType is added as
well, and the one for qmlRegisterExtendedUncreatableType and
qmlRegisterCustomExtendedType that was added in
fcb40ff6d71f4561401e6b2bd4d7fc706fff8eee is now fixed. It was not being
generated because referred to "QQmlEgine" instead of "QQmlEngine".

Change-Id: I1403b10076c64a4c0d760f72b06dd52c38b351a5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQML Debugging: Fix breakpoints/stepping in a with-statement.
Erik Verbruggen [Fri, 5 Dec 2014 12:58:22 +0000 (13:58 +0100)]
QML Debugging: Fix breakpoints/stepping in a with-statement.

Also fix the stack-trace generation, otherwise the debugger engine would
report a breakpoint hit on the wrong line.

Change-Id: I6eb4b508fbdca64d03badd8f9312a05c78781ded
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAdd hiDPI @2x retina image support to AnimatedImage
Marko Kangas [Mon, 8 Dec 2014 10:56:52 +0000 (12:56 +0200)]
Add hiDPI @2x retina image support to AnimatedImage

Copied hiDPI image support from base Image-class in to overwritten load()
function that ignored it before.

Change-Id: Iee89b572b523bbf990b6dd0e94c59c71f2b2ed31
Task-number: QTBUG-43104
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoFix the visualization of unmerged batch geometries without index
Jocelyn Turcotte [Wed, 26 Nov 2014 14:58:12 +0000 (15:58 +0100)]
Fix the visualization of unmerged batch geometries without index

indexData() is null for most QSGGeometryNodes subclasses in QtQuick,
make sure that we draw using vertex array data in that case.

The patch also increases the contrast of the line pattern, since it
is almost invisible with brighter hue values, to make it easier to
see which batches aren't merged.

Change-Id: Ife7b26692ee318feb0810ee0e787289eb151ea8a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoWindows: Don't disable JIT
Sérgio Martins [Sun, 7 Dec 2014 01:37:57 +0000 (01:37 +0000)]
Windows: Don't disable JIT

[ChangeLog][QtQml][Windows] V4 JIT was re-enabled after it was disabled by mistake in 5.4.0.

Task-number: QTBUG-43171
Change-Id: I16206e094c210b1eadbfef9ee04cf78d3a7dcebe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQML Debugging: Fix crash when stepping through try-catch block.
Erik Verbruggen [Fri, 5 Dec 2014 12:16:14 +0000 (13:16 +0100)]
QML Debugging: Fix crash when stepping through try-catch block.

Also fix the stack-trace generation, otherwise the debugger engine would
report a breakpoint hit on the wrong line.

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

Mark unused fields as Q_UNUSED. They are still "used" to check if the
compiler will generate warnings/errors (which it shouldn't).

Change-Id: I38e1668e88d94ab8f26a92a06f5207b77369e136
Reviewed-by: Simon Hausmann <simon.hausmann@digia.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 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 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 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 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 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 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 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 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>
9 years agoAdd padding to distance field glyph cache
Eskil Abrahamsen Blomfeldt [Thu, 6 Nov 2014 11:10:00 +0000 (12:10 +0100)]
Add padding to distance field glyph cache

Linear filtering can cause pixels outside the glyph's bounding rect
to be sampled. On drivers where uninitialized texture data is actually
uninitialized, this could cause artifacts in rendering for glyphs at
the right edge of the initiliazed area since they would sometimes sample
random pixels. To avoid this, we add padding between the glyphs in the
cache.

[ChangeLog][Qt Quick] Fixed uncommon artifacts in rendering of distance
field glyphs.

Task-number: QTBUG-42148
Change-Id: I6982b4a150d9459185d50a4362e1ead588d3860f
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
9 years agoDon't embded qmldbg_tcp plugin to libQt5Qml in static build
Pasi Petäjäjärvi [Fri, 24 Oct 2014 08:31:38 +0000 (11:31 +0300)]
Don't embded qmldbg_tcp plugin to libQt5Qml in static build

Embedding qmldbg_tcp sources to libQt5Qml causes multipled
definitions of QTcpServerConnection symbols with static
build on Qt Quick 2 applications. Qmake can resolve
dependencies to static plugins applications use, so no
need to embed this to libQt5Qml.

Change-Id: I18c5e44b9ac3de4ef8be29cc5944de3527566b3c
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
9 years agoqml: obey QT_NO_REGULAREXPRESSION define
Pasi Petäjäjärvi [Fri, 24 Oct 2014 08:44:30 +0000 (11:44 +0300)]
qml: obey QT_NO_REGULAREXPRESSION define

Not all platforms do have QRegularExpression as it is based on
pcre.

Change-Id: I3247f8b2213f78a6e537f6781d97b0c6382482ad
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRevert "Fix pixel bleed in BorderImage"
Eskil Abrahamsen Blomfeldt [Mon, 10 Nov 2014 13:22:05 +0000 (14:22 +0100)]
Revert "Fix pixel bleed in BorderImage"

This reverts commit a9238292145e05d36be7c35bdd50829c6400a3de.

It also reverts follow-up commits:
  87755d0437413cfb875c50e3dfa53030601567c9
  c2c710e5a8d66fa696276aa69c2e3b00436eefe5
  cc8a76ce8ea76afe912902067e95ca2abf9e482f

The new implementation is much too slow because it will cause each
section of the border image to be uploaded to the atlas, and it will
not be shared between different border images nor between different
sizes of the border. The performance regression is so significant
that it's not worth it for the original bug fix.

We leave the tests around, so some of those might regress due to
this.

Change-Id: I3f56f4564255ebb77e6487881a6a11b19ad0234e
Task-number: QTBUG-42288
Task-number: QTBUG-35838
Reviewed-by: Michael Brasser <michael.brasser@live.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4' into 5.4.0" into refs/staging/5.4.0
Jani Heikkinen [Mon, 10 Nov 2014 15:06:02 +0000 (16:06 +0100)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.4.0" into refs/staging/5.4.0

9 years agoMerge remote-tracking branch 'origin/5.4' into 5.4.0
Oswald Buddenhagen [Mon, 10 Nov 2014 10:42:05 +0000 (11:42 +0100)]
Merge remote-tracking branch 'origin/5.4' into 5.4.0

Change-Id: I2c69deb3bc69da1a06485aaf72fb298b08756734

9 years agoFix not having a context when cleaning up on Windows
Laszlo Agocs [Thu, 6 Nov 2014 21:06:26 +0000 (13:06 -0800)]
Fix not having a context when cleaning up on Windows

The same old issue surfaces in the windows render loop too.
The basic render loop is already fixed, apply a similar patch
to the windows one too.

Task-number: QTBUG-42213
Change-Id: I07068315f5164014e329b8ce061947c97ae9da61
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
9 years agoqmlscene: Simplify context sharing logic.
Pierre Rossi [Tue, 28 Oct 2014 14:40:49 +0000 (15:40 +0100)]
qmlscene: Simplify context sharing logic.

We can use the new application attribute for this now.

Change-Id: Ia0a6d13d36316ec9becfb5d3251b8461ac73a2d0
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoQQuickWindow: let 'clearFocusObject' clear all the way to the root
Richard Moe Gustavsen [Fri, 7 Nov 2014 10:33:14 +0000 (11:33 +0100)]
QQuickWindow: let 'clearFocusObject' clear all the way to the root

The previous code was wrong, as it cleared focus from the active
focus item directly. By doing so we would only clear focus inside
the focus scope that surrounded the item, but leave the scope itself
with active focus (which would then be the focus object). The intended
result is rather to end up with the root as focus object.

Change-Id: I455a8939f8bc6c48765119b995aa781aee6d1e70
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
9 years agoQQuickWindow autotest: verify that onClosing can block close()
Shawn Rutledge [Fri, 7 Nov 2014 11:54:16 +0000 (12:54 +0100)]
QQuickWindow autotest: verify that onClosing can block close()

Task-number: QTBUG-40093
Change-Id: I800259f45d95736172d500494e68042180178e93
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
9 years agoDebug: Make it possible to save distance field cache on Windows
Eskil Abrahamsen Blomfeldt [Thu, 6 Nov 2014 10:35:35 +0000 (11:35 +0100)]
Debug: Make it possible to save distance field cache on Windows

This makes compilation possible of the saveTexture() function which is
used to store the distance field glyph cache on disk when debugging.
It also changes the warnings output from here to have no prefix, since
this is anyway always available as the context in Qt 5.

Change-Id: If3b64f0921a59c485b5321a5465369708e764afc
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
9 years agoInspector: Do not assert when trying to stream QModelIndex
Kai Koehne [Thu, 6 Nov 2014 10:43:19 +0000 (11:43 +0100)]
Inspector: Do not assert when trying to stream QModelIndex

Some QVariant's like QModelIndex cannot be streamed in a meaningful way:
QDataType::save() will return false for them. However, this leads to a
qWarning and Q_ASSERT in QVariant::operator<<().

To prevent this we're calling QDataType::save() manually beforehand. We
however throw away the result if it succeeds, and still call
QVariant::operator<<() to get the benefits of the QDataStream version
handling.

The alternatives would be to make QVariant::operator<<() not assert,
or blacklist all known types with problems manually. Both seem to
be difficult though ...

Change-Id: I4f5fe6d5a3a076c24fbc73371a4d12d720de53da
Task-number: QTBUG-42438
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAvoid stack overflow when destroying InternalClass
Ulf Hermann [Thu, 6 Nov 2014 13:40:37 +0000 (14:40 +0100)]
Avoid stack overflow when destroying InternalClass

If there are deep object hierarchies connected to an InternalClass the
recursive nature of the destroy() method could lead to a stack
overflow. By changing the recursion into an iteration this is avoided.

Change-Id: I6667f268a366749c2dbc5f7147882388f192a9c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoStabilize tst_QQuickAccessible
Jan Arve Sæther [Thu, 6 Nov 2014 09:53:49 +0000 (10:53 +0100)]
Stabilize tst_QQuickAccessible

There is no reason to wait for the window to activate

Task-number: QTBUG-42355
Change-Id: I5faaff5bddd367e6dd57a6a922011c87c847148e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
9 years agoInitialize member variable QSGAnimationDriver::m_lag.
Friedemann Kleint [Wed, 5 Nov 2014 08:22:11 +0000 (09:22 +0100)]
Initialize member variable QSGAnimationDriver::m_lag.

Fixes purify warning:
[W] UMR: Uninitialized memory read in QSGAnimationDriver::advance(void) {1 occurrence}
QSGAnimationDriver::advance(void) [qtdeclarative\src\quick\scenegraph\qsgcontext.cpp:221]

Task-number: QTBUG-42213
Change-Id: Ide35830c60c5935644747da5cfbad1cdbd357232
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoqv4: assign split of edges to loop header to the correct group
Fawzi Mohamed [Wed, 5 Nov 2014 10:27:15 +0000 (11:27 +0100)]
qv4: assign split of edges to loop header to the correct group

(i.e assign split edges to the correct loop group, now for real)
The fix of 25b6fae1eb26645a30b3e7e254ce0b585757351c did try fix QTBUG-41766
and simplify the logic to assign the inserted statement to a loop group.
Unfortunately that was incorrect if the target basic block starts a group.
In that case if the source was already inside the group we should add it
to the target basic block, otherwise to the one containing the target
block (as before).
There was no visible regression caused by this.

Change-Id: Id50c42305fc5ac6aedaffa89d8f8dc3b5e976aa4
Task-number: QTBUG-41766
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAdd attached Window::contentItem property
J-P Nurmi [Mon, 3 Nov 2014 16:23:11 +0000 (17:23 +0100)]
Add attached Window::contentItem property

This is essential to the Qt Quick Controls for implementing floating
text selection handle popups.

Change-Id: Ibae65110a5db6d65dacd197fef3ad567d11342dc
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoMark cleanup function as unused if compiled with QT_QML_NO_DEBUGGER
Ulf Hermann [Wed, 5 Nov 2014 13:02:55 +0000 (14:02 +0100)]
Mark cleanup function as unused if compiled with QT_QML_NO_DEBUGGER

The static cleanup function in qqmldebugserver.cpp is only used if the
debug server is actually created. If not we can mark it as unused to
avoid compile warnings. Enclosing it in #ifdef would be uglier.

Task-number: QTBUG-42394
Change-Id: Ieb7fa38ecb346e80ce815ced85eb3a168bad9d99
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAdd a debug function to save contents of distance field cache
Eskil Abrahamsen Blomfeldt [Wed, 5 Nov 2014 12:35:12 +0000 (13:35 +0100)]
Add a debug function to save contents of distance field cache

Just copy the one from QSGSharedDistanceFieldCache with some
compile fixes to the superclass so we store the default cache
as well.

Change-Id: I1fcc390601eea58f8b7729c9cead418e4c94714c
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
9 years agoDocumentation: Update QtQuick import value to 2.4
Caroline Chao [Wed, 5 Nov 2014 09:57:45 +0000 (10:57 +0100)]
Documentation: Update QtQuick import value to 2.4

There are new APIs in Qt 5.4, the import version needed is 2.4.

Change-Id: I1c52c6a50362f539670d9ad00e03e57208234a17
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoqv4: assign split edges to the correct loop group
Fawzi Mohamed [Tue, 4 Nov 2014 13:55:26 +0000 (14:55 +0100)]
qv4: assign split edges to the correct loop group

edge splitting had a strange logic to assign the inserted statement to a loop,
which would go wrong for example for the statement just after the loop header.
I guess that was done to increase the likelihood that the goto removed from the
final instructions.
Given that we are talking about critical edges it is always possible to emit
them in a bad order, and I do not think that the old logic was really better
than simply always use the loop group of the target which is always correct.
It might be worthwhile to ensure that the block it is emitted just before the
target block, or improve the handling of empty gotos in the backend, but in this
patch we go for the simplest solution.
If one would notice worse code, either one of the provious improvements could be
done, or the old logic could be kept, changing just the if (container == 0) to
container = toBB->containingGroup();

Change-Id: I26a488e9e2cb2b692fa8187ee658fb4dd98bfa8b
Task-number: QTBUG-41766
Reviewed-by: Bernd Lamecker <bernd.lamecker@basyskom.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix memory leak in QQmlLocaleData
Liang Jian [Tue, 4 Nov 2014 09:18:15 +0000 (17:18 +0800)]
Fix memory leak in QQmlLocaleData

Call the correct destructor in QQmlLocaleData::destroy() to prevent memory
leak.

Change-Id: Id5b7657443521fbb46486bfbc5575d914c7c7b71
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix disappearing nodes when adding in two levels of batch root
Eskil Abrahamsen Blomfeldt [Thu, 30 Oct 2014 08:08:00 +0000 (09:08 +0100)]
Fix disappearing nodes when adding in two levels of batch root

When having e.g. a clip node inside another clip node and adding
children to the innermost, we would get into the situation where
we did a partial rebuild for the outermost root, but its available
render order count would not be updated to reflect the change
deeper down in the tree. Since the z range would be based on the
outermost batch root's knowledge of the maximum render order in
the tree, what would happen is that the z of the rendered nodes
would increase steadily until they went outside of the viewing
volume and disappeared.

When decreasing the available order count of a batch root, we need
to also decrease the available order count of its parents. If any
of them drop below zero, we need to rebuild the render lists.

[ChangeLog][QtQuick] Fixed nodes sometimes disappearing when
adding many new nodes to the tree.

Change-Id: I39c34acf0e1e0e87601f0fcd983f8da38cee029f
Task-number: QTBUG-42096
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>