aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlstringconverters.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use factory functions and ctors for creating value typesUlf Hermann2020-10-021-1/+1
| | | | | | | | | | As you can extend value types with QML_EXTENDED we may as well allow a factory function in the extended type. Furthermore, if the original type allows construction from QJSValue, we may just use that. In turn, we can get rid of the value type providers now. Change-Id: I9124ea47537eab6c33d7451080ab2fff942eaa7b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Condense the different value type creation functions into oneUlf Hermann2020-09-231-2/+7
| | | | | | | They all did the same thing. Change-Id: I7661b19ad16c0713d46c4df337899e3897349b2e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Eliminate QQmlValueTypeProvider::createVariantFromString()Ulf Hermann2020-09-231-1/+1
| | | | | | | This can be expressed as constructing the variant from a QJSValue. Change-Id: I3140958469423acdc498e26129e349bcfb601198 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Eliminate QQmlValueTypeProvider::createFromStringUlf Hermann2020-09-231-6/+0
| | | | | | | It can be expressed as a special case of create() with a QJSValue. Change-Id: I7342026ad694077d2780dd8a852714fa72dd68d0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlStringConverters: Remove dead codeUlf Hermann2020-09-161-86/+1
| | | | | | | | | createFromString() is only ever called for QVector2D, QVector3D, QVector4D, and QQuaternion. Those are all handled by the QtQuick implementation. Change-Id: Iaf2662207bf1110cb21761e4ffb401d8ebe521c6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Unify "variant" and "var" properties in QMLFabian Kosmale2020-08-241-16/+0
| | | | | | | | | | | | | | | | | | | | variant and var properties differ in two important ways: - variant properties trigger "magic" string conversions: variant v1: "red" // contains a QColor var v2: "red" // contains a string - variant properties behave differently for value types: they create copies, instead of references. However, as variant properties were marked as obsolete and this behavior was effetively undocumented, it should be safe to give "variant" "var semantics". With this change, we can also avoid doing magic conversions when storing data in QVariant properties of QObjects/QGadgets Change-Id: I549b1beb98e6af9639c1ee81f316bda513d5ff65 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Drop special casing of QDateTime when setting valuesUlf Hermann2020-06-251-3/+0
| | | | | | | | | | | | | | | | | This introduced inconsistency in order to be compatible with V8 and Qt 5.0/5.1, respectively. We don't need to do this anymore. We standardize on the behavior observed when statically setting a property in QML, e.g. "foo: '2014-03-03'", rather than the behavior observed when dynamically setting it from JavaScript. [ChangeLog][Important Behavior Changes] Dates are interpreted the same way when assigned to QML properties as when parsed in JavaScript now. The time zone is generally left alone, not forced to UTC in some cases. Fixes: QTBUG-36635 Change-Id: I72a7045d7b39ee1c6e0ac1ef55d74ef8aa505f00 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port QtDeclarative from QStringRef to QStringViewKarsten Heimrich2020-06-161-8/+8
| | | | | | | | Task-number: QTBUG-84319 Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-6/+6
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 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>
* Use QStringRef in a bunch of places.wip/dbusSérgio Martins2015-10-181-8/+8
| | | | | | | Done automatically with clazy static analyzer. Change-Id: Ia0cf8fa24331ab102a3c3c30c2aa92ef1ba772e2 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>
* 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>
* Remove old compiler and VMESimon Hausmann2014-03-071-1/+0
| | | | | | | | | | | | This removes the bulk of the code. A few smaller cleanups remain, to be done in smaller changes as they move code around. Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData, which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not do anything and the class is gone now :) Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge master into api_changesKent Hansen2012-03-231-0/+3
|\ | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlboundsignal.cpp src/qml/qml/qqmlpropertycache.cpp Change-Id: I5193a193fa301c0b518291645bf626a5fa07118f
| * Fix consistency of parsing ISO 8601 date strings.Andrew den Exter2012-03-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | Use the UTC timespec for strings with no time zone qualifier as V8 does so we don't get different QDateTime in bindings depending on whether the string was bound directly, or parsed by constructing a new JS Date object. Task-number: QTBUG-24895 Change-Id: I8f74dae418aaeeaf06df33fe58ab4e3e3fea791b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* | Migrate gui dependencies from QtQml to QtQuick.Matthew Vogt2012-03-201-106/+97
|/ | | | | | | | | | | | | Ensure that users of declarative that have no need for functionality provided by the Qt Gui module do not have to link against it. Any use of QtGui functionality is delegated to providers that can be installed by another library; QtQuick adds default providers for this functionality when linked against QtQml. Task-number: QTBUG-24559 Change-Id: I5e6a58a4198732dc2f8f52f71abfa1152b871aa7 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+311
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>