aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorRichard Weickelt <richard@weickelt.de>2019-04-21 13:27:05 +0200
committerRichard Weickelt <richard@weickelt.de>2019-04-24 08:43:00 +0000
commit4d098132421fe75492d61d270569c2d8a7acbdde (patch)
treea94712d523c82b88d7668b6f71879f88d33c682b /src/quick/items
parent93818a359973003531e2a5ef2d55cf58b3d440d9 (diff)
Move creation and management of singletons to QQmlEnginePrivate
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>
Diffstat (limited to 'src/quick/items')
0 files changed, 0 insertions, 0 deletions