Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.3.0
-
None
-
9e71faae038de4c41c206f1321da1b37ab6ca8b1 (qtdeclarative)
Description
I have a C++ QObject-based class that has a QQmlScriptString property.
class MyClass : public QObject { Q_PROPERTY(QQmlScriptString script READ .. WRITE set_script NOTIFY...) void set_script (QQmlScriptString script) { ... qqml_expression_ = new QQmlExpression(script); } private : QQmlExpression *qqml_expression_; }
It works most of the time, except when I set something too trivial
MyClass { script: 1.0 }
which provokes a crash in QQmlExpression.cpp@169 : QVector<T>::at: "index out of range"
I use the following workaround
MyClass { script: 1.0*1.0 }
If necessary, I can try to work out a sample.
Attachments
Issue Links
- relates to
-
QTBUG-41860 Crash when evaluating an invalid QQmlExpression.
-
- Closed
-