Commit Graph

7264 Commits

Author SHA1 Message Date
Simon Hausmann 7efe51e116 Android: Fix compilation when doing ARM builds
Clean up the code to determine when to _disable_ the JIT and add
Android to that list when targeting ARMv5 (dubbed armeabi as opposed
to armeabi-v7a)

Task-number: QTBUG-33507

Change-Id: Id78e08e888df8f8075d5655e15bb754cede70638
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-09-18 18:48:24 +02:00
Lars Knoll bc8b25dd91 Correctly convert an invalid QDateTime to JS
Task-number: QTBUG-33539

Change-Id: I645db2e12e3b46731c0bef04e2d48abb71650974
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 18:48:24 +02:00
Mitch Curtis 52cc10589a Temporarily disable tst_QJSEngine tests to allow qtbase dev integration
Temporarily disables:
- tst_QJSEngine::dateConversionJSQt()
- tst_QJSEngine::dateConversionQtJS()

so that https://codereview.qt-project.org/#change,65560 can merge.

Change-Id: I415daf1c5bd137e1905773f88fe5ebaaab1e0a06
Reviewed-by: John Layt <jlayt@kde.org>
2013-09-18 16:04:40 +02:00
Topi Reinio 52eb21be3d Doc: Reintroduce docs for Qt Quick Models and Views examples
The .qdoc files/images for these examples were lost during
modularization. This change adds them back and fixes related
links.

Change-Id: Id5260daad1c38284e3aa8178ae82d24067f4e88c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-18 15:28:06 +02:00
Lars Knoll 4241a55836 Fix handling of empty Values
Make things consistent between 32 and 64 bit again
Adjust test results after the changes

Almost all uses of Value::empty() will get removed
in the future, but for now this gets all our tests
to pass again.

Change-Id: I44784a43432e78febbdfe78115c9be2a3e3ece76
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:52 +02:00
Lars Knoll 382709e14d Skip unstable tests
We can't test GC reliably due to our GC being conservative
currently. Once we moved over to an exact GC, we can re-enable
the test.

Change-Id: I6778ed9bee3b41372705f6b41c1379d224335e53
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:41 +02:00
Lars Knoll 2f4522d72e Fix regression with isNaN and isInf
We use std::isnan and std::isinf to determine whether a number is
NaN or Inf. Unfortunately some versions of these methods seem to
return int instead of bool, breaking the Encode() call.

Change-Id: Iec58eb3a5f344373a389ddbc7f6ee81cdead2726
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:33 +02:00
Lars Knoll 67b2face7c Initialize variables
They could end up being used uninitialized otherwise.

Change-Id: I169f0023a8079f32b42508d39f7655985eba5d6b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:27 +02:00
Lars Knoll 87f475cbdb Refactor our NaN boxing to be more efficient
* Use a unified way to store all Managed objects inside
a Value, instead of distinguishing between strings
and other objects.

* On 64 bit we store pointers as pointers, so accessing them
through Scoped<> objects is cheap. This implies that doubles
are now stored in a mangled form (xor'ed with a mask).

Change-Id: I582e0fb167a62c0c527c6bfa3452550e37944069
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:21 +02:00
Lars Knoll 43cdae853b Optimize some runtime methods
This prings performance up by ~25% again.

Change-Id: I680466e11b722b2eac0edda0fe4199b717d23855
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:16 +02:00
Lars Knoll f79df5da07 Convert more methods to return a Returned<>
Change-Id: If294c9c4f574824c308b63a11da1337226180105
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:13 +02:00
Lars Knoll e4e90923c9 Convert some methods to use Returned<>
Change-Id: I631606cb5ab3b35b72104e70092a5200dd235fbc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:10 +02:00
Lars Knoll 9dcc12d523 Convert a few more methods in ExecutionEngine to use protected pointers
Change-Id: I2e6b1b9dff52bbd16f35a00152c9ac557f8346eb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:08 +02:00
Lars Knoll 19f7850176 Convert methods in qv4runtime to use Returned<X>
Change-Id: I1f68ecb298b049f3fa90de26b4b39233d48fb8e0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:05 +02:00
Lars Knoll 49aead7f23 Extend the ReturnedValue mechanism to pointers to Managed objects
Add a Returned<T> that we can return instead of raw pointers
to Managed objects.

Start using the Returned<T> for a few methods.

Also clean up all our classes to use the Q_MANAGED macro instead
of manually defining their vtable.

Change-Id: I0a2962e47f3de955cd2cd8474f8f3fcc9e36d084
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:03 +02:00
Lars Knoll 2a43ec129a Make QJSValue::prototype() gc safe
Change-Id: Ia93af291f97fd2b6473267e95520bc0759034029
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:14:00 +02:00
Lars Knoll 7ad3ba2dbb Don't polish items if the screen is 0
The current code leads to an assertion during qapp
destruction time, as the screen gets set to 0, which
triggers a force polish that in turns accesses the qapp instance.

In addition, we don't need to do any work when the screen is 0,
as the window can't be visble in that case. Once it gets visible
again, forcePolish() will be called again.

Change-Id: I81d9a11e494b4573a56d06bca651cc6b5fa785c7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-18 13:13:58 +02:00
Lars Knoll a2d115fbaf Convert most remaining return values from Value to ReturnedValue
Change-Id: If8b0c3b91be50678693868c10fefc3678008834d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:55 +02:00
Lars Knoll 399f88f6b7 Fix regression in Object.isExtensible()
We need to encode a bool, but the extensible flag
in Object is a bitfield (ie uint).

Change-Id: I2461c8ae90e92840da737c0c7ee88b9a2cee21e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:52 +02:00
Lars Knoll ce5dee2422 Convert more methods to use ReturnedValue
Change Exception.value() and a few other places.

Change-Id: I53ce17e5656e260138b1ac7f6d467e4636c0a0b9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:49 +02:00
Lars Knoll 16f92ad85c Convert builtin methods to return a ReturnedValue
Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:47 +02:00
Lars Knoll 7d4e61dd82 Rename BuiltinFunctionOld to BuiltinFunction
This is the correct abstraction for a builtin method.
Time to get rid of the 'old' in the name.

Change-Id: Ia386d2cc8ef0e6c269ab24da6fc8ebfac52d7f69
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:44 +02:00
Lars Knoll a245f60c6a Don't check whether Scoped<T> really contains a T
When retriveing a pointer to T, there's no need to check
that we really have a Managed stored in the value, as the
type checking is already done by the constructor and
assignment operators.

Change-Id: I246610b8d6e33848e6a2e2179a5e6e6d9d0975ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:41 +02:00
Lars Knoll 2187beaaae Convert lookups to use ReturnedValue
Change-Id: Idbcd1fbd2aa43775ce8c1a3d8fac29a6b58b678a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:38 +02:00
Lars Knoll 6c9f1c8ed9 Use a ReturnedValue for Managed::getIndexed()
Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:36 +02:00
Lars Knoll bdb27b96ac Use ReturnedValue for Managed::get().
Change-Id: Ia8f35d227b69d32e1f6a041283abbbd083aa34ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:33 +02:00
Lars Knoll 8d26084ae5 Use ReturnedValue for Managed::construct()
Change-Id: I9e702d60c4e1b7ba19a699ff7a8d53876d6cd5f7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:30 +02:00
Lars Knoll 4691396f96 Don't access out of bounds arguments
QQmlV4Function wasn't checking argc correctly when
accessing the arguments it contains.

Change-Id: I475c1366d46a5ef9c91104c12343507e469a69bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:26 +02:00
Lars Knoll d6837e9ca3 Rename QV4::ValueScope to QV4::Scope
The class is going to be used all over the place, so let's
give it a short name :)

Change-Id: If61543cb2c885e7fbb95c8fc4d0e870097c352ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:23 +02:00
Lars Knoll 002e6105f6 Require a ValueScope for ScopedCallData as well
This brings things more in line with ScopedValue, and
also simplifies cleanup of Scoped values.

Change-Id: If5f1466b4e13c629d56c1e7c638937f61ba48f77
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:21 +02:00
Lars Knoll 1a2a83f80b Use a ReturnedValue for Managed::call()
Change-Id: Ief2d75e9789dd367c603d90dc0fe5316a0d055e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:18 +02:00
Lars Knoll 826550af45 Adjust return values to use ReturnedValue
Change-Id: I03822d360ad90cc659da66252439472ecb1a52bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-18 13:13:16 +02:00
Simon Hausmann d642438b76 Change calling convention in JIT to use ReturnedValue
This simplifies the masm backend as well and should be faster.

Change-Id: I64ad5d9ee1b6caca950471e3aec4ef19d7503e62
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-18 13:13:12 +02:00
Lars Knoll 0858209105 Disable quick autotests on mac until qtbase is fixed
Change-Id: I8c4fecfe42f93b3d6c272d2552a856e3ed1fce28
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-18 13:13:06 +02:00
Robin Burchell 74d213726d Avoid copying touchpoints, and only check until we find a match.
Change-Id: I46fad782e93fe1f940acec05f4e1bb4afb5be230
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-09-17 18:29:51 +02:00
Yoann Lopes a6bdcc1bd1 Expose "Qt.application.state".
This deprecates Qt.application.active.
The new property can indicate more states than just active or inactive
(currently Suspended and Hidden exists in addition to the
aforementioned).

Change-Id: I8d5bf72f89a357c13daf1625c20e8e7311dac013
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-09-17 18:29:51 +02:00
Gunnar Sletta 886b1b1424 These files are not used anywhere.
Change-Id: I0aa3b7ad944375ec53d8bd831a233d8055d21582
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-17 18:29:51 +02:00
Sergio Martins 96d950c4d0 wince: Build fix, Windows can also run on ARM.
Change-Id: I113a9fd86215700fe11fa5b2bfb8461953b1255b
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-17 18:29:51 +02:00
David Faure 80b65ff537 Doc: PathView::currentItem is an Item, not an int.
Change-Id: If06c747b424ac8dd6b880aa296af5e5957bb9b51
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-17 16:17:03 +02:00
Caroline Chao 739483926b qmlplugindump: fix prototypes identification for composite types
The prototype name for the composite type is the first "default"
prototype found in the reachable types. If none is found then
the default value is QObject.

Change-Id: I40b4fefaab40e4c9f83d24c89bd026579be63e7b
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-09-17 15:39:15 +02:00
Mitch Curtis 97feace2aa Improve QML Date object documentation.
Carrying on from https://codereview.qt-project.org/#change,61255, I've
added documentation for the from*String() functions, as they weren't
actually documented. I've also formatted some arguments and linked to
Locale documentation where the format enums are mentioned. Note that,
because of QTBUG-32505, I can't link to the format enum directly, so I
just link to the Locale page itself.

The import QtQuick 2.0 should also be removed from the documentation
when that bug is fixed.

Task-number: QTBUG-32492

Change-Id: I19c6c8450746ef2a68bc55fd3ef7db776f4acc35
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-17 14:35:53 +02:00
Shawn Rutledge 37492efee0 Qt Quick Dialogs: can see and control geometry of QML implementations
QQuickAbstractDialog had x/y/width/height properties already but they
didn't do anything.  It's still not possible with the native dialogs
because neither QPlatformDialogHelper nor QFileDialogOptions etc.
have any geometric properties; but the application author can now
see and control the geometry of any QML dialog implementation.

Change-Id: Icdac9592c72e81175436436027f7fe3d75ff7f42
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-09-17 13:24:07 +02:00
Alex Blasche 7ebd0523e1 Fix wrong return type
Android g++4.8 errors out with

jsapi/qjsvalueiterator.cpp: In member function 'QString QJSValueIterator::name() const':
jsapi/qjsvalueiterator.cpp:155:16: error: converting 'false' to pointer type for argument 1
of 'QString::QString(const char*)' [-Werror=conversion-null]
         return false;

Change-Id: I589418e34c7e1ae72f2bf547067ea8e5944119b8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-17 13:09:51 +02:00
Tomasz Olszak 5a16b04405 Removed strange character from MacroAssemblerARM.cpp file.
It caused:
error: stray ‘\302’ in program
error: stray ‘\304’ in program
when cross-compiling for ARM with gcc 4.5

Change-Id: Ibd80a21b436b65b355181b1e304ade22f9ff7404
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-17 10:11:36 +02:00
Topi Reinio 241886c139 Doc: Move properties of Locale QML type to correct module
Moves property and method documentation for QML Locale type
from Qt Quick to Qt Qml module, and fix a number of broken
links in locale-related docs.

Change-Id: Id9e01314ea867987f5159ca3bffcc40abb27b289
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-17 10:09:37 +02:00
Eskil Abrahamsen Blomfeldt 5c54308cc1 Don't depend on widgets plugin in QtQuick
Since the accessible directory contains plugins for both the
widgets and quick plugins, we need to specify the precise
plugin, otherwise all QtQuick apps will depend on QtWidgets
on Android.

Change-Id: I8016afc64f8a75cc4ac0a3a69871df9cb2894f8a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-09-17 09:49:57 +02:00
Mitch Curtis e73d503b84 Add currentColor property to ColorDialog.
QColorDialog has this property. This patch effectively means that
the color property will be set when the dialog closes, instead of
whenever the current color in the dialog changes, so pressing cancel
will revert the color to what it was before the dialog was opened.

[ChangeLog][QtDeclarative][ColorDialog] Added currentColor property.

Change-Id: I2ef6b32954342cd2469cf1552d53f9e2fbf3420b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-09-17 07:36:09 +02:00
Shawn Rutledge 77ee9ab37e fixed warnings in dialog module when PURE_QML_ONLY is defined
There are a couple of unused parameters in that case.

Change-Id: Ica81621e7d74474cbfa0b54c20501ecc72661c08
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-09-17 07:35:33 +02:00
Alan Alpert 2831e385e7 Fix qmlClearTypeRegistrations tests
The manual test now tests that QtQuick can be loaded second try, and an
autotest has been added to ensure that the function does not affect
correctness.

Task-Number: QTBUG-32078
Change-Id: Ifd55e12c2c31e2e181054f897f10f02a2811c5d1
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
2013-09-17 06:14:36 +02:00
Alan Alpert e203b1c51a Mark tst_qquicktrailsemitter insignificant on windows
Has been blocking CI intermittently, but not locally reproducable.

Task-number: QTBUG-33421
Change-Id: I0e876fe1f236a00a9ecad2231aa7ff50a4b8d590
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-09-17 06:14:18 +02:00