Sze Howe Koh [Sun, 3 Nov 2013 04:48:38 +0000 (12:48 +0800)]
Doc: Fix QUrl conversion details
Task-number: QTBUG-33360
Change-Id: I2f6889d798c6c10f1412f5adb69dd0362ac790fb
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Gunnar Sletta [Mon, 4 Nov 2013 14:45:22 +0000 (15:45 +0100)]
Tolerate NaN in the geometry without asserting
If we come across NaN geometry, we treat it as spanning
the entire viewport, similar to other geometries with
undefined geometry.
Task-number: QTBUG-34520
Change-Id: Ia4171f9f13d876c6c587043ad7decaa19bb85f01
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Sérgio Martins [Mon, 4 Nov 2013 15:58:11 +0000 (15:58 +0000)]
Enable JIT for WinCE.
Demos work, 120 unit-tests pass, some failures unrelated to JIT.
Change-Id: I641d31cc08dc7961fa46d7b95666178699317f61
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Robin Burchell [Mon, 4 Nov 2013 13:18:26 +0000 (14:18 +0100)]
Fix preedit text layout
preeditPosition is relative to the block position
Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com>
Change-Id: If96a1d0939f84ab11f0642d5fe78d786c30f418a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Robin Burchell [Mon, 4 Nov 2013 13:18:15 +0000 (14:18 +0100)]
Handle glyph runs with >65536 glyphs
Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com>
Change-Id: Ica3a1dccc798186414b92f900b858966ac8dc8c9
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Lars Knoll [Sat, 2 Nov 2013 14:01:09 +0000 (15:01 +0100)]
Better way of handling string additions
The old algorithm still had some quadratic behavior when adding
strings in a loop. This fixes is by keeping track of the longest
substring used, as well as the length of the string. If the length
is larger then twice the length of the longest substring, we
simplify the string.
Change-Id: I9d99ae1632a8046ac135e67bdbb448638d15836d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sun, 27 Oct 2013 20:43:37 +0000 (21:43 +0100)]
Fix a bug in LifetimeInterval:covers()
Change-Id: I7c3b0b2ac43462a9834e3f1891dae23fc9ed061d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Topi Reinio [Mon, 4 Nov 2013 12:08:43 +0000 (13:08 +0100)]
Doc: Add missing image to XmlListModel documentation
The image was originally part of QtQuick1 docs - copy it
over to qtdeclarative repository.
Task-number: QTBUG-34556
Change-Id: Ic7089ce157ff7722e5f42b201ff4b01dcff2564e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Simon Hausmann [Mon, 4 Nov 2013 12:20:09 +0000 (13:20 +0100)]
Fix unused variable warning in release builds
Part of trying to get https://codereview.qt-project.org/#change,70160 in
Change-Id: Ie11e50c258343c590d6b240cf8ae7ce070510f6f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Topi Reinio [Tue, 8 Oct 2013 12:35:55 +0000 (14:35 +0200)]
Doc: Fix warnings in StocQt Qt Quick demo
Fix a number of warnings from QML engine by adding
some boundary & sanity checks for properties. Also
address UI update issues by having XMLHTTPRequest
calls to trigger by a timer, instead of directly
binding them to multiple change notifier signals.
Task-number: QTBUG-33867
Change-Id: I48f573050b5dc3e3fe6e75bc423fe86ecc4a2469
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Erik Verbruggen [Fri, 1 Nov 2013 11:38:32 +0000 (12:38 +0100)]
Fix various compiler warnings in order to remove warn_off in the near future
Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Wed, 30 Oct 2013 13:47:07 +0000 (14:47 +0100)]
Avoid exception checks after calls to some run-time functions
We know that some run-time functions won't thrown an exception, so this
patch annotates them with a tricked NoThrowContext* instead of
ExecutionContext*, which allows the masm isel to detect calls to them
and avoid generating the exception handling checks after the call.
Change-Id: Ida1c9497edda14f26e1d6389b0144f6abeeba654
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 30 Oct 2013 12:33:49 +0000 (13:33 +0100)]
Avoid unnecessary saving of the instruction pointer in the JIT
We only need to save it when the line number changes, not for each and every
call.
Change-Id: I1a6fdf97abd3dd654bbd97d2a99cd09e9c20f64f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 30 Oct 2013 12:27:43 +0000 (13:27 +0100)]
Improve debugging of QML expressions
Add the name of the property to the generated IR function ("expression for x")
to make it easier to debug.
Change-Id: If35f42764774e6d7f40d3bf080e1fbdb12321ed5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Thu, 31 Oct 2013 21:22:54 +0000 (22:22 +0100)]
Say hello to the scene graph sanity-tests for rendering
Change-Id: I5d975735b0975f284b8aee15541f208e3deb704f
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Liang Qi [Thu, 31 Oct 2013 08:23:47 +0000 (09:23 +0100)]
tests: fix tst_qqmlmoduleplugin::incorrectPluginCase()
It gives different error message based on the case sensitivity of
the file system on Mac.
Task-number: QTBUG-32652
Change-Id: I52415126e63978c9f80b7652e0116e0e07703fd8
Reviewed-by: Liang Qi <liang.qi@digia.com>
Erik Verbruggen [Thu, 17 Oct 2013 12:31:10 +0000 (14:31 +0200)]
V4: make Scope uncopyable.
Copying will result in a dangling pointer.
Change-Id: I7f7e0df87326f43cf0ee5da6562726a5e3d2ca9c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Richard Moe Gustavsen [Wed, 30 Oct 2013 12:19:42 +0000 (13:19 +0100)]
QQuickWindowPrivate: implement clearFocusObject
Ref change: cfa85c7 (qtbase)
Implement QQuickWindowPrivate::clearFocus()
to enable platform plugins to remove focus from the
focus object when the virtual keyboard closes.
On mobile platforms line edits etc are not supposed to
be drawn with focus and blinking cursors unless the
virtual keyboard (or another keyboard) is open. With the
new virtual QWindowPrivate::clearFocus() the
platforms can remove focus without deactivating the
whole window.
The old implementation on iOS deactivated the whole window
when the keyboard was closed. But this was unfortunate,
especially in QtQuick, since a qquicktextinput would
not get active focus unless the window was active. But
the platform would not activate the window unless the
keybaord was open. So, a classic chicken - egg problem.
Change-Id: I62e652a3cd85f1313713c5d086d9537cc2f9826f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Lars Knoll [Fri, 1 Nov 2013 13:50:38 +0000 (14:50 +0100)]
Fix a bug in the inserting setters
Make sure we have allocated enough storage for
properties before writing them.
Change-Id: I3232ad1c4f17c21b48e8b444dc9ca604745dc799
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 1 Nov 2013 09:42:48 +0000 (10:42 +0100)]
Don't assert on (++1), rather throw a ReferenceError
Also fix up the generated string for the reference error.
Change-Id: I327a8eb682017297a799f8bae650267727039616
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Fri, 1 Nov 2013 13:26:18 +0000 (14:26 +0100)]
Fix valgrind errors in tst_qqmlecmascript::revision
The QML code looks like this:
MyRevisionedClass {
prop1: prop2
}
and MyRevisionedClass is C++ based. We need to return an initialized value when
reading prop2.
Change-Id: I33792c04aa1ba0d8e38c1351b8fb4de7abbe4891
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Tobias Hunger [Fri, 1 Nov 2013 09:39:33 +0000 (10:39 +0100)]
Fix build using clang
Change-Id: I59ceac7b3b68a92f128b0ee78076182d191e09e9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Frederik Gladhorn [Tue, 1 Oct 2013 19:09:52 +0000 (21:09 +0200)]
KeyNavigation should use forceActiveFocus
It would only set focus which works fine as long as the target is in the
same FocusScope. But as user one would expect that the target actually
receives the focus. Using forceActiveFocus is sensible since the current
item needs to have the "activeFocus" anyway and within the same focus
scope setting focus=true on another item will take away the active
focus.
Task-number: QTBUG-34209
Change-Id: I824f15fd0d4d42eb2f0c6c1b02660f2e007b3362
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Gunnar Sletta [Wed, 30 Oct 2013 13:32:54 +0000 (14:32 +0100)]
Added private API for enabling sharing between the QQuickwindow instances.
This API is primarily a hook which is needed by the Qt WebEngine to
set up sharing with the scene graph's OpenGL contexts.
Change-Id: I5bb03abd9ab99f502db8e413fe838a8b30365b8d
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Gunnar Sletta [Thu, 31 Oct 2013 21:14:12 +0000 (22:14 +0100)]
Fix rendering bug with batched translucent elements.
When one item in a batch of other translucent items would
change opacity, we need to rebuild batches under the current
root as all items in a batch are expected to have the same
opacity.
Task-number: QTBUG-34311
Change-Id: I2b9db19f05bd3a82be65cfa8a91e9398e8d58d0f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Alan Alpert [Wed, 23 Oct 2013 22:31:10 +0000 (15:31 -0700)]
Fix qml runtime when loading files that imported other files
QQmlComponent::setData does not perform any URL processing. Consequently
when using that function we need to 'normalize' the URLs ourselves to
ensure that the engine finds them acceptable.
Task-number: QTBUG-34301
Change-Id: Ia0f3a51129423020f7e4d7003ca356af3f89b441
Reviewed-by: Antti Piira <apiira@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
BogDan Vatra [Fri, 1 Nov 2013 06:46:32 +0000 (08:46 +0200)]
Fix compile.
Change-Id: Iee1280462bec296de1ff2f7572cfc98035195235
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 29 Oct 2013 10:59:54 +0000 (11:59 +0100)]
Speed up lookups of imported scripts
The QQmlContextData stores the JS objects of imported scripts in a
QList<PersistentValue>. Instead of indexing into that list, this patch changes
ctxt->importedScripts to be a JavaScript array, that in the IR we can index via
subscript.
Change-Id: Ie2c35fb5294a20a0b7084bb51d19671a27195fec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Liang Qi [Thu, 31 Oct 2013 08:20:35 +0000 (09:20 +0100)]
tests: replace nokia with qtproject in tst_qqmlmoduleplugin
Change-Id: I674da7f77dde380fb0772d5077da84de875b6ce8
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Lars Knoll [Thu, 31 Oct 2013 12:22:07 +0000 (13:22 +0100)]
Optimize string additions
QV4::String can now either hold a pointer to a QStringData,
or a pair of pointers to a left and right string. This
reduces the overhead of an addition to allocating a new
GC'ed object.
To avoid huge chains of linked strings, we use a depth counter,
and flatten the string once the depth reaches 16.
Change-Id: If7192b8a9f67f0e36a9a8ea34a156c5222f127f4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 31 Oct 2013 11:32:16 +0000 (12:32 +0100)]
Optimize lookup code
Simplify code slightly and allow the compiler to
generate more efficient code.
Change-Id: I2fbb060dc8969cf17813157d9c15e088a61e5de4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Mon, 28 Oct 2013 16:02:54 +0000 (17:02 +0100)]
Implement loading of resolved imported scripts
We can resolve the use of names that refer to imported scripts at compile
time and load them at run-time by index through context->importedScripts.
Change-Id: I681b19e7d68dbf3b9a68af00b4cea2a9254c2d78
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 28 Oct 2013 14:18:31 +0000 (15:18 +0100)]
Implement setting of values to resolved QObject properties
After the resolution of a property, we can set it by index at run-time instead
of via name resolution.
Change-Id: I479599dabe343cf9e6582dcda12291aebfcce418
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Thu, 31 Oct 2013 09:28:22 +0000 (10:28 +0100)]
Be consistent when checking for blocked subtrees.
This code was a leftover from before we started sending notifications
for changes in QSGNode::isSubtreeBlocked. It would accumulate opacity
and return blocked for nested blocks, even when
QSGNode::isSubtreeBlocked would return non-blocked. The result is that
the renderer would not respond correctly to DirtySubtreeBlocked and
would not add/remove shadow nodes for that subtree.
Change-Id: Iea83e89c6da4d0a3cb3ee7ea74cd96b7cda9fd6d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Kai Koehne [Thu, 10 Oct 2013 12:17:04 +0000 (14:17 +0200)]
Fix compilation with Mingw.org headers
Mingw.org (gcc 4.7.2) does not provide an implementation of
localtime_r. Anyhow, the localtime() in the Windows runtime
is thread safe, so we can use localtime() instead.
Change-Id: I387e0dcc22e519777fa9ceb9ad6a8b030d0438c1
Task-number: QTBUG-34038
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Fri, 25 Oct 2013 13:03:01 +0000 (15:03 +0200)]
Propagate bool/int/double/string types from QML into the IR
... by mapping the property type to the IR type if possible. In an expression
like parent.width * 0.5 this avoids a to-double conversion for parent.width but
instead we can rely on the result of the property read for the width property
to always be a double.
Unfortunately integer propertyes are currently not propagated, because upon
assignment from a double we would do the ECMAScript compliant truncation while
QML actually expects a round to happen. This needs to be solved separately.
Change-Id: I9c8f58416201d406e6e11d157cae12a686b774e5
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 25 Oct 2013 12:23:39 +0000 (14:23 +0200)]
Resolve member expressions of QObject members
...when the base is a QObject property itself or an ID referenced object.
This patch resolves for example the width property in a parent.width expression
to be a per-index lookup at run-time. That requires the base ("parent") however
to be a final property or come from an object where expected revision is known, i.e.
a QML imported object (scope or context).
Change-Id: Iaa1f57ace452da5e059c1d4e63b52b316e1a6b08
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Shawn Rutledge [Thu, 24 Oct 2013 11:44:55 +0000 (13:44 +0200)]
QtQuick.Dialogs DefaultFontDialog: visual improvements
Layout is taller and less wide, by putting weight, style and sample
below the other list views. It's more resolution-independent and
looks reasonable by default on Android. Renamed Others to Style.
Made column headings bold. Text in selected ListItem delegates
are in a contrasting color. Delegates are taller so they are
easier to select by touch.
Task-number: QTBUG-34157
Change-Id: Ia0c96c8556835d689d3c2fd5e2c0d34e421aff76
Reviewed-by: Liang Qi <liang.qi@digia.com>
Simon Hausmann [Mon, 28 Oct 2013 10:15:10 +0000 (11:15 +0100)]
Fix hanging debug engine auto-tests
* Move the debugger agent to the same thread as the debug service. It cannot
live in the gui thread where it is created.
* When the debugger is paused, resume immediately for now. This should be removed
once the "counter" part propertly responds to V4_BREAK and resumes us through
a separate message.
Change-Id: I64ea5a4e95c07763dd87736fbc72fc8927a669e3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Sean Harmer [Sat, 26 Oct 2013 17:48:56 +0000 (18:48 +0100)]
Refactor shaders into seprate GLSL source files
The default implementation of QSGShaderMaterial::vertexShader() and
fragmentShader() now loads the GLSL source from a list of source files
that can be specified via the setShaderSourceFile() or
setShaderSourceFiles() functions.
Multiple shader source files for each shader stage are supported. Each
source file will be read in the order specified and concatenated
together before being compiled.
The other places where Qt Quick 2 loads shader source code have
been adapted to use the new QSGShaderSourceBuilder, which is also
used internally by QSGMaterial.
This puts Qt Quick 2 into a better state ready to support OpenGL
core profile and to load different shaders based upon OpenGL version,
profile, GPU vendor, platform, etc.
Change-Id: I1a66213c2ce788413168eb48c7bc5317e61988a2
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Simon Hausmann [Thu, 24 Oct 2013 12:51:02 +0000 (14:51 +0200)]
Initial support for resolving meta-property access for the scope and context objects at QML compile time
This avoids having to do a string lookup for ids and in the import cache at
run-time, before we can do a string hash lookup in the property cache. Instead
we resolve final properties in the context and scope object at compile time and
look them up at run-time using their index instead. The dependencies to these
properties are also tracked separately and recorded in the compiled data.
This is merely the initial patch. There's a lot left to do, such as having
specialized getter and setters for specific property types. Setters are missing
altogether right now and will fall back to name lookup.
Change-Id: If3cb4e7c9454ef4850a615f0935b311c9395b165
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 31 Oct 2013 08:32:06 +0000 (09:32 +0100)]
Fix crash in QObject tree destruction
This issue was discovered while running the QtQuick Controls auto-tests
in valgrind. The issue is that the QObject based property in the VME meta
object is deleted as a child, after its parent (that had the property)
was deleted. At that point it's not safe anymore to emit the notify signal
in the already-deleted object (m_target->object).
Change-Id: I54e81dfedb6e712b8cbf182a72254e33e82910e3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Alan Alpert [Fri, 13 Sep 2013 23:34:07 +0000 (16:34 -0700)]
Load image data on main thread
QQuickPixmap use should be done on the main thread, if not it can lead
to an exception when creating the file loading thread (owned by the
engine).
Change-Id: Id59cec4312ecdee537dcba85778bd90ea4433b2e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Shawn Rutledge [Fri, 25 Oct 2013 14:53:55 +0000 (16:53 +0200)]
QtQuick examples make use of the new pixelDensity property
Change-Id: I273fc08405724158fbf7c7d410bfa38fef4600b1
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Shawn Rutledge [Fri, 25 Oct 2013 14:41:06 +0000 (16:41 +0200)]
QtQuick.Dialogs DefaultFileDialog: visual improvements
Make spacing of controls consistent with the other dialogs. It was
too conservative for high-resolution displays anyway.
Change-Id: I095d0c8f136b6692cc9c4ac01db748dbef205867
Reviewed-by: Liang Qi <liang.qi@digia.com>
Shawn Rutledge [Thu, 24 Oct 2013 13:27:11 +0000 (15:27 +0200)]
QtQuick.Dialogs MessageDialog: use Flow for button layout
On mobile platforms the dialog can have more buttons than horizontal
space to show them, so it's better to let them wrap around to ensure
they are all visible. But Flow does not try to maximize its
implicitWidth, so we have to calculate it at the right time before
showing the dialog.
Change-Id: I5667aa90539f291ae040f2e125abc2dea968f9ac
Reviewed-by: Liang Qi <liang.qi@digia.com>
Shawn Rutledge [Thu, 24 Oct 2013 11:47:43 +0000 (13:47 +0200)]
QtQuick.Dialogs: fake window decoration clips, is opaque for touch
This is the wrapper for dialogs on platforms that don't have top-level
windows. Mouse events over any unused area in the dialog would fall
through to the surrounding mouse area and close the dialog. Now they
don't. Clipping is enabled to ensure that dialog contents don't
overflow the "window" frame.
Change-Id: Ia3c0ae44bb47d46981daac9febd4cc93228dd20f
Reviewed-by: Liang Qi <liang.qi@digia.com>
Shawn Rutledge [Wed, 23 Oct 2013 13:45:26 +0000 (15:45 +0200)]
QtQuick.Dialogs: handle more keyboard shortcuts
The Back button on Android should close the dialog, but there is a bug
that Qt only receives the release, not the press. Otherwise Esc should
do the same, Enter should accept, it should be possible to copy the
text from the MessageDialog, copy colors to and from the ColorDialog,
etc.
Change-Id: Ib4d4c58cde9f4bb00ce3d46e2f9ea1aad9d52bb0
Reviewed-by: Liang Qi <liang.qi@digia.com>
Gunnar Sletta [Wed, 30 Oct 2013 13:09:18 +0000 (14:09 +0100)]
Work around Nouveau driver bugs
Change-Id: I25311a2bd88f41087352e0a43ba505f4e27b7e85
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Jan Arve Saether [Fri, 18 Oct 2013 13:21:43 +0000 (15:21 +0200)]
Don't let contentItem be FINAL in order to allow shadowing.
For subclasses that adds menubars, toolbars etc, the plan is to expose
another item (the item excluding the menubars, toolbars) as a
contentItem.
Task-number: QTBUG-32443
Change-Id: Id12fc50efde3fdf363e4528dd5de17177ddef24f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Lars Knoll [Wed, 30 Oct 2013 09:08:28 +0000 (10:08 +0100)]
Remove the last C++ exceptions from QtQml
Also clean up and compile the repository with exceptions
disabled again.
Change-Id: I653ae89353284b2f4ab884384f8ea6a5d100785d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Liang Qi [Wed, 9 Oct 2013 11:46:29 +0000 (13:46 +0200)]
Test: qmltest/fontloader were fixed
The commit
3745b0ca126f46eadfeeb7e3d1d53360dbf800cd resolved this
issue.
Task-number: QTBUG-32650
Change-Id: I084b326c19e7c0de303b05b2f3fb788c380a1ba0
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Lars Knoll [Tue, 29 Oct 2013 21:41:38 +0000 (22:41 +0100)]
Fix a regression introduced in I6e141a425c2b4cc0cd64c7f0011e7028b9147f69
Change-Id: I34840795cf280f6872a330e4949062f3ee692afa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 10 Oct 2013 09:51:42 +0000 (11:51 +0200)]
Use lookups in the interpreter
Implement lookup calls for the interpreter. This
significantly reduces overhead by avoiding repeated
name lookups on the same object type.
This doubles the speed of quite a few of the v8
benchmarks, and brings the interpreter up to close
to 40% of the speed of the JIT.
Change-Id: Ie8c2f5b1ca71a7329bc643c3d2158a6301a392ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 29 Oct 2013 15:06:43 +0000 (16:06 +0100)]
Optimize some unops and binops for moth
Optimize unops for ints/bools and add some
special binops where one side is constant.
Change-Id: I4f5639e36458560e5614371733abaafd94909ab1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 29 Oct 2013 14:28:17 +0000 (15:28 +0100)]
Moth: Inline a couple of binops
This gives another 10-15% for v8-bench
Change-Id: Iaea90402179813af23008c35d344fa7f5353cf5f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Thu, 17 Oct 2013 12:53:33 +0000 (14:53 +0200)]
Use one render loop per QQuickWindow
See the task for the full reasoning behind this patch.
The threaded renderloop has been refactored to have one window per
thread. This is mostly a simplification of the current code path where
for loops over multiple windows are turned into if (window).
The QSGContext has been split into two classes, QSGRenderContext
for which there is one per OpenGLContext.
The rest of the patch is name changes and a couple of cleanups
in the hopes of simplifying this change.
Task-number: QTBUG-33993
Change-Id: I31c81f9694d7da7474a72333169be38de62613c4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Shawn Rutledge [Mon, 28 Oct 2013 10:16:45 +0000 (11:16 +0100)]
qml tool: compiles with clang
The error was that app can be uninitialized if the switch goes into
the default branch.
Change-Id: Ic690e1dd257cf88ee04d019b5b81121cecb48564
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Alan Alpert [Tue, 29 Oct 2013 23:36:31 +0000 (16:36 -0700)]
Fix qqmllocale test
Test was only passing the time to the format function, thinking it was
the only part under test, but the date is also relevant due to DST being
part of the formatted output.
Task-number: QTBUG-34406
Change-Id: I1f542b58907281632ee3c96b9b5b38426936953e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Thu, 24 Oct 2013 08:38:29 +0000 (10:38 +0200)]
Cleanup QML specific JS code generator
Move parameters global to the entire QML file to the constructor, pass
component/context specific parameters to the generate function.
Change-Id: I6c3ab41b3bab19b066bbe20f971c5cafaeb70b98
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
kakadu [Thu, 24 Oct 2013 10:55:11 +0000 (14:55 +0400)]
Fix adding created objects to instantiator.
Before all new objects were pushed into the end of QVector,
i.e. if item model changes object with low index newly created object
will be added like it has big index. So, removing objects from
instantiator was buggy.
Task-number: QTBUG-33847.
Change-Id: I49fba53a40fce72060b629f737c10b525c67cc86
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
kakadu [Thu, 24 Oct 2013 10:24:45 +0000 (14:24 +0400)]
Add support of hidden files to folder list model.
Property 'ShowHidden' has been added to see hidden files.
Task-number: QTBUG-34247.
Change-Id: I7016b04b9d29731139c32bc0b30b93762e03e02e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Simon Hausmann [Wed, 23 Oct 2013 14:24:58 +0000 (16:24 +0200)]
Speed up id object lookups
We can resolve lookups for objects referenced by id at QML compile time
and use a run-time helper to extract the id object out of the QML context
data by index instead of name.
Dependencies to id objects are also tracked at compile time and registered
separately before entering the generated function code.
The lookup of id objects is encoded in the IR as special member lookups.
Members will also then in the future be used to for property lookups in context
and scope properties, as well as any other property lookups in QObjects where
we can determine the meta-object.
Change-Id: I36cf3ceb11b51a983da6cad5b61c3bf574acc20a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Tue, 29 Oct 2013 11:53:05 +0000 (12:53 +0100)]
Inline unary operations in moth
Change-Id: I6e141a425c2b4cc0cd64c7f0011e7028b9147f69
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Tue, 29 Oct 2013 09:54:06 +0000 (10:54 +0100)]
Remove superfluous code.
I suspect this was to work around that a very early version
of the previous renderer some times left vertex pointers
active, but this has not been the case for a very long time,
so this code is just wasting time and memory.
Change-Id: I4b79ff67d17bf47af515e8db203960c9bceae247
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Antti Piira [Thu, 24 Oct 2013 00:34:18 +0000 (17:34 -0700)]
Modify SameGame to use QML Singleton
Converts SameGame to use QML Singleton for storing global settings
data that was previously stored in javascript files. In addition
adds a BlackBerry specific selector to load a different singleton
settings instance.
Change-Id: If511e5efd0e539c764ab70eca4fb0f2874b6240e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Gunnar Sletta [Tue, 29 Oct 2013 10:37:57 +0000 (11:37 +0100)]
Make sure custom particles mark themselves dirty.
Task-number: QTBUG-34396
Change-Id: I3a012166489cb36b923ff794bf9ac26c4bae0508
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Sean Harmer [Wed, 2 Oct 2013 22:57:29 +0000 (23:57 +0100)]
Prevent bogus warning message flood on nVidia driver related to mipmaps
When using QtQuick2 Text elements on nVidia with the KHR_debug extension
active we get flooded by messages of the form:
"Texture state usage warning: Waste of memory: Texture 0 has mipmaps,
while its min filter is inconsistent with mipmaps."
This is totally bogus as there really aren't any mipmaps created here.
However, it is very annoying and hides genuine errors. Setting the
mipmap max level to 0 works around the issue. nVidia seem unwilling
to fix it in the driver.
Change-Id: I56632ba1ee777fb54fc8d17e1828669baa183a55
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
J-P Nurmi [Sun, 27 Oct 2013 09:51:10 +0000 (10:51 +0100)]
QQmlSettings: fix loading of initial values
When the initial value of a QML Settings var property is invalid
ie. it has no initial value set, it must be loaded from QSettings
as is without testing QVariant conversion (that would fail when
the conversion target type is "invalid").
Change-Id: If002d52251e3f2d6373dcc305b439de61c6b8c79
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
J-P Nurmi [Sun, 27 Oct 2013 09:22:30 +0000 (10:22 +0100)]
QQmlSettings: fix indentation
Change-Id: I0b8b16176dbc1981f99807f98230294c18255475
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Lars Knoll [Tue, 29 Oct 2013 09:28:04 +0000 (10:28 +0100)]
Rework parameter handling for moth
Get rid of the parameter type, and only store a
scope, that is an index into a SafeValue ** array.
This significantly speeds up loading and saving of
parameters.
Change-Id: I185145f1afd0b8cea461c7ca732ada3ebe39c34c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 29 Oct 2013 07:17:54 +0000 (08:17 +0100)]
Remove the LoadValue instruction
With the constant table this is exactly the same as a move.
Also renamed MoveTemp to Move, as it not only moves Temps
but also other variables.
Change-Id: I1fccc04314661954179d903519adbc39777395e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 28 Oct 2013 21:30:04 +0000 (22:30 +0100)]
Move constants into the compiled data for the interpreter
This makes it possible to remove the Value stored as
part of the instruction stream. Reduces the size of the
instruction stream and will allow to optimize Param lookup.
Change-Id: I23dab5dbed76bf8d62df7042934064d4676bc43d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sun, 27 Oct 2013 21:32:19 +0000 (22:32 +0100)]
Add a constant table to the compiled data
This will help simplifying and speeding up the moth generated
code.
Change-Id: I1b87c4b25dbfa6ce2e8a0b77e526f7fc063b0de2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Frederik Gladhorn [Tue, 29 Oct 2013 10:42:58 +0000 (11:42 +0100)]
Seed Math.random in v4
Task-number: QTBUG-34105
Change-Id: I6cb5c8b80f158677aaf334feeaa206a5eaf9cfc3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Mon, 28 Oct 2013 13:02:25 +0000 (14:02 +0100)]
Track size changes from transform animators.
When the size changes, so will most likely also the transform
origin, so we need to check for it and update accordingly.
Task-number: QTBUG-34140
Change-Id: Ic3d6c1ac599db499ab196a8cbe550308a75e837f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Gunnar Sletta [Mon, 28 Oct 2013 13:35:51 +0000 (14:35 +0100)]
Add references to Animators from the QML Type Reference
Task-number: QTBUG-34221
Change-Id: Iaa1d7f4dd70d2d8150e8360545a33ac984e6bebd
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Simon Hausmann [Mon, 28 Oct 2013 15:14:21 +0000 (16:14 +0100)]
Disable DST related locale test temporarily
We prioritize getting other fixes into QtQml right now, so skip these tests.
According bug is filed.
Change-Id: I9b824e41d2164906b22282e75aa80a69a4ce5652
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Mon, 28 Oct 2013 15:04:07 +0000 (16:04 +0100)]
Fix interpreter without computed goto and new exception handling
At the end of an instruction, don't break and run into the unreachable assert,
instead use "continue" to get to the top of the for (;;) loop to resume
execution.
Change-Id: I544104e76cb7a547c050714da1c67cde6f11ba04
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 24 Oct 2013 06:54:03 +0000 (08:54 +0200)]
Remove qv4unwindhelper class
This class is not required anymore to generate stack traces, as
we now store the required information in the JS context stack.
Change-Id: I3893c805ca89dda70efde07fdd120e7dfaf3639f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 24 Oct 2013 06:49:35 +0000 (08:49 +0200)]
Cleanup: Remove now unused throwInternal() method
This method was throwing a C++ exception in the old exception
handling and is not needed anymore.
Change-Id: If67696cdbd260225ae60720a1035941fe7e1e650
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 22 Oct 2013 12:32:03 +0000 (14:32 +0200)]
Fix the remaining try/catch statements in C++
Change-Id: I2421dc48fb271b66bd476fb16a32a88fcc4c5177
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 22 Oct 2013 11:26:08 +0000 (13:26 +0200)]
Protect write accesses to objects
Don't write to objects if we have a pending exception to
avoid any side effects.
Change-Id: I9f93a9195a652dbae7033cc6ebb355d5d86e9b5e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 21 Oct 2013 07:57:58 +0000 (09:57 +0200)]
Avoid side effects when en exception has been thrown.
We don't want to check for exceptions after every single
line on our runtime methods. A better way to handle this
is to add the check in all methods that have direct side
effects (as e.g. writing to a property of the JS stack).
We also need to return whereever we throw an exception.
To simplify the code, ExecutionContext::throwXxx methods now
return a ReturnedValue (always undefined) for convenience.
Change-Id: Ide6c804f819c731a3f14c6c43121d08029c9fb90
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 22 Oct 2013 08:48:21 +0000 (10:48 +0200)]
Correctly catch exceptions in the API methods
Replace all C++ try/catch statements with
engine->hasException checks.
Change-Id: I7c04e02664ec6b4d256478c6e18f6b20ae4f7bc1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 21 Oct 2013 07:50:27 +0000 (09:50 +0200)]
Properly propagate parse errors
Replace all try/catch statements used when parsing
with checks for engine->hasException.
Change-Id: I4493cb600d5a3eb095c2003bb88bd031403e47c9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 21 Oct 2013 11:07:33 +0000 (13:07 +0200)]
Exit the codegen in case we have thrown a parse error
This makes sure we get the right exception in the engine
in case there are multiple parse errors in the code, and
avoids running into assertions.
Change-Id: I8a11c6d043d09caf57a3e4c6aad5834e99cc1761
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 23 Oct 2013 12:03:09 +0000 (14:03 +0200)]
Implement new exception handling for moth
Add the required instructions and check for
exceptions in the engine before storing any
results.
Change-Id: Ibfaf904d659859e8012920270825211ba202c63d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 21 Oct 2013 15:07:45 +0000 (17:07 +0200)]
Rework IR code generation for try/catch/finally
Simplify the generated code. Add a special block to catch
exceptions thrown inside a catch() statement.
store the exception on the stack when entering finally and
rethrow it at the end. This ensure correct behavior for
break/continue/return statements inside finally.
Don't check for exceptions after calling push_catch_scope
and pop_scope in the JIT'ed code. This can lead to infinite
loops when throwing inside an exception handler.
Change-Id: I67e9325794e2fd25b0773b21e02fbaadb43faab0
Change-Id: Ic1ea9c0c43eec1d49177dc1ab4552a1da04e96fe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 18 Oct 2013 13:42:17 +0000 (15:42 +0200)]
Rework exception handling
Start the work to remove c++ exceptions from our JS
exception handling. Rather rely on engine->hasException.
Check the flag after we return from any runtime call in the
JIT.
Implement new try/catch handling code in qv4codegen and
for the JIT that doesn't rely on exceptions. As an added
bonus, we can remove the Try statement in the IR.
Change-Id: Ic95addd6ae03371c43c47e04cac26afdce23a061
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 29 Oct 2013 09:29:27 +0000 (10:29 +0100)]
Disable the stack slot allocator
The allocator doesn't work correctly and sometimes assigns
temps with overlapping ranges to the same stack slot.
This fixes crypto.js and qt quick controls autotests running
with the interpreter.
Change-Id: If3d0f90edfac669f89da5174cd58eb345d48f2b8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Thu, 24 Oct 2013 18:44:17 +0000 (20:44 +0200)]
Fix rendernode bug and enable rendernode test.
The bug in the renderer was that the viewport was set before
we called the render node, leaving us with the viewport
set by the render node as opposed to the viewport of the
renderer.
The render node API is a crude and intrusive hack which was added for
webkit back in the day. With the introduction of webengine it becomes
less relevant, but it should still work.
Change-Id: I66a1e3047e018ad6c0bb28044851e9fc65da59cc
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Shawn Rutledge [Fri, 25 Oct 2013 13:24:50 +0000 (15:24 +0200)]
QtQuick.Dialogs: resolution-independent controls use actual resolution
logicalPixelDensity ended up hard-coded on Android, which made the
buttons and the FileDialog too small again.
Change-Id: Ic1805246c4466d7167d422ba48ae5ec37978d332
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Shawn Rutledge [Fri, 25 Oct 2013 13:16:46 +0000 (15:16 +0200)]
Screen attached property: expose pixelDensity property
Because logicalPixelDensity is different than physical density on
multiple platforms, having the actual density is critical to be able
to design resolution-independent controls.
Change-Id: I06bbdc6e6869718058a796ca737668ce69802f2b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Gunnar Sletta [Thu, 24 Oct 2013 17:59:12 +0000 (19:59 +0200)]
Make sure QQuickBorderImage sets its pixmapChanged dirtyflag
Task-number: QTBUG-34298
Change-Id: Ie66f0bdd705335491496f5d583193b32cb7749f3
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Antti Piira [Wed, 23 Oct 2013 20:53:38 +0000 (13:53 -0700)]
Use finalUrl in QQmlTypeLoader::Blob::addPragma to fix a bug.
There was a bug in addPragma where url() was being used instead of
finalUrl(). This resulted in an error finding the type if selectors
were used. This patch includes the fix and adds a unit test to cover
the use case.
Change-Id: I18b6c73e96af2e1464931de76f1f8fd804746d82
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Tor Arne Vestbø [Fri, 18 Oct 2013 15:12:15 +0000 (17:12 +0200)]
Explicitly mark subdirs as host_builds in SUBDIRS template
Allows post-processing code to exclude recursing into host_build subdirs.
The alternative would be to have the SUBDIRS logic pre-parse the subdir
project to check if it's a host_build, but that might have a performance
impact, so it's better to leave the information explicit in the subdir
project file.
Change-Id: I468ceeaedce54b13bf672f82b9dcf04cc19d15e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Oswald Buddenhagen [Fri, 18 Oct 2013 10:18:07 +0000 (12:18 +0200)]
simplify host_build logic again
qt_tool handles bootstrapping fully automatically.
This reverts commit
0fc040ef70513ccaeb9e96f7ca05a3df4d6c7879,
and adds some more.
Change-Id: Icffcf7f487dbf660678c7ee622f94b1063fef7e3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Oswald Buddenhagen [Tue, 22 Oct 2013 10:06:56 +0000 (12:06 +0200)]
sanitize dependencies surrounding qmlimportscanner
the tool's subdir must come before its dependants, otherwise qmake -r is
broken (ok, that's mostly academical nowadays).
also remove the unnecessary dependencies.
Change-Id: Idf785522d466d4abb5f864ef4b66784024322339
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Oswald Buddenhagen [Tue, 22 Oct 2013 10:03:53 +0000 (12:03 +0200)]
untangle SUBDIRS
this also excludes qmlprofiler on android, as it is not a host tool.
Change-Id: I0bc2582fa4b951ea1f871cd67ef05d0d15ed9763
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>