Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.0 Beta1
-
None
-
fedora linux x86
-
3dbe05f6bf3fd51ce8097c35f6c7f12b39acb0f6 (qtdeclarative)
Description
we have this codes for C++ side:
class TestVariantBug : public QObject { Q_OBJECT public: explicit TestVariantBug(QObject *parent = 0) : QObject(parent) { } Q_INVOKABLE QVariantMap create() { QVariantMap result; result["dest"] = QStringList() << "test"; return result; } Q_INVOKABLE QVariantMap test(QVariantMap map) { qDebug() << "C++ Map:" << map; return map; } };
and in qml side:
TestVariantBug{
id:bug
Component.onCompleted: {
var x = bug.create();
bug.test(x)
}
}
and output in C++ is:
C++ Map: QMap(("dest", QVariant(QVariantMap, QMap(("0", QVariant(QString, "test") ) ) ) ) )
that is incorrect and must be:
QMap(("dest", QVariant(QStringList, ("test") ) ) )
Attachments
Issue Links
- relates to
-
QTBUG-40431 Property alias on a javascript object points to different and corrupted object
- Closed