aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltyperegistrar
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-05-26 16:47:06 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2021-05-27 11:30:12 +0200
commitbc7c2710eb4eadc3675d6be5cd3a179db6a8a652 (patch)
treeff55975ba171afaf3a7a7e067298f26fbf0e9e22 /src/qmltyperegistrar
parenta10eeee97d42f05409074f69cc99d9a8da5db077 (diff)
Propagate NOTIFY from moc output to qmltypes
This is useful for the object creation compiler when generated aliases should really have a notify which is bound to the origin's notify Change-Id: I805d0d461490da7122e37345914dec4140f342ff Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmltyperegistrar')
-rw-r--r--src/qmltyperegistrar/qmltypescreator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qmltyperegistrar/qmltypescreator.cpp b/src/qmltyperegistrar/qmltypescreator.cpp
index a47e22c264..a79c1326a0 100644
--- a/src/qmltyperegistrar/qmltypescreator.cpp
+++ b/src/qmltyperegistrar/qmltypescreator.cpp
@@ -190,6 +190,9 @@ void QmlTypesCreator::writeProperties(const QJsonArray &properties)
const auto write = obj.constFind(QLatin1String("write"));
if (write != obj.constEnd())
m_qml.writeScriptBinding(QLatin1String("write"), enquote(write->toString()));
+ const auto notify = obj.constFind(QLatin1String("notify"));
+ if (notify != obj.constEnd())
+ m_qml.writeScriptBinding(QLatin1String("notify"), enquote(notify->toString()));
}
if (!obj.contains(QLatin1String("write")) && !obj.contains(QLatin1String("member")))