Andrew Knight [Mon, 17 Mar 2014 22:08:49 +0000 (00:08 +0200)]
Use QUrl::toLocalFile() when decoding a string URL
Some percent-decoded characters may still be present in the string URL,
so it is best to use QUrl::toLocalFile() to process the string properly.
This also makes some drive handling "magic" obselete as QUrl already
handles this.
This fixes an issue whereby QML apps residing in local paths requiring
percent-encoded characters (or which import local file URLs with
percent-encoded characters) would fail to load, as the path was passed
to the file system engine without fully decoding the URL.
Change-Id: I8ec2b06f0661e0ac7cc9df79d35ec5cee211f672
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Mon, 17 Mar 2014 16:11:20 +0000 (17:11 +0100)]
Namespace cleanup
Move the QML IR types into the QmlIR namespace and clean them up.
Change-Id: I2125449e5a519034e23670651efa620f405730b4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Mon, 17 Mar 2014 14:54:44 +0000 (15:54 +0100)]
Stabilize tst_qquickwindow and tst_scenegraph.
Change-Id: I6f1b6c0ed86869149658e3ce07545217ce9797a7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 17 Mar 2014 13:42:05 +0000 (14:42 +0100)]
Fix crash with lazy binding initialization and compile time calculated dependencies
During lazy binding initialization we may execute bindings where we calculated
dependencies to the context object at compile time. In order to register those
dependencies, the contet object needs to be set in the QQmlContextData.
This patch makes sure to set it before setting up the bindings.
Change-Id: Iacd360140cd9c389487bda82f6a7e6cc3a44c154
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Fri, 14 Mar 2014 14:15:26 +0000 (15:15 +0100)]
Fix potential crash during shutdown for QQuickWindows
The cleanup() function would deregister the render loop from all
windows the render loop had seen, but the render loop doesn't see
windows until the window gets a showEvent and for some implementations
it was removed as a result of hideEvent. So add explicit tracking to
QSGRenderLoop which is managed by QQuickWindow's constructor and
destructor. With this, we no longer need the lists from the
subclasses, so these functions are removed again.
Change-Id: I05e5507ad57e23c80bacd99752654cc7d0890dc1
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Michael Brasser [Tue, 21 Jan 2014 15:19:50 +0000 (09:19 -0600)]
Fix AnimatedSprite interpolation when looping and/or reversing.
Ensure we interpolate in the correct direction, and that interpolation
occurs between loops.
Task-number: QTBUG-36339
Task-number: QTBUG-36340
Change-Id: Iccb097e6a9af9fa6697e2ba9ee852be9eb516edc
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Kurt Pattyn [Sun, 26 Jan 2014 12:38:33 +0000 (13:38 +0100)]
Suppress implicit sign conversion warnings in public API
Suppres implicit sign conversion warnings when compiling with the
-wsign-conversion flag.
E.g. “qqml.h:235:5: warning: implicit conversion changes signedness:
'const int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]”
Change-Id: I7a51c51609c39f2431acb95febed6bb741f3c09c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Friedemann Kleint [Mon, 17 Mar 2014 10:10:00 +0000 (11:10 +0100)]
Fix context creation failure message.
Add missing newline, fix placeholders in translator's comment.
Change-Id: If80d237a97096a319a67da4c75c5e32c47576aee
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Friedemann Kleint [Mon, 17 Mar 2014 08:38:07 +0000 (09:38 +0100)]
qv4isel_moth.cpp: Fix MSVC-warnings about operator unary minus applied to unsigned.
compiler\qv4isel_moth.cpp(1041) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
compiler\qv4isel_moth.cpp(1056) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
compiler\qv4isel_moth.cpp(1096) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
Change-Id: Idb4714a277486ff736f49c50c7e840fd62e2150f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
David Greaves [Fri, 27 Dec 2013 22:37:25 +0000 (22:37 +0000)]
Add docs on using a query in XMLRole with the less obvious boolean()
Added to a documentation snippet since a direct boolean map is useful
in QML for toggles and using "@wanted/boolean()" as the @type example
does, would be wrong.
Change-Id: If412ec0f4891db39fe1a219f9cb89e1f7103fd38
Signed-off-by: David Greaves <david@dgreaves.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Giulio Camuffo [Sun, 16 Mar 2014 09:32:30 +0000 (11:32 +0200)]
Unset the current gl window when deleted
This does in the QSGGuiThreadRenderLoop what
403045a did for the
QSGThreadedRenderLoop. Fix a memory corruption in Mesa's dri2 EGL
when setting a window current after deleting the previous current
one.
Change-Id: I8df0bacdf12f71e969a9ea39842a402c9a2a303f
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
J-P Nurmi [Fri, 14 Mar 2014 12:04:42 +0000 (13:04 +0100)]
Canvas: do not emit paint when resized but hidden
It turns out to be a bad idea (as in, breaks the enterprise controls)
to block paint() altogether when hidden. The original bug report
QTBUG-31830 only complained about paint() being emitted upon resize
while _hidden_, so this change solves exactly that. User is still
free to call requestPaint() even when hidden, and Canvas now doesn't
recklessly ignore the request.
Task-number: QTBUG-31830
Change-Id: Icd82188f65406b3ef6ae3b19b5984944576886ff
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Simon Hausmann [Fri, 14 Mar 2014 15:00:36 +0000 (16:00 +0100)]
Fix crash when calling concat on an empty array
Make sure to create the array data. The earlier called copyArrayData()
doesn't have to do that.
Task-number: QTBUG-37506
Change-Id: I6671769fcd471234c4c2eaa1614aa61266db0e5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sat, 15 Mar 2014 09:03:02 +0000 (10:03 +0100)]
Fix crash on shutdown with states
When populating deferred properties, we must not set the rootObjectInCreation
flags on the root context and (consequently) on any sub-objects objects created
when initializing deferred properties. Doing so otherwise will end up us
incorrectly linking QQmlContextData together, causing QQmlData::linkedContext
to point to iself and crash on exit upon deletion.
Task-number: QTBUG-37484
Change-Id: Ia5dc92a04e0f66499f15fbac10f14859d387b021
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Michael Brasser [Sat, 15 Mar 2014 04:27:06 +0000 (23:27 -0500)]
Use stable sort when cleaning batches.
Ensure valid batches do not change order. This was causing rendering
issues when m_rebuild was 0, as we would not re-sort the list in correct
render order after cleanup.
Change-Id: I912fb313d4029f96e263fad24d68462f252003df
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Oliver Wolff [Fri, 14 Mar 2014 12:25:05 +0000 (13:25 +0100)]
WinRT: Disable qml debugger autotest
As the test heavily depends on QProcess and QProcess is not implemented
for WinRT, this auto test should be disabled.
Change-Id: I765db54072ffaefe028b34d37090cfc2ad8dbd48
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Simon Hausmann [Fri, 14 Mar 2014 09:10:13 +0000 (10:10 +0100)]
Fix crash when appending arrays to sub models in list models
The elements are still inaccessible, but at least it doesn't crash. This is
consistent with the behavior in Qt 5.0, where it didn't crash because the v8
object handle returned an empty array for the property names because the
individual array element wasn't an object.
Bug QTBUG-12117 tracks support for arrays in list models.
Task-number: QTBUG-35891
Change-Id: Ief446341344977a1473bca474ca5ba934e950468
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Wed, 5 Mar 2014 14:38:02 +0000 (15:38 +0100)]
Make sure QSGRenderLoop is cleaned up cleanly.
e13547c595913c58e6bd6a5ed80fdc729fae7d47 used a global static to clean
up QSGRenderLoop which is triggered very late, potentially after
SG backend API plugins have been unloaded. This results in crashes
when used in combination with scenegraph-playgrounds's customcontext.
Partially revert the change and instead clean up at the time of
QApp::aboutToQuit and make sure we also disconnect cleanly from
all QQuickWindows.
This change also ensures that QSGRenderLoop::windowDestroyed() gets
called for all QQuickWindows registered with the render loop. This
ensures that rendering stops and that scene graph nodes and resources
will be cleaned up regardless of whether the application has
remembered to delete the window or not. This is a good thing as it
makes the scene graph shutdown a bit cleaner.
Change-Id: I9cb9093979f8eac05542f118a6ff9cfe5c84f745
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Liang Jian [Fri, 14 Mar 2014 01:42:48 +0000 (09:42 +0800)]
Fix WorkerScript object leak
Delete WorkerScrip object in WorkerRemoveEvent::WorkerRemove event
Change-Id: I1a304838e4a43577a5781216e32610ea36c5a7fd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Topi Reinio [Wed, 12 Mar 2014 11:05:10 +0000 (12:05 +0100)]
Move Qt Quick Widgets example and document it
Because QtQuickWidgets is part of Qt Quick module documentation,
its examples need to also be moved under the examples/quick
directory structure.
This change moves the example, creates minimal documentation
for it, and adds a link to it from the QQuickWidget class
reference.
Task-number: QTBUG-37272
Change-Id: Iffb67849f150b9aaf0edaef5852364e93f7752b8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Liang Jian [Fri, 14 Mar 2014 02:25:40 +0000 (10:25 +0800)]
Fix QQmlContextData object leak
Mark the QQmlContextData object created in QmlContextWrapper::urlScope()
as owned by its QmlContextWrapper to prevent leak.
Change-Id: Ie7afee676e0745a78ef4f3a56984f52f638227e0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Liang Jian [Fri, 14 Mar 2014 01:09:57 +0000 (09:09 +0800)]
Fix QmldirCache object leak
Delete all the QmldirCache objects in the linked list
Change-Id: I9948ccce3d72aaed4f8b14b131e040177d7a15ef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Liang Jian [Thu, 13 Mar 2014 05:28:53 +0000 (13:28 +0800)]
Fix CompiledData::CompilationUnit object leak
Don't ref CompiledData::CompilationUnit in constructor of ScriptFunction
since its has been referenced in its base class
Change-Id: I9ad2d6e190c2ac11de4ccd63015c81d2dead3971
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Larsson [Sat, 1 Mar 2014 06:28:29 +0000 (07:28 +0100)]
Fix crash in qml/qmlscene when using dummy-data with imports
When using the tools qml and qmlscene with dummy-data it will crash or
behave wrong, due to the dummy-data component will get the state not
ready, if the dummy-data qml-files does an import of another folder or
a js-file. By changing the way of loading dummy-data, by letting
QQmlComponent handle the file opening instead of using the setData()
method, qmlscene and qml will be able to handle this type of
dummy-data.
The tool qml also needed to load the dummy data before loading the
regular components, otherwise the dummy-data would not be ready for the
other components to use.
Task-number: QTBUG-32721
Change-Id: Ia1cc2b2626187e23c7d7313be788202d91b12471
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Liang Jian [Thu, 13 Mar 2014 06:55:02 +0000 (14:55 +0800)]
Fix QQmlTypeNameCache object leak
Remove redundant ref to QQmlTypeNameCache object in
QQmlTypeCompiler::compile()
Change-Id: Ie166e8d04c1504194bec227bf5e945b273778a20
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
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>
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>