aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllocale.cpp
Commit message (Collapse)AuthorAgeFilesLines
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-17/+17
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Convert QQmlLocale to the new builtin calling conventionLars Knoll2018-01-121-142/+142
| | | | | Change-Id: Iebe9f18d688d991346cbb52b3c939d31159b7fef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Convert Date methods to new calling conventionLars Knoll2017-11-131-9/+9
| | | | | Change-Id: I5b80eb9d9f18b113a04461fc8b5217a3695269a4 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Convert methods of Number to new calling conventionLars Knoll2017-11-131-1/+1
| | | | | Change-Id: Ib4eea41bbf6db6ad555daae357c7010c736bbd50 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Convert String methods to new calling conventionLars Knoll2017-11-131-2/+2
| | | | | Change-Id: I6de932817fc26c7a35b004926cd3ca84e42272ad Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Change CallData::argc to be a QV4::ValueErik Verbruggen2017-09-191-37/+37
| | | | | | | | | | | Instead of mimicking a Value. This makes sure that argc now stays correct even when anything on Value changes. Most of the change is mechanical: replace callData->argc by callData->argc(). Change-Id: I521831ae1ffb3966bad6589c18d7a373e13439d7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove Scope::result and convert calling convention for builtinsLars Knoll2017-08-081-92/+92
| | | | | | | | Allow for faster calling of builtins, and completely avoid scope creation in many cases. Change-Id: I0f1681e19e9908db10def85a74e134a87fc2e44c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert more builtin methods to the new calling conventionLars Knoll2017-01-251-239/+246
| | | | | Change-Id: I2cd1df437d91918001beed8dfe92d553b3bb377f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clean up Value::isString()/stringValue() combinationsLars Knoll2016-11-291-29/+35
| | | | | | | | It's enough to just call stringValue(), as that already does the isString() check. Change-Id: I7be0e643a7975c0704b4c9c43b337deb8db9fce0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Introduce destroy() on Base subclassesErik Verbruggen2016-10-051-22/+22
| | | | | | | | This removes the destructors of subclasses of Base, making them nearly trivial. Change-Id: Ia6f7d467e87899b5ad37b8709a8f633a51689d59 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Move remaining objects to new constructor syntaxLars Knoll2015-09-221-1/+1
| | | | | | | Also disable the old way of constructing objects. Change-Id: Ib4e69087cd563ae1481da116d6caf97876239798 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move constructor objects onto the js stackLars Knoll2015-04-241-5/+5
| | | | | Change-Id: I828c5f7407d90cd5df1a8fd89a0ca35074fbde43 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move more objects from the v4 engine to the js stackLars Knoll2015-04-241-6/+6
| | | | | | | Convert most of the prototype objects in the v4 engine. Change-Id: I365f290493c20973bc991b6a383649836e42a16a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* More cleanupsLars Knoll2015-04-211-6/+6
| | | | | | | | Get rid of Value::asObject(), and pass const Managed pointers into some more vtable methods. Change-Id: Ia4f427d5fd8868f77b4015d1ce5424d32bfc2115 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of asStringObject()Lars Knoll2015-04-171-2/+2
| | | | | Change-Id: Iad3afd00d2fdbd04efa4f3b841f11269ab496826 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of Value::asDateObject()Lars Knoll2015-04-161-3/+3
| | | | | Change-Id: I71816a784b5175f600c5a870318b16c0d84c42fb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* CleanupsLars Knoll2015-01-231-105/+105
| | | | | | | | Simplify some code in BooleanObject Simplify access to call arguments and thisObject Change-Id: I2f8e844019bc587385608beb02f05b15f827535c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of most uses of ValueRefLars Knoll2015-01-231-2/+2
| | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make sure we always have an engine when assigning to a PersistentLars Knoll2015-01-131-1/+1
| | | | | | | This prepares things for a rewrite of the internals of Persistent. Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove v8engine dependency from qqmllocaleLars Knoll2015-01-081-4/+3
| | | | | Change-Id: Ib6f51915c5a049592c2958624017eb2f8ad962d8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move extension mechanism over to use the v4 engineLars Knoll2015-01-081-10/+9
| | | | | Change-Id: Ib329fc7bcae3c78d962a116f53b2244a71f81228 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use QV4::ScopedObject typedef instead of actual typeOleg Shparber2015-01-031-1/+1
| | | | | Change-Id: I0b68c534ea513a7c230b12114f6b42b069f9864b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use QV4::ScopedArrayObject typedef instead of actual typeOleg Shparber2015-01-031-2/+2
| | | | | Change-Id: I975536745ac6c264aca074f84d223fbec7682d3d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove most of the places where getPointer() is usedLars Knoll2014-12-201-1/+1
| | | | | | | This is no longer required, and simply uglifies the code Change-Id: Iba91a1d7735ebe23a43437f137a488423b6eb743 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move prototype back from the vtable into ObjectLars Knoll2014-12-111-6/+6
| | | | | | | | This is the only way we can support a GC that moves objects around in memory. Change-Id: I1d168fae4aa9f575b730e469e762bc5b5549b886 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Ported ExecutionEngine::newString and newIdentifier to Heap::StringSimon Hausmann2014-11-121-6/+6
| | | | | | | | | | Avoid the use of Returned<String> for newString and changed the identifier table to use Heap::String. This required moving some code back into Heap::String, but that's code that doesn't call back into the GC, so allocations and therefore future object moves aren't possible. Change-Id: I1dca3e9c12a9c56f09419af8cc8cba39fe04f720 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move data of more Qml related objects into Heap namespace.Lars Knoll2014-11-101-0/+2
| | | | | Change-Id: Ifb3a7093351474d6feb2f64498b531c36fdf669b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Change the object allocation schemeSimon Hausmann2014-07-221-1/+1
| | | | | | | | | Instead of allocating the data directly, centralize the object and its ::Data allocation in one place in the memory manager. This is in preparation for additional pointer indirection later. Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Convert String to new constructor syntaxLars Knoll2014-07-221-2/+2
| | | | | Change-Id: I07f7667d3d72a7d72e6717d194de8d7b15435777 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert regexpsLars Knoll2014-07-221-1/+1
| | | | | Change-Id: I5b62a265a7ce363a16b1e14ae93cadbb1ab0cb5b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert ExecutionContext to new storage schemeLars Knoll2014-07-221-126/+126
| | | | | Change-Id: I9fcc13da5360f37cef3149b114ed9263b9b74281 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert qml locale object to new data layoutLars Knoll2014-07-221-22/+22
| | | | | Change-Id: I1c02498102d89be1127fb6bbf0b38e21c48bed8b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix remaining QQmlLocale auto-test failuresSimon Hausmann2014-04-081-2/+5
| | | | | | | | | | | | | | | | Thanks to improvements in QDateTime's parser, we can unskip a bunch of tests. What remained was dateFromLocaleTimeString, which failed because it relied on the earlier behavior of a failed conversion from a _time_ string to a date also returning an invalid date object. This behavior is restored by leaving the QDateTime object as invalid unless the converted time is valid. In Qt <= 5.1, QDateTime::setTime would make the entire datetime object invalid if the provided time was invalid. In Qt >= 5.2 it remains potentially valid if the date at least is correct - which was the case here as it was initialized from currentDateTime. Change-Id: I32a2cd2a9631cca3b12773e4c55169baa3eeaf1a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-02-111-3/+6
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/jsruntime/qv4arrayobject.cpp src/qml/jsruntime/qv4context.cpp Change-Id: Ied5b23bec4dc14abe51127c507aed668f855c1e1
| * Updated documentation for QML Locale.measurementSystemAnders Gunnarsson2014-02-071-3/+6
| | | | | | | | | | | | | | Added documentation for ImperialUSSystem and ImperialUKSystem. Change-Id: I1a628121dce4a7566bd8769843c487e28f3dd6fe Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Change virtual methods in ArrayData to take Object pointerLars Knoll2014-01-241-2/+2
| | | | | | | | | | | | | | | | | | Pass a pointer to the underlying object instead of the ArrayData to virtual methods that modify the arrayData. This prepares for allocating the ArrayData together with the array itself. Change-Id: I66fe187f8b1e4d382ab243a518dbde5f18a1d16d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Split ManagedVTable into two classesLars Knoll2014-01-211-1/+1
| | | | | | | | | | | | | | | | Keep the basic methods in ManagedVTable, but have the Object related stuff in an ObjectVTable class. Change-Id: I9b068acf3caef813686227b8d935e7df1a7d1a6e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Add a SimpleArrayData classLars Knoll2014-01-201-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the ArrayData class 'pure virtual'. SimpleArrayData now contains the implementation of simple arrays. This makes the separation between simple and sparse arrays a lot cleaner. It also allows us to move len and offset from the base class into the SimpleArrayClass. This fixes some bugs where we accessed len for sparse arrays leading to some buggy behavior. Added a virtual length() method to ArrayData to query the highes used index in the Array. Change-Id: Iab2ba2a48ebe5b7031759eeb4ebe02b4d86233f0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Allow assignment of a QML Locale object to a C++ QLocale property.Mitch Curtis2014-01-141-63/+14
| | | | | | | | | | | | | | Task-number: QTBUG-36125 Change-Id: I58454db0c47684aed3e95c52a8135fd5fd6bf2f9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Rework array handling for JS objectsLars Knoll2014-01-091-4/+5
| | | | | | | | | | | | | | | | | | Split up ArrayData into two classes, one for regular arrays, one for sparse arrays and cleanly separate the two cases. Only create array data on demand. Change-Id: I9ca8d0b53592174f213ba0f20caf93e77dba690a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move array data into it's own structLars Knoll2014-01-031-4/+4
| | | | | | | | | | | | | | First step of separating the array data from Object. Change-Id: I5c857397f0ef53cff0807debdb1e405424e1046a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move Managed::type and some flags into the vtableLars Knoll2014-01-031-1/+0
|/ | | | | | | | | | | | | Move the type flag into the vtable to free up these bits in the Managed class, and not have to set them at object construction time. As we often need to know whether a Managed object is a Object, FunctionObject or String, add some bitflags to test for these to the vtable. Change-Id: I7d08ca044544debb307b55f124f34cb086ad9e84 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove setVTable calls in performance critical areasLars Knoll2013-12-041-1/+1
| | | | | | | | | | Remove all the calls to setVTable that were in performance critical parts of the code. This now brings performance back to the level we had with the vtable inlined in the Managed objects. Change-Id: I76317cc5c53b5b700d1d3883b954407142a4c424 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move the vtable pointer from the object to the internal classLars Knoll2013-12-041-1/+1
| | | | | | | | This saves one pointer per object, and willmake other optimizations easier in the future. Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify & speed up function callingLars Knoll2013-11-091-49/+49
| | | | | | | | | 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>
* Better way of handling string additionsLars Knoll2013-11-041-2/+2
| | | | | | | | | | | 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>