Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
QDS 2.1
-
None
-
-
e7f923e9f1031996e14cd5f71fe98d70d5f5ecc2 (qt-creator/qt-creator/4.15)
-
QDS 2D- 2021 Week 18/19
Description
Design Studio built with Qt6 throws an InvalidArgumentException when opening a scene that contains keyframes.
Exception: "InvalidArgumentException"
Function: "setValue"
File: "...src/plugins/qmldesigner/designercore/model/variantproperty.cpp"
Line: 62
"file: .../qt-creator/src/plugins/qmldesigner/designercore/model/variantproperty.cpp, function: setValue, line: 62"
The reason is a failed attempt to convert the value argument which is of type var in propertyparser.cpp::read(int variantType, const QString &str)
...
// with variantType == QVariant::QVariant
value = QVariant(str);
// value == QVariant(QString, "540")
value.convert(static_cast<QVariant::Type>(variantType));
// value == QVariant(QVariant, QVariant(Invalid))
A quickfix that worked on my side was to add a switch case for QVariant that deals with the issue.
Not sure if this should be better fixed in QVariant though. (... or if this an intended behaviour change)