platform/upstream/qtdeclarative.git
10 years agoCompress touch events in QQuickWindow.
Gunnar Sletta [Thu, 3 Apr 2014 11:16:42 +0000 (11:16 +0000)]
Compress touch events in QQuickWindow.

Instead of sending multiple touch updates per frame, we
store the last one and flush the pending events just before
we enter into the scene graph sync phase.

[ChangeLog][QtQuick] QQuickWindow will compresses touch events
and delivers at most one touch event per frame.

Done-with: Robin Burchell <robin.burchell@jollamobile.com>
Change-Id: Ia0169bc4a3f0da67709b91ca65c326934b55d372
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agodoc: class QQuickCloseEvent added to module QtQuick
Martin Smith [Wed, 23 Apr 2014 11:12:29 +0000 (13:12 +0200)]
doc: class QQuickCloseEvent added to module QtQuick

The wrong qdoc command had been used to add it to the
QML module QtQuick.Window. This caused a link to the
QML module to be not found by qdoc. The correct command
and C++ module name are now used.

Task-number: QTBUG-38529
Change-Id: I810f179d8f70dc8fb4d359ac3d4b192ef63ca429
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
10 years agoOpt-in that QSGSimpleTextureNode can own the texture.
Gunnar Sletta [Thu, 1 May 2014 14:04:14 +0000 (16:04 +0200)]
Opt-in that QSGSimpleTextureNode can own the texture.

Having to subclass just to delete the texture is a bit
tedious.

Change-Id: I26c7e0b5c053ba70e004949ead748e50756d9b39
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoSay hello to QQuickItem::grabToImage().
Gunnar Sletta [Mon, 28 Apr 2014 11:30:04 +0000 (13:30 +0200)]
Say hello to QQuickItem::grabToImage().

[ChangeLog][QtQuick][Item] Added functions QQuickItem::grabToImage()
and Item::grabToImage() to allow grabbing of items into
system-memory images.

Change-Id: I76cd73bb62f7440569c6fce63d63528559845721
Reviewed-by: Michael Brasser <michael.brasser@live.com>
10 years agoMake sure we rebuild batches properly after a Blending material change.
Gunnar Sletta [Fri, 25 Apr 2014 14:21:00 +0000 (16:21 +0200)]
Make sure we rebuild batches properly after a Blending material change.

If a node sent DirtyGeometry and DirtyMaterial in the same round and
DirtyGeometry triggered its batch to be invalidated, we would take the
no-batch code path which did set the rebuild state to BuildBatches. This
looks ok on screen, but if the node changed from alpha to opaque, it
would not be put into an opaque batch. For things like full screen
rectangles, this can potentially hurt performance.

To prevent doing a full rebuild on any material change on batchless
items (aka all Rectangle nodes), we store the blend state of the material
in the element and do a full rebuild only when blend state changes.

Change-Id: Ifdf06fb72ef02ca47a135c821ddbcbe0d164ca29
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoUpdate tst_qquickapplication to support OS X ApplicationState handling
Samuel Gaist [Thu, 1 May 2014 07:21:05 +0000 (09:21 +0200)]
Update tst_qquickapplication to support OS X ApplicationState handling

This patch modifies tst_qquickapplication so that it tests correctly
against OS X's new ApplicationState handling

Task-number: QTBUG-10899
Change-Id: Iea20b0137daabe03fdddf98435dc2626e122741f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoSupport shutting down the render thread without an OpenGL context.
Gunnar Sletta [Fri, 11 Apr 2014 14:21:54 +0000 (16:21 +0200)]
Support shutting down the render thread without an OpenGL context.

[ChangeLog][QtQuick][SceneGraph] There might not be an OpenGL context
bound when QQuickWindow::sceneGraphInvalidated() is emitted if an
error occurs while cleaning up the scene graph (such as
EGL_CONTEXT_LOST). This is according to the documentation, but has
never occurred in practice before.

Change-Id: I13dbfbb4b6d0d27fa42fcb8b54df16ea02284807
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
10 years agoMake profiling of pixmap cache events more consistent
Ulf Hermann [Thu, 27 Mar 2014 13:12:40 +0000 (14:12 +0100)]
Make profiling of pixmap cache events more consistent

Previously canceled replies weren't reported, the cache count was
reported before it was updated, and the request or implicit sizes
were reported instead of the size actually stored in memory.

Task-number: QTBUG-37890
Change-Id: I9d9d9f6b9bfa75c7d56b778fc8174bda4e842d72
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoQt Quick: use categorized logging for touch, mouse, focus, and dirty
Shawn Rutledge [Thu, 10 Apr 2014 13:29:49 +0000 (15:29 +0200)]
Qt Quick: use categorized logging for touch, mouse, focus, and dirty

There was no need to log debug info as warnings; and QTouchEvent has
had a streaming operator for some time, which shows more useful info.
Categorized logging makes all of this debug info available without
rebuilding Qt first and without adding new env variables.

Change-Id: If2f5bab3f9d90c8b72b295c075e7184662d3ead3
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoQML: fix clang warnings about unused return values
Shawn Rutledge [Tue, 15 Apr 2014 08:44:35 +0000 (10:44 +0200)]
QML: fix clang warnings about unused return values

For example calling toRect() and throwing it away caused this warning
error: ignoring return value of function declared with
warn_unused_result attribute [-Werror,-Wunused-result]

Change-Id: I849088d052d21402a5f50cfe9d1305c3e1d91244
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoQQuickPinchArea: Don't jump around when a finger is lifted.
Robin Burchell [Tue, 1 Apr 2014 13:16:04 +0000 (15:16 +0200)]
QQuickPinchArea: Don't jump around when a finger is lifted.

Change-Id: I580348c2323896e3229f068745ce9c89334a5abc
Done-with: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoPrevent crash when mixing shaders from different windows
Gunnar Sletta [Tue, 1 Apr 2014 07:39:28 +0000 (09:39 +0200)]
Prevent crash when mixing shaders from different windows

Change-Id: Iad9383ff02cb3130d725a215582400e7806df1dc
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoQQuickWindow: Don't store animation driver pointer unnecessarily.
Robin Burchell [Fri, 28 Mar 2014 17:13:20 +0000 (18:13 +0100)]
QQuickWindow: Don't store animation driver pointer unnecessarily.

We don't do anything with it outside the constructor.

Change-Id: Id31e9672f9901180e34bae86c8523bfc70d4922c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix failing autotest due to wrong Qt datastream version
Kai Koehne [Fri, 28 Mar 2014 11:26:04 +0000 (12:26 +0100)]
Fix failing autotest due to wrong Qt datastream version

Actually use the exact version that we decided by the connection handshake.

Change-Id: Ib3cbecd57366a3bb52cc48242027968c12213e80
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoSkip nodes with no vertices when preparing batches.
Gunnar Sletta [Wed, 26 Mar 2014 09:05:21 +0000 (09:05 +0000)]
Skip nodes with no vertices when preparing batches.

Nodes with no veritces end up overlapping with everything so they
tend to lead to poor batching. In my specific case, the empty
nodes came from the QQuickTextNode, but it is a valid usecase
so better to handle it gracefully in the renderer.

Change-Id: Ic09c202a2675f806f2124cd436027afcd2654452
Reviewed-by: Michael Brasser <michael.brasser@live.com>
10 years agoAccessibility: Use factory function instead of plugin
Frederik Gladhorn [Sat, 15 Feb 2014 13:41:45 +0000 (14:41 +0100)]
Accessibility: Use factory function instead of plugin

[ChangeLog][QtQuick] Accessibility for Qt Quick is now included in the
qtquick library instead of being a separate plugin.

Change-Id: I26a7ed14b8a387662cea8f89218485be50033e34
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
10 years agoBuild/install the qmleasing tool to bindir
J-P Nurmi [Tue, 11 Mar 2014 17:04:29 +0000 (18:04 +0100)]
Build/install the qmleasing tool to bindir

Change-Id: Icc65ecf8ec7e2ef19d4181788706a23b186ead14
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
10 years agodoc: Minor group/module page changes.
Martin Smith [Mon, 24 Feb 2014 13:01:06 +0000 (14:01 +0100)]
doc: Minor group/module page changes.

These changes were made in conjunction with the
large update to qdoc to teach it to use multiple
trees.

Task-number: QTBUG-35377
Change-Id: If16bfdf9186483c0b313c999c61fa4dc5cf49048
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoDocument the window property for qml and register the revision
Laszlo Agocs [Fri, 21 Mar 2014 12:37:57 +0000 (13:37 +0100)]
Document the window property for qml and register the revision

Change-Id: I52d54d022ccd6f727abdb1c109b7fd2336425eea
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoTry to simplify the threaded render loop.
Gunnar Sletta [Mon, 17 Mar 2014 12:45:59 +0000 (13:45 +0100)]
Try to simplify the threaded render loop.

This beast has grown and grown for some time so it was time
to take step back and look at a few of the problems again.

1. show/hide vs exposed/obscured. There is really no reason why we
should even bother with show. It only adds the window to a list,
we can do that in handleExposure and simplify things a bit.

2. Expose, polish, repaint, sync stuff was growing increasingly
complex with multiple waits and several events and states
interacting. So I merged the expose into the sync and passed that
information along to the render thread. The render thread now knows if
the sync is for a normal state-sync or an expose. For a normal sync it
will wake GUI right away. For an expose, it waits until after the
renderpass has completed and the frame is swapped.

Change-Id: I0b9e5135215662a43fb4ff2a51438e33c845c4a7
Reviewed-by: Michael Brasser <michael.brasser@live.com>
10 years agoTestHTTPServer: Make listening an explicit operation that reports failure.
Robin Burchell [Thu, 20 Mar 2014 22:21:49 +0000 (23:21 +0100)]
TestHTTPServer: Make listening an explicit operation that reports failure.

Use this to print the error message when listening fails, and switch to always
stack allocating TestHTTPServer instances for easier cleanup.

Change-Id: I63b2bd38963b66611dc08a5c322615d91a91e675
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
10 years agoExpose QQuickItem::window as a property
Laszlo Agocs [Thu, 20 Mar 2014 14:38:34 +0000 (15:38 +0100)]
Expose QQuickItem::window as a property

Everything is already in place, except that for some reason there is
no property. Add it because this is the most efficient and robust
way for Quick Controls to figure out which window a given item belongs to.

Change-Id: I41b513e99d924f3e56346f8480df50a77c16e8bf
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAdd defaultSurfaceFormat to QQuickWindow
Laszlo Agocs [Wed, 19 Mar 2014 14:43:49 +0000 (15:43 +0100)]
Add defaultSurfaceFormat to QQuickWindow

This static function can be used to set a surface format that is
then picked up by all QQuickWindows, including the ones instantiated
from QML.

This introduces the ability to request higher OpenGL versions, core
profile and other options also for windows that are created from QML
via the ApplicationWindow element in Quick Controls applications.

[ChangeLog] Added QQuickWindow::setDefaultSurfaceFormat() to
set a surface format that applies to all Quick windows,
including the ones created from QML. The OpenGL shading language
version is now exposed to QML too in order to allow components
to provide the correct shader source so shader effect items.

Task-number: QTBUG-36392
Change-Id: I75a4718243d835894461f7ee0b4a383988840f9b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix obvious logic error
Niels Ole Salscheider [Fri, 28 Feb 2014 20:05:02 +0000 (21:05 +0100)]
Fix obvious logic error

Change-Id: I377036a4ae773f53cdc833efbcd69202c1f479e9
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Sergio Ahumada [Thu, 13 Mar 2014 18:33:48 +0000 (19:33 +0100)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ic7e33502f9983cf67393afe11e2b194e0f922d18

10 years agoFix rendering issue with material changes from opaque <-> alpha
Gunnar Sletta [Wed, 12 Mar 2014 20:24:26 +0000 (21:24 +0100)]
Fix rendering issue with material changes from opaque <-> alpha

When I introduced the invalidation of z ranges, I forgot that we need
to rebuild render lists when nodes move from opaque to alpha batches
or vice versa as that sorting happens in buildRenderLists(). To remedy
this, make Batch::isMaterialCompatible report blending changes
separately and trigger a full rebuild in this case.

Task-number: QTBUG-37422
Change-Id: I020813cb531ed58353f8340fcad58dec8d7856dd
Reviewed-by: Michael Brasser <michael.brasser@live.com>
10 years agoAllow maximum block size to be specified as an environment variable.
Michael Brasser [Thu, 20 Feb 2014 16:43:09 +0000 (10:43 -0600)]
Allow maximum block size to be specified as an environment variable.

A smaller maximum block size helps limit RAM usage on constrained
systems, at the cost of more frequent garbage collection.

Change-Id: Iba07d9cc628e3178dfaad35664c631844540bc9d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDon't crash if a ScriptAction changes state mid-transition.
Michael Brasser [Wed, 12 Mar 2014 15:44:28 +0000 (10:44 -0500)]
Don't crash if a ScriptAction changes state mid-transition.

Change-Id: Ia85cb128c7410e2276bf4da02f946d3d0bf44989
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix QQmlTypeData object leak
Liang Jian [Thu, 13 Mar 2014 12:30:04 +0000 (20:30 +0800)]
Fix QQmlTypeData object leak

1) unref QQmlTypeData object stored in m_compositeSingletons
2) unref QQmlTypeData object in resolveQmlType()

Change-Id: I5f2e3a542637f62509c4a2f2ed8a6ba080eacf1b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix QQmlBoundSignalExpression::Data object leak
Liang Jian [Thu, 13 Mar 2014 11:35:34 +0000 (19:35 +0800)]
Fix QQmlBoundSignalExpression::Data object leak

Delete QQmlBoundSignalExpression::Data object in
QQmlBoundSignalExpression's destructor

Change-Id: I92dfb534f1ea937ee9a85b60b824417fbac21f3b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix QV4::IR::Function object leak
Liang Jian [Thu, 13 Mar 2014 07:48:35 +0000 (15:48 +0800)]
Fix QV4::IR::Function object leak

Delete the QV4::IR::Function object before removing it

Change-Id: Ie85de6f18034b2def5645c07df1ccc84ac3060ec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoEnsure TextEdit's text is vertically aligned after resizing its height.
Mitch Curtis [Tue, 11 Mar 2014 10:02:43 +0000 (11:02 +0100)]
Ensure TextEdit's text is vertically aligned after resizing its height.

The current code only updates the alignment if the width of the
TextEdit changed, but we must also check if the height has changed.

Task-number: QTBUG-36069

[ChangeLog][QtQuick][TextEdit] Fixed TextEdit not vertically aligning
its text after having its height changed.

Change-Id: I0b2d6a7384457ca1018fc9899c82699e8ecfcbd4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoFix property caches out of sync with grouped properties that have a VME meta object
Simon Hausmann [Wed, 12 Mar 2014 12:00:46 +0000 (13:00 +0100)]
Fix property caches out of sync with grouped properties that have a VME meta object

Because QQmlObjectCreator::populateInstance would take the property cache to
install from the outside and also pass it as the cache to use for the VME meta
object to install, it could happen that the wrong cache was installed - the one
supplied by engine->cache(propType) instead of the cache created together with
the VME meta-object at type compilation time.

This patch ensures that they're always in sync and correct by removing the
responsibility of the caller to supply the cache to use and install. Instead
the function will always use the cache calculated at type compile time (and
also use that when installing the VME meta object).

Installation of the property cache on the declarative data of the instance is
now done only at createInstance() time, which fortunately also simplifies the
code.

Change-Id: Ia722cd57bc48007aaf725f1f59daa2f21569e324
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoAdd some error handling to the QQuickWidget example.
Friedemann Kleint [Wed, 5 Mar 2014 12:21:31 +0000 (13:21 +0100)]
Add some error handling to the QQuickWidget example.

Use a QMainWindow and display errors occurring during loading
QML as well as scene graph errors (for example, failure
to create an Open GL context) in the status bar.

Change-Id: Icd9ad2bd2b809baf80d83a54e295c25b7fb1f94b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoConsolidate context creation failure handling in Quick.
Friedemann Kleint [Mon, 10 Mar 2014 09:53:49 +0000 (10:53 +0100)]
Consolidate context creation failure handling in Quick.

Add QQuickWidget::sceneGraphError() equivalent to
QQuickWindow::sceneGraphError(), move message formatting code
to QQuickWindowPrivate.

Change-Id: I18cd4d7e0f6ee1011c29375218dc6a044b0d2cf2
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoQQuickWindow: let clearFocusObject actually clear the focus object
Richard Moe Gustavsen [Wed, 12 Mar 2014 12:34:19 +0000 (13:34 +0100)]
QQuickWindow: let clearFocusObject actually clear the focus object

On iOS we clear the focus object when the virtual keyboard is
hidden (to stop blinking cursors etc). The current implementation
in QQuickWindow would then tell the root item to clear
focus. This was wrong, since setFocus is expected to be called
on the item you either want to gain, or release, focus (not the root
item). This sometimes caused items to end up in an incorrect
focus state.

With this patch we ensure that we call setFocus on the focus object.

Change-Id: I0c08fbc35f6695064b7c911466fdc62f4027385e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
10 years agoStatic plugins: support loading static plugins from several engines
Richard Moe Gustavsen [Tue, 11 Mar 2014 11:51:15 +0000 (12:51 +0100)]
Static plugins: support loading static plugins from several engines

When loading dynamic plugins, we register them as loaded so that
we don't try to register their types several times if using several
engines. The same was not done for static plugins. This patch
will ensure that we follow the same logic also for static
plugins.

Task-number: QTBUG-36532
Change-Id: Icc1e089ae5d682c38b2d36bf4808f1c753c122a4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoItem views: avoid fixing up the position while moving/flicking
J-P Nurmi [Thu, 2 Jan 2014 20:35:50 +0000 (21:35 +0100)]
Item views: avoid fixing up the position while moving/flicking

Task-number: QTBUG-35920
Change-Id: Id6a68400eed69d880dd1c218ec4a1beda8a8fbb9
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoDoc: Re-organized Qt Quick's examples page.
Jerome Pasion [Mon, 24 Feb 2014 16:06:43 +0000 (17:06 +0100)]
Doc: Re-organized Qt Quick's examples page.

-Organized into "Demo", "Tutorials", and "Examples".
-Added Controls, Dialogs, and other Qt Quick examples.
-Added links to Qt Creator tutorials related to Qt Quick.

Task-number: QTBUG-36838
Change-Id: I9ca000a73465217a2c42ebac9288e6462afa4cf5
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoDon't crash when a signal/slot connection outlives the engine
Simon Hausmann [Wed, 12 Mar 2014 08:31:38 +0000 (09:31 +0100)]
Don't crash when a signal/slot connection outlives the engine

In the test case in the bug, the signal was emitted from the QApplication
destructor (somewhere from the qpa plugin when the platform windows were
destroyed)

Task-number: QTBUG-37351
Change-Id: Ieec59e12be10bab1428743b80eecdf22ef9d8bf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agonetworkaccessmanagerfactory example: Fixed build with QT_NO_NETWORKPROXY
Oliver Wolff [Mon, 10 Mar 2014 12:03:01 +0000 (13:03 +0100)]
networkaccessmanagerfactory example: Fixed build with QT_NO_NETWORKPROXY

Change-Id: I803dd555961420b8189f36e1978a3fb65ab4d2a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
10 years agonetworkaccessmanagerfactory example: introduced QCommandLineParser
Oliver Wolff [Mon, 10 Mar 2014 12:40:36 +0000 (13:40 +0100)]
networkaccessmanagerfactory example: introduced QCommandLineParser

Change-Id: I6385ee0c33a0a8cb411dbbdf5f6ea10f5ebde1a5
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoQQuickWindow cleanup: Remove forceRendering flag
Paul Olav Tvete [Mon, 10 Mar 2014 14:26:13 +0000 (15:26 +0100)]
QQuickWindow cleanup: Remove forceRendering flag

forceRendering was introduced for QQuickWidget, but QQuickWidget
now has full control of when the rendering functions are called. It
makes more sense to not call the QQuickRenderControl functions, than to
set a flag on QQuickWidget that decides whether those functions have any
effect.

Change-Id: I69819b13000120c04cecd1a467c08e8df9330df8
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoMakes PasswordMaskDelay configurable through TextInput
Risto Avila [Tue, 11 Mar 2014 10:04:52 +0000 (12:04 +0200)]
Makes PasswordMaskDelay configurable through TextInput

Adds a new property to TextInput which can be used to override QPlatformTheme::PasswordMaskDelay.
The new property is TextInput.passwordMaskDelay and takes in delay (ms) which time character
is shown before masking it. This is only when echoMode is set to TextInput.Password

[ChangeLog][QtQuick][TextInput] Added passwordMaskDelay property

Change-Id: I52812b883db11fdd21b25154887c51df8a44f69c
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoqmldebugger: avoid loading tcp module in inspector
Fawzi Mohamed [Mon, 10 Mar 2014 18:29:06 +0000 (19:29 +0100)]
qmldebugger: avoid loading tcp module in inspector

loading the module twice starts two threads, and creates issues
when unloading.

Change-Id: I861df6a6b6a8942557d31d455b35e7987478a527
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
10 years agoAvoid crash when unlinking compilation unit
Simon Hausmann [Tue, 11 Mar 2014 13:22:34 +0000 (14:22 +0100)]
Avoid crash when unlinking compilation unit

Don't free static data

Change-Id: I315b98841e1a44492d54ac2732743706c286e527
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoRemove redundant QQmlBinding members.
Michael Brasser [Tue, 4 Mar 2014 03:53:52 +0000 (21:53 -0600)]
Remove redundant QQmlBinding members.

This reduces the size of QQmlBinding by 12 bytes.

Task-number: QTBUG-37134
Change-Id: Id55257edec8cee88d863374e8a96d7eebbeaf523
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
10 years agoDoc: Fix issues in QQuickWidget documentation
Topi Reinio [Tue, 11 Mar 2014 14:13:10 +0000 (15:13 +0100)]
Doc: Fix issues in QQuickWidget documentation

Fix qdoc warnings, do some editing and cross-link between
QQuickWidget and QQuickView class references.

Task-number: QTBUG-37272
Change-Id: I48d3a01e7c6315be329e24a5c5f7635697629316
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoqmldebugger: handle static builds correctly
Fawzi Mohamed [Mon, 24 Feb 2014 15:37:44 +0000 (16:37 +0100)]
qmldebugger: handle static builds correctly

The loading of the qml debugger was hardcoded to dynamically load its
plugins.
Now directly build and instantiate the QQmlDebugServerConnection in
static builds.

Done-with: Kai Koehne <kai.koehne@digia.com>
Change-Id: I38bf0e310caaa6aaa743e3814b0108c6fe7001df
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoAdd support for resolving translation bindings at compile time
Simon Hausmann [Thu, 6 Mar 2014 15:19:42 +0000 (16:19 +0100)]
Add support for resolving translation bindings at compile time

Simple calls to qsTr and qsTrId are detected at type compile time and
reduced to a special Translation and TranslationById binding type, which
avoids allocating a QML binding at type instantiation type just to perform
a translation.

Change-Id: I61e4f2db2a8092b5e6870e174b832d9c20cd62b5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix incorrectly initialized property cache on group objects
Simon Hausmann [Tue, 11 Mar 2014 12:12:38 +0000 (13:12 +0100)]
Fix incorrectly initialized property cache on group objects

When initializing bindings on group objects, we would accidentally set the
property cache for the property type instead of preserving a possibly earlier
initialized cache on the ddata of the QObject.

Task-number: QTBUG-37390

Change-Id: I4d6a4ce6b3382f378f9a9ddfe11924860a15979d
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix linking
Simon Hausmann [Tue, 11 Mar 2014 09:23:44 +0000 (10:23 +0100)]
Fix linking

Add some missing exports

Change-Id: I0c250231e902b6efeda257951ee5653ea363e288
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDoc: Adding QQuickWidget's path to the qtquick.qdocconf
Jerome Pasion [Tue, 11 Mar 2014 13:18:19 +0000 (14:18 +0100)]
Doc: Adding QQuickWidget's path to the qtquick.qdocconf

-allows QDoc to detect and generate documentation.

Task-number: QTBUG-37272
Change-Id: I83aedead99c7fccb03fe4a7fa34be45fc94ae010
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoAllow detaching V4 debuggers in agent destructor
Ulf Hermann [Mon, 10 Mar 2014 16:38:33 +0000 (17:38 +0100)]
Allow detaching V4 debuggers in agent destructor

We don't know in which order the QML engines and the debug service are
deleted on shutdown.

Change-Id: I9d23b3c88eee125a93c5b0f8ea85466013233737
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDoc: Qt QML: Document signals (not handlers) under \qmlsignal
Sze Howe Koh [Sun, 9 Mar 2014 05:02:01 +0000 (13:02 +0800)]
Doc: Qt QML: Document signals (not handlers) under \qmlsignal

Task-number: QTBUG-35846

Change-Id: I989617865a79bfbf1f1ffd3b105598025dde54c5
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoDon't delete the QML engines from the profiler service destructor
Ulf Hermann [Mon, 10 Mar 2014 16:05:13 +0000 (17:05 +0100)]
Don't delete the QML engines from the profiler service destructor

Task-number: QTBUG-37382
Change-Id: Ib40d69813794e18cc7c7f05e10881b1b23a93b4e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoCleanup our runtime methods
Lars Knoll [Mon, 10 Mar 2014 18:58:05 +0000 (19:58 +0100)]
Cleanup our runtime methods

Move all our runtime methods into the QV4::Runtime
struct and give them nicer names without underscores.
Sort them logically and remove a few unused methods.

Change-Id: Ib69b71764ff194d0ba211aac581f9a99734d8180
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix copying of Property's
Lars Knoll [Mon, 10 Mar 2014 14:18:54 +0000 (15:18 +0100)]
Fix copying of Property's

Data properties don't contain valid data in the set field
if they are being stored in Objects. Thus we should never
access that field unless we are dealing with accessor
properties.

Change-Id: I19dcbaee7ebd042ae24387f92a93571d75ca578a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix compile error
Lars Knoll [Mon, 10 Mar 2014 11:49:40 +0000 (12:49 +0100)]
Fix compile error

Change-Id: Iba3860ef8ea940b8f232e21e273b0ac83d895882
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoStack size increase for x86 QNX systems
James McDonnell [Mon, 10 Mar 2014 16:00:58 +0000 (12:00 -0400)]
Stack size increase for x86 QNX systems

Increase the size of the stack for the scene graph thread on x86
QNX systems.  The default stack size (132K) is too small for the
MESA graphics driver shared libraries on these systems.

Task-number: QTBUG-37338
Change-Id: I8b50aece98ef3f530f2202fc89a0e90b0b2e2e72
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoMultiPointTouchArea: make nested.qml autotest easier to debug
Shawn Rutledge [Fri, 7 Mar 2014 14:44:37 +0000 (15:44 +0100)]
MultiPointTouchArea: make nested.qml autotest easier to debug

Visual feedback

Change-Id: I8f670d5f4729149e5ee02c2e9a36b5570ac3c5a7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
10 years agoFix TextEdit::lineCount to update as appropriate
J-P Nurmi [Thu, 6 Mar 2014 12:37:41 +0000 (13:37 +0100)]
Fix TextEdit::lineCount to update as appropriate

The total line count needs to be updated when geometry,
document size or wrapping mode changes.

Task-number: QTBUG-37263
Change-Id: If58a2f77022475e8bcb7cca0f2a091ee837b39a5
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
10 years agoRemove several uses of module includes
Andrew Knight [Sun, 9 Mar 2014 21:27:34 +0000 (23:27 +0200)]
Remove several uses of module includes

Module includes are discouraged because they may increase compilation
time. While debugging a broken core module include header, a number
of module include infractions were discovered in qtdeclarative. Replace
them with their more specific counterparts.

Change-Id: I614e9a6aa2177f396e5289f3cdb3c35faa0202c9
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoMultiPointTouchArea: handles mouse too, unless mouseEnabled is false
Shawn Rutledge [Wed, 8 May 2013 13:21:59 +0000 (15:21 +0200)]
MultiPointTouchArea: handles mouse too, unless mouseEnabled is false

A new boolean property mouseEnabled is introduced (true by default).
If set to true, then it will handle any non-synthetic mouse event
as if it were a touch point.
If set to false, the area becomes transparent for real mouse events
so that a MultiPointTouchArea can be stacked on top of a MouseArea
in order to separate handling of touch and mouse.
In either case it continues to absorb and ignore synthesized mouse
events (including touch-to-mouse synthesis in QQuickWindow).

[ChangeLog][QtQuick][MultiPointTouchArea]handles mouse as a touchpoint;
added mouseEnabled property to permit transparent pass-through to
mouse-sensitive items

Change-Id: I4af94d838f0060154494589c0f15c6858ee89ddb
Task-number: QTBUG-31047
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
10 years agoQQuickWidget: handle resize to empty size
Paul Olav Tvete [Fri, 7 Mar 2014 15:46:51 +0000 (16:46 +0100)]
QQuickWidget: handle resize to empty size

Resizing to an empty size needs to be handled as if the widget was
hidden. Restoring to a non-empty size is like a show, except that we
are rendering synchronously.

Task-number: QTBUG-37046
Change-Id: I572e4763c4a28bfe7347868e109acca5b357db50
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFixed qqmlapplicationengine autotest build for QT_NO_PROCESS
Oliver Wolff [Fri, 7 Mar 2014 14:58:55 +0000 (15:58 +0100)]
Fixed qqmlapplicationengine autotest build for QT_NO_PROCESS

Change-Id: Ie5993fac36a29a7d7edcadf5030dc2b5bf95b506
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
10 years agoV4 SSA: remove unused code.
Erik Verbruggen [Fri, 7 Mar 2014 13:08:40 +0000 (14:08 +0100)]
V4 SSA: remove unused code.

Change-Id: I56b3e5400e7b9880b9534117ac17a80436ff1733
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4: fix address printing for real.
Erik Verbruggen [Fri, 7 Mar 2014 13:33:56 +0000 (14:33 +0100)]
V4: fix address printing for real.

The previous patch contained the wrong formatting string for 64bit
platforms. Good compilers will warn on this (and fail compiling with
-Werror). Fixed the issue in such a way that we now have static checking
for both 32bit/64bit platforms by the compiler.

Change-Id: Idf4a80d8795605c61ef812426c9984df1ceac4d4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4 JIT: enable JIT on win64.
Erik Verbruggen [Thu, 6 Mar 2014 11:40:21 +0000 (12:40 +0100)]
V4 JIT: enable JIT on win64.

Change-Id: I640d507c33fd4c4df6d6284b473df5cea9e5c4b4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoUse an array of Value's for Object::memberData
Lars Knoll [Thu, 6 Mar 2014 11:06:36 +0000 (12:06 +0100)]
Use an array of Value's for Object::memberData

This cuts the memory required to store properties
in an object in half for the common case. Accessor
properties require two slots inside memberData,
but data properties only one.

Change-Id: I0bab1b88ca9ed5930abf065c77c89985b9ed5320
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoReserve a double slot for accessor properties
Lars Knoll [Thu, 6 Mar 2014 09:13:26 +0000 (10:13 +0100)]
Reserve a double slot for accessor properties

Reserve two slots in the internal class for accessor
properties. This opens up reducing the default storage
required per data property to one Value. In practice
this implies cutting the required memory in half.

Change-Id: Ifed897852bbdfd810018f0d6b049fca6690ead2c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoUse fuzzy comparison for another Flickable StopAtBounds case.
Michael Brasser [Fri, 7 Mar 2014 02:43:23 +0000 (20:43 -0600)]
Use fuzzy comparison for another Flickable StopAtBounds case.

Be consistent with 268f4615dcf19aad3603833af83ba28eca886aa5, and use
fuzzyLessThanOrEqualTo when checking whether we are at or past the bounds
when dragging. This prevents a condition where:

1. A Flickable with StopAtBounds is at one of the bounds.
2. A quick flick will sometimes (rarely) cause the Flickable to flick
   past the bounds.

Change-Id: I4165fa133f556fb9d47cc691d11b2ecb77746b33
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
10 years agoQQuickWidget: handle windowChange
Paul Olav Tvete [Thu, 6 Mar 2014 12:57:39 +0000 (13:57 +0100)]
QQuickWidget: handle windowChange

When the toplevel window changes, QQuickWidget needs to recreate
the context so it is compatible with the new window.

Change-Id: Ic7c3410061a33f223e20e3d1f93437917abcff18
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMove some methods from ExecutionContext to CallContext
Lars Knoll [Wed, 5 Mar 2014 15:24:56 +0000 (16:24 +0100)]
Move some methods from ExecutionContext to CallContext

This is where they really belong. Slightly simplifies
and cleans up the code.

Change-Id: Ib5782c1f57c761c46f4bc52c3d496220299f8ac9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoBetter way of retrieving the prototype property for FunctionObjects
Lars Knoll [Wed, 5 Mar 2014 07:40:11 +0000 (08:40 +0100)]
Better way of retrieving the prototype property for FunctionObjects

Make sure FunctionObjects always have the prototype property at
index 0. This way we can speed up the instanceOf operator even more,
and at the same time save 16-28 bytes of memory per FunctionObject.

Change-Id: I8527bc8f9dc7b04a9db8395b5f05bab47ddc21ce
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRemove the name member of FunctionObject
Lars Knoll [Tue, 4 Mar 2014 12:19:27 +0000 (13:19 +0100)]
Remove the name member of FunctionObject

The data is anyway stored in the name property of
the FunctionObject, and is not performance critical.

Change-Id: If1784b0ec6f368bc474c246bb9c2c50d5e56b689
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoReduce memory consumption of FunctionObject
Lars Knoll [Mon, 3 Mar 2014 20:00:30 +0000 (21:00 +0100)]
Reduce memory consumption of FunctionObject

Remove varCount and formalParameterCount members
in FunctionObject and retrieve them from the
CompiledFunction instead.

Change-Id: I8a6cdc6d354b0f33da9d67a4c3dbfe8a7cc96176
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRemove unused entries in CompiledData
Lars Knoll [Mon, 3 Mar 2014 19:51:25 +0000 (20:51 +0100)]
Remove unused entries in CompiledData

Change-Id: Ie5313371fa5dec6630a1d955d4409ea4d6163810
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix test failure in qqmldebugjs autotest
Lars Knoll [Thu, 6 Mar 2014 08:09:05 +0000 (09:09 +0100)]
Fix test failure in qqmldebugjs autotest

The debugger should only have one breakpoint that can
be set per line. Nevertheless, we should have proper
line number information available in case we stop at
other places.

We also need a debug instruction before the return
statement, so that step out will always find a last
stopping point in the parent frame.

Change-Id: I86145fc244148f106a4a97ce69ab60b568c8dac6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFixes to breakpoint handling
Lars Knoll [Tue, 4 Mar 2014 09:35:11 +0000 (10:35 +0100)]
Fixes to breakpoint handling

Make sure stepping works correctly, and we always
break at a valid breakpoint.

Change-Id: I6a3032b3ae204484b8a92b2031904a7f681c7f80
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd a Line instruction to the interpreter
Lars Knoll [Mon, 3 Mar 2014 13:41:31 +0000 (14:41 +0100)]
Add a Line instruction to the interpreter

This unifies the way we handle line numbers in the
JIT and Interpreter.

Remove the now unused lineNumberMapping code and data.

Change-Id: I1d60b1fbb77e70b531fa73d93410683e84dd1e3c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoSimplify our breakpoint handling
Lars Knoll [Mon, 3 Mar 2014 13:20:54 +0000 (14:20 +0100)]
Simplify our breakpoint handling

Only store a Hash of break points in the debugger,
instead of the involved logic that currently adds and
removes break points. Add the current line number to
the Debug statements in the interpreter, and pass them
on to the debugger for checking whether we should really
break.

This adds a slight additional overhead to running inside the
debugger, but greatly simplifies the logic and doesn't require
modifying the bytecode anymore. This in turn opens up the
possibility to run the debugger on JIT generated code later on.

Change-Id: If2a3ae8f8d08b69a3a704cbbe0a84000f917a32e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRemove old compiler and VME
Simon Hausmann [Thu, 6 Mar 2014 15:55:09 +0000 (16:55 +0100)]
Remove old compiler and VME

This removes the bulk of the code. A few smaller cleanups remain, to be
done in smaller changes as they move code around.

Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData,
which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not
do anything and the class is gone now :)

Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoQQuickWidget: make sure to use the proper GL format
Paul Olav Tvete [Thu, 6 Mar 2014 13:25:08 +0000 (14:25 +0100)]
QQuickWidget: make sure to use the proper GL format

We cannot be sure that the toplevel widget has the correct GL format,
and we do not want to force depth and stencil buffers on surfaces that
do not need them. Therefore, we have to create an offscreen surface for
the FBO.

Change-Id: I7dfc3a6f84bf79125f3ab811a204972e95e245a3
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoAdd the features of QLoggingCategory to QML's debugging methods.
Giorgos Tsiapaliokas [Wed, 23 Oct 2013 13:47:30 +0000 (16:47 +0300)]
Add the features of QLoggingCategory to QML's debugging methods.

It is now possible to modify the output of QML's debugging methods. Also the
prefix of "qml" makes it possible to capture the output from the QML
files using qInstallMessageHandler.
This commit depends on qtbase/4967c7106568d5df0be4d40bf793583c7c6bdb69

Change-Id: I2c7a2cb96a0b91fd3249dc2dacbab63e6ac68243
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoV4 JIT: fix stack space reserving code
Erik Verbruggen [Thu, 6 Mar 2014 11:39:45 +0000 (12:39 +0100)]
V4 JIT: fix stack space reserving code

sub32 will truncate the register's content, which is a bit problematic
when the stack is located outside the first 4G (e.g. on win64).

Change-Id: I8c2c55c0e08f4e5b67295ba6a8a26d7d55d4477f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4: fix address printing on 64bit platforms
Erik Verbruggen [Thu, 6 Mar 2014 11:37:06 +0000 (12:37 +0100)]
V4: fix address printing on 64bit platforms

The addresses were truncated to 32bits, which is a problem on win64,
because JITted code ended up outside that range.

Change-Id: I0d8b92486714340dffe4b4c2de29cf11a929a149
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix MSVC2012 compiler warnings in disabled code.
Erik Verbruggen [Wed, 5 Mar 2014 17:03:31 +0000 (18:03 +0100)]
Fix MSVC2012 compiler warnings in disabled code.

... that should soon get enabled.

Change-Id: I2f8393cab5e99a7f5d3c7df6af6385fefd2d4dd1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4 JIT: fix up register usage for linux/macos on x86_64.
Erik Verbruggen [Wed, 5 Mar 2014 16:47:59 +0000 (17:47 +0100)]
V4 JIT: fix up register usage for linux/macos on x86_64.

Change-Id: Ia6f3a78410fd41c58904a60f4c7a0630cf5230d0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix more MSVC2012 compiler warnings.
Erik Verbruggen [Wed, 5 Mar 2014 14:34:08 +0000 (15:34 +0100)]
Fix more MSVC2012 compiler warnings.

All are conversions from size_t to int or to unsigned.

Change-Id: Ic94c938dcad6d50a32dd6ec62da2341869cf994d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoQML testlib: Do not modify the arguments passed into QGuiApplication.
Friedemann Kleint [Thu, 6 Mar 2014 15:54:32 +0000 (16:54 +0100)]
QML testlib: Do not modify the arguments passed into QGuiApplication.

argc/argv passed  into QGuiApplication must match those
of main on Windows due to the special command line parsing.

Task-number: QTBUG-36466
Change-Id: Id722692d2bdc18a6627fdaeffb349b78137ae314
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoMouseArea: make clear containsMouse requires the cursor to be inside
Shawn Rutledge [Tue, 4 Mar 2014 11:52:10 +0000 (12:52 +0100)]
MouseArea: make clear containsMouse requires the cursor to be inside

Task-number: QTBUG-37133
Change-Id: I5d0943963bf423c3f930365502e42b54a71d9e88
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix a couple of typos in the documentation
Laszlo Papp [Wed, 5 Mar 2014 06:42:45 +0000 (06:42 +0000)]
Fix a couple of typos in the documentation

Change-Id: Ie06af2e33e5adf6d56391929bd763b01e57557b0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoQSGBatchRenderer: return when a shader is not returned by the manager
Andrew Knight [Thu, 6 Mar 2014 12:59:42 +0000 (14:59 +0200)]
QSGBatchRenderer: return when a shader is not returned by the manager

If a shader can't be found from the manager (e.g., if it failed to link),
return from rendering. This prevents the renderer from crashing on a
null pointer.

Task-number: QTBUG-37290
Change-Id: I44d0bbb721854c0bc6da681ff55f71140a5cb0bc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoSwitch the code path from the old compiler and VME to the new code path
Simon Hausmann [Wed, 5 Mar 2014 09:27:14 +0000 (10:27 +0100)]
Switch the code path from the old compiler and VME to the new code path

Change-Id: Ib1b38ec07830f8df9fa4caacd00879434608053b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix crash in tst_qquickpathview
Simon Hausmann [Thu, 6 Mar 2014 12:44:40 +0000 (13:44 +0100)]
[new compiler] Fix crash in tst_qquickpathview

QQuickPathView's attached object uses a dynamic meta-object. So when installing
bindings - such as a signal handler - on it and we want to determine the
property cache for it, we must not use the QQmlEnginePrivate::cache overload
that takes a QObject pointer, as that will - rightly so - return a null
pointer. Instead in this case it is okay to go with the static type overload,
by using the meta-object of the attached type known at compile time.  This is
consistent with the VME code path.

Change-Id: Iffc64f7ee4677c6cc60d071b80f4032cf8037ab7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix potential infinite recursion when using the incubator
Simon Hausmann [Thu, 6 Mar 2014 12:25:02 +0000 (13:25 +0100)]
[new compiler] Fix potential infinite recursion when using the incubator

Some auto-tests use the incubation controller with a one-step boolean,
so shouldInterrupt() always returns true. When we're in the finalization phase
enabling the bindings one-by-one, pop one off the bindings stack and enable it
_before_ doing the shouldInterrupt() check. Otherwise we don't progress at all.

Change-Id: Ibd5bbc253f8e8f74b08c91b018533c9e2735d2c8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix incorrect accelerated lookups to id objects
Simon Hausmann [Thu, 6 Mar 2014 09:18:08 +0000 (10:18 +0100)]
[new compiler] Fix incorrect accelerated lookups to id objects

When compiling JS code in the scope of a component, make sure to always
set the id object mapping, even if it is empty. Otherwise the id objects
from one scope might leak into another, leading to id object dependencies
that are invalid.

Change-Id: Ib2bca11203acd6924e8c74f9560a1ee3e00d7e39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDoc: Fix "Right-to-left User Interfaces"
Takumi Asaki [Tue, 4 Mar 2014 06:59:34 +0000 (15:59 +0900)]
Doc: Fix "Right-to-left User Interfaces"

* Change from QApplication to QGuiApplication
* Change from qmlviewer to qmlscene

Change-Id: I6ceee763c125c4896905884f55437e3f375408d7
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoStabilize tst_QQuickPathView:dataModel()
J-P Nurmi [Wed, 5 Mar 2014 19:25:14 +0000 (20:25 +0100)]
Stabilize tst_QQuickPathView:dataModel()

- QQuickPathView::setCurrentIndex() result must be immediate
  => no need for random QTest::qWait(100) there.
- Remove another random QTest::qWait(100) after inserting
  a model item. Instead, wait for the desired result ie.
  delegate creation with QTRY_VERIFY().
- Furthermore, disable the default highlight move duration to
  avoid the auto test and QQuickPathView's internal timeline
  fighting over the current index.

Task-number: QTBUG-35705
Change-Id: Ie53fdcc8f7955a03027da38b075e6042a3aea7f2
Reviewed-by: Alan Alpert <aalpert@blackberry.com>