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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Sergio Ahumada [Thu, 13 Mar 2014 18:33:48 +0000 (19:33 +0100)]
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ic7e33502f9983cf67393afe11e2b194e0f922d18
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
J-P Nurmi [Tue, 4 Mar 2014 14:40:14 +0000 (15:40 +0100)]
Fix GridView flow enum docs
Task-number: QTBUG-37232
Change-Id: Ib975181e6cff9a86f642d822dfc92773528598cb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Gunnar Sletta [Mon, 3 Mar 2014 20:02:30 +0000 (21:02 +0100)]
Reset the expose cycle when polishAndSync aborts.
On platforms with misbehaving expose behavior, we will get
and exposure, even though the window is not renderable.
This results in the renderthread being in the "wait for polish"
state while the GUI thread goes back to "no state". Check
for this and reset render thread's expose cycle when it
is hit.
Task-number: QTBUG-37201
Change-Id: I6a6c89d9016301ff19443f88a2c182012b4eb65f
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Ulf Hermann [Tue, 4 Mar 2014 15:34:48 +0000 (16:34 +0100)]
Add some leading white space to generated code for QML signals.
Like this the column numbers in the generated code are correct. We rely
on the column numbers in quite a few places.
The alternative solution of extending the Javascript parser to add an
initial column offset would result in much more code and complexity.
const-casting the column number and adding to it after compiling would
be an option but as the column number may be saved in other places, too,
this is not desirable.
Task-number: QTBUG-37226
Change-Id: I0d11816d96ff4e7c756064646755a3e9874f9790
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Wed, 5 Mar 2014 09:49:22 +0000 (10:49 +0100)]
[new compiler] Fix designer integration
If the QML puppet disables onComplete callbacks, we must obey that also
in the new code path.
Change-Id: Ic9b74c6a5ee04dc5b8e4f545a8e6cc0fa8dd28f1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 5 Mar 2014 09:25:02 +0000 (10:25 +0100)]
Make tst_qqmlincubator::chainedAsynchronousIfNested more robust
Don't rely on the exact number of instructions executed in the VME to
determine the loading state of the incubator. With the simpler object
creator that's not based on instructions we might end up creating objects
in less steps, so make the test work with both.
Change-Id: If8a3628cac97251036c9b2cd8f26e75eca1d39ed
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 5 Mar 2014 09:21:52 +0000 (10:21 +0100)]
[new compiler] Fix auto component creation with composite types
A binding like this
property Component foo: SomeComposite {}
should not do an implicit component insertion if SomeComposite is actually
a component. The property assignment is compatible and can proceed normally.
Fixes tst_qquickcanvasitem, but added a separate unit test for this case.
Change-Id: I7221eebd38dba3f2a82b59341739b9b67211e352
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 4 Mar 2014 19:48:11 +0000 (20:48 +0100)]
[new compiler] Add support for deferred properties
Change-Id: I592518444ef353cfcf153df0e6afa2fbac613560
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 4 Mar 2014 15:15:26 +0000 (16:15 +0100)]
[new compiler] Fix invalid memory reads when JS closures outlive QML types
If QQmlCompiledData gets destroyed while somebody still has refcount on the
QV4::CompiledData::CompilationUnit, then unit's _data_ would be freed already
by ~QQmlCompiledData. Given that compilationUnit->data is pointing to the same
malloc'ed address as QQmlCompiledData::qmlUnit, we can just let the
CompilationUnit always own the data.
Fixes tst_qquickloader and makes it possible to run the qquickcomponent tests.
Change-Id: Ie3f3e5335139236d7c2524a327665bda0a9cc847
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Andrew Knight [Wed, 5 Mar 2014 08:23:08 +0000 (10:23 +0200)]
Fix qquickfolderlistmodel test compilation on WinRT
Like WinCE, the changeDrive() test should be disabled on WinRT.
Change-Id: I85749b84fef372e166fe52c263225478094ccdb4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Erik Verbruggen [Tue, 4 Mar 2014 11:29:03 +0000 (12:29 +0100)]
Fix MSVC2012 compiler warnings.
Tested on both win32 and win64.
Change-Id: I47755e2da51829e61e1452eaaf84a057224b478b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Friedemann Kleint [Wed, 5 Mar 2014 09:44:52 +0000 (10:44 +0100)]
Add some error handling to the QWindowContainer 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: Id9cf190e8a4f40de0f18ab081e2747135221bb88
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Gunnar Sletta [Tue, 4 Mar 2014 14:30:29 +0000 (15:30 +0100)]
Don't sort batches when there are no changes.
On node removal we change the batch, but don't set rebuild
as everything else should be drawn as is. A sort after such a removal
could result on the order of batches being changed without the other
nodes being updated. This would then result in incorrect ordering
and nodes could be obscured.
Task-number: QTBUG-37222
Change-Id: I57dd2fbc945e8c10c949743f59315b3372a4b6f4
Reviewed-by: Michael Brasser <michael.brasser@live.com>