diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-29 07:48:59 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2019-04-29 08:34:50 +0000 |
commit | 9c25df6dd0412d0e4211370843d8cbb8aef1e512 (patch) | |
tree | 61919135b33113cf94753608b221758f95a8ce77 /src/qml/qml/qqmltypewrapper.cpp | |
parent | 0ca32eb4c57ba43b64cfc74c0fbd1c63706952c2 (diff) | |
parent | 23f988fe48f3f3c63e8311c31ed09394702089d2 (diff) |
Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev
Diffstat (limited to 'src/qml/qml/qqmltypewrapper.cpp')
-rw-r--r-- | src/qml/qml/qqmltypewrapper.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp index 3e72f5b324..236daac75c 100644 --- a/src/qml/qml/qqmltypewrapper.cpp +++ b/src/qml/qml/qqmltypewrapper.cpp @@ -95,9 +95,8 @@ QObject* QQmlTypeWrapper::singletonObject() const QVariant QQmlTypeWrapper::toVariant() const { - // Only Singleton type wrappers can be converted to a variant. if (!isSingleton()) - return QVariant(); + return QVariant::fromValue<QObject *>(d()->object); QQmlEnginePrivate *e = QQmlEnginePrivate::get(engine()->qmlEngine()); const QQmlType type = d()->type(); |