diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2021-08-04 10:28:33 +0200 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2021-08-06 17:25:50 +0200 |
commit | d4e62f2c5a0f7e2e47d3bdfd570094862b1c05c1 (patch) | |
tree | 0c37739a29b1e9519cf418c37a0c1aff627dd768 /src/tools | |
parent | 6ba6e7585dff4198aa3e4b23035ba95fb988400f (diff) |
moc: Support BINDABLE for private properties
Hopefully we won't need it but let's have it still at least for
consistency
Change-Id: I72289e65e5e5613174ad4d98cf8d614f9caae8e6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/moc/generator.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 37797ef7db..a21e44ba8f 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -1415,7 +1415,14 @@ void Generator::generateStaticMetacall() const PropertyDef &p = cdef->propertyList.at(propindex); if (p.bind.isEmpty()) continue; - fprintf(out, " case %d: *static_cast<QUntypedBindable *>(_a[0]) = _t->%s(); break;\n", propindex, p.bind.constData()); + QByteArray prefix = "_t->"; + if (p.inPrivateClass.size()) { + prefix += p.inPrivateClass + "->"; + } + fprintf(out, + " case %d: *static_cast<QUntypedBindable *>(_a[0]) = %s%s(); " + "break;\n", + propindex, prefix.constData(), p.bind.constData()); } fprintf(out, " default: break;\n"); fprintf(out, " }\n"); |