Laszlo Agocs [Thu, 7 May 2015 17:09:39 +0000 (19:09 +0200)]
Create contexts and pbuffers with the correct screen in QQuickWidget
Change-Id: I8e9db998eee0af5f62c1384f2dcb2028254cc642
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Erik Verbruggen [Mon, 11 May 2015 08:16:37 +0000 (10:16 +0200)]
QML: fix mixed debug/release build on OSX.
Dyld will take the debug library and link it against the release
versions of the frameworks. (Using the debug versions is an option to
dyld when starting an application.) This requires all symbols in both
debug and release libraries in frameworks to be the same.
Change-Id: I6d96bcdf8577f1dffc63c508cb7adc0db2acc486
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Santtu Lakkala [Thu, 16 Apr 2015 13:51:45 +0000 (16:51 +0300)]
Hide cursor when text fields becomes read only
Clear the cursor node in TextEdit if field is read only. Otherwise the
cursor stays visible indefinitely, if it were at the moment the flag
was set.
Task-number: QTBUG-44735
Change-Id: Ib39138260ad8a4d7e5ed2185b8a04c577ee1eff0
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Shawn Rutledge [Mon, 11 May 2015 09:34:08 +0000 (11:34 +0200)]
Add QtQuick::Text::font.weight enum values
Followup to
517da68893be9e6d97c7993922c573de9560604d in qtbase:
make all possible font weights available in QML.
Task-number: QTBUG-38482
Change-Id: I4f821d2fadbcd42fbb237903be474d67a0a5a7c9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Sérgio Martins [Fri, 8 May 2015 19:10:06 +0000 (20:10 +0100)]
qmllint: Fix parsing js files with .import directives
For .pragmas we removed them explicitly but the correct fix is to
not use "qmlMode" when setting code in the lexer.
Change-Id: I6ffc0ca9e7ebab09fbf91e647d292ff0a3a1fd7d
Task-number: QTBUG-45916
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Simon Hausmann [Fri, 8 May 2015 10:34:53 +0000 (12:34 +0200)]
Add protection against "wrong" marking in debug builds
To protect against situations where we accidentally mark an object that belongs
to a different engine - there are many possible entry points - this patch adds
an assertion in debug builds for this situation. When it happens, it will point
more or less directly to the code that tries to push an object to the wrong JS
stack for marking. This helped in the investigation of QTBUG-44895
Change-Id: I311b9ff6d282d52e725044b03a62cd77085536be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 7 May 2015 14:22:24 +0000 (16:22 +0200)]
Fix memory corruption when sharing QObjects between different QML engines
When marking the JS wrappers for QObject manually, we cannot use
ddata->jsWrapper directly but we must respect the case where the same
object is exposed to different engines and then we must mark the wrapper
that belongs to the engine that is currently collecting garbage.
Change-Id: If82883c762ccaf3431e7074243ff2ff703234d66
Task-number: QTBUG-44895
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Jan Kundrát <jkt@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Rainer Keller [Fri, 8 May 2015 07:18:03 +0000 (09:18 +0200)]
Avoid namespacing QTEST_MAIN
The test tries to be smart but it won't work once GPU blacklists are
supported because QTEST_MAIN will contain some imports that cannot be
namespaced.
Change-Id: Id0538cf1ba3885736d8b177e64064bd06f8fef2e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Simon Hausmann [Tue, 5 May 2015 11:14:36 +0000 (13:14 +0200)]
Avoid uninitialized bytes in QV4::CompiledData
When populating the QV4::CompiledData for a JS unit, we memset the malloc'ed
data to zero. We should do the same when creating a unit for QML files. We do
write all the fields that we use, but due to padding we may end up with bytes
that are neither used nor written but still uninitialized. Consequently they
should be zero'ed, otherwise serialization will write garbage.
Change-Id: I0b093e4dde6789d7236247507221f4f3476ba89d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 5 May 2015 08:52:34 +0000 (10:52 +0200)]
Fix memory corruption in array handling
SimpleArrayData's markObjects() implementation did not mark the entries
correctly. When the dequeue offset was non-zero, we would end up marking values
that may have been garbage collected earlier.
Task-number: QTBUG-45888
Change-Id: Iacec350ccc76399ad4d16138af50acf22b2809db
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 28 Apr 2015 13:38:09 +0000 (15:38 +0200)]
Fix memory corruption when multiple QML engines have JavaScript wrappers for the same QObject
It's possible that the same QObject is exposed to multiple JavaScript
environments, for which we have this "extra" hack in the form of a QMap. The
common case is that QQmlData has a QV4::WeakValue that points to the JS wrapper
for the object. However in the rare case of multiple exposure, a map in the
other engines stores those references. That map was erroneously storing
pointers to temporary values on the JS stack instead of heap pointers.
Change-Id: I8587f9921a9b4f9efd288326d00cebc25ad0bc12
Task-number: QTBUG-45051
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Andy Nichols [Thu, 6 Nov 2014 19:30:45 +0000 (11:30 -0800)]
BorderImage support for @2x assets
Despite being a subclass of QQuickImageBase, BorderImage components did
not support using @2x assets like Image components. The 9 patch image
logic now accounts for device pixel ratio when needed.
Manual tests added for stretch, repeat and round tiling modes.
[ChangeLog][BorderImage] Add support for @2x HiDPI border images.
This means, no more need to multiply the border sizes by the device
pixel ratio.
Change-Id: I79958739929964c816ba5dacedd9eaf93a60a183
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Laszlo Agocs [Tue, 5 May 2015 09:45:31 +0000 (11:45 +0200)]
Enhance QQuickFramebufferObject docs regarding the state
Add a note about resetOpenGLState() and the initial state to render().
This tries to tackle the common issue of forgetting to set or reset the
state the custom OpenGL code relies on.
Change-Id: I706b2b1eac76468a9b35cfb7cd99bd5483f2912c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Friedemann Kleint [Tue, 5 May 2015 07:36:31 +0000 (09:36 +0200)]
QQuickWindow: Replace assert() on unreleased touch points by warning.
Output a warning message and clear
QQuickWindowPrivate::itemForTouchPointId should unreleased touch points
exist when QEvent::TouchEnd is received.
Task-number: QTBUG-45856
Change-Id: I8a05220e4258c0ca401f79a2c32ec4f1d43fa444
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Simon Hausmann [Mon, 4 May 2015 11:49:52 +0000 (13:49 +0200)]
Fix qml-i18n example
Commit
f0e285381800c0809e5bfd3a4871a2283ea10fb9 renamed the example, but
it did not adjust the context in the translations. From that point on the
context didn't match anymore and the entire example stopped working.
Change-Id: I491d518235aea07768b69c52d13b2bbf5060f61f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Andrew den Exter [Thu, 23 Apr 2015 11:29:47 +0000 (21:29 +1000)]
Fix implicitHeight for Text items bindings dependent on implicitWidth.
Recalculate the implicitHeight on the second layout if the width
changes after setting the implicitWidth, and potentially do another
layout if the updating the implicitHeight changes the height.
Change-Id: Ib6a637452013b56dba7ae8a6862cd92156386578
Task-number: QTBUG-45546
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Simon Hausmann [Mon, 4 May 2015 08:21:10 +0000 (08:21 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Simon Hausmann [Mon, 4 May 2015 08:20:20 +0000 (10:20 +0200)]
Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: Ie8ea118ed0a1a9a1c3d81e1e34d85c03c695c9a4
Gunnar Sletta [Tue, 28 Apr 2015 05:45:28 +0000 (07:45 +0200)]
Avoid QQuickItem in materials's compare() on the render thread
Task-number: QTBUG-44664
Change-Id: I4438e666b75fdf2e8d4353e64454d4c665a24350
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Simon Hausmann [Tue, 28 Apr 2015 14:03:07 +0000 (16:03 +0200)]
Fix default value for XMLHttpRequest.response property
The default value for responseType is the empty string, for which
the expected data type for the response property is a string - same
as when the response type is set to "text". In other words: By default
the response property should contain the string representation of the
data.
Task-number: QTBUG-45862
Change-Id: I563160e5cdfbf93aca7e283e455d77a6b9deceb4
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Reviewed-by: Valery Kotov <kotov.valery@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Jan Arne Petersen [Tue, 13 Jan 2015 10:23:10 +0000 (11:23 +0100)]
Create QOpenGLContext with the correct screen
Change-Id: I91169e719ac97b8e32805e08d6a1f43caa897f73
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Simon Hausmann [Thu, 30 Apr 2015 11:20:43 +0000 (13:20 +0200)]
Fix passing of locals as function arguments with side-effects
Commit
75c22465cf8fe262edfe6178bb9ca19661fb710e regressed in allowing
locals and arguments to be passed directly as further arguments to function
calls, but that's incorrect when considering
var i = 2;
testFunction(i, i += 2)
where it is instrumental to place the first argument into a temp (making a
copy) instead of passing it directly.
Change-Id: Iffcf6c6eda92a8fb665982cda1db0b96359cd092
Task-number: QTBUG-45879
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 28 Apr 2015 14:53:37 +0000 (16:53 +0200)]
Fix uninitialized variables/data
* Initialize the indexOfRootObject member
* When creating the QV4::CompiledData::String objects,
don't include the one ushort _beyond_ the QString, which
is random data.
Change-Id: I8fe8a465e2713a385504f217b367a62b70ee5fdf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Topi Reinio [Mon, 27 Apr 2015 11:23:05 +0000 (13:23 +0200)]
Doc: Fix linking issues in Item QML type documentation
Use explicit link commands as QDoc cannot create links to single-word
QML type names automatically.
Task-number: QTBUG-45827
Change-Id: I048300728356d3ae9901c5c57febc683137ce090
Reviewed-by: Martin Smith <martin.smith@digia.com>
Laszlo Agocs [Thu, 16 Apr 2015 13:56:33 +0000 (15:56 +0200)]
Fix rendercontrol example for screens with different dpr
renderWindow() was not reimplemented in the example. This is pretty
bad since renderWindowFor() fails to find a window and thus falls
back to using the default device pixel ratio (which is the highest
dpr present in the system). The result is broken content from Quick
because it operates with a dpr of 2 any time a retina screen is connected,
even when the example's own QWindow is placed on a normal screen.
Add also a note to the QQuickRenderControl docs because it is easy to
overlook.
Task-number: QTBUG-45613
Change-Id: I31bf92ec285f3d9867a5604a4b4e3bea73791932
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Laszlo Agocs [Thu, 16 Apr 2015 13:41:26 +0000 (15:41 +0200)]
Recreate the FBO on dpr change in rendercontrol example
Even when the window size is not changing. This provides a useful
example of connecting to the screenChanged() signal.
Task-number: QTBUG-45613
Change-Id: I0652838d9c0cfec8b64b3422997159f385445b20
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Laszlo Agocs [Thu, 16 Apr 2015 10:47:42 +0000 (12:47 +0200)]
Avoid showing garbage when resizing the rendercontrol example
The threaded variant was working well since that triggers a render
when resizing. The single threaded version lacked this and this
resulted in showing garbage on OS X at least since the new FBO had
undefined contents. Avoid this.
Task-number: QTBUG-45613
Change-Id: Ibb3d3f7640bab5da913df1c0c63cc3a3aaafb140
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
David Edmundson [Thu, 23 Apr 2015 13:01:24 +0000 (15:01 +0200)]
Avoid calling potentially pure virtual method
In Qt 5.4 screenChanged is called indirectly from the destructor of
QPlatformScreen. By comparing new values against the oldScreen we call
call virtual methods of QPlatformScreen from it's own destructor which
results in a crash.
This patch simply emits change signals whenever a screen change regardless
of whether the value differs from the previous screen. Arguably less
efficient, but better than crashing.
This fix is not needed in Qt 5.5 where the QPA architecture has changed.
Task-number: QTBUG-45753
Change-Id: Ic155906928855a377add9b21bff9e72b31f4667e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Simon Hausmann [Mon, 27 Apr 2015 13:18:05 +0000 (13:18 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Simon Hausmann [Mon, 27 Apr 2015 07:52:51 +0000 (09:52 +0200)]
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
.qmake.conf
tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp
Change-Id: I715b8a78b74cbe0dcaf599367fd6e08af4858e11
Aaron Kennedy [Thu, 29 Jan 2015 13:56:00 +0000 (14:56 +0100)]
Only heap allocate binding bits storage if needed.
For samegame, this has the following change on the total bytes allocated:
Startup (main page):
Before: 1636
After: 1072
Difference: 564 bytes (-34%)
Actual game (single player):
Before: 14120
After: 10432
Difference: 3688 bytes (-26%)
Done-with: Robin Burchell <robin.burchell@viroteck.net>
Change-Id: I10fd1e9f1440dcff93aed06e2c77c2912bc7dd39
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
(cherry picked from commit
54a19db8d00b67044861c8ffd1d5b1e646658609)
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gabriel de Dietrich [Thu, 23 Apr 2015 09:12:08 +0000 (11:12 +0200)]
Instantiator: Make asynchronous mode work
This patch proceeds in two steps. First, and the most trivial,
we make sure not to offend the Instantiator's objects container
since asynchronous creation also means the objects can be created
in any order. We do so by ensuring the objects container has
always the necessary size.
The second step is to make sure the objects don't get destroyed by
the delegate model when their incubation tasks are asynchronous.
We force to keep an extra reference calling the object() function
on the instance model, but only if the creation was asynchronous.
However, it's not enough to check for the Instantiatior async value
since the incubation tasks in QQmlDelegateModel are async-if-nested.
Therefore, we need to keep track of the object index requested to
the model and see if it matches when the createdItem() signal gets
emitted.
Task-number: QTBUG-36410
Change-Id: I180b03b6a7468d6521827a9631755577e9e6d357
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Simon Hausmann [Sat, 25 Apr 2015 15:40:39 +0000 (17:40 +0200)]
Merge remote-tracking branch 'origin/5.4.2' into 5.4
Change-Id: Ie0987bcaeae5ee06e01f06ac27f0d161272720b0
Simon Hausmann [Wed, 22 Apr 2015 15:15:30 +0000 (17:15 +0200)]
Prospective fix for flakey "network" related QML tests
Replace hard-coded server ports with dynamically allocated ports.
Change-Id: Iab8f9a88343a9f2c49af3cd700c954c13c3bf121
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Shawn Rutledge [Fri, 24 Apr 2015 06:39:19 +0000 (08:39 +0200)]
Add list of changes for 5.4.2 relative to 5.4.1
Change-Id: I9f64f0ff3d10ced8ddc7a4aafac1c77680e3f30e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Nico Vertriest [Tue, 21 Apr 2015 11:02:50 +0000 (13:02 +0200)]
Doc: corrected error on return value qmlRegisterType
Task-number: QTBUG-45584
Change-Id: I97508aabe47c49d8e27329a7856dd921ee0505dd
Reviewed-by: Martin Smith <martin.smith@digia.com>
Robert Griebl [Wed, 15 Apr 2015 11:57:51 +0000 (13:57 +0200)]
Fix a memory leak in the material shader cache.
There were multiple problems in the implementation of the shader cache:
1) it was not thread-safe
2) nothing was ever removed from the hash
3) since the keys into the hash are the actual shader source code, problem
#2 would lead to serious memory consumption over time
Change-Id: I20d1fb2074932e23f89edddba12e68ab8adcbff0
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Simon Hausmann [Wed, 22 Apr 2015 11:39:06 +0000 (13:39 +0200)]
Fix regression with nested objects served by custom parsers
The following piece of code used to work and broke with Qt 5.3:
ListModel {
property var conn: Connection {
...
}
}
When validating the properties of the ListModel we would not validate
the Connection sub-object here, which meant the custom parser for the
connection object was never called.
We need to extend the logic for sub-object validation to recursive into
sub-objects when this is either an attached property (Component.onComplete on a
list model for example) or the object is assigned to an _existing_ property,
i.e. a property not deal with by the custom parser. In this case that's a
custom declared property.
Change-Id: Ic99f746f08771460cc6424a9e8a839c78a7eafd9
Task-number: QTBUG-45735
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Eirik Aavitsland [Tue, 14 Apr 2015 11:30:36 +0000 (13:30 +0200)]
Make the scenegraph_lancelot test work on Mac
Grabbing the window after every frame is needlessly expensive and
would overload a less powerful Mac. Rewrote the grabber to just do the
necessary grabs.
Make the hostinfo script not output the unneeded '[undefined]' value
for unset environment variables, as the braces would upset the paths
in the html report.
Change-Id: I76104235c15eafd5e7f92f2ec01c84f5b11b55a6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Konstantin Ritt [Mon, 20 Apr 2015 08:07:18 +0000 (12:07 +0400)]
[labs.settings] Minor optimization
Prefer clear() over subsequent erase() and remove duplicated check.
Change-Id: Ibc70c665972e2f972763e7a0088263815792a997
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Pasi Petäjäjärvi [Wed, 22 Apr 2015 12:28:21 +0000 (15:28 +0300)]
V4: include alloca private header as alloca is used unconditionally.
Change-Id: I9d0f63c41609c4aaef272fabafd5b1272853a099
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
J-P Nurmi [Mon, 20 Apr 2015 13:59:08 +0000 (15:59 +0200)]
QtQml.Models: bump up the import version number to 2.2
The latest version is 2.2 since
4ca9be5.
Change-Id: I19014c26301a67f2ce2ef93d7bab124a65337b59
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
J-P Nurmi [Mon, 20 Apr 2015 12:56:36 +0000 (14:56 +0200)]
Add plugins.qmltypes for QtQml.Models
Task-number: QTBUG-43229
Task-number: QTCREATORBUG-13780
Change-Id: Ice39a26809eb433a01205bae5cea9cfdc0699c27
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Shawn Rutledge [Wed, 18 Feb 2015 08:23:32 +0000 (09:23 +0100)]
add manual tests for touch interaction
So far there are manual tests for Flickable and
MultiPointTouchArea. It can be expanded later.
Change-Id: Ifa838b68f137a49647a208dc15f22c90f1e02d1f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Mitch Curtis [Tue, 21 Apr 2015 11:41:33 +0000 (13:41 +0200)]
XCB: respect QPlatformDrag::ownsDragObject().
In a Qt Quick application on X11, QDrag events were deleted before
their data could be passed to an external application. There was a
function introduced recently to account for this problem, so we should
use that instead.
Change-Id: If74dd32bb8c7aa7c2e3160448af546d2e8640528
Task-number: QTBUG-45604
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Marco Benelli [Tue, 17 Mar 2015 15:33:14 +0000 (16:33 +0100)]
qmlplugindump: add dependencies
Change-Id: I53b2a394ba1f6c8a7a88f7456fba8646cdf35bf4
Task-number: QTBUG-41079
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Rolf Eike Beer [Wed, 4 Feb 2015 12:24:53 +0000 (13:24 +0100)]
QML: do not check stack size if stack grows up
On architectures where the stack grows upwards (i.e. HP PA-RISC) the
stack limit calculation fails because the variables used to check the
offset are usually close to the bottom of the stack, which is in this
case the origin of the stack grows. Since these machines are a rare
obscurity simply assume that everything is fine on these machines. The
few people that are indeed running QML on such machines will probably
be able configure their stack size properly by default.
Task-number: QTBUG-44268
Change-Id: Ia83a39179a0f6e0602ba7a5032d386e12d8d1ba3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Simon Hausmann [Mon, 13 Apr 2015 11:46:40 +0000 (13:46 +0200)]
Eliminate remaining property cache string lookups upon object instantiation
Even for the id property binding we can use the property data cache and
therefore avoid string hashing.
Change-Id: Id9a4ca3159cdfe5ba93060f1bc8626e70140daa1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 08:13:04 +0000 (10:13 +0200)]
Speed up instantiation of objects that are assigned to list properties
For example massive amount of Item{} objects that are "children" of another
item and thus get assigned to the default data list property. Instead of
repeatedly retrieving that list property via a meta-call, we can do that only
once and re-load if necessary.
Change-Id: Ia7d10b84b3c7dca58d9f0b4b2138bd6f916c128d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 9 Apr 2015 08:23:17 +0000 (10:23 +0200)]
Speed up property binding initialization on object creation
Avoid repeated string hashing and lookups in the property cache in order to
retrieve the property details when initializing literal and script bindings.
Instead we now cache the property data at type validation time, similar to how
the property data was encoded in the VME instructions in the old engine.
Change-Id: I3957c7c4c3e26dfa97c4880b23940a3755ee90e4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Mon, 20 Apr 2015 11:38:31 +0000 (13:38 +0200)]
Always return a proper Value from JIT generated code
When throwing an exception, we ended up having junk data in
the return value register. That could end up being written
onto the JS stack when returning from the function, and then
causing crashes in the garbage collector afterwards.
Fix it by returning undefined in case we throw an exception.
Change-Id: Ice380f2de673b179c1e2c98fbeb87e47347ef520
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Oswald Buddenhagen [Mon, 20 Apr 2015 10:27:43 +0000 (12:27 +0200)]
Bump version
Change-Id: Ifd5bf3e424ee0d0fe7218414c6f95c7a4c2a5d81
Holger Hans Peter Freyther [Tue, 31 Mar 2015 18:23:27 +0000 (20:23 +0200)]
Address uninitialized pointer variables
Coverity CID 10721, 84861, 86705, 85424, 85422,
85259, 84863, 84857
Change-Id: Ia86970b5ac4e0be9de01b79b618d33011da6a328
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Alexandr Rekunkov [Mon, 30 Mar 2015 10:29:52 +0000 (13:29 +0300)]
fix model leak in QQmlInstantiator
Change-Id: Ieb6ef229bc999f1a35adc2a157bd42a38908f7d7
Task-number: QTBUG-45271
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Sze Howe Koh [Tue, 14 Apr 2015 23:45:03 +0000 (07:45 +0800)]
Doc: Expand on QJSEngine exception handling
- List the properties provided by the Error object. They consist of the
standard properties and a subset of the Mozilla extensions.
- Add QJSValue::property() usage to the example code.
- Add cross-referencing.
- Some rephrasing for clarity and conciseness.
Change-Id: I1eb6943899fee2bd81851ccb03660a7a474a975d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Nico Vertriest [Mon, 30 Mar 2015 08:27:35 +0000 (10:27 +0200)]
Doc: corrected some language issues
Task-number: QTWEBSITE-628
Change-Id: I608c4fe5e18f6494cc03377080a536a01be232ca
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Friedemann Kleint [Fri, 17 Apr 2015 06:46:11 +0000 (08:46 +0200)]
Fix forward declaration of QQmlSourceLocation.
Fix warning:
qtdeclarative/src/qml/qml/qqmljavascriptexpression_p.h(55) : warning C4099: 'QQmlSourceLocation' : type name first seen using 'struct' now seen using 'class'
Change-Id: Id441502913180631fe09c2f256498063c8f144b1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Shawn Rutledge [Thu, 16 Apr 2015 07:52:53 +0000 (09:52 +0200)]
rename manual test dir shorcuts -> shortcuts
Change-Id: Icdd494fb6c561b15d3cccb925b84990163c77bf2
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Liang Qi [Thu, 16 Apr 2015 18:27:44 +0000 (18:27 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Simon Hausmann [Fri, 10 Apr 2015 13:17:51 +0000 (15:17 +0200)]
Speed up composite type instantiation with lots of IDs
We don't need to convert from a QHash to a QVector in order to populate the
property name cache in QQmlContextData.
Change-Id: Ifa8e4f64a1e174907e92684b2d38abaf0a4a705c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 13:17:36 +0000 (15:17 +0200)]
Speed up object creation
Avoid copying url and file name twice into the context every time we
instantiate an object.
Change-Id: I1c76b80b9c44f95512af5899d760151f6dcd7bb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 12:56:24 +0000 (14:56 +0200)]
Speed up object creation with lots of id name objects
In the common case when objects are referenced by id, we don't need the
QQmlContextData's property name cache for the lookup. Instead of bindings
we resolve the id to an integer at type compilation time. Therefore we can
delay the population of the QQmlContextData's propertyNames until we need it
and therefore safe time on startup.
Change-Id: I2e8eeb51b1ac92f230059be3467f9a1e00fdbbef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 9 Apr 2015 13:50:55 +0000 (15:50 +0200)]
Speed up script binding initialization
Don't spend any time repeatedly building the same internal class for the simple
binding functions. We can do that once at engine construction time.
Change-Id: I3777b5bd15ad4a8aaf78ae13bee27e8d8cadc2ee
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 9 Apr 2015 10:33:13 +0000 (12:33 +0200)]
Avoid strict mode for the surrounding QML call contexts
The strict mode is not necessary from a correctness point of view but comes
with the extra cost that for each script binding additional caller and
arguments accessor members are a installed on the internal class.
Change-Id: I13b688bc8344ee2f027679821586ca7670d17cc5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Laszlo Agocs [Wed, 15 Apr 2015 16:14:15 +0000 (18:14 +0200)]
Support sRGB for text with QQuickWidget
Otherwise we get visually different results with QQuickWindow
and QQuickWidget on OS X.
Task-number: QTBUG-42861
Change-Id: Icbf6f6e980129f5de73a88e7be7bef4f592e875e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Simon Hausmann [Thu, 9 Apr 2015 14:07:08 +0000 (16:07 +0200)]
Speed up creation of objects without script bindings
Avoid the creation of the QML binding wrappers if we don't need it, by
moving the creation into a function that creates it on demand.
Change-Id: I1af6a8507a114c1a0b83374704981b7ed4c4a3fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 12:22:58 +0000 (14:22 +0200)]
Speed up copying of value types in bindings
When a binding results in a value type reference and the destination property
is of the same time, then we can avoid a heap allocation and just allocate
the value type memory on the stack, construct, copy and destruct.
Change-Id: If71ef82b0ced85c1b962c5e44147d6c07edd1440
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 10:34:46 +0000 (12:34 +0200)]
Speed up value type binding creation
* Avoid calling QMetaType::construct/destruct(typeId, ...) as that requires
repeated lookups in the type registry. Instead cache the constructor/destructor/etc.
function addresses in the QQmlValueType singletons as QMetaType
* Allocate memory for the gadget pointer lazily, to accommodate the common case of
a value type binding by property reference.
Change-Id: I98a3ac73453b8f80027c06401b4f29a9707949d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 13 Apr 2015 14:01:59 +0000 (16:01 +0200)]
Changed QML type locking
Replace the use of QReadWriteLock with a plain QMutex. At this point
QReadWriteLock adds a lot of overhead due to its internal QHash and otherwise
offers little over a recursive mutex, especially given that there is most
of the time only one reading thread and one writing thread.
Change-Id: I0a91e4a64cff5d25e4a133ed46b08912e81bb055
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 13:53:02 +0000 (15:53 +0200)]
Speed up creation of objects that don't import scripts
In the common case of no 'import "Foo.js" as Bar' we can avoid the creation of
the JS array that holds the script references.
Change-Id: I6704bd9efaf8681f939a148b2cb0a1de2cb22d80
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 10:34:36 +0000 (12:34 +0200)]
Speed up binding evaluation
Don't spend any cycles of determining the location of the binding (file, line,
column) unless we really need that information. That's the case when the profiler
is active or an error happens.
Change-Id: Iae97808d500b88fed6a813e8b224aa6ebe04d3b6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Liang Qi [Thu, 16 Apr 2015 10:29:42 +0000 (12:29 +0200)]
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
tests/auto/qml/debugger/qv4profilerservice/qv4profilerservice.pro
tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler.pro
Change-Id: I76d87e3df97ebdba902ca3d7488c1582eca2a83c
Gunnar Sletta [Tue, 24 Mar 2015 06:58:39 +0000 (07:58 +0100)]
Fix regressed atlas texture log output. Broken since:
a49b0ad786
Change-Id: I5df32609b45047666ea8bde500cf771736c396e5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Gunnar Sletta [Wed, 1 Apr 2015 12:45:30 +0000 (14:45 +0200)]
Make sure we have enough precision to run animations for years.
Task-number: QTBUG-45358
Change-Id: I4af0da937253f3ae578333c659dcbb132312a9cc
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Robert Griebl [Tue, 24 Mar 2015 21:28:34 +0000 (22:28 +0100)]
Unregister types in the QMetaType system on unload.
This patch will enable the unregistering of previously registered
QMetaTypes, when the corresponding Qml type is dead.
The API for this was added to QtBase with
b00201b.
Change-Id: I96d4a3004d8da59ee8edf7cfd6d2fef3a5410807
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Valery Kotov [Wed, 25 Mar 2015 18:17:08 +0000 (20:17 +0200)]
QML Engine: Share data for ArrayBuffer created from QByteArray.
ExecutionEngine performs shallow copy of internal data for ArrayBuffer
created from QByteArray.
Change-Id: I514cd9708a7fbe9a989937fac62d00b464d7362d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Valery Kotov <kotov.valery@gmail.com>
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Julien Brianceau [Tue, 14 Apr 2015 16:15:54 +0000 (18:15 +0200)]
V4 JIT: cosmetic change
Since
4377d44fb7399751ed4f284bb4be7ece494aff6d, we can avoid one
generateFunctionCallImp bounce.
Change-Id: I2e92578dbc26a614f7626d2c28a2d9b28dd06b6b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Albert Astals Cid [Tue, 14 Apr 2015 14:02:43 +0000 (16:02 +0200)]
Protect the RegExp against early garbage collection
Backported from Qt 5.5
Change-Id: Ice9fd8061fac0c35d787e1603873c69f8ef7e10b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Daniel Teske [Thu, 15 Jan 2015 15:34:53 +0000 (16:34 +0100)]
Use qt_subtract_from_timeout instead of duplicating qt_timeout_value
The same function was duplicated 5 times in qtbase, so create one copy
to rule them all and use it also in QtDeclarative.
Change-Id: I4e39a7ee0541ce4fe9710cea344e537ee011bbe9
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Simon Hausmann [Wed, 8 Apr 2015 13:55:34 +0000 (15:55 +0200)]
Simple speed-up for binding setup during object instantiation
We use stringAt() to retrieve the name of the id property of an object but all
we do with that string is check if it has a length. So if an id is set, we
allocate memory and copy the string data into a new QString, and if it's not
set then we get a default constructed QString. Either way the string isn't used
and we can simply check for whether the id is set by checking if the idIndex is
non-zero.
Change-Id: Ib84fb05ed31c59f7e85dac72ab61b4d3bc9c902b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 8 Apr 2015 12:49:41 +0000 (14:49 +0200)]
Cleanup: Fix const'ness of the property binding validator code
The property validator is supposed to validate the proposed property bindings
and abort type compilation if necessary. As such it is a read-only pass through
the data structures and therefore we make it const. However it does have a
side-effect of collecting some state, which however is "write-only" and
therefore marked as mutable. Those variables are written to, but not read
during this pass.
Change-Id: I6a3655fedbd6691b7498cf82ca1c8e21dd635bd3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 8 Apr 2015 12:09:14 +0000 (14:09 +0200)]
Cleanup
Avoid re-using the same variable for different purposes, so just pull in the
first use into the tight scope and the second "property" variable close to
the loop it is used with.
Change-Id: I3a325478f9e56413b65dea9c7e05566497fbc6cf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Julien Brianceau [Mon, 13 Apr 2015 15:00:34 +0000 (17:00 +0200)]
V4 JIT: fix typo in Binop::int32Binop
Change-Id: I68f073ab512b482c9b3b1ad7860f4c759245298e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Christian Strømme [Mon, 30 Mar 2015 12:14:00 +0000 (14:14 +0200)]
Match the offscreen windows position to the QQuickWidget position.
The position of the offscreen window would always be set to 0,0,
making it impossible to get the actual position of the scene.
With this change, it will be possible for child windows or items
in the scene to correctly calculate their global position.
Change-Id: Ibd3ff03880209047776e86ad889b40cbf79c3e6e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Frederik Gladhorn [Mon, 30 Mar 2015 22:21:58 +0000 (00:21 +0200)]
Fix a few typos
Change-Id: Ia00949757a6f47babc1748f27e32a9644d6cc608
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Laszlo Agocs [Mon, 13 Apr 2015 08:18:22 +0000 (10:18 +0200)]
Avoid running anims at 3x speed on Windows
When there is no render pending, renderWindow() is not called and so
there is no blocking for vsync. Advancing the animations without any
sleep is wrong in this case and results in animations running at 3x
speed in case there is no change in the scenegraph contents.
To solve this, import the threaded render loop's sleep call.
Task-number: QTBUG-42699
Change-Id: I3658a827af12d4bc2ac05c7b0b29c65e9fc99675
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Caroline Chao [Wed, 8 Apr 2015 12:13:28 +0000 (14:13 +0200)]
Tests: Use blacklist instead of insignificant for tst_qquickanimations
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST file.
Blacklist the relevant tests, the tests that have been found flaky in CI.
Change-Id: I4c3ce430e654886ceea8b6f714710ebe2374e4db
Task-number: QTBUG-45466
Task-number: QTBUG-29062
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Caroline Chao [Thu, 9 Apr 2015 12:22:31 +0000 (14:22 +0200)]
Tests: Use blacklist instead of insignificant for tst_qquickflickable
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST file.
Blacklist the relevant tests, the tests that have been found flaky or
failing in CI.
Change-Id: If145b9bc413e4c9dbf1c3c06c1596647c707770e
Task-number: QTBUG-36804
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Albert Astals Cid [Wed, 1 Apr 2015 14:20:19 +0000 (16:20 +0200)]
Do not stall loading of local images if network is slow
Without this patch it can happen that we're
loading IMAGEREQUEST_MAX_REQUEST_COUNT http based images,
if the next image to load is a local file it wouldn't be processed
until one of the http ones finishes, which makes not much sense
Change-Id: I515306005192a20722f0c4588a1db1241348407c
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Eskil Abrahamsen Blomfeldt [Wed, 8 Apr 2015 11:09:24 +0000 (13:09 +0200)]
Fix TextEdit when vertical alignment != AlignTop
When the TextEdit's alignment was either AlignBottom or
AlignVCenter, several things would be broken: First of all
the position of all non-dirty nodes would not be updated,
so if you e.g. added text to the end of the document, it
would overlap with the previously added text.
Also, the frame decorations were always aligned to the top, since
the basePosition was not accounted for in the node for this.
The fix is to translate the root node to the base position instead
of baking this into the position of the text nodes. This also
automatically fixes frame decorations since it's already aligned
to the top of the root node.
[ChangeLog][TextEdit] Fixed issues with using other vertical
alignments than AlignTop.
Change-Id: I11f73eab21a28658a5cbf00292fd519efd0f3e7f
Task-number: QTBUG-45032
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Caroline Chao [Wed, 8 Apr 2015 12:41:23 +0000 (14:41 +0200)]
Tests: Make qquickcustomparticle significant again
The test is passing in CI and it seems it was temporarily
made insignificant in
5a4eebbc.
Change-Id: Ic53d45b842c9a9c431a43cb6d5cbd3849e5729ed
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Caroline Chao [Wed, 8 Apr 2015 13:00:06 +0000 (15:00 +0200)]
Tests: Make qquicktrailemitter significant again
The test is now passing in CI.
Change-Id: Iad7dc46e7819ba9e9f604ed39ab9bc53f123b119
Task-number: QTBUG-33421
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Caroline Chao [Wed, 8 Apr 2015 13:16:15 +0000 (15:16 +0200)]
Tests: Make qqmldebugjs significant again
The test is now passing in CI.
Change-Id: I9414e05d40fe373878afa43121fcfa7cf95fcbdf
Task-number: QTBUG-28263
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Caroline Chao [Tue, 7 Apr 2015 12:58:27 +0000 (14:58 +0200)]
Tests: Make qquickgridview significant again
The qquickgridview tests are passing in CI
Change-Id: Idaf5a9d9df06a28c9ff5162b7bb00e4d677c3a0b
Task-number: QTBUG-33017
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Caroline Chao [Wed, 8 Apr 2015 07:32:24 +0000 (09:32 +0200)]
Tests: Make qquicktext, qquicktextedit and qquickpathview significant
The tests are now passing in CI for OS X.
The test qquicktextedit is also passing on win32.
Make qquicktext, qquicktextedit and qquickpathview significant again.
Change-Id: I778cc90aff0d1e76b66b6f8ae5150d3113e6fc68
Task-number: QTBUG-27740
Task-number: QTBUG-32540
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Julien Brianceau [Fri, 3 Apr 2015 07:13:17 +0000 (09:13 +0200)]
[mips] Handle properly unaligned halfword load.
This patch improves YarrJIT efficiency on mips platforms.
Cherry-picked from qtwebkit (
ea22657d17a934b04c8621dc8891a1d4d80510e3)
Change-Id: I83eca9716e4d6e9e1dd4d8ceb76c3da380502ce7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Ulf Hermann [Wed, 8 Apr 2015 14:07:46 +0000 (16:07 +0200)]
Remove outdated V8 profiler test
Change-Id: I296a3f94d16c4e7a6f89e566893f627c50b66ba3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Mitch Curtis [Wed, 8 Apr 2015 08:04:25 +0000 (10:04 +0200)]
Return the correct type from Item::mapToItem/Item::mapFromItem.
Previously we were returning a JavaScript object with x/y/width/height
properties, instead of a point/rect. This meant that the type couldn't
be converted to a point/rect because we don't support duck typing,
where we would deduce the type based on the properties.
One example of a broken use case that this patch fixes is when QML is
unable to convert the return type to a point in a property declaration:
property point p: mouseArea.mapToItem(child, mouseArea.mouseX, mouseArea.mouseY)
Another is using the result of the function to pass to another function:
child.contains(mouseArea.mapToItem(child, mouseArea.mouseX, mouseArea.mouseY))
Change-Id: I3ce82f10175f904dd02c8af6b5e42cee14b2ebb2
Task-number: QTBUG-41452
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Richard Moe Gustavsen [Wed, 8 Apr 2015 12:10:28 +0000 (14:10 +0200)]
tst_qquickapplication: change test case 'state' to be more stable
Qt-5.4 integration can sometimes fail on this test. We have not
succeeded reproducing it, but from reading the test code, it seems
likely that the problem might come from already pending state
events queued before the test starts. Since the test cannot know if
the platform will queue state events while spinning the event loop
(waitForEvents), this patch will instead only flush already queued
events, which should be less prone to side effects.
Change-Id: I134f98ba35faa4d9213ee658ebcbe76b390b5516
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Julien Brianceau [Fri, 3 Apr 2015 07:09:28 +0000 (09:09 +0200)]
[mips] Fix or32 implementation in macro assembler.
Cherry-picked from qtwebkit (
0546c8656a3728bf4375da39027e096beba4f111)
Change-Id: I924661dc51bee334c6f26557e765a3a1e8ec0bce
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>