Commit Graph

9820 Commits

Author SHA1 Message Date
Simon Hausmann 2509e9b7bc Fix crashes on QNX/x86
On x86 we assume that ebx holds the address of the global offset table for
position independent code. So before placing a run-time call we restore the
register from it's position we saved it on earlier on the stack. However after
commit d9f33ccdef the register wasn't saved on the
stack anymore in the prologue because we skipped because it's caller saved. So
when we seemingly reloaded ebx with the GOT from the stack, we loaded it from a location
we never saved it to. This patch makes sure to always save it on the stack so that
we can always restore it.

Change-Id: I8f6a8e38779151fff517f17220f29a7cb45ca89d
Task-number: QTBUG-43036
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-03 10:50:07 +01:00
Simon Hausmann 1a764d00ee Fix application build when combining with Mac OS X Cocoa headers
OSX's AssertMacros.h unconditionally defines macros like "check" and that
clashes with qml's type discovery templates that define a check function
and that are used by qmlRegisterType and friends.

There's a comment in the OS X headers suggesting that this will be fixed
in the "next" release, but that hasn't happened for a while and the bug
is still present in 10.10. So let's work around it and make life easier
for people using Qml and Cocoa at the same time.

Change-Id: I005d21188f92deaebd45bce2e6484cd4deeb9a34
Task-number: QTBUG-36309
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-12-03 08:28:42 +01:00
Simon Hausmann a6fbea98ed Fix conditional breakpoints in QML
We need to set "inheritContext" to true for the QV4::Script that's used during
conditional break point evaluation, because that will also disable fast
property lookups, which is still required for QML lookups to work.

Change-Id: I8976df1c827b5058eae9bdce6e86e5ea856cbfe1
Task-number: QTBUG-43018
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-12-03 08:28:25 +01:00
Simon Hausmann cfdcc65cc5 Fix expression evaluation in specific frames in the debugger
Expressions from the QML/JS console are intended to be executed in a specific
frame / context. However that wasn't implemented properly, we should pop the
current context frameNr times.

[ChangeLog][QtQml] Fix inspecting objects in QML/JS console in different frames.

Change-Id: If575d4005c52a9fe6805538a7b1a02b9e32049d6
Task-number: QTBUG-42831
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-12-03 08:28:22 +01:00
Simon Hausmann b970c57916 Remove dead code
The eval code tracking was used last time for the old exception handling,
but that's long gone :)

Change-Id: I6fa80a5197745fde461e4da66cd65a50149c6048
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-12-03 08:28:18 +01:00
Shawn Rutledge b34e6717fa QtQuick.Window: add missing documentation for Window methods
Several more methods/slots are inherited from QWindow but are not
documented for the QML Window type.  Also some other documentation
improvements.

Task-number: QTBUG-40093
Task-number: QTBUG-42426
Change-Id: Ib753be269cbc41ee540e6556e0ef483758eefe62
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-12-03 07:15:16 +01:00
Simon Hausmann bde7358e94 Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4 2014-12-02 19:56:43 +01:00
Simon Hausmann 1ba68c8431 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I89bbb2977350a03c156d531f810d08a5560ffbb3
2014-12-02 13:41:58 +01:00
Kai Koehne d0b5332dcc Fix permissions of files
Change-Id: I22958892d846da348325ba608084f8d9a05473d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-12-02 13:29:21 +01:00
Simon Hausmann d40fcf19f7 Added change log for 5.4.0
Change-Id: Ie3e238a3ccac1d95978229316977d131be3010d6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-12-02 09:56:19 +01:00
Simon Hausmann 1eedf91fcd Regression: Fix array data corruption
When inserting into a sparse JS array, we may have to re-allocate the
underlying data vector. When that happens we must reload the ArrayData
pointer, to avoid returning a wrong pointer in ArrayData::insert.

This patch also fixes the valgrind support in the memory allocator by correctly
marking the mmap'ed memory region as inaccessible.

Change-Id: I86aabc2cec74a4f3c8396463910d90c8968a741d
Task-number: QTBUG-42956
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-12-02 09:56:13 +01:00
Friedemann Kleint 06fc202e81 Skip tst_qquickwindow::headless() when using ANGLE/Windows.
The test crashes frequently.

Task-number: QTBUG-42967
Change-Id: Ic17c6187bfa657154a9b04eb9c5b9a3de291cb1e
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2014-12-02 09:56:04 +01:00
Simon Hausmann 64c9cbf304 Fix loading of .ui.qml form files with cached compilation units
Simplify the type loading logic and try the Type -> Type.qml and Type ->
Type.ui.qml mapping in a simple loop that tries off-disk and cached
compilation unit loading.

Change-Id: I537feabd0a158a71f330bede9e6988291298ae81
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-12-02 09:55:58 +01:00
Andrew Knight c170ea57ca Don't default to HighQualitySubPixelAntialiasing on WinRT
The subpixel shader is probably not a good default here because most
devices are mobile (can change screen orientation) and have high pixel
densities. Furthermore, it breaks text rendering on the Surface RT, where
the graphics hardware is too weak to support the number of uniforms the
subpixel shader uses.

Task-number: QTBUG-41769
Change-Id: I10210af91976ab55e611025c0452a1ee1f3114a9
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-12-02 07:51:33 +01:00
Morten Johan Sørvig ca5e643ea9 Make effectiveDevicePixelRatio() return a qreal.
Fractional scale factors are not as broken as previously
believed, especially for Qt Quick. Keep the door open
for finding a way to support it at some point in the
future.

Change-Id: Ifeadcc53175ac6c25ea0288d5fe1966e3de408f9
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2014-11-30 09:45:11 +01:00
Laszlo Agocs fa0eea53f7 Add missing call to rendercontrol
Change-Id: Ic8c8e6d7a9d99216292b8b4faa2926d849333a05
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2014-11-28 13:09:26 +01:00
Albert Astals Cid 93bcce48b2 Add since 5.4 markers
Change-Id: Ic0e594cb53016e6f68fbfb6e6064707344afefef
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-11-28 13:03:48 +01:00
Friedemann Kleint 9d7204eadd Stabilize tst_qquickflickable.
- Use one engine per test
- Use QQuickView for the margins test
- Verify QWindow cleanup.

Change-Id: Id2a10b56101832c362822963a2a7bd1d66daa143
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2014-11-28 12:02:24 +01:00
Mitch Curtis 437f268f56 Document Qt.application.supportsMultipleWindows property.
The documentation was not added in
0df606e2ab.

Change-Id: I0a5802a66021e17d1280f3969981c9e8a62c8119
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-11-25 13:58:37 +01:00
Simon Hausmann 4a9d10d9fb Doc: Remove text that claims aliases cannot be read-only
It's very well possible to have read-only aliases :)

Task-number: QTBUG-33709
Change-Id: I2ad8854cd0b412d1d2e7afde6dfd585519b69e27
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2014-11-24 15:35:19 +01:00
Lars Knoll ef73060d05 Operate directly on Heap::ArrayData where possible
Change-Id: I87dfb3e9a07673b5c405619eab8b6ee292d5c097
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-22 07:58:59 +01:00
Lars Knoll c044e33696 Reduce usage of Object::arrayData()
This will simplify porting over to returning Heap::ArrayData
from the method (as required for the new GC).

Change-Id: I5fb9ca7dfeab1aa63cc17c8948ef0966716f1bcb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-22 07:58:46 +01:00
Lars Knoll 544ea314b6 Move the indexing methods from SimpleArrayData to Heap::SimpleArrayData
Change-Id: I7d126999fb813bd9c0f224f7229d66854079f793
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-22 07:58:36 +01:00
Lars Knoll 6d2904ce54 Remove two reinterpret_casts in Object
Change-Id: I921cd8129acb47cffd58be9551a6925c4f296d41
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-22 07:56:58 +01:00
Lars Knoll 9f717b650e Let the memory manager operate on Heap::Base objects, not Managed
Change-Id: Ib5c9b51dbf9c69abeda088094e6348dd545bf3c8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-21 19:32:52 +01:00
Lars Knoll 2784a68d64 Cleanup destruction of heap objects
Generate the code from a macro instead of duplicating boiler
plate code. Operate on Heap::Base instead of Managed.

Change-Id: I84c5a705980899be3e5b931a093645e50d3923bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-21 19:32:23 +01:00
Oleg Shparber 2cb6d1bf32 Make QV4::RegExpObject header independent from masm headers
Also remove pointless uint32_t for uint values and replace
a few inconsistent uint16_t uses with quint16. MSVC was using uintN_t
defined in masm headers instead of cstdint, so this change eliminates
such situation.

Change-Id: Ibd7dd50fc047dcdc78e057299883311a24dd3960
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-11-21 19:19:19 +01:00
Lars Knoll d6140dbfe8 We should never construct a managed derived type directly anymore
Change-Id: I77e4065429a49bb3409bd1518ce910298d6141ee
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-21 16:36:29 +01:00
Lars Knoll b943d80dd9 Remove the executioncontext in a few more places where it's not needed
Change-Id: I4c92c7bc9d94d8265e306f45d863fdc080a5e2a6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-21 16:36:24 +01:00
Lars Knoll cf7bd35a93 Fix the qmlProperty accessors to not require a context anymore
Change-Id: Ied5ad5b2fef494de77aefdb4a7ee25aff4d7722a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-21 16:36:15 +01:00
Simon Hausmann f62bf4e76d Changed InternalClass to store Identifier* instead of String*
All members are identifiers anyway, so this gets rid of a ### and
also simplifies some of the call sites by removing the need for a
scoped string.

Change-Id: Ic6b550cdb97afa5a4b0fa7e9b13e7768ed3f6bd8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-11-21 16:36:10 +01:00
Frederik Gladhorn be6c91acc3 Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4 2014-11-21 14:02:19 +01:00
Frederik Gladhorn 0874c2a1e5 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I2e7fc085663e00dd0390593a91c30d23d1369c4e
2014-11-21 13:45:07 +01:00
Simon Hausmann f58b5229a3 Fix run-time string handling with regards to the new heap
Changed runtimeStrings to be an array of Heap::String pointers instead of
indirect String pointers. Later that member along with other GC related members
will go into a managed subclass. Meanwhile the generated code no more loads
String pointers directly but just passes the index into the run-time strings to
the run-time functions, which in turn will load the heap string into a scoped
string.

Also replaced the template<T> Value::operator=(T *m) with a non-template
overload that takes a Managed *, in order to help the compiler choose the
non-template operator=(Heap::Base *) overload. This allows removing a bunch
of Value::fromHeapObject calls.

Change-Id: I20415c0549d33cca6813441a2495976b66d4c00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-11-21 13:08:28 +01:00
Joni Poikelin a758382b93 Fix multirow spritesheet rendering in paused state
Task-number: QTBUG-42777
Change-Id: I8027f100c593ae7c57df7c952e66cc2b3fae1dd9
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-11-21 11:14:34 +01:00
Simon Hausmann e6db292366 Get rid of one PersistentValue usage
We don't need to store a PersistentValue in a place that is reachable through
regular object marking.

Change-Id: I2a8764970e6d37b707921c65e6066d33c558576c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-11-20 12:26:27 +01:00
Jocelyn Turcotte 5f3792cd32 Expose a getter for the QSGEnginePrivate
This allows getting its underlying QSGContext and QSGRenderContext.

Change-Id: If0773d09b6faa360e706949757db1a6ddbe244e1
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-11-19 13:50:57 +01:00
Jocelyn Turcotte 8c82d3b6aa Allow setting the source rect on QSGSimpleTextureNode
This allows the QtQuick 2D Renderer to get this information without
having to extract it from the QSGGeometry.

Change-Id: Iec99c4bc910fea9c7d0e6712a418787254a70cb2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2014-11-19 13:50:53 +01:00
Jędrzej Nowacki 1f74dde59f Update qml to use new QMetaType::registerNormalizedType signature
Change-Id: Ia2ead9768669db4ee9c7b7c8fc14d0e4b09420b0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-18 14:51:43 +01:00
Laszlo Agocs a29337be6e Do not send deferred deletes from QQuickRenderControl::invalidate()
Leave it up to the clients of QQuickRenderControl to do this, if they
want it. It is usually not necessary.

In the single-threaded widget world forcing deferred deletes to execute
on every invalidate(), so for example from the hide event handler of
QQuickWidget, is dangerous because widget apps tend to deleteLater()
all sorts of widgets which can then be destroyed at unexpected times.

From windowDestroyed() we continue to send the deferred deletes, just
like all the render loops do.

Task-number: QTBUG-42618
Task-number: QTBUG-40435
Change-Id: I8189124e2e7675361ee97bd8ba3e88b10ef193fa
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-11-18 14:23:08 +01:00
Nico Vertriest 10b6e6a06d Doc: removed reference to sizeHint
sizeHint is not a property of QQuickView
Task-number: QTBUG-39044
Change-Id: I6e19e975ab71f73ddaf703956afb90f2e607b6f8
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-11-18 09:38:38 +01:00
Thiago Macieira 205336ebc8 Change test data from 6.7 to 6.5
6.5 is an exact binary number (4 + 2 + 0.5), so all conversions to
string will result in "6.5", regardless of how many digits of precision
are used.

This is done in advance of changing QVariant to add more digits of
precision, which would cause toString() of 6.7 to result in
"6.7000000000000002".

Change-Id: I19ea4c5bb02b99f0655c0b9bc9dc09f06ec654e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-18 09:34:01 +01:00
Laszlo Agocs 05176ece31 Fix render control docs
Fix a typo and add a note to the signals.

Change-Id: Ia8810562c5b5f192d7e54bc965807b8e78a26985
Reviewed-by: Karim Pinter <karim.pinter@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2014-11-17 13:22:37 +01:00
Gunnar Sletta 54ec039a97 Add hint regarding alpha fbo's in the textureinthread example.
Change-Id: I92e6a7c2ca9e9f229b1fc463feea9f657ae18db9
Task-number: QTBUG-42486
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-11-17 07:12:18 +01:00
Lars Knoll 124ff9c5a3 Use the engine instead of the context where it makes sense
Change-Id: I17a3b6f4b3c076107dc9a8de667ac526566ea6e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-15 13:16:47 +01:00
Lars Knoll 3965ebb3ff Fix usage of ExecutionContext in the json parser
Change-Id: I9b2d1389dd66ad74507dd16c4bdf7b57491c1cfb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-15 13:16:41 +01:00
Lars Knoll b3c00b7df3 Cleanup qv4executionengine header
Change-Id: I7312005a8d8e301ab4d8960c5f7579ace0a19a73
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-15 13:16:35 +01:00
Lars Knoll 3dc7b5ddf6 Cleanup exception catching code
Change-Id: I85afd5758f72e19c280dc196601ee145f0c25f01
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-15 13:16:28 +01:00
Lars Knoll cd6db04169 Remove ExecutionContext from the array sorting code
Change-Id: I3c59fdb2413664f1c541264a89613a325ecefd2a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-15 13:16:20 +01:00
Lars Knoll 1b97c612e6 Remove ExecutionContext from the Runtime codegenerator
Change-Id: Ic62ae1cbd24c0089e0df6bc6758d262cf49d0b91
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-15 13:16:14 +01:00