Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.2, 6.8.0
-
None
-
macOS 15
Description
in our effort to move to Qt6 we came across a problem. Fortunately it seems to be only with special types that this fails.
So if you run that code with Qt5
#include <QSettings> int main() { QSettings s{QSettings::UserScope, "org", "app"}; QVariantMap newData{{"1", QVariantList{QByteArray("toto")}}}; s.setValue("toto", newData); }
and then run this code with Qt6:
#include <QSettings> int main() { QSettings s{QSettings::UserScope, "org", "app"}; qDebug() << "HAHA" << s.value("toto").toMap().value("1").toList().constFirst(); }
You would expect that the value printed is a QByteArray.. but no, it is a QVariantList with 1 item that is the QByteArray.
So far I was only able to pro that problem if I write a QVariantMap where values are QVariantList.