Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.1.0
-
None
-
OS: Ubuntu 13.04 32 bits
Qt version: Qt 5.1 given by the Qt Project online installer (i.e. not the Qt5 version in Ubuntu repositories)
-
77833b90c8d93b86904b744f7be2926ba377ca6e
Description
While coding a personal program, I saw some unexpected segmentation faults when I use the "QVariant QJsonValue::toVariant();" method on a QJsonValue containing an empty QJsonArray:
QJsonArray a; // a = []
QJsonValue v(a); // QJsonValue with the empty QJsonArray
QVariant vari = v.toVariant(); // Segmentation fault (SIGSEGV)
While trying to reproduce the bug in my personal program, I also noticed that the same SIGSEGV happened with an empty QJsonObject:
QJsonObject o; // o = {}
QJsonValue v(o); // QJsonValue with the empty QJsonObject
QVariant vari = v.toVariant(); // Segmentation fault (SIGSEGV)
I do not thing that I missed something dealing with that in the Qt Documentation. Moreover, I do not remember getting such a bug with Qt 5.0.