platform/upstream/qtdeclarative.git
10 years agoMerge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev
Frederik Gladhorn [Wed, 2 Jul 2014 12:52:52 +0000 (14:52 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev

10 years agoUse qNextPowerOfTwo instead of reimplementing it
Allan Sandfeld Jensen [Tue, 17 Jun 2014 12:23:15 +0000 (14:23 +0200)]
Use qNextPowerOfTwo instead of reimplementing it

This patch uses the new shared qNextPowerOfTwo implementation introduced in qtbase.

Change-Id: I831d056f584897a99df2ceb8c1d840764464e344
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix output of swap times for basic render loop
Ulf Hermann [Tue, 1 Jul 2014 14:23:04 +0000 (16:23 +0200)]
Fix output of swap times for basic render loop

The swap time was treated as absolute by the qCDebug output, but was
actually relative.

Change-Id: Ia1539b8f8305ca37430022803419eb12a05934cb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoProperly collect polish timings from all render loops
Ulf Hermann [Mon, 30 Jun 2014 12:01:38 +0000 (14:01 +0200)]
Properly collect polish timings from all render loops

Previously the polish timings were collected incorrectly from the
windows render loop and not at all from the basic render loop. By
collecting the polish times at the right places we can get rid of
the 2-argument profile macro as well.

Task-number: QTBUG-39876
Change-Id: I0b4aaf87162c652b8dcea6cd4f54db053f8312fe
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoUse the same length for all scene graph numeric data
Ulf Hermann [Mon, 30 Jun 2014 12:28:31 +0000 (14:28 +0200)]
Use the same length for all scene graph numeric data

Having one int between all the qint64 is really not worth it. Also, the
clients were not picking that up correctly.

Change-Id: I9a9bc1c26c7518e1b666b788fa41f83c714a6db5
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoMerge remote-tracking branch 'origin/5.3' into dev
Frederik Gladhorn [Wed, 2 Jul 2014 07:58:13 +0000 (09:58 +0200)]
Merge remote-tracking branch 'origin/5.3' into dev

Conflicts:
.qmake.conf
examples/quick/scenegraph/openglunderqml/squircle.h
src/quick/doc/src/qmltypereference.qdoc
src/quick/scenegraph/qsgthreadedrenderloop.cpp

Change-Id: Ife4f4b897044a7ffcd0710493c6aed1d87cf1ef9

10 years agoTools and examples: consistently use organization name QtProject
Shawn Rutledge [Fri, 27 Jun 2014 10:59:14 +0000 (12:59 +0200)]
Tools and examples: consistently use organization name QtProject

This affects the location of the QSettings files or registry entries.
Other parts of Qt are using this organization name so it's good to
have all the settings in the same place.

[ChangeLog][QtQuick] tools and examples consistently use the
QtProject organization name

Change-Id: I1fae4eaed0248411fe95dda9572d38006648b162
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoQQuickSystemPalette: use QGuiApplication::paletteChanged()
J-P Nurmi [Fri, 20 Jun 2014 11:38:46 +0000 (13:38 +0200)]
QQuickSystemPalette: use QGuiApplication::paletteChanged()

Use the newly introduced signal instead of filtering events
of the whole application.

Change-Id: I876268145485ba07316e916d26a93d53c464ef3a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoRemove redundant sse2 math flags
Allan Sandfeld Jensen [Tue, 1 Jul 2014 09:57:36 +0000 (11:57 +0200)]
Remove redundant sse2 math flags

Qtbase already enables sse2 math by default now. This version is no
longer needed and may actually hurt performance by triggering scheduling
for pentium4.

Change-Id: Ib3b6781fb0b92c1351344cc2d2f13101fa2b632b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
10 years agoSkip rssnews demo if xmlpatterns is not present
Laszlo Agocs [Fri, 27 Jun 2014 13:14:33 +0000 (15:14 +0200)]
Skip rssnews demo if xmlpatterns is not present

Otherwise builds without the QtXmlPatterns module will fail.

Change-Id: I11d0b84653f8d59787b09cd9c12977d18be92729
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoAdd grabFramebuffer() to QQuickWidget and use it in the autotest
Laszlo Agocs [Wed, 19 Mar 2014 08:21:11 +0000 (09:21 +0100)]
Add grabFramebuffer() to QQuickWidget and use it in the autotest

This introduces the need for a grab function in QQuickWidget.
The render control has one already so there is no reason for not exposing
this in QQuickWidget too.

This also means that a relatively meaningful autotest can be now be added.

[ChangeLog][QtQuick] Added QQuickWidget::grabFramebuffer() for capturing the content into a QImage.

Task-number: QTBUG-37589
Change-Id: I5ca8192c0ef8dab4f076a4db27b64aebe3359bb8
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAvoid direct GL calls in Qt Quick examples and tests
Laszlo Agocs [Thu, 26 Jun 2014 13:08:47 +0000 (15:08 +0200)]
Avoid direct GL calls in Qt Quick examples and tests

Change-Id: I204a5513708aeff5cae00d06d4f0c27c20a13ace
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoDocs: clarify the relation between default alpha and format.
Laszlo Agocs [Fri, 27 Jun 2014 11:28:34 +0000 (13:28 +0200)]
Docs: clarify the relation between default alpha and format.

Reformat the new API docs the get rid of the unnecessary stars.

And fix some typos.

Change-Id: I09dcb3bea55cfd7b9209a4e0ad43e28a47fd1fa4
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoUse categorized logging for all things scenegraph.
Gunnar Sletta [Thu, 26 Jun 2014 18:48:47 +0000 (20:48 +0200)]
Use categorized logging for all things scenegraph.

Change-Id: I865ee838b0fd6c257b7189f24130012b98206fd1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoAvoid deadlock during window hiding.
Gunnar Sletta [Fri, 27 Jun 2014 05:35:18 +0000 (07:35 +0200)]
Avoid deadlock during window hiding.

Because we do event processing in polishAndSync, hide() or
handleObscurity() might have been called by the time we
continue execution. We already handled that windowDestroyed()
was called.

Change-Id: If45bcf3fa18cef1a60ca31bc26d3830045f581d9
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMark failing testcases with QEXPECT_FAIL for windows
Gunnar Sletta [Tue, 1 Jul 2014 10:21:01 +0000 (12:21 +0200)]
Mark failing testcases with QEXPECT_FAIL for windows

Task-number: QTBUG-39961
Change-Id: I981159921b38ac2af37e8a6d715f0d67d6f01da8
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3.1' into 5.3" into refs/staging/5.3
Frederik Gladhorn [Mon, 30 Jun 2014 12:32:51 +0000 (14:32 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3.1' into 5.3" into refs/staging/5.3

10 years agoAvoid double deletion of QQuickWindow
Shawn Rutledge [Tue, 17 Sep 2013 13:05:04 +0000 (15:05 +0200)]
Avoid double deletion of QQuickWindow

It's uncertain why 4fc0df58b8458052a818e3e970a97457882808e6 added
the call to sendPostedEvents(0, QEvent::DeferredDelete) but now we can
see that it easily results in the destructor calling itself, and
therefore double-deleting its own d_ptr.  removePostedEvents seems
safer to ensure that the window cannot be doubly deleted, in spite
of the qdoc warning that "You should never need to call this function."

Task-number: QTBUG-33436
Change-Id: I4873ebe179dde551407eba1f6baac5f03ca7f177
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix intermittent crash with older MinGW releases
Robin KAY [Tue, 24 Jun 2014 22:35:22 +0000 (23:35 +0100)]
Fix intermittent crash with older MinGW releases

An alternate code-path was previously added to work around a bad
signature for the SHParseDisplayName() function in older and non-w64
versions of the MinGW headers. This code-path incorrectly passed a
single rather double indirect pointer to the third argument of that
function causing it to produce corrupt data and subsequently crash.
This change modifies the code to instead cast a pointer of the correct
type to the incorrect type expected by the headers.

Task-number: QTBUG-39793
Change-Id: I4d65dea4fc38d7e885468cd23434d8570c311fc2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoDoc: Add documentation for the Maroon in Trouble example
Leena Miettinen [Fri, 30 May 2014 16:01:56 +0000 (18:01 +0200)]
Doc: Add documentation for the Maroon in Trouble example

Change-Id: I8b272894ef6374aeb6ec09275d7ce96d16a6be0f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoQQuickApplication: do not filter LayoutDirectionChange events
J-P Nurmi [Fri, 20 Jun 2014 09:26:54 +0000 (11:26 +0200)]
QQuickApplication: do not filter LayoutDirectionChange events

The newly introduced QGuiApplication::layoutDirectionChanged() is much
cheaper to use than filtering events of the application object.

Change-Id: I356c94cc6bea806bf3644c31c2610501d90f6c35
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoAllow integer values to be assigned QList<qreal> properties
Oleg Shparber [Wed, 25 Jun 2014 00:03:08 +0000 (17:03 -0700)]
Allow integer values to be assigned QList<qreal> properties

Before this patch it was not possible to assign an integer value to
QList<qreal> property, while it worked for non-list properties.

Change-Id: Iab00288f7d78f4f76056ab4291700d7f51626de4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMerge remote-tracking branch 'origin/5.3.1' into 5.3
Frederik Gladhorn [Wed, 25 Jun 2014 08:25:44 +0000 (10:25 +0200)]
Merge remote-tracking branch 'origin/5.3.1' into 5.3

Change-Id: Ic4418ade05ff7d89cbb375a25d9fd80353a2317a

10 years agoMerge remote-tracking branch 'origin/stable' into 5.3
Frederik Gladhorn [Wed, 25 Jun 2014 08:22:38 +0000 (10:22 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: Iafccb173a9b5569bc9fd1022abb210955519fc61

10 years agoWarn at runtime about badly threaded calls to QQuickItem::update()
Gunnar Sletta [Tue, 24 Jun 2014 10:21:46 +0000 (12:21 +0200)]
Warn at runtime about badly threaded calls to QQuickItem::update()

Change-Id: Ia3fc01f11ff28441d4ef095b520297a73e3399d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix crash in QQmlDelegateModel during destruction phase
Simon Hausmann [Tue, 24 Jun 2014 14:09:29 +0000 (16:09 +0200)]
Fix crash in QQmlDelegateModel during destruction phase

It has been reported multiple times (with different back traces) that
the QQmlDelegateModel tries to access a dangling QQmlContext pointer.
The scenarios for reaching this point differ slightly, one such scenario
is very late model activity during the scene destruction. The provided
test-case simulates that and the provided patch guards the QQmlContext
in a QPointer.

Task-number: QTBUG-39780
Change-Id: I594ee4918cd1b78c5db5c164314e85e9eea99fbd
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoExclude private methods and QObject::deleteLater from enumerable properties
Simon Hausmann [Tue, 24 Jun 2014 10:05:35 +0000 (12:05 +0200)]
Exclude private methods and QObject::deleteLater from enumerable properties

This is a regression from Qt 5.1/5.0 introduced with 5.2. Private slots/methods
such as QObject::_q_reRegisterTimers() as well as QObject::deleteLater() are
not suitable for calls from JavaScript. deleteLater() in particular is covered
by the destroy() replacement slot.

Task-number: QTBUG-39744
Change-Id: I9b25f3c0d4095ba8e2e8e5ee47e37903b5def1f9
Reviewed-by: Michael Brasser <michael.brasser@live.com>
10 years agoMake QQuickRenderControl public
Laszlo Agocs [Mon, 31 Mar 2014 13:59:18 +0000 (15:59 +0200)]
Make QQuickRenderControl public

QQuickRenderControl allows rendering Qt Quick 2 scenes into framebuffer
objects which can then be used in arbitrary ways in Qt-based or 3rd party
OpenGL renderers.

[ChangeLog][QtQuick] Introduced QQuickRenderControl as a public API.

Task-number: QTBUG-37944
Change-Id: I84262243b261b35cefdf67ec6bba8127a0f29275
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoV4 JIT: add IR printer that uses platform register names.
Erik Verbruggen [Fri, 23 May 2014 13:52:08 +0000 (15:52 +0200)]
V4 JIT: add IR printer that uses platform register names.

After running register allocation, the IR is printed one last time (when
the environment variable QV4_SHOW_IR is set). This will now use the
platform defined register names, e.g. "ebx" or "d2".

Change-Id: I2f2f4536d1de940a69690056e5165d38fa7910bb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix crash when deleting component in Component.onComplete through loader
Simon Hausmann [Fri, 20 Jun 2014 15:26:57 +0000 (17:26 +0200)]
Fix crash when deleting component in Component.onComplete through loader

This is a regression introduced with Qt 5.3.0. The recursion watcher code that
is supposed to handle the test case of QTBUG-39775 can detect the recursion
into the object creator. However the boolean that indicates the recursion is a
member of a structure that's deleted afterwards. To avoid access to deleted
memory, this patch simply reference counts data structure shared between the
creators and also wraps the recursion watcher into a convenience class that
also increases/decreases the reference count accordingly.

Change-Id: I8d2e3e200ab1295e89d951e09f187d382a056d5a
Task-number: QTBUG-39775
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoQQuickApplication: do not filter ApplicationActive/Inactive events
J-P Nurmi [Fri, 20 Jun 2014 09:22:26 +0000 (11:22 +0200)]
QQuickApplication: do not filter ApplicationActive/Inactive events

Listening to QGuiApplication::applicationStateChanged() is enough, no
need to do expensive event filtering for listening to application state
changes.

Change-Id: Iba71bc8cefec236f2f7e2e25c57c5c6b9c9fb1ea
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoFix memory leak in QQmlComponent::createObject
Simon Hausmann [Sat, 21 Jun 2014 08:56:00 +0000 (10:56 +0200)]
Fix memory leak in QQmlComponent::createObject

Regression introduced with 5.3.0. Prevent the leak of the object creator
on repeated createObject calls by using a scoped pointer.

Change-Id: Ib4fe7c9c6926c2390f7ae78f3287bb7da5f60527
Task-number: QTBUG-39742
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoUpdate QtQuick import value to 2.3
Samuel Gaist [Tue, 3 Jun 2014 20:44:25 +0000 (22:44 +0200)]
Update QtQuick import value to 2.3

The current documentation uses import QtQuick 2.2 which is wrong since
there are new APIs like mipmap for the QML Image element.

Task-number: QTBUG-39302
Change-Id: I3cc3a1522efd85090c3b4011429fa16b95e79435
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoMake sure program is bound before calling initialize().
Gunnar Sletta [Mon, 9 Jun 2014 09:41:03 +0000 (11:41 +0200)]
Make sure program is bound before calling initialize().

Some implementations will use the initialization to set
constant uniforms like texture locations, so bind the
program before so this will work.

Task-number: QTBUG-39472
Change-Id: I677c5aeefe68535bd4805e83b93308d0bd090030
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoSet locked state while locking for grab.
Gunnar Sletta [Thu, 5 Jun 2014 05:11:54 +0000 (07:11 +0200)]
Set locked state while locking for grab.

Change-Id: If4b8fa77e6e3a288487a011e83791ad6a189675c
Reviewed-by: Manish Sharma <83.manish@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoQQmlObjectCreator: Clear sharedState componentAttached in destruction/clear
Albert Astals Cid [Tue, 17 Jun 2014 11:10:35 +0000 (13:10 +0200)]
QQmlObjectCreator: Clear sharedState componentAttached in destruction/clear

Fixes crash when delegate is being deleted while not totally instantiated

Valgrind trace:
==15748== Invalid write of size 8
==15748==    at 0x57A02DB: QQmlComponentAttached::~QQmlComponentAttached() (qqmlcomponent.cpp:985)
==15748==    by 0x57A0318: QQmlComponentAttached::~QQmlComponentAttached() (qqmlcomponent.cpp:989)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D34655: QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D348A5: QQmlPrivate::QQmlElement<QQuickFocusScope>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D34655: QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x6689607: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1B012: QQuickItem::event(QEvent*) (qquickitem.cpp:7114)
==15748==    by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x665B826: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66B1242: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x40711B: startShell(int, char const**, void*) (main.cpp:171)
==15748==    by 0x407A74: main (main.cpp:227)
==15748==  Address 0x1be83870 is 64 bytes inside a block of size 112 free'd
==15748==    at 0x4C2C2BC: operator delete(void*) (vg_replace_malloc.c:503)
==15748==    by 0x5815FB0: QQmlObjectCreator::~QQmlObjectCreator() (qqmlobjectcreator.cpp:156)
==15748==    by 0x57A52AA: QQmlIncubatorPrivate::clear() (qscopedpointer.h:62)
==15748==    by 0x57A53C6: QQmlIncubator::clear() (qqmlincubator.cpp:577)
==15748==    by 0x5DCEA20: QQuickLoader::setActive(bool) (qquickloader.cpp:350)
==15748==    by 0x5DCF6D2: QQuickLoader::qt_metacall(QMetaObject::Call, int, void**) (moc_qquickloader_p.cpp:277)
==15748==    by 0x579DC66: QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1322)
==15748==    by 0x579E76E: QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1246)
==15748==    by 0x579F2F9: QQmlPropertyPrivate::writeBinding(QObject*, QQmlPropertyData const&, QQmlContextData*, QQmlJavaScriptExpression*, QV4::ValueRef, bool, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1578)
==15748==    by 0x580CF69: QQmlBinding::update(QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlbinding.cpp:266)
==15748==    by 0x580D5BD: QQmlBinding::expressionChanged(QQmlJavaScriptExpression*) (qqmlbinding_p.h:105)
==15748==    by 0x57E6156: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:81)
==15748==    by 0x57E6130: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:76)
==15748==    by 0x57E6130: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:76)
==15748==    by 0x5788FA3: QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) (qqmlengine.cpp:721)
==15748==    by 0x6688232: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x57882A7: QQmlData::destroyed(QObject*) (qqmlengine.cpp:1658)
==15748==    by 0x668FD7D: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x55E8B64: QQmlDMAbstractItemModelData::~QQmlDMAbstractItemModelData() (qqmladaptormodel.cpp:95)
==15748==    by 0x58643DC: QQmlDelegateModelPrivate::release(QObject*) (qqmldelegatemodel.cpp:520)
==15748==    by 0x586440C: QQmlDelegateModel::release(QObject*) (qqmldelegatemodel.cpp:536)
==15748==    by 0x5DFED4F: QQuickItemViewPrivate::releaseItem(FxViewItem*) (qquickitemview.cpp:2349)
==15748==    by 0x5DBAB94: QQuickGridViewPrivate::addVisibleItems(double, double, double, double, bool) (qquickgridview.cpp:497)
==15748==    by 0x5DFC94E: QQuickItemViewPrivate::refill(double, double) (qquickitemview.cpp:1751)
==15748==    by 0x5DFF26A: QQuickItemViewPrivate::layout() (qquickitemview.cpp:1859)
==15748==    by 0x5D275F7: QQuickWindowPrivate::polishItems() (qquickwindow.cpp:271)
==15748==    by 0x5D02B7D: QSGThreadedRenderLoop::polishAndSync(QSGThreadedRenderLoop::Window*) (qsgthreadedrenderloop.cpp:1150)
==15748==    by 0x5D03167: QSGThreadedRenderLoop::event(QEvent*) (qsgthreadedrenderloop.cpp:1235)
==15748==    by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66B00CC: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66B03F0: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x40711B: startShell(int, char const**, void*) (main.cpp:171)
==15748==    by 0x407A74: main (main.cpp:227)

Change-Id: I2c7d38fa5a2566520173bff7ad4e5f9c966d083e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoInitialize velocity
Albert Astals Cid [Mon, 16 Jun 2014 14:51:17 +0000 (16:51 +0200)]
Initialize velocity

Fixes valgrind warning
==21054== Conditional jump or move depends on uninitialised value(s)
==21054==    at 0x5DAE6D4: QQuickListView::viewportMoved(QFlags<Qt::Orientation>) (qquicklistview.cpp:2789)
==21054==    by 0x5D9ED76: QQuickFlickablePrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquickflickable.cpp:296)
==21054==    by 0x5DFC438: QQuickItemViewPrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquickitemview.cpp:1158)
==21054==    by 0x5DAC6A2: QQuickListViewPrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquicklistview.cpp:1369)
==21054==    by 0x5D0D5F2: QQuickItem::geometryChanged(QRectF const&, QRectF const&) (qquickitem.cpp:3365)
==21054==    by 0x5D11822: QQuickItem::setY(double) (qquickitem.cpp:5858)
==21054==    by 0x5C84FED: QQuickTimeLinePrivate::advance(int) (qquicktimeline.cpp:826)
==21054==    by 0x5C85155: QQuickTimeLine::updateCurrentTime(int) (qquicktimeline.cpp:702)
==21054==    by 0x58576FA: QAbstractAnimationJob::setCurrentTime(int) (qabstractanimationjob.cpp:497)
==21054==    by 0x5857BDD: QQmlAnimationTimer::updateAnimationsTime(long long) (qabstractanimationjob.cpp:119)
==21054==    by 0x640C7EC: QUnifiedTimer::updateAnimationTimers(long long) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x58570C8: QQmlAnimationTimer::startAnimations() (qabstractanimationjob.cpp:152)
==21054==    by 0x66895B5: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x665B826: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x66B1242: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==21054==    by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==21054==    by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==21054==    by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)

Change-Id: I72e101140b8bee0b6867cf92902e70660c8d21ab
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoImprove RSS News Qt Quick Demo
Topi Reinio [Thu, 12 Jun 2014 13:05:05 +0000 (15:05 +0200)]
Improve RSS News Qt Quick Demo

    - Add main.cpp for launching, use Qt resource system
    - Update feed URLs
    - New layout and images
    - Make the example scalable, react to orientation changes
    - Use graphical effects and animations
    - Display time and link for each news item
    - Fix license headers to use the correct license

Task-number: QTBUG-37203
Change-Id: I6f8941cbdaed78a3dee30305496b3ea7777ba3e3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
10 years agoFix QQmlComponent detailed description.
Mitch Curtis [Tue, 17 Jun 2014 11:35:21 +0000 (13:35 +0200)]
Fix QQmlComponent detailed description.

setParent() => setParentItem()

Task-number: QTBUG-39687
Change-Id: I67dc871a6d3b10af321d1f7b08921dcad0a6f19d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoAdd a QQuickWidget - QQuickView comparison example
Laszlo Agocs [Fri, 6 Jun 2014 14:53:33 +0000 (16:53 +0200)]
Add a QQuickWidget - QQuickView comparison example

Besides serving as a side-by-side test tool for QQuickView and
QQuickWidget (including multisampling), it also demonstrates some
useful practices for rendering 3D content via QQuickFramebufferObject.

Done-with: Paul Olav Tvete <paul.tvete@digia.com>
Change-Id: Ie73e998ee91e32ef1535dd6f0f65c8a69addcc5e
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoFix crash in QObjectWrapper
Oleg Shparber [Tue, 17 Jun 2014 22:47:43 +0000 (15:47 -0700)]
Fix crash in QObjectWrapper

This can happen during QObject destruction, when
QObjectPrivate::deleteChildren() itself sets entries
in the children list to zero when deleting. These
zeros cause crash in markChildQObjectsRecursively().

Task-number: QTBUG-38635
Change-Id: I29ad9e793b78ca4e8d73fbb125f46db1b8292f20
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoUse QSignalSpy instead of waitFor in tst_qpacketprotocol
Ulf Hermann [Mon, 16 Jun 2014 09:21:01 +0000 (11:21 +0200)]
Use QSignalSpy instead of waitFor in tst_qpacketprotocol

QTcpServer::waitForNewConnection() blocks the event loop and prevents
the client, that runs in the same event loop, from sending anything.
Also, if the connection is established before waitForNewConnection() is
called we're going to wait for another connection, which will never
happen.

It's not clear if this is actually the cause of the test failures but
blocking the event loop is generally a bad idea and the last change to
the test that actually made a difference to the functionality added
exactly that line, see b36bbe3626bc68ac267d7653fa6408a8f258251d.

Task-number: QTBUG-39655
Change-Id: Ic03a4e7cac78155532588476b99449664c343ee2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: add some documentation and literature references.
Erik Verbruggen [Thu, 22 May 2014 14:04:20 +0000 (16:04 +0200)]
V4 JIT: add some documentation and literature references.

Change-Id: I67667b74672b94b951361bf2a446476edf44b826
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4 JIT: add hint for phi-node operands.
Erik Verbruggen [Thu, 22 May 2014 14:09:43 +0000 (16:09 +0200)]
V4 JIT: add hint for phi-node operands.

Not only is it preferable for the target of a phi-node to be stored in
the same location as one of the sources, but the same yields for the
sources. For example, in a loop, it is preferable to store the result
of a value used in a phi-node in the loop header to be stored in the
same location as that phi-node's target. Doing that will eliminate extra
moves that are generated to resolve differences between edges.

Change-Id: I0cb5fbe8915d602ac9b9a2a7e8b95cf47b1efb68
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoTest the javascript heap profiler
Ulf Hermann [Tue, 3 Jun 2014 13:12:28 +0000 (15:12 +0200)]
Test the javascript heap profiler

Change-Id: I6ac08e520e263ae1cda9eeccd08dea997f6bdd2f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix compiler warning
Lars Knoll [Tue, 6 May 2014 11:30:31 +0000 (13:30 +0200)]
Fix compiler warning

Change-Id: I26df4f1b8417c6b075d81eaf118669a4103503e2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoUse the correct 'no-widgets' check
Gunnar Sletta [Wed, 18 Jun 2014 12:02:00 +0000 (14:02 +0200)]
Use the correct 'no-widgets' check

Change-Id: I754f785625a534886c6c40f1e850b90cf2418297
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoAdd changelog for 5.3.1 upstream/5.3.1
Simon Hausmann [Wed, 18 Jun 2014 08:27:05 +0000 (10:27 +0200)]
Add changelog for 5.3.1

Change-Id: I5d9c67a2f89c0c191de9e6de24d068fca17dba0e
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
10 years agoBump version
Oswald Buddenhagen [Tue, 17 Jun 2014 22:28:50 +0000 (00:28 +0200)]
Bump version

Change-Id: I48d18a93971f4595b295aa6a1f70dfbe2b2266a1

10 years agoV4 JIT: teach regalloc about callee-saved registers.
Erik Verbruggen [Thu, 22 May 2014 12:45:59 +0000 (14:45 +0200)]
V4 JIT: teach regalloc about callee-saved registers.

Callee-saved registers won't get clobbered by a call, so any value
stored in it will survive the call.

Change-Id: I2b61b84617b01bf7ce7e81cd0119a6da689ee9d5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev
Sergio Ahumada [Tue, 17 Jun 2014 06:51:08 +0000 (08:51 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev

10 years agoIntroduce Accessible.ignored
Frederik Gladhorn [Fri, 23 May 2014 11:53:11 +0000 (13:53 +0200)]
Introduce Accessible.ignored

Task-number: QTBUG-39163
Change-Id: Ic09573408c460c64503cf1c4d6fff3754e92a223
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
10 years agoSeparate renderer out in "OpenGL under QML" example.
Gunnar Sletta [Fri, 13 Jun 2014 11:59:57 +0000 (13:59 +0200)]
Separate renderer out in "OpenGL under QML" example.

The example was promoting very bad practice.

Change-Id: Ibb83780ec33e59ee5aabf65a775705dd0da681e6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoUse newest QtQuick in rssnews demo
Niels Weber [Fri, 13 Jun 2014 11:27:45 +0000 (13:27 +0200)]
Use newest QtQuick in rssnews demo

Task-number: QTBUG-37203
Change-Id: I720e510b875f63eb5c184cd7d8b9eb127674d505
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
10 years agoMerge remote-tracking branch 'origin/stable' into 5.3
Sergio Ahumada [Sat, 14 Jun 2014 16:19:53 +0000 (18:19 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: Id783915b0139a90ecfb99f8298b1ff5cf506a1dd

10 years agoFix copy-paste errors.
Richard J. Moore [Fri, 18 Apr 2014 10:53:05 +0000 (11:53 +0100)]
Fix copy-paste errors.

Fix two copy-paste errors identified by static analysis at
http://www.viva64.com/en/b/0251/

Change-Id: I359a4635a4a837995f9ed9bf0182a1ca543725df
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
10 years agoMerge remote-tracking branch 'origin/5.3' into dev
Simon Hausmann [Fri, 13 Jun 2014 21:10:03 +0000 (23:10 +0200)]
Merge remote-tracking branch 'origin/5.3' into dev

Conflicts:
src/quickwidgets/qquickwidget.cpp

Change-Id: Id4b080aea713df68608847bb82570231e37ce536

10 years agoMerge remote-tracking branch 'origin/stable' into 5.3
Simon Hausmann [Fri, 13 Jun 2014 14:45:46 +0000 (16:45 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: I9cff3f4d42d58157fd8d17ec172b6a74dc386508

10 years agoV4 JIT: use RegisterInfo in the register allocator.
Erik Verbruggen [Thu, 22 May 2014 12:31:03 +0000 (14:31 +0200)]
V4 JIT: use RegisterInfo in the register allocator.

Change-Id: Ia9faeb20b360f41d00f908132fd306e2d25c7574
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix Stmt:Data object leak
Liang Jian [Wed, 28 May 2014 07:46:51 +0000 (15:46 +0800)]
Fix Stmt:Data object leak

call Stmt::destroyData() whenever a Stmt object is to be removed in
BasicBlock to delete the Stmt::Data object hold in the Stmt object.

Change-Id: I59c939d79b935153e6f8613e54f149120f5198f5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
10 years agoSet StrongFocus on QQuickWidget
Laszlo Agocs [Thu, 12 Jun 2014 13:10:51 +0000 (15:10 +0200)]
Set StrongFocus on QQuickWidget

Make text input functional out of the box.

Both QGraphicsView and QDeclarativeView (QQuick1) do this so there
is no reason to do this differently for QQuickWidget. For QQuickWindow
and QQuickView the issue does not exist in the first place, they will
accept the focus by default.

Task-number: QTBUG-39605
Change-Id: I74f01b85342df51aa3c0e80baf58ba1619c63438
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 RegAlloc: simplify algorithm after introducing half open ranges.
Erik Verbruggen [Wed, 14 May 2014 15:17:59 +0000 (17:17 +0200)]
V4 RegAlloc: simplify algorithm after introducing half open ranges.

Now that all ranges are half open, and temporaries are defined at the
end of the (defining) statement, the linear scan algorithm get simpler.
Specifically, when allocating a register for a temporary, the check if
the temporary is defined or used is not needed anymore.

Another simplification is the handling of phi-nodes. Previously they
shared the same statement number as the first "real" statement in a
basic-block, and special checks were needed to handle them. Those are
now gone too.

Change-Id: Ia4266ea5ede8c2aff0e70c6579fba9575c6719fb
Sanity-Review: Qt Sanity Bot <qt_sanitybot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4 RegAlloc: change life-time intervals from closed to half-open.
Erik Verbruggen [Wed, 14 May 2014 12:44:27 +0000 (14:44 +0200)]
V4 RegAlloc: change life-time intervals from closed to half-open.

There are two changes in this patch, that go hand-in-hand. First, when
re-numbering the statements in order of occurrence in the scheduled
basic-blocks, the (new) position is not stored in the statement itself,
but in the LifeTimeIntervals class. This makes it possible to re-use
information gathered during SSA formation or optimization.

The re-numbering itself has also changed, resulting in some minor
changes to the life-time interval calculation. The new numbering
is described in LifeTimeIntervals::renumber(). The reason is to make it
easy for the register allocator and stack-slot allocator to distinguish
between definition of a temporary and its uses. Example:

  20: %3 = %2 + %1
  22: print(%3)

If the life-time of %2 or %1 ends at 20, then at the point that %3 gets
assigned, it can re-use the storage occupied by %1 or %2. Also, when
both %1 and %2 need to get a register assigned (because they were
spilled to the stack, for example), %3 should be allocated "after" both
%1 and %2. So, instead of having a closed interval of [20-22] for %3, we
want to use an open interval of (20-22]. To simulate the "open" part, the
life-time of %3 is set to [21-22]. So, all statements live on even
positions, and temporaries defined by a statement start at
statmentPosition + 1.

Change-Id: I0eda2c653b0edf1a529bd0762d338b0ea9a66aa0
Sanity-Review: Qt Sanity Bot <qt_sanitybot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoAdd support for translations in pure QJSEngine based environments
Simon Hausmann [Fri, 6 Jun 2014 10:42:23 +0000 (12:42 +0200)]
Add support for translations in pure QJSEngine based environments

Re-add the QScriptEngine::addTranslatorFunctions API that brings back
qsTr() and friends to pure QJSEngine based environments.

The auto-test were also ported where applicable.

Change-Id: Ib03e3495ef09eeea9e4c8341061499768caed307
Sanity-Review: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDoc: Clarify where JavaScript fits in QML code
Sze Howe Koh [Wed, 11 Jun 2014 23:24:17 +0000 (07:24 +0800)]
Doc: Clarify where JavaScript fits in QML code

- Rewrite the introductory list.

- Rewrite the section about application startup code.

- Flatten sections. Previously, there were two \section1 headings:
  "JavaScript Expressions in QML Objects" and "Running JavaScript at
  Startup". This split wasn't very natural, as startup code needs to be
  called from an object, while imported JS files aren't in objects.

- Some minor formatting/wording changes in unrelated areas.

Change-Id: Ie08f94e2ea77ca84f80491c782bc30612f7ef698
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoProperly initialize heap profiler when starting profiling
Ulf Hermann [Thu, 12 Jun 2014 12:33:05 +0000 (14:33 +0200)]
Properly initialize heap profiler when starting profiling

Change-Id: Ia994464b2150dc9a9185280ae0e2f8c615393310
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix EllipseShape for Affectors in QtQuick.Particle
Daniel Oberländer [Thu, 29 May 2014 19:37:54 +0000 (21:37 +0200)]
Fix EllipseShape for Affectors in QtQuick.Particle

EllipseShape was theated like rectangles if set as shape in an Affector
due to an unimplemented containment check (was marked as TODO in source
code). This fix implements the missing check.

Change-Id: I8df1406f147c56e799531fccf4963110c9fdd8ef
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoInitialize QSGPaintedNode with an empty size.
Gunnar Sletta [Thu, 12 Jun 2014 08:02:55 +0000 (10:02 +0200)]
Initialize QSGPaintedNode with an empty size.

Failing to do so would cause it to not update its size when set to 1x1
which in turn would cause it to never update its texture, causing crashes
later during rendering.

Task-number: QTBUG-39555
Change-Id: I099d9ef2d6968ece21f7c03819abfd6685bec430
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAdd node description to painted items.
Gunnar Sletta [Thu, 12 Jun 2014 08:07:59 +0000 (10:07 +0200)]
Add node description to painted items.

Change-Id: I47ad9df1550649131ac5379acbf7d133088c60a8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMake sure shader rewriter stops immediately on an empty string.
Gunnar Sletta [Mon, 9 Jun 2014 08:42:08 +0000 (10:42 +0200)]
Make sure shader rewriter stops immediately on an empty string.

The 'invalid' token didn't really serve a purpose. If a string contains
0 for any reason, it one has reached the end.

Task-number: QTBUG-39505
Change-Id: I3fc9b8f28dc223386a72bbfa28f70fcca0fde223
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoDoc: Fix qmlclass selector used in documentation config
Topi Reinio [Wed, 11 Jun 2014 15:04:35 +0000 (17:04 +0200)]
Doc: Fix qmlclass selector used in documentation config

A recent change (46959875) in qdoc raised QML types from
subnodes to top-level nodes. This change modifies the
documentation configuration file(s) accordingly.

Change-Id: Ic457d20368979aa15b546dceaf84fa2fb2d31091
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
10 years agoFix forwarding of keyboard events to multiple target items
Joni Poikelin [Mon, 9 Jun 2014 11:50:29 +0000 (14:50 +0300)]
Fix forwarding of keyboard events to multiple target items

Fix regression when multiple items are set to Keys.forwardTo attached
property. QML items accept key events automatically and event should be
by default in accepted state when entering handler.

Task-number: QTBUG-39168
Change-Id: Ibf6c163c4059269996113634efa48ad2fe4d838d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoFurther improve the StocQt demo
Topi Reinio [Tue, 27 May 2014 11:18:00 +0000 (13:18 +0200)]
Further improve the StocQt demo

- Display the price scale on y-axis, highest trade volume on x-axis
- Adjust grid size for the chart based on the active view
- Fix incorrect drawing of volume data
- Correctly scale the chart based on the price/volume ranges
- Align the volume graph to the price chart and improve its look
- Use Date.toDateString() instead of hardcoded month names
- Minor fixes to layout

Task-number: QTBUG-38254
Change-Id: I0e7ef18a152c7678371fb9c01f86d3d91a289472
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
10 years agoMerge remote-tracking branch 'origin/stable' into 5.3
Sergio Ahumada [Wed, 11 Jun 2014 08:03:38 +0000 (10:03 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: I595002245ffee7aa739ce6ee9806cf509a5e7405

10 years agoDrag&Drop support for child items in QQuickWidget
Paul Olav Tvete [Tue, 10 Jun 2014 09:09:21 +0000 (11:09 +0200)]
Drag&Drop support for child items in QQuickWidget

This is a quick-fix. The real issue is that QWidget and QWindow
reacts differently when a QDragEnterEvent is rejected.

Change-Id: I3e3e50610c14acfaada9c1b243b88cfe9eae54b2
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoAdd FreeBSD support to qv4targetplatform_p.h
Dmitry Shachnev [Thu, 5 Jun 2014 17:57:01 +0000 (21:57 +0400)]
Add FreeBSD support to qv4targetplatform_p.h

Currently, that code only works on Linux, Windows, Mac OS X
and QNX on x86 and x86_64 processors.

Change-Id: I07f2cb4cb9b8556d4bcd681c6a1f997dc3897901
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
10 years agoStop polish-and-sync timer when the window is destroyed
Laszlo Agocs [Fri, 6 Jun 2014 13:02:21 +0000 (15:02 +0200)]
Stop polish-and-sync timer when the window is destroyed

The threaded render loop continues to run the polish-and-sync timer for
ever in case the QQuickWindow is destroyed while the timer is active.
Instead of pumping the timer events on the render thread for ever, the
timer has to be killed somewhere.

Change-Id: I8e458624e26ebfacb6cc69a4f2fbb3da57ae5e0e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoadd missing signal declaration in Exposing Attributes to QML example
Shawn Rutledge [Tue, 13 May 2014 13:29:06 +0000 (15:29 +0200)]
add missing signal declaration in Exposing Attributes to QML example

Task-number: QTBUG-33985
Change-Id: Id6a2a51467ee5de44bf51fb48e3f9346a832f8f2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoJavascript heap profiler
Ulf Hermann [Mon, 2 Jun 2014 16:33:19 +0000 (18:33 +0200)]
Javascript heap profiler

This profiler tracks every memory allocation and deallocation, by the
MemoryManager as well as the V4 VM, and exposes them as a stream of
events to the profiler service.

Change-Id: I85297d498f0a7eb55df5d7829c4b7307de980519
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 IR: Store positions for life-time intervals outside the statement.
Erik Verbruggen [Tue, 13 May 2014 14:32:35 +0000 (16:32 +0200)]
V4 IR: Store positions for life-time intervals outside the statement.

The statement ids are now stable, so the life-time interval calculation
can re-use information calculated by the optimizer. This re-use will
be done in a separate patch.

It also allows for changes to the numbering in a non-intrusive way. This
will also come in a later patch.

Change-Id: Ie3a2e1d9e3537cc8070ff3e3007f3a5e8ca0579a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 IR: add def statements to the worklist when removing uses.
Erik Verbruggen [Tue, 13 May 2014 11:05:25 +0000 (13:05 +0200)]
V4 IR: add def statements to the worklist when removing uses.

When removing a phi node, add the def statement for the (previously)
used temps to the worklist. These statements might now be eligible for
further optimizations (specifically removal when there are no uses
left).

Change-Id: I05d7c7bc0a243d328b5f9d1c2dcc53a10bd7491d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd support for multisampling in QQuickWidget
Laszlo Agocs [Wed, 4 Jun 2014 13:05:00 +0000 (15:05 +0200)]
Add support for multisampling in QQuickWidget

Use a multisampled fbo when the requested format has samples > 0.
Resolving happens after each rendering of the scene.

The blit to the temporary non-multisampled fbo could be avoided,
in theory, by sending the fbo instead of the texture id down the
stack and performing a blit directly to fbo #0. This however
involves a number of potential issues, for example due to the
non-sharability of FBOs between contexts. Hence it is left as a
future exercise.

Task-number: QTBUG-39187
Change-Id: Iae98b969bcbc3bb57e6d73288496f5428913c826
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 IR: replace hashes by vectors.
Erik Verbruggen [Mon, 12 May 2014 14:33:49 +0000 (16:33 +0200)]
V4 IR: replace hashes by vectors.

Speeds up the register allocation by another 20%.

Change-Id: I8c638d09e1b96f400e3e101a000bc73b02d79165
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRemove copy and accidental detach.
Erik Verbruggen [Mon, 12 May 2014 14:31:14 +0000 (16:31 +0200)]
Remove copy and accidental detach.

Change-Id: Iedd751424ff0b651ba9e00a30f50e197ecd7967d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoKeep QML and JS messages separate in QQmlProfilerService test
Ulf Hermann [Wed, 4 Jun 2014 08:48:47 +0000 (10:48 +0200)]
Keep QML and JS messages separate in QQmlProfilerService test

Like that we can deal with misbehaving clocks in the tested
application.

Task-number: QTBUG-39169
Change-Id: Ia9f9844efb6f20508bccac3ca2d593d01d55fc83
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoProperly support all events in trace files and clean up a bit.
Ulf Hermann [Wed, 19 Feb 2014 17:11:41 +0000 (18:11 +0100)]
Properly support all events in trace files and clean up a bit.

In particular, use both message and range type to identify events so
that we can get rid of the messy type aliasing.

Task-number: QTBUG-36953
Change-Id: I691a7501aa285f78f7ce5b7017ef50628f44fcf7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 Yarr JIT: push/pop addressTempRegister.
Erik Verbruggen [Thu, 5 Jun 2014 12:13:39 +0000 (14:13 +0200)]
V4 Yarr JIT: push/pop addressTempRegister.

Change 6572d4e50d73ac60a8974d07de74c27a7f99ebef moved the
addressTempRegister from r3 to r10, so that calculated calls would not
overwrite the fourth argument of a call. However, JSC's Yarr JIT might
also use it for certain loads, so it also needs to save r10.

Task-number: QTBUG-39289
Change-Id: I0a4e725b6b11ab5e772330662049668bed009c05
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 RegAlloc: store, pass, and use life-time intervals by pointer.
Erik Verbruggen [Mon, 12 May 2014 11:33:48 +0000 (13:33 +0200)]
V4 RegAlloc: store, pass, and use life-time intervals by pointer.

By storing LifeTimeIntervals by pointer (instead of by value), other
data-structures can safely use pointers too. This removes a lot of
copies, especially in vectors that act as worklists.

Also change the order of the "unhandled" list of intervals to be sorted
in descending order. Not only is this more efficient, but it also
removes the need to reverse the results of the life-range calculation
(which produces the list in exactly this order).

This change speeds up register allocation by about 20%.

Change-Id: I6ea3dcd110f250d9ccc881753dc7392510a26d87
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix opacity issue in the renderer.
Gunnar Sletta [Wed, 4 Jun 2014 16:59:58 +0000 (18:59 +0200)]
Fix opacity issue in the renderer.

Given the following tree:

OpacityNode
    |
TransformNode (which is a batch root)
    |
GeometryNode

If both opacity and transform nodes were changed this frame, we would
hit the optimized "scrolling" path while traversing the tree and abort
updating that subtree. As a result the opacity change was not
propegated to the geometry node and it would be rendered incorrectly.

Fix this by skipping the optimized path when there are opacity changes
in an ancestor.

Task-number: QTBUG-39190
Change-Id: Ieaebfe3de62b961204bd3103fe9913d60e75e412
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix QQuickWidget offscreen surface format and creation order
Laszlo Agocs [Thu, 5 Jun 2014 13:16:33 +0000 (15:16 +0200)]
Fix QQuickWidget offscreen surface format and creation order

Create the QOffscreenSurface together with, and after, the QOpenGLContext.
This is essential to get a surface that is compatible with the context and
is in line with the QOffscreenSurface usage recommendation from the docs.

Otherwise, if the offscreen surface gets created first, without
knowing what _actual_ format (e.g. EGL configuration) the context
will use, the result is an incompatible surface and context on
systems that offer a different set of configurations for window and
pbuffer surfaces.

This fixes QQuickWidget on EGL implementations that offer both 16 and 24
bit pbuffer configs, but only 24 (or 32) bit window configs.

Task-number: QTBUG-39474
Change-Id: I43925d2b25e28d26d172ce9d22651c25b281b832
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoOptimize the way AnimatedImage display its content
Louis du Verdier [Thu, 5 Jun 2014 06:44:16 +0000 (08:44 +0200)]
Optimize the way AnimatedImage display its content

Since QtQuick2, the AnimatedImage component is less efficient than it
was with QtQuick1, using more CPU and RAM.

This commit makes it upload when required each animation frame as a
cached texture (using QQuickPixmapCache) to speed up the component.

Task-number: QTBUG-38921
Change-Id: I7ab0b5f47ecec6cb3cdded0dd219d6acc1bc4148
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoDoc: Removed redundant link to section in the same page.
Jerome Pasion [Tue, 3 Jun 2014 13:52:49 +0000 (15:52 +0200)]
Doc: Removed redundant link to section in the same page.

There is no need to refer to a different section as it is understood
that those instructions apply to all examples.

Change-Id: I2d0d2d6cbf84790bc4ca2f3deda57ab5d3d1c6c1
Reviewed-by: Martin Smith <martin.smith@digia.com>
10 years agoDoc: Updated "Qt Quick Examples" pages.
Jerome Pasion [Wed, 28 May 2014 14:19:08 +0000 (16:19 +0200)]
Doc: Updated "Qt Quick Examples" pages.

-added instructions about running the example (using \include)
-used the example names as sections in the collection pages
-general editing and documentation polishing
-updated copyright information

Change-Id: I044f29fcc1921a541040505d5821acb06dc4cb35
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoCleanup: Get rid of the url and file name members in QQmlCompiledData
Simon Hausmann [Wed, 4 Jun 2014 15:32:31 +0000 (17:32 +0200)]
Cleanup: Get rid of the url and file name members in QQmlCompiledData

This is part of the effor of moving members from QQmlCompiledData into
QV4::CompilationUnit in order to eliminate the former in the long run.

Change-Id: Icce7fe0ee9a49cb3a7677fd7020008fc55ecdcf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDetect and warn when using QQuickWidget as a native child
Laszlo Agocs [Wed, 4 Jun 2014 10:42:11 +0000 (12:42 +0200)]
Detect and warn when using QQuickWidget as a native child

This is not supported.

Change-Id: I19ed485ee629baa4f3631770ab0c730e0ef6748e
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoProcess children first when delivering drag events
Aleix Pol [Thu, 24 Apr 2014 18:22:10 +0000 (20:22 +0200)]
Process children first when delivering drag events

[ChangeLog][QtQuick][Important Behavior Changes] Drag and Drop events
now propagate to child items before their parents.

Change-Id: I22832d707c7cb2461eaa94d659c5cc83506def8d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoUse the correct precision specifier in visualizer GLSL.
Gunnar Sletta [Tue, 3 Jun 2014 11:01:49 +0000 (13:01 +0200)]
Use the correct precision specifier in visualizer GLSL.

Task-number: QTBUG-39119
Change-Id: I0ec4909167f5694ce4229df8202c89742be21d0a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
10 years agoFix bindings to when property of States not always working
Simon Hausmann [Wed, 4 Jun 2014 11:49:50 +0000 (13:49 +0200)]
Fix bindings to when property of States not always working

The "when" property is of type QQmlBinding* and we special case that type when
writing property bindings. However in order for that to work, the meta-type for
QQmlBinding* needs to be registered at the point in time when resolving
properties in the type compiler. In Qt 5.1/5.2 this worked by accident due to
a different code paths that implicitly registered the meta-type earlier from a
different location.

There are a couple of property types for which we have special handling, such as
QQmlV4Handler and QJSvalue, besides QQmlBinding*. We do register them explicitly
at engine initialization time, and therefore we should also initialize the meta-type
for QQmlBinding* there.

Task-number: QTBUG-39421
Change-Id: Iec8609848b632afa52aa42cf0b807330c74f6f3a
Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
10 years agoFix method overload calling of Qt slots from JavaScript
kh1 [Wed, 4 Jun 2014 11:17:30 +0000 (13:17 +0200)]
Fix method overload calling of Qt slots from JavaScript

After commit ac57f185d1a2203cd4b585df7bd7af01c3ec33ed we succeed in selecting
the correct overload based on the supplied arguments. However when calling
slots on objects without a property cache, we end up using the local "dummy"
variable to store the synthetic propert data. We also store the currently best
patch in the "best" variable, which is a _pointer_ to the property data of the
match. Suppose we have 5 overloads to choose from, we find that the 3rd is
the best. Then we try the fourth but find it unsufficient and break out of
the loop. Unfortunately the "dummy" property data at this point contains the
data of the fourth (wrong) overload, and our best match variable points to it.
So then when we finally call the method, we do it based on the wrong property
data.

The easy patch is to simply copy the few bytes of property data, so "best" is
stored by value instead of pointer.

Change-Id: Ie2ebbdb88a117770b6c7b9490e1c634077020e9d
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Simon Hausmann [Tue, 3 Jun 2014 13:28:51 +0000 (15:28 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

The merge conflict is about the removal of "d1" from the register
set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e

The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b
was reverted to what it was before, per Laszlo's advice.

Conflicts:
src/qml/jit/qv4isel_masm.cpp

Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b