aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qquicklistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qquicklistmodel.cpp')
-rw-r--r--src/qml/qml/qquicklistmodel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/qml/qquicklistmodel.cpp b/src/qml/qml/qquicklistmodel.cpp
index 461d4d8610..52ef2ab61f 100644
--- a/src/qml/qml/qquicklistmodel.cpp
+++ b/src/qml/qml/qquicklistmodel.cpp
@@ -2229,8 +2229,9 @@ bool QQuickListModelParser::compileProperty(const QQmlCustomParserProperty &prop
d[0] = char(QQmlScript::Variant::Invalid); // marks empty list
} else {
QByteArray script = variant.asScript().toUtf8();
- int v = evaluateEnum(script);
- if (v<0) {
+ bool ok;
+ int v = evaluateEnum(script, &ok);
+ if (!ok) {
using namespace QQmlJS;
AST::Node *node = variant.asAST();
AST::StringLiteral *literal = 0;