Yoann Lopes [Wed, 30 Oct 2013 17:03:23 +0000 (18:03 +0100)]
Fallback to native font rendering for bitmap fonts.
Distance field rendering requires glyph outlines, which are not
available for bitmap fonts.
Task-number: QTBUG-32737
Change-Id: I64569e4e6b2285ca998b5f80ec31ab04cf1f3d09
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Simon Hausmann [Fri, 8 Nov 2013 14:27:51 +0000 (15:27 +0100)]
For x86 builds, try to detect SSE2 availability early and bail out
...instead of potentially just crashing. This is for the rare case
of somebody trying to run a QML2 based application on a Pentium 3
from before 2001 or older.
Change-Id: Ia5606fe28ef5579654ec939c86830af70dbb84d7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Sun, 3 Nov 2013 14:26:34 +0000 (15:26 +0100)]
Remove stray warn_off in pri file
Change-Id: I9abf1180aecbd2e87fa7f52b51ad1c59665723fc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 10:18:08 +0000 (11:18 +0100)]
Fix a few more compiler warnings in release builds
Change-Id: I826226b7ddd4a74037b5bbe9a4a7322d404f53a9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Yoann Lopes [Fri, 8 Nov 2013 14:55:15 +0000 (15:55 +0100)]
Workaround for glyph upload bug with the Mali-400 GPU.
Uploading unaligned and alpha-only data seems to be broken with that
GPU, uploading line by line does the trick.
Task-number: QTBUG-33951
Change-Id: I2790990ca1d3a3016ec3d9fefaea7002b92faeb7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Morten Johan Sørvig [Fri, 8 Nov 2013 14:40:30 +0000 (15:40 +0100)]
Make QQuickWindow::forcePolish() private.
Adding public API was not the intention when adding
this slot.
Change-Id: If477917c434b32d5e5cd1fa6c640f1a6b167dd24
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Frederik Gladhorn [Thu, 7 Nov 2013 18:49:29 +0000 (19:49 +0100)]
Remove include of empty QAccessible2 header
Change-Id: I62dd3364909179c364e91682e4cece8ae5a847d4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Eskil Abrahamsen Blomfeldt [Fri, 8 Nov 2013 14:10:51 +0000 (15:10 +0100)]
Remove debug output
Some applications (like e.g. the Tweet Search example) prints out
a ton of these "scanEscape" messages to the console.
Change-Id: Ibfa9c4780705167693c7fb6af8cad1e312549a5f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Friedemann Kleint [Fri, 8 Nov 2013 08:39:25 +0000 (10:39 +0200)]
Move Primitive::emptyValue() to qv4value_def_p.h.
Silence MinGW-warnings: warning: 'static QV4::Primitive
QV4::Primitive::emptyValue()' redeclared without dllimport attribute
after being referenced with dll linkage
Task-number: QTBUG-34152
Change-Id: Id6971a20f1901022ab0d1c8f1834b135c71510ae
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Wed, 6 Nov 2013 09:16:00 +0000 (10:16 +0100)]
Remove debugging tests for commands not used by Qt Creator.
These are also not (yet) implemented in the V4 debugging engine.
Change-Id: If47b97535e69117193b87d278131f19bd4120c57
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Lars Knoll [Fri, 8 Nov 2013 15:24:23 +0000 (16:24 +0100)]
Initialize variable
Change-Id: I540b08bd1c60215a63cad1233f09e060b70df66f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sun, 3 Nov 2013 14:23:05 +0000 (15:23 +0100)]
Simplify & speed up function calling
Get rid of the SimpleCallContext, instead simply
use the CallContext data structure, but don't
initialize the unused variables.
Change-Id: I11b311986da180c62c815b516a2c55844156d0ab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Sat, 9 Nov 2013 00:58:28 +0000 (01:58 +0100)]
Fix crash in animation controller upon destruction
Triggered by tst_examples, it appears that we can have jobs in
m_deleting that are also still listed in m_starting. So similar to
what we do in beforeNodeSync, we now also take any deletion-scheduled
jobs out of m_starting/m_stopping in the destructor.
Change-Id: I2e00570a4e4669f8172354bf5806c5285920030a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Kai Koehne [Thu, 7 Nov 2013 08:08:05 +0000 (09:08 +0100)]
Generalize check for localtime_r
Use the _POSIX_THREAD_SAFE_FUNCTIONS define to decide
whether localtime_r is available, instead of guessing
by Mingw-w64 version.
This copies the logic of qdatetime.cpp in qtbase, and
should fix compilations with older Mingw-w64 versions.
It replaces
ce3e8f93c.
Task-number: QTBUG-34038
Change-Id: Iee8a9aa61d2af3e069e6365c40f81007c479d147
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Shawn Rutledge [Thu, 7 Nov 2013 17:31:47 +0000 (18:31 +0100)]
MessageDialog: handle clicked(button, role) signal properly
Depends on I7be753080794adabb784df9b95ac04aa1c29151c in qtbase.
Now the Android native dialog can provide the same functionality as
the QML and QMessageBox implementations.
Change-Id: Icc9c610669742199d48497096524f6cf8ed4d835
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Shawn Rutledge [Thu, 7 Nov 2013 17:28:38 +0000 (18:28 +0100)]
DefaultMessageDialog: use gadget StandardButton type
Followup to
e17ae3b8b716b00c7cb6156347101f2e789dbd58 : Message.Ok etc.
are no longer available.
Change-Id: I30fc054fc6ace7dc48951739c88f49db2291a7a9
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Gunnar Sletta [Thu, 7 Nov 2013 10:08:49 +0000 (11:08 +0100)]
Fill recursive ShaderEffectSource with transparent when using alpha.
The logic relies on m_fbo being 0 on the first render pass, in which
case it will pick texture id 0 which is solid black. Though this
works ok, it results in recursive shader effect sources starting
out black which is ugly.
Change-Id: I22b1d50e02c00583837b8152c5fb850263038a93
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
J-P Nurmi [Wed, 6 Nov 2013 11:38:47 +0000 (12:38 +0100)]
Fix FolderListModel versioning
Task-number: QTBUG-34448
Change-Id: Idebfdc123a7b908988c9ae86d7db4831ad0e4433
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Yoann Lopes [Tue, 5 Nov 2013 14:17:03 +0000 (15:17 +0100)]
Fix crash when invalidating QSGContext.
A pointer list was not cleared when invalidating the context,
potentially holding dangling pointers after that.
Change-Id: I0618c54ffa67b31b115901e8be3a6d3cd16dc844
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Gunnar Sletta [Fri, 1 Nov 2013 14:49:33 +0000 (15:49 +0100)]
Refactored Animator internals
Change the design from posting events for starting and stopping
to use the scene graph's existing 'sync' point. This gives
much higher predictability and makes both ownership and cleanup
cleaner and also reduces intermediate states while events are
waiting to be delivered.
Task-number: QTBUG-34137
Change-Id: I069ac22acbddaa47925b8172ba98ac340fe9bf8d
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Alan Alpert [Wed, 6 Nov 2013 05:16:29 +0000 (21:16 -0800)]
Version pixelDensity consistently
Change-Id: I06bbdc6e6869718058a796ca737668ce69802f2c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Sérgio Martins [Wed, 6 Nov 2013 15:04:10 +0000 (15:04 +0000)]
Initialize variables before using them.
Change-Id: I7cd5a17259814b3f2405b63d7f4d2a0fd30cae4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Kai Koehne [Wed, 6 Nov 2013 14:13:59 +0000 (15:13 +0100)]
Replace QString::fromUtf8() with QString::fromLatin1() for literals
The literals are all latin1 strings, and fromLatin1() is much faster.
Change-Id: I25af0358a0a4aa2e973349c027cfac50b7589429
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Jerome Pasion [Tue, 5 Nov 2013 12:13:56 +0000 (13:13 +0100)]
Doc: Updated url variable in qdocconf files.
In 5.2, the HTML output is in a flatter structure and when they are
hosted in qt-project.org/doc, the documentation will be found at
http://qt-project.org/doc/qt-$QT_VER
The url variable is used by projects outside of Qt 5 which need
to link to Qt 5 documentation, such as Qt Creator.
Task-number: QTBUG-34584
Change-Id: Ie23c3748fbe780fa00f98404238099809df5ef06
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Andrew Knight [Tue, 5 Nov 2013 22:23:44 +0000 (00:23 +0200)]
Fix build on WinRT
Disable JIT and avoid unsupported functions under WinRT.
Also add MSVC's ARM flag to the double conversion white list.
Change-Id: I22ec340a20b113fdeefb802ac61812f78a527895
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Mon, 4 Nov 2013 01:48:16 +0000 (02:48 +0100)]
Ensure the this object is set correctly to the scope object in binding expressions
This is a regression from 5.1
Change-Id: I61ad372a02d937c195dad74bd9fcb8fd4410d97a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
J-P Nurmi [Tue, 29 Oct 2013 16:25:00 +0000 (17:25 +0100)]
Fix QQuickText hover event handling
Catch hover events only when the item contains either rich or styled
text, and make sure to ignore hover events as appropriate to propagate
them further.
Task-number: QTBUG-33842
Change-Id: Idef5be7c502711393ab532c4ace31663b0e0a872
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Lars Knoll [Tue, 5 Nov 2013 18:36:58 +0000 (19:36 +0100)]
Fix XHR
Return after throwing an exception. Fixes the XHR autotest
Change-Id: Id3412eeb2c9867d3ad9bd64b3a81c4468c5b5bd5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 15 Oct 2013 21:35:52 +0000 (23:35 +0200)]
Generate inline code for "foo == null/undefined"
Change-Id: I81f5708034ed50207afde697e377e8f265cbcd1c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 20:41:58 +0000 (21:41 +0100)]
Smaller optimisations
Change-Id: Idb35d57801472e73b4e77b83e129dbb2a484b734
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 20:13:41 +0000 (21:13 +0100)]
Remove 2 unused macros
Change-Id: I095673b56166f47969583e9aff30bcef1e50a674
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 20:10:13 +0000 (21:10 +0100)]
Move conversion of this object into generated code
When a non strict mode function uses the this object, we
need to make sure it's being correctly converted into a
object before being accessed. So far this was being done
by ScriptFunction::call. Move this into the generated code to
avoid overhead for methods not using 'this', and simplify our
ScriptFunction::call() implementation.
Change-Id: I739f4a89d29ed8082ce59e48d1523776224fc29d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 18:56:09 +0000 (19:56 +0100)]
Don't initialize locals for simple script functions
There are not being used anyway.
Change-Id: Id61b023eeb9d61bbee2874a5fd5005ba9fb08fca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 18:25:11 +0000 (19:25 +0100)]
Minor optimisations
Remove a couple of function calls.
Change-Id: I5abc6d96df52787ee7c433239807c851eb9a6d41
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 18:23:46 +0000 (19:23 +0100)]
Remove code that's not required anymore
The StackSaver class is not required anymore, as we don't
throw C++ exceptions anymore, and masm/moth generated code
always cleans up the JS stack.
Change-Id: If49d952230f8bd074f3b9353f56c07c8c5134752
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 17:39:55 +0000 (18:39 +0100)]
Don't run the GC too often
Some test cases were badly trashing the GC, running it
way too often. Fix this by only running the GC after
we allocated more than 50% of the amount of available
items.
Change-Id: Icfe6d0730552ef2298963de706213ebc9e3e342c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 2 Nov 2013 16:11:06 +0000 (17:11 +0100)]
Optimise string additions
Small optimisation for string additions, also add one more check
for exceptions in the code where required.
Change-Id: I6c14bc88ea5d03f7eeed0e0168c5195f9f823693
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Tue, 5 Nov 2013 12:20:24 +0000 (13:20 +0100)]
Fix rounding behavior of Qml when assigning doubles to integer properties
The engine used to round, but that is inconsistent with ECMAScript's way of
converting doubles to integers by truncation.
With this patch we can also enable the propagation of integer type information
into the IR, but we have to be careful not to utilize it when writing
properties.
Change-Id: I04af4879ba5131349eca2eeff2b27f4598f5267b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Alan Alpert [Tue, 5 Nov 2013 01:13:47 +0000 (17:13 -0800)]
Remove time type documentation
While the time type does technically exist, it cannot be created from
QML. Pending a discussion about its future, the doc will be temporarily
removed to avoid confusing people.
Task-number: QTBUG-32295
Change-Id: Ic171a7f4a5d7c0515427a6d1d65bed0abcfe3643
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Alan Alpert [Mon, 4 Nov 2013 21:29:12 +0000 (13:29 -0800)]
Don't propagate mouse events to disabled MouseAreas
Task-number: QTBUG-34368
Change-Id: I28d4f57e51300f12a7bab5d215933762102f3916
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Lars Knoll [Sat, 2 Nov 2013 15:30:26 +0000 (16:30 +0100)]
Refactor marking GC'ed objects
Don't use recursive function calls anymore. Instead, push marked
objects onto the JS stack, and then pop them off when their children
are being marked.
Should reduce stack memory usage, and improves performance by ~5%.
Change-Id: I2d37d97579144fcba87ec8e9fd545dd220c01fbb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Tor Arne Vestbø [Mon, 4 Nov 2013 13:24:26 +0000 (14:24 +0100)]
Add missing Q_INIT_RESOURCE
The library needs to do Q_INIT_RESOURCE for all resources it uses
internally, otherwise static linking will fail, and the user has
no idea how to rectify it as the name of the missing resource is
not known.
Change-Id: I8ea766e63cff22bbb0c45e6125c3a07948de2274
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Tor Arne Vestbø [Tue, 5 Nov 2013 14:11:31 +0000 (15:11 +0100)]
Add missing namespace wrappers for QQuickItemsModule
Change-Id: I75b576eda67db7172fc6579dbc42a690d0386b88
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Sze Howe Koh [Tue, 5 Nov 2013 12:17:06 +0000 (20:17 +0800)]
Doc: Fix broken links
Change-Id: Ie7408409ddbaa354370267f2dd74326ec56a4186
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Shawn Rutledge [Mon, 4 Nov 2013 13:56:34 +0000 (14:56 +0100)]
Replace Message attached property with gadget types
This is a more efficient way to expose the StandardButton and
StandardIcon enums.
Change-Id: I9d0becf54be2a883d55c9eaeaf10b83b23e59f3c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Gunnar Sletta [Thu, 31 Oct 2013 08:45:57 +0000 (09:45 +0100)]
Added QSG_INFO=1 environment variable to spit out graphics info
Change-Id: I12bc0bc475b3e99185aefcd58eef5a0fb5e9852e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Sze Howe Koh [Sun, 3 Nov 2013 14:08:47 +0000 (22:08 +0800)]
Doc: Fix typos
Task-number: QTBUG-33360
Change-Id: I913c14d3d6a90d2c20e40e246ad11f50a26c3ad9
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
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>