aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllistwrapper.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-07-11 13:14:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-07-14 09:52:43 +0200
commit23383528d41a73cb5c1a889a191849480722518b (patch)
treeadf084ad9b7f0334935d0898860e6b49b6c1205a /src/qml/qml/qqmllistwrapper.cpp
parent813ba0591893fcca2b427dee73106c8773c3b59f (diff)
QQmlListProperty: Turn "doesn't define" into a type error
Change-Id: Ibcb4bef193da6d3340a83cd0e637569cf90f2b4e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmllistwrapper.cpp')
-rw-r--r--src/qml/qml/qqmllistwrapper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp
index ee160b8f8c..bf45cb0bad 100644
--- a/src/qml/qml/qqmllistwrapper.cpp
+++ b/src/qml/qml/qqmllistwrapper.cpp
@@ -12,6 +12,7 @@
QT_BEGIN_NAMESPACE
using namespace QV4;
+using namespace Qt::StringLiterals;
DEFINE_OBJECT_VTABLE(QmlListWrapper);
@@ -222,7 +223,7 @@ ReturnedValue PropertyListPrototype::method_push(const FunctionObject *b, const
QQmlListProperty<QObject> *property = &w->d()->property();
if (!property->append)
- THROW_GENERIC_ERROR("List doesn't define an Append function");
+ return scope.engine->throwTypeError(u"List doesn't define an Append function"_s);
QV4::ScopedObject so(scope);
for (int i = 0, ei = argc; i < ei; ++i)