aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontext.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-04-15 19:12:32 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-04-16 14:29:55 +0200
commit7fc9e671077a09294a62b160a4aa0fb006192956 (patch)
treefcf6de58d6b67a5c4e9ef87e799b0d3b9b8147ba /src/qml/qml/qqmlcontext.h
parentc6446e7d67126979e470eeb78124b299c0515b08 (diff)
Provide an objectForName() function in QQmlContext
This is the reverse of nameForObject(). We don't need to wrap id'd objects in QVariant just to unwrap them again at the call site. Change-Id: Ie1c5382af33b5c05b0b931fcc5bcf8d232d27c21 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlcontext.h')
-rw-r--r--src/qml/qml/qqmlcontext.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcontext.h b/src/qml/qml/qqmlcontext.h
index 5eda300b36..82d15b8102 100644
--- a/src/qml/qml/qqmlcontext.h
+++ b/src/qml/qml/qqmlcontext.h
@@ -84,6 +84,7 @@ public:
void setContextProperties(const QList<PropertyPair> &properties);
QString nameForObject(const QObject *) const;
+ QObject *objectForName(const QString &) const;
QUrl resolvedUrl(const QUrl &) const;