aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlglobal_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove last traces of QV8EngineUlf Hermann2019-05-081-1/+0
| | | | | Change-Id: I59f738402d51e39188bbbca2ef1fbc8a61612372 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove QQmlV4HandleUlf Hermann2019-04-101-2/+2
| | | | | | | | This is just an alias for QV4::ReturnedValue. We can as well use the latter. Change-Id: Ibd2c038a3ca726b39a8f0f05e02922adb9fccbdb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Split propertyCache into multiple filesUlf Hermann2019-02-011-1/+1
| | | | | | | I want to be able to read the code. Change-Id: I063143ff63b0a476d783c892e1d328e7f5133fab Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QQmlDirParser and QQmlError available in QmlDevToolsUlf Hermann2018-10-251-10/+0
| | | | | | | | We will need them for the QML language server. Also, always build all of QQmlDirParser. The QT_CREATOR condition is mostly useless. Change-Id: I476864b55f6ff3953c11e7887525a043a9405e00 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-261-3/+3
| | | | | | | | clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-2/+2
| | | | | | | | | | | | | 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>
* Fix QQml_setParent_noEvent not to print undefined behavior errorsAlexandru Croitor2017-12-181-11/+5
| | | | | | | | | | | | | | When building Qt with -fsanitize undefined, the usage of QQml_setParent_noEvent caused the following error message: "qqmlglobal_p.h:233:5: runtime error: downcast of address 0x60300061bf10 which does not point to an object of type 'QQmlGraphics_DerivedObject'". Instead of casting to the referred type, use QObjectPrivate::get to access the d_ptr. Change-Id: I2f2224bdb20a8d2e35a3291961378231f03c4ba2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add Qt.platform.pluginName propertySami Nurmenniemi2017-06-061-0/+1
| | | | | | | | | | | | This exposes QGuiApplication::platformName() for qml. It is required at least for tests that are run on the "offscreen" platform (armv7 tests on qemu). [ChangeLog][QtQuick] Added Qt.platform.pluginName property. Task-number: QTBUG-60268 Change-Id: Ie55a282485d4d76ffe7ed8e77359ad7183f579c2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-2/+0
| | | | | | | | 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>
* Remove dead fwd-dclFrank Meerkoetter2015-12-151-2/+0
| | | | | Change-Id: Ifd9fe32b80cd1ebc8dc9fda7c252ecdaae42cb37 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QML: Sanitize reading environment variables.Friedemann Kleint2015-10-221-4/+6
| | | | | | | | | | | Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Change-Id: Ia8b7534e6f5165bd8a6b4e63ccc139c42dd03056 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Also remove the QQmlValueTypeProvider::destroyValueType interfaceFrank Meerkoetter2015-08-181-2/+0
| | | | | | | After the removeal of the QQmlVMEVariant there is no user left. Change-Id: I97224127aac57aba9a80827f9292018d03609b85 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Adapt the ValueTypeProvider interface and port its typesFrank Meerkoetter2015-08-181-8/+8
| | | | | | | | | The ValueTypeProvider system allows non-QML modules to add new basic QML types. It needs to be changed when porting away from QQmlVmeVariant as underlying type of properties. Change-Id: I2b52d7e6f578647a39832896c28553404b9a679f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove QQmlValueTypeProvider::copyValueTypeFrank Meerkoetter2015-08-181-2/+0
| | | | | | | | While reworking the QQmlValueTypeProvider interface I noticed that this code isn't used. Change-Id: I30a279ffabf3a1c70eaa1327e69b774f5e5981f0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add Qt.hsva() functionSean Harmer2015-02-181-0/+1
| | | | | | | | | | | | This is more convenient than the alternative hsla() function in many cases as color pickers in other applications default to the HSV color space e.g. GIMP, kcolorchooser. [ChangeLog][QtQml] Added Qt.hsva() function Change-Id: Id5c1a78173757bf9842b164d90b31682e9a41749 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.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>
* Expose QStyleHints as Qt.styleHintsJ-P Nurmi2015-01-171-0/+1
| | | | | Change-Id: I0fc94e680b011963e645bdbf51110820751e53aa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove v8engine usage in the value type providerLars Knoll2015-01-081-2/+2
| | | | | Change-Id: I6b26a8249175a86c6e15d000b24ba3300e112715 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Initial work on gadget supportSimon Hausmann2014-12-221-4/+2
| | | | | | | | | | | | | | | | | | | | | | Changed built-in QtQml value types to use gadgets. This is in preparation for supporting external gadgets. This replaces the mostly direct inheritance of the concrete value types with gadgets and "dynamic" inheritance through QQmlValueType being generic. Over time as some of the value types may become gadgets, we can remove the ones here. It's important that these "separate" gadgets have the same memory layout as the actual types (QPointF, etc.). Also while QQmlValueType remains practically a singleton, it's not required anymore to be one. Consequently the JS wrappers for value types keep their own instance of QQmlValueType. This allows eliminating the qobject_cast in various places that dealt with the singleton nature. This comes at a cost, making the JS wrappers slightly heavier. However that is meant to be a temporary situation and finally the value type wrapper should merely store the meta-object in addition to the data and the type. Change-Id: I15071ded0a1e54203f29ec1ecf7a9ab646d1168e Reviewed-by: Lars Knoll <lars.knoll@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>
* Combine the source file, line and column number triplet in a common structureSimon Hausmann2014-03-041-0/+10
| | | | | | | | | This avoids unnecessary function calls when all of the three pieces need to be retrieved from a QQmlBoundSignalExpression. Change-Id: Ibcd498c907ea723baf6439cf32ca5fc704f204b5 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-5/+5
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-221-0/+8
|\ | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/quick/items/context2d/qquickcontext2d.cpp tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
| * Add Qt.application.organization/domainJ-P Nurmi2013-06-291-0/+8
| | | | | | | | | | | | Change-Id: Ic4a161b59d51e621e13c960f104d1a3be2ee64f8 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-241-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * Fix -Wpedantic warningsAlbert Astals Cid2013-06-071-2/+2
| | | | | | | | | | | | | | Don't need these extra ; and give warnings with -Wpedantic Change-Id: I877fee2a6421b151697ca3845a09d70f3b2b302b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Doc: Qt Quick: Fix module name format (Pt 2/2)Sze Howe Koh2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Attempt to differentiate between the whole module ("Qt Quick") and the QML import ("QtQuick") by encoding the latter with monospace font. There are places in the text where both representations are valid. Change-Id: If398304757e0a5106542c09099e1814084e54c5c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Rename QQmlV8Handle to QQmlV4HandleLars Knoll2013-04-191-2/+2
|/ | | | | | | | | The handle wraps a V4 Value, so this is the better name for it. Also added some accessor methods to convert to and from V4 Values. Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add core application functionality to Qt.application in QMLAlan Alpert2013-03-051-0/+47
| | | | | | | | | | | | | | This exposes some information to QML which is available on the QCoreApplication instance. A future change should make it possible to restrict this for use in scripting environments (which should not have access to the QCoreApplication). That has been left out of this change because proper support for such restrictions is not yet in place. Change-Id: Ica144fcfb0b42fa6df8d0cb1c7c03eb97282b489 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix the QtQml's use of plugins for value type providersThiago Macieira2013-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | When the QtQuick library is loaded, it runs a global constructor that installs the QtQuick value providers. But those providers are never uninstalled when the library is unloaded, resulting in a dangling pointer stored in QtQml's singly-linked list of value providers. Since cafb02911a29b98ac2652fde64e95870e70fd547, QLibrary will unload plugins after inspecting their plugin metadata on Mac and Windows. If QtQml is trying to load a plugin that links to QtQuick (in particular, *the* qtquick2plugin plugin), it would cause the value provider to go stale. To make matters worse, it's quite likely that the plugin would get loaded soon after, at the same address in memory, which causes the valueTypeProvider list to become cyclic. Change-Id: I6f4db5475ceeaba766d9e9c78f86266c9a65806a Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.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>
* Limit case-sensitivity check in QML to file names.Friedemann Kleint2012-11-301-1/+8
| | | | | | | | | | Provide for checking relative paths only; default to file names. Currently, the checking triggers on a drive letters and installation folder names, which is too strict. Task-number: QTBUG-28277 Change-Id: I1174bb0c485eeb1ffee10bb2a523d6629c57728b Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Enable module build with QT_NO_IMTasuku Suzuki2012-11-261-0/+2
| | | | | | Change-Id: I90f8ec7e6357db7b4038bb1646fe9d3835821556 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
* Fixed missing virtual destructors in qtdeclarative.Samuel Rødal2012-09-241-0/+3
| | | | | | Change-Id: I0b0e63b572617a56874e27361479de2690644aa3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Fix warnings in QtQmlMatthew Vogt2012-08-241-1/+1
| | | | | Change-Id: Ibba3b8e878257f7019bdc90a1344462b77f95a21 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Reduce memory consumption of source coordinatesMatthew Vogt2012-08-161-0/+10
| | | | | | | | | | Reduce memory consumption by storing source location coordinates as 16-bit variables (in run-time structures). Also modify qmlmin to restrict line lengths so that the column bound is not normally exceeded. Change-Id: I08605626ffbdf081b6da2aea1116bdfe24998572 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Add fuzzyCompare() to qmltestCharles Yin2012-07-181-1/+1
| | | | | Change-Id: I4834f4af0839fb89424ed25f0addfb618e5374f8 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix broken value-type support by allowing property definitionChris Adams2012-07-111-5/+8
| | | | | | | | | | | | | | | | | | | | | In QtQuick 1.x the "variant" property type was supported, which could be used to allow value type properties to be defined in QML. In QtQuick 2.0, we have deprecated the "variant" property, but its replacement ("var") is not suited for defining lightweight C++ type values (such as QColor, QFont, QRectF, QVector3D etc). This commit allows those QML basic types to be used in QML once more, by supporting them in the property definition syntax. Note that since some value types are provided by QtQuick and others are provided by QtQml, if a client imports only QtQml they can define but not use properties of certain types (eg, font). Task-number: QTBUG-21034 Task-number: QTBUG-18217 Change-Id: Ia951a8522f223408d27293bb96c276281a710277 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Implement QAbstractDeclarativeData::isSignalConnected hookKent Hansen2012-06-271-3/+1
| | | | | | | | | | QQml_isSignalConnected is no longer needed, since QObjectPrivate::isSignalConnected will now call the declarativeData hook. Change-Id: I0685b0fa909d6c6c2d275bfa8d41100d9926a046 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Check for null ptr in qmlobject_cast definitionChris Adams2012-06-121-1/+1
| | | | | | | | | Previously, the input object wasn't checked for nullness, and thus the qmlobject_cast could assert. Change-Id: I3552150953cef8411a860a381e28b1d681494b08 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Adapt to connection-related changes in qtbaseKent Hansen2012-06-121-3/+2
| | | | | | | | | | | | | | | | | | | The QQmlData hooks signalEmitted() and receivers() now receive the index in the signal index range (i.e., excluding non-signal methods). This was done to avoid Q(Meta)Object having to compute the class's method offset; the signal offset should be sufficient for everyone. This required adapting QQmlNotifier, QQmlBoundSignal, QQmlPropertyCache and friends to use the signal index range whenever a property's notify signal is involved in the internal connection lists and property captures. Using the signal index range also reduces the memory used for NotifyList::notifies, since useless entries for non-signal methods will no longer be created. Change-Id: I62872fbea5a1f829b8b03bae3fc1e6acd84cf886 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Avoid string-based lookup in IS_SIGNAL_CONNECTEDKent Hansen2012-06-101-8/+6
| | | | | | | | | | Specify the signal as a member function suitable for passing to QMetaMethod::fromSignal(), and use the new function QMetaObjectPrivate::signalIndex(QMetaMethod) to get the index in the signal range. Change-Id: If16daa24c2699f7749a17decb611cf395d89d0c4 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Lazily create QMetaObjectsAaron Kennedy2012-05-241-11/+85
| | | | | | | | | | For internal QML built types, creating a metaobject each time is just wasteful. Additionally, as the property caches were always created from the intermediate QMetaObject, it was difficult to pass information directly from the compiler to the property cache. Change-Id: I769526b0edaaf16a86883f3065b75618b94e4077 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Remove unnecessary exportsMatthew Vogt2012-05-181-1/+1
| | | | | | | | | Reduce library load time by removing any exports which are not required by existing clients. Task-number: QTBUG-24768 Change-Id: Ia5754d6f97bb2ed46e290820a5b092f85a4bc5b0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure external value types are initialized before writeMatthew Vogt2012-04-301-0/+2
| | | | | | | | | Ensure that the logic used when writing to a property having a value type provided by an external module matches that used for properties of internal value types. Change-Id: I925b8b30a211ef813e2a51134411a162b0b146b5 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Also check notifier endpoints when checking whether a signal is connected.Michael Brasser2012-04-231-0/+15
| | | | | | | This is required for the QQmlBoundSignal optimizations. Change-Id: I63540b96cd7d4523ec49973a2540054c83d82b12 Reviewed-by: Chris Adams <christopher.adams@nokia.com>