platform/upstream/qtdeclarative.git
10 years agoMerge branch 'release' of ssh://codereview.qt-project.org/qt/qtdeclarative into stable
Simon Hausmann [Tue, 26 Nov 2013 09:01:56 +0000 (10:01 +0100)]
Merge branch 'release' of ssh://codereview.qt-project.org/qt/qtdeclarative into stable

Change-Id: I0bf06be69927d5961f1bdb4948c3572ef6111923

10 years agoAlso update viewport size when header/footer size changes
Robin Burchell [Mon, 25 Nov 2013 22:54:47 +0000 (23:54 +0100)]
Also update viewport size when header/footer size changes

Task-number: QTBUG-24292
Change-Id: I8e7f5abe077b6e8d2ce6625dcf43a34a7260934e
Done-with: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoQSmoothedAnimation: Don't set property if animation isn't running
Robin Burchell [Wed, 20 Nov 2013 21:36:30 +0000 (22:36 +0100)]
QSmoothedAnimation: Don't set property if animation isn't running

This could cause things to get "stuck" in the wrong state under some rather hard
to reproduce conditions.

Change-Id: Ied23d2bdfcfd0b197f4b28fed9c82ffd64e52ebf
Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com>
Done-with: Alan Alpert <416365416c@gmail.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoInitial support for accelerated property access to QML singletons and enums
Simon Hausmann [Sat, 2 Nov 2013 21:46:25 +0000 (22:46 +0100)]
Initial support for accelerated property access to QML singletons and enums

With this patch we determine the meta-object of singletons, propagate it into
the IR and load them separately using a dedicated run-time function. In
addition enums in singletons and QML types are resolved at compile time.

Change-Id: I01ce1288391b476d1c9af669cb2987a44c885703
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoIR Cleanup, resolve ID objects through array subscripts
Simon Hausmann [Sat, 2 Nov 2013 17:48:18 +0000 (18:48 +0100)]
IR Cleanup, resolve ID objects through array subscripts

...instead of a special MEMBER type. This allows removing the
type member from V4IR::Member altogether (and thus unshadow from
V4IR::Expr::type). By not requiring the base of a id lookup
member expression to be a NAME, we can also speed up repeated
id lookups by fetching the id object array wrapper only once
per function.

Change-Id: I3e9b8f498d32ace4a0cc2254f49e02ecc124f79c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoCleanup, get rid of MemberOfQObject V4IR::Member specialization
Simon Hausmann [Sat, 2 Nov 2013 16:40:35 +0000 (17:40 +0100)]
Cleanup, get rid of MemberOfQObject V4IR::Member specialization

It is technically redundant to the Member::property field.

Change-Id: If0ee35b2c94a2c9373784d36a1f8dfe8ad7dcfb3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoSpeed up repeated context, scope and import script lookups
Simon Hausmann [Tue, 29 Oct 2013 12:02:48 +0000 (13:02 +0100)]
Speed up repeated context, scope and import script lookups

Instead of querying for the context, scope or imported scripts object on each
access, do it once at the beginning of the expression in the IR and re-use the
temp. The optimizer will optimize away unused temps.

Change-Id: I703e737469030c4454d23c567873012a2b537d71
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoImprove type interference for QObject properties
Simon Hausmann [Wed, 30 Oct 2013 15:49:32 +0000 (16:49 +0100)]
Improve type interference for QObject properties

Propagate QObject properties in member expressions across temporaries
as part of the type interference SSA pass. This replaces the earlier
attempt to resolving QObject properties in fieldMemberExpression()
in the codegen, but it was incomplete and now things like the following
are fully resolved:

    var tmp = blah.somePropertyThatReturnsAQQuickItem; <-- QQuickItem property return type propagated into tmp
    var width = tmp.width; <-- and picked up here again to resolve the index of width instead of by name

With this patch Temp gets a helper structure with a function pointer,
initialized to aid the resolution of properties in Qt meta objects. This
structure is propagated into the temps until it reaches the next member
expression that uses the temp. Similarly QObjectType is added as IR type, next
to VarType.

The resolution inside the SSA type interference pass also requires passing
through the QQmlEngine from the upper caller levels, in order to resolve the
property type to a potential QMetaObject property.

Change-Id: I14c98fa455db57603da46613ce49c174d0944291
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix crash on QQmlEngine destruction.
Robin Burchell [Mon, 25 Nov 2013 15:15:58 +0000 (16:15 +0100)]
Fix crash on QQmlEngine destruction.

QQmlTypeLoader references QQmlImportDatabase in a thread, so change the
declaration order so QQmlTypeLoader is destroyed and its thread stopped
before QQmlImportDatabase is destroyed.

Change-Id: If1f8ef0a5ce56103a417ecfb6897d2c3b9c8d364
Done-with: Andrew den Exter <andrew.den.exter@jollamobile.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix out of bounds array access when index is integer and negative
Simon Hausmann [Mon, 25 Nov 2013 08:21:27 +0000 (09:21 +0100)]
Fix out of bounds array access when index is integer and negative

When the index is a double, the branchTruncateDoubleToUInt takes care of
branching when the index is negative, but when it's an integer we need
to perform that check ourselves.

Without the patch it's rather easy to cause the application to crash.

Change-Id: If908923ddc2077b3fb3dd42350f038ff0072e8e1
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoUse QFontDatabase to check if a font is scalable.
Yoann Lopes [Fri, 22 Nov 2013 17:52:22 +0000 (18:52 +0100)]
Use QFontDatabase to check if a font is scalable.

The flag set in QFontEngine was not always correctly set, use
QFontDatabase instead which is slower but should always be correct.
We fallback to native font rendering when the font is not scalable.

Change-Id: Ie9a2397abd42890d0fb05bc2f9c46a60040296f2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
10 years agoStop render thread regardless when the window is being destroyed
Gunnar Sletta [Mon, 25 Nov 2013 10:40:12 +0000 (11:40 +0100)]
Stop render thread regardless when the window is being destroyed

When a window is shown and quickly hidden again we can get to
a state, on a asynchronous windowing system API, where the
isExposed=true event has been pushed to the event queue but
not yet processed at the time the user calls hide().
As hide() immediately sets isVisible() to false, we end up with
isExposed=true and isVisible=false which prevent the WM_Obscure
event to be sent to render loop which means the render thread
thought the window was still on screen when we reched the
shutdown in WM_TryRelease.

Changed WM_TryRelease handling to disregard window state when
the window is being deleted. This forces SG and GL cleanup
and stops the thread.

Task-number: QTBUG-35055
Change-Id: Ibac5aa27354d6450f30a61450214cb785ab855bf
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix rendering of Flipable content.
Gunnar Sletta [Mon, 25 Nov 2013 09:06:36 +0000 (10:06 +0100)]
Fix rendering of Flipable content.

When a batch is merged in the renderer, we use the z component to
stack the item front to back. This works because each item is
guaranteed to have a z-range of 0->1. However, when a projective
matrix is used, we need to compensate for the implicit [x,y,z]/w,
which GL applies to gl_Position after the vertex stage completes,
so that this guarantee still holds.

Task-number: QTBUG-35020
Change-Id: I254a3d4dc9ad22f53717160ec6ad8f3a27b43d1c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoNo assert when the focus changes and a window has no active focus item.
Frederik Gladhorn [Fri, 22 Nov 2013 18:13:20 +0000 (19:13 +0100)]
No assert when the focus changes and a window has no active focus item.

[ChangeLog][QtQuick] Fix crash when showing and hiding a window that has
no active focus item.
QtQuickControls hit the situation where a popup window was shown without
ever having an active focus item. When then closing the popup,
clearFocusInScope would assume it had to always modify the old focus,
but in this case the focus would be on the window itself, so there is
nothing to update.

Task-number: QTBUG-35057

Change-Id: Ifbde4689d39f98b13e6f90573cb22e28bb86f2c4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
10 years agoFix memory corruption in QML expression compilation
Simon Hausmann [Mon, 25 Nov 2013 14:58:36 +0000 (15:58 +0100)]
Fix memory corruption in QML expression compilation

We store QQmlPropertyData pointers in our IR for Qt meta-object property
resolution at compile time. As it turns out however, it is possible that these
pointers change after retrieval from the QQmlPropertyCache, as the cache may
change later in the compilation process. Therefore we must do what also
QQmlCompiler does by storing a copy of the QQmlPropertyData. For the JS IR we
can do that conveniently through the IR memory pool.

A side-effect of this bug was that QQmlPropertyData pointers were re-used
and so the identity check in the isel later such as

    _function->contextObjectDependencies.contains(m->property)

for dependency tracking failed. In the example given in the bug report it was
determined that the window.contentWidth property wouldn't need a property
capture, and therefore the binding was not re-evaluated as window.contentWidth
later in the binding evaluation phase received its correct value.

This patch also fixes the incorrect debug output names assigned to JS binding
expressions, where the index used to look up the name is per compiled object,
not per QML component.

Task-number: QTBUG-35063
Change-Id: I3e5bbfaac11e5c122a2ed15a3e486a93988e1b6e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoTests: Enable TestHTTPServer to receive data in chunks.
Friedemann Kleint [Wed, 20 Nov 2013 16:28:14 +0000 (17:28 +0100)]
Tests: Enable TestHTTPServer to receive data in chunks.

Fixes tst_qqmlxmlhttprequest on Windows.

Task-number: QTQAINFRA-573

Change-Id: Ie685cfa90904672246c1c5d8d3cec54c63cc76ba
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
10 years agoAllow for QtQml and QtDeclarative to co-exist at run-time
Simon Hausmann [Mon, 25 Nov 2013 09:11:10 +0000 (10:11 +0100)]
Allow for QtQml and QtDeclarative to co-exist at run-time

This patch changes QQmlData to share the very first bit with QDeclarativeData,
to indicate if the QObject in question is exposed in the QML1 or QML2 run-time.

Task-number: QTBUG-35006

Change-Id: I3aa1d7c99038792011afd9f481ad30d9b981721f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDo not crash when resizing invisible (non-tracked) windows.
Gunnar Sletta [Mon, 25 Nov 2013 07:25:21 +0000 (08:25 +0100)]
Do not crash when resizing invisible (non-tracked) windows.

Change-Id: I776c21a0f675d2dbe831325cef2c1c2a103e03e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoPerformance note about QQuickWindow::setColor vs top-level Rectangle
Gunnar Sletta [Mon, 25 Nov 2013 09:33:20 +0000 (10:33 +0100)]
Performance note about QQuickWindow::setColor vs top-level Rectangle

Change-Id: I58d271b108734958b6e0cd55ff62417d5b649a63
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoFix crash when assigning a null QObject or derived property as a ListView model
Andrew den Exter [Thu, 21 Nov 2013 01:15:59 +0000 (11:15 +1000)]
Fix crash when assigning a null QObject or derived property as a ListView model

Fall through to the null case handler in the event of a QVariant of QObject or
derived type with a null value, rather than asserting in the instance handler.

Task-number: QTBUG-34999

Change-Id: I5eeffbe29a263c57e6157d516b138ddc8e2e7a95
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoAndroid: Add qmltooling plugins to apk
Daniel Teske [Wed, 20 Nov 2013 15:54:16 +0000 (16:54 +0100)]
Android: Add qmltooling plugins to apk

Task-number: QTCREATORBUG-10560

Change-Id: Ifabe6a74552dbc74b1de3030f8d60efda865f84a
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
10 years agoBe even more tolerant towards broken platform behavior.
Gunnar Sletta [Thu, 21 Nov 2013 13:13:07 +0000 (14:13 +0100)]
Be even more tolerant towards broken platform behavior.

When the platform (Mac in particular) sends us exposes for windows
which are not renderable, we store it for later and fake expose events
when we get resized.

Task-number: QTCREATORBUG-10814
Change-Id: I909bb5a920550589322afd97ae1834884754cf81
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoQtQuick.Dialogs MessageDialog docs
Shawn Rutledge [Mon, 11 Nov 2013 20:41:47 +0000 (21:41 +0100)]
QtQuick.Dialogs MessageDialog docs

Change-Id: Ic229a26c395be0542409ba3e13739e55b6ffb521
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoSafeguard the threaded renderloop against incorrectly exposed windows.
Gunnar Sletta [Wed, 20 Nov 2013 12:27:02 +0000 (13:27 +0100)]
Safeguard the threaded renderloop against incorrectly exposed windows.

On Mac we had a situation where we got expose events for windows which
were either 0x24 in size or completely off the screen. These would
result in makeCurrent failing and lead to crashes later on in the
scene graph. Safeguard against invalid dimensions during initialization
and abort after a call to makeCurrent if any of them fail.

Task-number: QTCREATORBUG-10814
Change-Id: I9063ea4d078eea3914666e4c155d141a1502e2ff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
10 years agoAvoid symbol clashes when linking QtDeclarative and QtScript statically
Simon Hausmann [Fri, 22 Nov 2013 14:37:08 +0000 (15:37 +0100)]
Avoid symbol clashes when linking QtDeclarative and QtScript statically

Re-define the three symbols we actually implement (as stubs).

Task-number: QTBUG-35041
Change-Id: Ie9511207440fa23645e52643881f5993177a4368
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoSaner and simpler way to handle line numbers for JITed code
Lars Knoll [Thu, 14 Nov 2013 14:58:39 +0000 (15:58 +0100)]
Saner and simpler way to handle line numbers for JITed code

Instead of storing the current instruction pointer in the
ExecutionContext, we might as well directly store the current
line number there.

Leads to simpler code, works cross platform and should also
be faster.

Change-Id: Ifb7897cf8dbe8a962505fe876aa3ed43283ebb06
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoTurn execution contexts into Managed objects
Lars Knoll [Thu, 14 Nov 2013 13:53:28 +0000 (14:53 +0100)]
Turn execution contexts into Managed objects

This finally gives proper memory management for ExecutionContexts.
So far they had been garbage collected but where still allocated
using standard malloc/free(). This allows us to collect the
contexts faster and speed up context creation.

Change-Id: I02e642391d55eaa59ab3f4c2720a2ac71259caf4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd support for large items to the memory manager
Lars Knoll [Thu, 14 Nov 2013 11:05:42 +0000 (12:05 +0100)]
Add support for large items to the memory manager

This is required, so we can track ExecutionContexts
through the regular memory manager.

Change-Id: I1bd2e2ef275e6e9e1f364a35affbb991f4377b05
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoSpeed up arguments object
Lars Knoll [Thu, 14 Nov 2013 10:08:41 +0000 (11:08 +0100)]
Speed up arguments object

Don't fully create the arguments object unless required.
In the 95% use case, we can avoid creating any array based
data structures for the arguments object and directly
manipulate the functions arguments. only create the full
data structure for the other 5%.

Speeds up the raytrace test by 50%, gives around 10% overall
on v8-bench.

Change-Id: If727d28b96585e83314f544031a6c3ca1817ea19
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoUse lookups for create_property (ie. new foo.bar)
Lars Knoll [Wed, 13 Nov 2013 10:45:51 +0000 (11:45 +0100)]
Use lookups for create_property (ie. new foo.bar)

This is not used that often, but it removes one more place
where we do lookups by name.

Change-Id: I9f798b8b4a64be3fdf3e53090e4288724c9d2b22
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDon't store the QSGNode pointer
Alan Alpert [Wed, 20 Nov 2013 21:34:19 +0000 (13:34 -0800)]
Don't store the QSGNode pointer

The QSGNode subtree may be cleared at any time. Get the subtree via the
node pointer passed in updatePaintNode, to ensure that the subtree is
still valid each update.

Some references are still being stored but invalidated when a new
subtree is created. QTBUG-34994 has been created to track fixing that.

Task-number: QTBUG-33553
Change-Id: I2115aff931d42b613d207553c636be7d80c405bb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
10 years agoTextInput: add editingFinished signal
Liang Qi [Thu, 21 Nov 2013 10:06:24 +0000 (11:06 +0100)]
TextInput: add editingFinished signal

Autotest is included.

Task-number: QTBUG-34780

[ChangeLog][QtDeclarative][TextInput] add editingFinished signal

Change-Id: Ib633daee67cd4e5f15739a6004adbe882ab3d3fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoFix assert after giving focus to a disabled item.
Andrew den Exter [Thu, 21 Nov 2013 01:10:10 +0000 (11:10 +1000)]
Fix assert after giving focus to a disabled item.

If an item has focus stolen by another item remove activeFocus from it even
if the item that gains focus doesn't gain activeFocus.  Otherwise the focus
tree will enter a state where an item that is not the subFocusItem of its
focus scope has activeFocus which is invalid and will trigger an assert
in QQuickWindowPrivate::clearFocusInScope().

Task-number: QTBUG-34779

Change-Id: I72408ec0e4fd9b05ef595147ef1ef95b6aed1c16
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agotst_qqmlxmlhttprequest: Use QScopedPointer.
Friedemann Kleint [Thu, 21 Nov 2013 08:09:56 +0000 (09:09 +0100)]
tst_qqmlxmlhttprequest: Use QScopedPointer.

Ensure resources are cleaned up in case of failing tests.

Change-Id: Ie27800da37beac09fec34111af276ed029dcde20
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoAlways check for dragging changed, not just when movement starts
Robin Burchell [Wed, 20 Nov 2013 21:29:54 +0000 (22:29 +0100)]
Always check for dragging changed, not just when movement starts

Otherwise, if you flick and then start a new drag before the flick
completes, dragging remains false.

Change-Id: I9bbe20107317a6edf765c87d2e0afe3e9e2618e9
Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoV4 Use getrlimit on Darwin to get the stack size for the main thread
Andy Nichols [Wed, 20 Nov 2013 16:17:01 +0000 (17:17 +0100)]
V4 Use getrlimit on Darwin to get the stack size for the main thread

Turns out pthread_get_size does not return the correct size when it is
called from the main thread, so to workaround you call getrlimit instead
Without this change, most QML applications are broken on iOS.

Change-Id: I9a61494de26caa3d7be7e46a991e6d6d0514ce17
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoqml tool on OSX: wait for a timeout before exiting
Shawn Rutledge [Mon, 18 Nov 2013 14:57:08 +0000 (15:57 +0100)]
qml tool on OSX: wait for a timeout before exiting

Double-clicking to open a QML file was not working because it would
exit if no files are given on the command line.  It needs to wait
a while for the QFileOpenEvent.

Task-number: QTBUG-34926
Change-Id: Icb585a777b0438db85120c62e7717f0f6eafffb1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
10 years agoEnforce window rendering in sequence on llvmpipe.
Gunnar Sletta [Wed, 20 Nov 2013 11:05:49 +0000 (12:05 +0100)]
Enforce window rendering in sequence on llvmpipe.

When rendering multiple windows in parallel on llvmpipe we end up with
crashes deep inside llvmpipe as multiple threads seem to access
unprotected resources. Work around this bug by enforcing that scene
graph rendering happens on one window at a time.

Task-number: QTCREATORBUG-10666
Change-Id: I2f734e8f653b2a9b4108eb189280ab922581e2c0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoUse the sharing context when grabbing a hidden QQuickWindow.
Jocelyn Turcotte [Mon, 18 Nov 2013 13:59:33 +0000 (14:59 +0100)]
Use the sharing context when grabbing a hidden QQuickWindow.

This allows QtWebEngine auto tests to grab the window's contents
without having to show it.

Change-Id: I5989a9815d0f69a7eff655f322c99d6051fc4d25
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
10 years agoMerge remote-tracking branch 'origin/release' into stable
Frederik Gladhorn [Wed, 20 Nov 2013 12:36:33 +0000 (13:36 +0100)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: Id732233d56e8d1706f62ef7a153d4a471406c551

10 years agoFix bad refcounting for Context2D.drawImage with an image item source.
Gunnar Sletta [Wed, 20 Nov 2013 08:53:38 +0000 (09:53 +0100)]
Fix bad refcounting for Context2D.drawImage with an image item source.

The pixmap we get from createPixmap is cached internally in the
QQuickCanvasItem's cache so we need to refcount it properly. Using
take would result in the refcount going to zero in this function
which would cause a crash.

Task-number: QTBUG-34714
Change-Id: I5f0e75a7117c53e4b89ac133ba7d161bc7b9053d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoStabilize tst_qpauseanimationjob
Frederik Gladhorn [Tue, 19 Nov 2013 18:04:48 +0000 (19:04 +0100)]
Stabilize tst_qpauseanimationjob

This test is highly timer dependent and contains so many windows special
cases that indicate problems (when timers are not accurate or the
machine is busy).

Change-Id: Ie057d560d39300252ffb6c19b4d1446179c0e56a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoCheck that the pathlist is not empty before calling sort() on it
Lars Knoll [Wed, 20 Nov 2013 08:55:54 +0000 (09:55 +0100)]
Check that the pathlist is not empty before calling sort() on it

Try to fix QTBUG-34834, where the app crashes because we replaced
qSort with std::sort(). Apparently std::sort always dereferences
begin(), even if it is the same as end().

Task-number: QTBUG-34834
Change-Id: I6207a27f61f21265dd964d7f4a6b78d059c615c8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4: fix Array.indexOf() for QStringList
Liang Qi [Thu, 3 Oct 2013 08:30:53 +0000 (10:30 +0200)]
V4: fix Array.indexOf() for QStringList

Autotest is included.

Task-number: QTBUG-33542
Change-Id: I46c3a81006019c6613a3d35aa018217f85a15d0b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
10 years agoBump MODULE_VERSION to 5.2.1
Sergio Ahumada [Tue, 19 Nov 2013 11:05:39 +0000 (12:05 +0100)]
Bump MODULE_VERSION to 5.2.1

Change-Id: I211610ee4153fa1e24de085d64bd735ce3746ae0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
10 years agoiOS: Fix Build error in QSGTexture
Andy Nichols [Tue, 19 Nov 2013 13:05:57 +0000 (14:05 +0100)]
iOS: Fix Build error in QSGTexture

We don't do build tests for qtdeclarative, and so this guy slipped
through the cracks.

Change-Id: I2ac29c6b7ec70f4dc4ca4bc682203bbca06f0e2a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
10 years agoFix build on iOS
Tor Arne Vestbø [Tue, 19 Nov 2013 16:28:34 +0000 (17:28 +0100)]
Fix build on iOS

Icccd542b8122c7bfa0e83 and Ia6e9f06dbb850 clashed.

Change-Id: Iaea844c9955eb29104ee32660499a67cb7224cbf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
10 years agoGreatly reduce memory consumed by QQmlEngine instances
Lars Knoll [Tue, 19 Nov 2013 11:46:34 +0000 (12:46 +0100)]
Greatly reduce memory consumed by QQmlEngine instances

Due to a inefficiency in our InternalClass implementation,
we were not sharing the string and attribute table between
internal class instances.

This was extremely inefficient with the Qt object, as it created around
1000 internal classes with large string and property tables. With the
patch these tables are now shared.

Reduces memory consumption of a QQmlEngine instance from around 6.5M
to a couple of 100k.

Change-Id: Ib763f31deca0808c000ac2c30aa0b05e806bda40
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
10 years agoFileDialog example: remove setGeometry button
Shawn Rutledge [Mon, 18 Nov 2013 16:15:23 +0000 (17:15 +0100)]
FileDialog example: remove setGeometry button

This was more of a manual test than an example: it should be possible
to set the geometry of widget-based and qml-based dialogs.  Since it
doesn't work for native dialogs let's not invite bug reports about it.

Change-Id: I43cb97bff0af932268ae541e3f812fc17a1f76ae
Reviewed-by: Liang Qi <liang.qi@digia.com>
10 years agoFix compilation on QNX
Fabian Bumberger [Tue, 19 Nov 2013 10:29:34 +0000 (11:29 +0100)]
Fix compilation on QNX

pthread_getattr_np is not available there, so we use the default implementation (1MB stack limit) for now.

Change-Id: Ia1f3cbbcd846998b688541c0b576ef42f22ac8b6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4: remove failing assert and fix code.
Erik Verbruggen [Mon, 18 Nov 2013 14:33:19 +0000 (15:33 +0100)]
V4: remove failing assert and fix code.

Assert failed for cases where the node’s ancestor with lowest
semi-dominator number was not the same as the parent. The test case
exemplifies this.

Task-number: QTBUG-34792
Change-Id: Ie6847b22a27211801bff7479bfcbfaf329c6005a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
10 years agoSafely abort when we don't succeed in creating a GL context.
Gunnar Sletta [Tue, 12 Nov 2013 15:53:47 +0000 (16:53 +0100)]
Safely abort when we don't succeed in creating a GL context.

Task-number: QTBUG-33363

Change-Id: Ia2b0c329157786cb4ec703989f12d2fdb1ce6bc8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix failing assertion when trying to assign to an id referenced QML object
Simon Hausmann [Mon, 18 Nov 2013 23:31:04 +0000 (00:31 +0100)]
Fix failing assertion when trying to assign to an id referenced QML object

References to id addressed QML objects are member expressions, which are unlike
other member expressions by not being lvalues. Handle this correctly.

Task-Number: QTBUG-34890

Change-Id: Ied6230edbc561128ad36bf0d1a1918185204deec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4 SSA: speed up dominator calculations.
Erik Verbruggen [Tue, 15 Oct 2013 14:13:01 +0000 (16:13 +0200)]
V4 SSA: speed up dominator calculations.

Changed three recursive routines to worklist-based iterative ones. This
not only speeds up the dominator frontier calculation, but also prevents
the algorithm to run out of stack space.

This is a partial fix for QTBUG-34047.

Change-Id: Ife8dc35724d50408ad356e1621884bdb82db9626
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix compiler warnings with mingw64.
Erik Verbruggen [Mon, 18 Nov 2013 16:57:32 +0000 (17:57 +0100)]
Fix compiler warnings with mingw64.

Task-number: QTBUG-34152

Change-Id: Ibb93d1cac8c343a7ca34ce7d010f24fc56ba89df
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoMake sure we clean up GL resources before we delete the GL context.
Gunnar Sletta [Mon, 18 Nov 2013 14:27:20 +0000 (15:27 +0100)]
Make sure we clean up GL resources before we delete the GL context.

Task-number: QTBUG-34806
Change-Id: I5013baaff0ca86357292474976944c1a3056f219
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix small bug in array sorting
Lars Knoll [Mon, 18 Nov 2013 14:58:30 +0000 (15:58 +0100)]
Fix small bug in array sorting

Task-number: QTBUG-34321

Change-Id: I33089499f730bce16a9dfdda04cc8402602bc5fa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMake comparison of singletons and qobjects work
Albert Astals Cid [Wed, 13 Nov 2013 12:31:46 +0000 (13:31 +0100)]
Make comparison of singletons and qobjects work

Otherwise you can end up with some weird situation in which you have
two objects, you print them and then you print the comparison and get
a Foo(0x858480) b Foo(0x858480) a == b false

Task-number: QTBUG-34651

Change-Id: Id2444d919f039be085eb5ed9112345db691540a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDoc: Fixed list of animation types.
Jerome Pasion [Mon, 18 Nov 2013 12:21:29 +0000 (13:21 +0100)]
Doc: Fixed list of animation types.

-manually created list duplicates the generated list.
-\generatelist{related} doesn't do anything for a regular \page.

Task-number: QTBUG-33360
Change-Id: I0bf870c71d3985e232fa8c0d5ef7ad572f596e99
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoMake use of GL_APPLE_texture_format_BGRA8888.
Gunnar Sletta [Thu, 14 Nov 2013 10:43:02 +0000 (11:43 +0100)]
Make use of GL_APPLE_texture_format_BGRA8888.

Texture uploads on iOS is extremly slow without it.

Change-Id: Icccd542b8122c7bfa0e839c25e988d107bc17d2a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
10 years agoFix interaction between head room and appending in arrays
Lars Knoll [Mon, 18 Nov 2013 12:54:33 +0000 (13:54 +0100)]
Fix interaction between head room and appending in arrays

We reserve space on both ends of the JS array for appending
and prepending. Make sure they interact well with each other
and don't cause any memory corruption.

Task-number: QTBUG-34853
Change-Id: I184280178690e3cb12ab9b199a8436b32383af38
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDon't assert in QQuickItem::update
Lars Knoll [Mon, 18 Nov 2013 13:23:36 +0000 (14:23 +0100)]
Don't assert in QQuickItem::update

The method can actually be called from QML, so we can not
have an assert in that method. Instead simply return if the
item has no contents

Task-number: QTBUG-34060
Change-Id: Ib28ffa5c6c63fbec956abe25020010ed73a9cfa9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
10 years agoqqmldebugclient.cpp: Fix warning about missing return.
Friedemann Kleint [Mon, 18 Nov 2013 09:28:53 +0000 (10:28 +0100)]
qqmldebugclient.cpp: Fix warning about missing return.

In file included from ../shared/qqmldebugclient.cpp:473:0:
../shared/qqmldebugclient.cpp: In member function
'QString QQmlDebugClient::stateString() const':
../shared/qqmldebugclient.cpp:452:1: warning: control reaches end of
non-void function

Change-Id: Ic5422dcff41591691621077ade45b6ea3ea3a8f1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoLimit the amount of memory we allocate on the stack
Lars Knoll [Mon, 11 Nov 2013 10:22:24 +0000 (11:22 +0100)]
Limit the amount of memory we allocate on the stack

Setup limits for both the C and the JS stack, and check
them before entering functions. If we run out of space,
throw a RangeError exception.

Be careful and recheck the stack bounds when things go
outside. This catches the case where the engine got
moved to another thread changing the stack boundaries.

Windows currently uses an unsafe fallback implementation,
this needs to be fixed later on.

Task-number: QTBUG-34568

Change-Id: I22fbcbec57b28f9cc8a49e12f1cc6e53e4f07888
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
10 years agoDon't call receivers from disconnectNotify
Alan Alpert [Sat, 16 Nov 2013 20:45:15 +0000 (12:45 -0800)]
Don't call receivers from disconnectNotify

A pending documentation update is going to explain that you can't call
into QObject functions from disconnectNotify, or it may deadlock
on the signalSlot mutex.

Task-number: QTBUG-34829
Change-Id: I57e7b4e457d813d4255c8cdbe36228b2e0f45aaa
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoRemove '-enable-debugger' argument from qml executable
Kai Koehne [Thu, 14 Nov 2013 11:38:25 +0000 (12:38 +0100)]
Remove '-enable-debugger' argument from qml executable

Task-number: QTBUG-34836
Change-Id: I3ab2a16036a1086c0ac1f50880a402caf9f54f2d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix lockup in creator.
Gunnar Sletta [Fri, 15 Nov 2013 14:28:33 +0000 (15:28 +0100)]
Fix lockup in creator.

My previous fix to force expose when the render thread is inactive
was not enough. We now lock down access to 'QSGRenderThread::window'
so that it will always be set when the thread is in the "exposed"
state and 0 when the thread is in the "obscured" state.

This introduces another sync point in handleObscurity to protect
the writing of window in the render thread.

Task-number: QTCREATORBUG-10793
Change-Id: I1e1153189b3a3562705892b42625f88ef6329188
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoDo not crash when one of group animation's children is null
Jacek Całusiński [Thu, 14 Nov 2013 16:53:58 +0000 (17:53 +0100)]
Do not crash when one of group animation's children is null

Check if pointer to QQuickAbstractAnimation for which we are setting
group is valid.

Task-number: QTBUG-34851
Change-Id: Iecb549f080804fd9489f884911fa51892def05a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoRemove version definition from custom particle shaders for OpenGL ES.
Maciej Kujalowicz [Thu, 14 Nov 2013 21:45:18 +0000 (22:45 +0100)]
Remove version definition from custom particle shaders for OpenGL ES.

Since OpenGL ES 2.0 does not support GLSL 1.2, #version 120 must
be removed from embedded shaders for a custom particle.

Task-number: QTBUG-34854
Change-Id: I8d3e51ff87acc099a53c4e312cd33d02e6a1cb4e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
10 years agoDeprecate logicalPixelDensity
Alan Alpert [Tue, 12 Nov 2013 10:12:04 +0000 (02:12 -0800)]
Deprecate logicalPixelDensity

It's just not working out in practice, and we don't want to confuse
users with having to pick their flavor of pixel density.

Task-number: QTBUG-34798
Change-Id: I552e479515a6f5249685844143601cb7449ccccc
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoexamples/quick/window example: fullscreen is possible on OSX
Shawn Rutledge [Fri, 15 Nov 2013 14:17:57 +0000 (15:17 +0100)]
examples/quick/window example: fullscreen is possible on OSX

It's normally disallowed without the WindowFullscreenButtonHint.
But if we're going to declare a value for flags, then we have to
put back the Window type which would otherwise be there by default.

Task-number: QTBUG-33607
Change-Id: Ibbd593b2648b98d37c7f70a0b9f96787b0a40f22
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
10 years agoFix === operator for value types
Lars Knoll [Tue, 12 Nov 2013 08:50:29 +0000 (09:50 +0100)]
Fix === operator for value types

Fix === comparison for urls and other QML value types.

Task-number: QTBUG-33546

Change-Id: I4a7066e6bbc7de7c599fe2c7b2fdfb75e0ff5196
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDoc: Fixed QtQuick.Window documentation
Jerome Pasion [Thu, 14 Nov 2013 16:27:38 +0000 (17:27 +0100)]
Doc: Fixed QtQuick.Window documentation

-fixed import statement in \qmlmodule and \inqmlmodule command.
-Removed extra identifier in property documentation.

Task-number: QTBUG-33360
Change-Id: I1e7ca5f418c327d42247ab4f4a11733c63d8c273
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix stacking order bug in the renderer
Gunnar Sletta [Fri, 15 Nov 2013 06:23:04 +0000 (07:23 +0100)]
Fix stacking order bug in the renderer

Since we are sorting batches based on the zorder of the first element
it is crucial that we don't continue adding to batches once an overlap
with a compatible element is found.

Task-number: QTBUG-34864
Change-Id: Ic2194c5c17bba0bc9874a14e8a69c81bff75bd1c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
10 years agoDon't crash when trying to assign to null.prop
Lars Knoll [Tue, 12 Nov 2013 10:01:06 +0000 (11:01 +0100)]
Don't crash when trying to assign to null.prop

Fixes a regression introduced during the exception handling
refactoring.

Task-number: QTBUG-34544

Change-Id: Ib751274d759030db3e5d3b1380b30dc07ec85f83
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMake tst_qqmlprofilerservice more robust
Kai Koehne [Fri, 15 Nov 2013 12:02:13 +0000 (13:02 +0100)]
Make tst_qqmlprofilerservice more robust

Don't expect only application output to be printed. E.g. a stray
qDebug somewhere in Qt could break this test so far ...

Change-Id: Ibdc31fba3bd8d822c264bd44515d16e648db9a8e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDon't dereference a null animationTemplate
Lars Knoll [Wed, 13 Nov 2013 07:32:12 +0000 (08:32 +0100)]
Don't dereference a null animationTemplate

If the SpringAnimation gets used inside a Transition, the
animationTemplate might get cleared, but updateCurrentTime()
still gets called on the SpringAnimation after that.

Task-number: QTBUG-34539
Change-Id: I1f27fdbfc594e6ff9a4343e45f7f4001964bb012
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoAvoid deadlock in Qt Creator
Gunnar Sletta [Thu, 14 Nov 2013 14:41:29 +0000 (15:41 +0100)]
Avoid deadlock in Qt Creator

Task-number: QTCREATORBUG-10699
Change-Id: Ia88df5ec4ea74fda6a0449aa739a9c6976fedb02
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
10 years agoImprove internal debug statements.
Gunnar Sletta [Thu, 14 Nov 2013 14:01:36 +0000 (15:01 +0100)]
Improve internal debug statements.

Now that we have one thread per window it is useful to know which
thread and window prints out the messages.

Change-Id: I699eae180575fd3355551ebe0bfe6fd6ac8837c9
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
10 years agoRespect device pixel ratio in "OpenGL under QML" example.
Gunnar Sletta [Wed, 13 Nov 2013 11:29:40 +0000 (12:29 +0100)]
Respect device pixel ratio in "OpenGL under QML" example.

Change-Id: I1b67acfdcdb1fb47593a6acd62ffd6c3315b5503
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
10 years agoAdd support for quaternion in ShaderEffect
Gunnar Sletta [Wed, 13 Nov 2013 08:42:08 +0000 (09:42 +0100)]
Add support for quaternion in ShaderEffect

Task-number: QTBUG-32605
Change-Id: I4e90a3505740dd9a8b369dac6ce05ce066d14d44
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
10 years agoV4 debugging: fix step-over and step-out.
Erik Verbruggen [Thu, 14 Nov 2013 13:16:50 +0000 (14:16 +0100)]
V4 debugging: fix step-over and step-out.

- step-out: only stop if we’re leaving the context for the function we
  previously stopped at, so intermediate calls between the current
  position and the end do not stop the engine
- step-over: set breakpoints on all lines in current function and
  continue to run. When hitting a breakpoint, see if we are in the same
  context, because recursive calls might happen. Breakpoints on all
  lines are needed, because the (pure) next line might be jumped over
  (like when doing step-over a single-line then clause, where the next
  line might be in the else clause).

Change-Id: Idf35dc740ca64fae5079162162906490a96af2a7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoV4 debugging: Fix instable test.
Erik Verbruggen [Thu, 14 Nov 2013 11:04:59 +0000 (12:04 +0100)]
V4 debugging: Fix instable test.

Request the scripts after hitting a breakpoint. The reason this test
could fail before, is that the engine might be calling into the debugger
even before any script was loaded.

Change-Id: Iba49f445ab97afaf2bb168b04063432ca2f9dddd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoAllow passing qmlRegisterSingletonType QObjects to C++ as QObject*
Albert Astals Cid [Wed, 13 Nov 2013 10:03:52 +0000 (11:03 +0100)]
Allow passing qmlRegisterSingletonType QObjects to C++ as QObject*

At the moment you can pass them as their FinalType* or
as one of their ParentType* but not as QObject* which
does not make much sense to me

Task-number: QTBUG-34617
Task-number: QTBUG-30730

Change-Id: Id5cfb7bbb123456ef43f44f33b450f8966a7641a
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdapt Qt Quick 2 renderer to work with OpenGL Core Profile
Sean Harmer [Wed, 6 Nov 2013 13:07:58 +0000 (13:07 +0000)]
Adapt Qt Quick 2 renderer to work with OpenGL Core Profile

The basic approach is to have the batched renderer create and bind a
vertex array object if it detects we are using an OpenGL Core profile
context. The VAO is bound for the duration of the QQ2 renderer's
work cycle and unbound at the end so as to not interfere with any
other VAO's a user may wish to use.

All shaders have been copied and ported to be compliant with the
GLSL 150 core specification which is the minimum for a Core profile
context (OpenGL 3.2 Core). We are not using any newer features as
yet so this will work anywhere we can get a Core profile context.

The QSGShaderSourceBuilder class has been extended to resolve any
requests for shaders to the same basefilename with "_core"
appended prior to any file extension. This could be extended in
the future to allow version, or GPU or platform specific shaders.

The QSGShaderSourceBuilder has also been extended to allow it to
insert #define definitions in the prologue of a shader. Any such
definition is inserted:

* After the last #extension directive (if any are found)
* Otherwise after the #version directive (if found)
* Otherwise at the start of the shader source

This is required by the custom particle shaders which make
extensive use of such #defines.

In addition the mechanism used by the distance field glyph cache to
extend the cache with new glyphs has been modified to work (and
work more efficiently) when using a Core profile context.

Rather than using a shader program and a buffer filling quad to
blit the old texture into the new cache texture, we instead use
the technique of framebuffer blitting. The existing fallback
implementation using glTexSubImage2D() is still available if
needed.

The DECLARATIVE_EXAMPLE_MAIN macro has been extended to allow easy
testing of any of the QtDeclarative examples with a core profile
context. Just run the example with

QT_QUICK_CORE_PROFILE=1 ./text

for e.g. The only ones that may not work out of the box are those
that provide GLSL shader source e.g. the customparticles or
shader effect examples. These work fine if the shader source is
adapted to GLSL 150 core.

In the future it may be a good idea to expose some context property
to QML that the user can use to determine what shader source
variation to provide to Qt Quick. Along these lines it would also
be very nice to allow the provision of shader source to
ShaderEffect or CustomParticle from a separate source file just as
we now do within Qt Quick.

Task-number: QTBUG-32050
Change-Id: Ia6e9f06dbb8508af9ae03c6b60fb418b4cc9e41f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDoc: Adding FontDialog type to group "dialogs".
Jerome Pasion [Tue, 12 Nov 2013 10:58:23 +0000 (11:58 +0100)]
Doc: Adding FontDialog type to group "dialogs".

-needed for FontDialog to show up in the landing page.

Task-number: QTBUG-33360
Change-Id: Ic3ea5722e963045704e81a673ebd85770c0253a3
Reviewed-by: Matti Paaso <matti.paaso@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoMake tst_nodes use QSGRenderLoop to behave more like QQuickWindow
Gunnar Sletta [Tue, 12 Nov 2013 12:49:51 +0000 (13:49 +0100)]
Make tst_nodes use QSGRenderLoop to behave more like QQuickWindow

Change-Id: I284164a45cabdb9f1fdbc2050db0cb00810ce946
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
10 years agoFix native compilation on linux/arm with gcc 4.7.2
Erik Verbruggen [Tue, 12 Nov 2013 15:30:14 +0000 (16:30 +0100)]
Fix native compilation on linux/arm with gcc 4.7.2

/disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp: In instantiation of ‘int QV4::LineNumberMappingHelper<field, SearchType>::lowerBound(int, int, SearchType) [with int field = 0; SearchType = int]’:
/disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp:142:49:   required from here
/disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp:106:13: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
cc1plus: all warnings being treated as errors

Change-Id: Ic97d6a2a9acd392d565e9c66f30159552473e092
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoRevert ffaf39e9a7f11d4e2800b3b37160a2a952795614
Alan Alpert [Tue, 12 Nov 2013 09:56:35 +0000 (01:56 -0800)]
Revert ffaf39e9a7f11d4e2800b3b37160a2a952795614

Making it public right now seems a little premature, given all the work
happening on the engine now (and for 5.3). We'll be in a better position
to commit to it or not next release.

Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2bbbb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoPolish up QQmlFileSelector
Alan Alpert [Tue, 12 Nov 2013 08:11:43 +0000 (00:11 -0800)]
Polish up QQmlFileSelector

Incorporate beta feedback, and hide QQmlAbstractUrlInterceptor as the
implementation (instead of making that "the API").

Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2aaaa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix warnings about deprecated string conversions in V4-debugservice.
Friedemann Kleint [Wed, 13 Nov 2013 07:51:37 +0000 (08:51 +0100)]
Fix warnings about deprecated string conversions in V4-debugservice.

Change-Id: I1b45876d2016fdcf1117c4f77b33c75f7d712657
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix boundingbox calculation of rotated items.
Gunnar Sletta [Tue, 12 Nov 2013 11:13:11 +0000 (12:13 +0100)]
Fix boundingbox calculation of rotated items.

Task-number: QTBUG-34328

Change-Id: If0202a67d95500333a0fb6f4ca3eb19ecb027770
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix property dependency generation for accelerated QML QObject properties
Simon Hausmann [Sat, 2 Nov 2013 19:35:33 +0000 (20:35 +0100)]
Fix property dependency generation for accelerated QML QObject properties

The previous approach of collecting the dependencies through an IR visitor
doesn't work, because it relies on a fixed structure - for example MEMBER(NAME,
prop) - which we can't guarantee (it's usually MEMBER(TEMP, prop)). But it
turns out that we can only pre-calculate dependencies for context, scope or id
properties, so we can do that right away in the QML specific JS codegen, store
that information in the IR function and use it from there in the data structure
generator as well as in the isel as a parameter to getQObjectProperty to tell
the run-time whether capture is required or not.

Change-Id: I33711c3420d6534c653c2a6a4284f0fc12e941cf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix out of bounds array index in the generated JIT code
Lars Knoll [Mon, 11 Nov 2013 14:08:41 +0000 (15:08 +0100)]
Fix out of bounds array index in the generated JIT code

When converting a double to int, make sure we check for >= 0
before using it, otherwise we get out of bounds accesses.

Task-number: QTBUG-34635
Change-Id: If72e116c08fe1dff03cd88ce510cf8b96d249b92
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
10 years agoV4 IR: change basic-block cleanup to remove unreachable cycles too.
Erik Verbruggen [Tue, 12 Nov 2013 13:55:14 +0000 (14:55 +0100)]
V4 IR: change basic-block cleanup to remove unreachable cycles too.

The previous version left unreachable cycles untouched. For example in:

function f() {
  if (false)
    while (true) { doSomething(); }
  anotherThing();
}

The edge to the then-part would be removed, but the loop itself would
not be removed. This resulted in the basic-block scheduler choking when
hitting the block with the anotherThing() call, because it wants to have
all blocks from incoming edges resolved first.

Task-number: QTBUG-34776
Change-Id: I5b3a79140e6058c4ade4ec7687c1a795f1a74f97
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
10 years agoUpdate .qmltypes files for 5.2
Alan Alpert [Mon, 11 Nov 2013 08:35:08 +0000 (00:35 -0800)]
Update .qmltypes files for 5.2

Task-number: QTBUG-34601
Change-Id: Icf5bdc2ea66b9a13186de957d5ae9c8701b481c7
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoQtQuick.Dialogs: hide internal functions and properties
Shawn Rutledge [Tue, 12 Nov 2013 07:57:35 +0000 (08:57 +0100)]
QtQuick.Dialogs: hide internal functions and properties

with double-underscores

Change-Id: If397bfaf50e0878516296eb4237bcf012eb8dae4
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoFix Object::getArrayHeadRoom()
Lars Knoll [Tue, 12 Nov 2013 11:17:14 +0000 (12:17 +0100)]
Fix Object::getArrayHeadRoom()

The method didn't adjust the size of the allocated array
properly, leading to crashes when being called repeatedly.

Task-number: QTBUG-34723
Change-Id: Ib58e7dcab6d0f5f46f3cf342eb541c1cc6b6cdc6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
10 years agoFix Canvas2d.createConicalGradient
Lars Knoll [Tue, 12 Nov 2013 12:41:53 +0000 (13:41 +0100)]
Fix Canvas2d.createConicalGradient

The method requires 3 arguments, not 6

Task-number: QTBUG-34718
Change-Id: Ib6c117ba18844acecea3707720c0c88449b50fb6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
10 years agoRemove unused _info on non-debug builds
Shawn Rutledge [Tue, 12 Nov 2013 12:35:21 +0000 (13:35 +0100)]
Remove unused _info on non-debug builds

Otherwise clang generates a warning which is fatal because of
treating warnings as errors.

Change-Id: I47c280edf6b0f8efa5ce24f9e92551304aed15fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>