aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltype.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-2/+2
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Mark functions involving attached property IDs as deprecatedUlf Hermann2019-04-301-0/+2
| | | | | | Task-number: QTBUG-75176 Change-Id: I969e7987ebf8b98aed9ba9e17388a0e168ef5e09 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move creation and management of singletons to QQmlEnginePrivateRichard Weickelt2019-04-241-64/+10
| | | | | | | | | | | | | | | | | | | | | | Singleton object instances were previously managed by QQmlType::SingletonInstanceInfo and kept in a shared storage. This caused concurrency problems when instantiating singleton instances from different QML engines in different threads. This patch moves the singleton house-keeping infrastructure to QQmlEnginePrivate and makes SingletonInstanceInfo immutable. Singleton objects are stored in a QHash with QQmlType as the key because the qml type id might be 0 for composite singletons. The public API of QQmlType is extended to provide more information about singleton types so that access to SingletonInstanceInfo is not needed. All internal accesses of singleton objects must now take the same code path via QQmlEnginePrivate::singletonInstance<T>() which simplifies overall usage of singletons and scatters less implementation details throughout the code base. Task-number: QTBUG-75007 Change-Id: I13c5fd21cac2eb7291f2cbcf2c2b504f0f51a07c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-231-5/+1
| | | | | | | Conflicts: src/qml/qml/qqmlmetatype.cpp Change-Id: Ieff61c076e46eb50a059c8b0210f7f4d7ce0cbcf
* Move propertyCache-by-minor-version into QQmlMetaTypeDataUlf Hermann2019-04-181-19/+0
| | | | | | | | | | | | Ths data structure should only be accessed when protected by the metatype data lock. In fact we don't access it from anywhere else. To make that more obvious, move it to the right place. This allows us to eliminate some const_cast and poking around in QQmlTypePrivate from the outside. Change-Id: I16ffd240b9504b9c00010bdb2d17b05c8196fe8a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix false unused parameter warningsRichard Weickelt2019-04-101-2/+2
| | | | | | | | | | | | | | When building Qt on Ubuntu 16.04 with gcc 5.4, build fails due to a warning about unused parameters. Warnings are treated as errors by default. This is most likely a bug in g++ and has probably been fixed in later versions. For instance, no warning is emitted for the synthesized operator= few lines further down. Above setup will be officially supported by Qt 5.14 and therefore, I suggest to work around this issue by omitting the explicit parameter names. Change-Id: Ifb22e39b7f5fa5101b188eec715d8620d4589941 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-101-7/+13
| | | | | | | | Conflicts: src/qml/qml/qqmlmetatype.cpp src/qml/types/qqmlmodelsmodule.cpp Change-Id: Idc63689ba98d83a455283674f4b5cf3014473605
* Use QQmlRefCount for QQmlType(Private)Ulf Hermann2019-03-191-49/+19
| | | | | | | | | | | | | As we already have an implementation of refcounting, we can just use that intead of inventing another one. This also gives us nice move ctors and operators. Also, use const pointers to QQmlTypePrivate where possible. This exposes quite some nastiness that needs to be fixed in follow-up commits: All the mutable members of QQmlTypePrivate are unsafe for multithreaded use. Change-Id: I3be8f2c53d86e06ffa80c8df8830473fe6d1d91d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make QQmlTypePrivate::name safe for usage from different threadsUlf Hermann2019-02-111-7/+6
| | | | | | | | There is hardly a point in setting this lazily. We always set uri and elementName together anyway. Change-Id: I5f9f00ee72d78fd8cf66413e81c8d88db1f8a436 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Eliminate excessive friendlyness of QQmlTypeUlf Hermann2019-02-081-123/+2
| | | | | | | | | | | | QQmlMetaTypeData does need to be exposed to the QQmlType ctors. Rather, we can use factory functions to create the QQmlTypePrivate objects. The static attachedPropertyIds should really be part of QQmlMetaTypeData and access to them should be protected by the lock. Task-number: QTBUG-73271 Change-Id: I154a3842fab03a02c710901a20afd1652364808d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QML: Split qqmlmetatype{_p.h|.cpp} into multiple filesUlf Hermann2019-02-061-0/+1129
Having all those classes in one big file promotes spaghetti code and makes the code unreadable. Change-Id: I3b6df93b9cfe1d97228771049b3054e78b868ea3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>