aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltyperegistrar
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-11-13 17:48:48 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-11-18 15:31:37 +0100
commit4241bb4d26ef69eb212e0274bad0926ec71bead9 (patch)
tree883ee38ba4496b0daca75830b6f53391c64faf7f /src/qmltyperegistrar
parent74377894ec32f10b31e247e2d8f9ca857ce2a8a0 (diff)
qmltyperegistrar: Expose also private and protected invokable functions
Those can in fact be invoked by the metatype system, and they are used that way, for example QQmlComponent::createObject. Change-Id: Icc6d853afc214a84801301a9c660a038d7efef62 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmltyperegistrar')
-rw-r--r--src/qmltyperegistrar/qmltypescreator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qmltyperegistrar/qmltypescreator.cpp b/src/qmltyperegistrar/qmltypescreator.cpp
index 7bac6a87d8..911120027e 100644
--- a/src/qmltyperegistrar/qmltypescreator.cpp
+++ b/src/qmltyperegistrar/qmltypescreator.cpp
@@ -173,9 +173,9 @@ void QmlTypesCreator::writeMethods(const QJsonArray &methods, const QString &typ
{
for (const QJsonValue &method : methods) {
const QJsonObject obj = method.toObject();
- if (obj[QLatin1String("access")].toString() != QLatin1String("public"))
- continue;
const QString name = obj[QLatin1String("name")].toString();
+ if (name.isEmpty())
+ continue;
const QJsonArray arguments = method[QLatin1String("arguments")].toArray();
const auto revision = obj.find(QLatin1String("revision"));
if (notifySignals.contains(name) && arguments.isEmpty() && revision == obj.end())