Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
6.0.0 Beta1
-
None
-
37c7ef4f4a8478e94eaf0af5b40c279c476fa561 (qt/qtbase/dev)
Description
Given this code:
#include <QtCore/QDebug> #include <QtCore/QAssociativeIterable> #include <QtCore/QVariant> #include <QtCore/QMap> int main(int, char**) { auto container = QMap<int, int>(); // Add a key with value `0`. Other values do not cause the bug container[0] = 1; auto containerVariant = QVariant::fromValue(container); auto iter = containerVariant.value<QAssociativeIterable>(); auto f = iter.constFind(QStringLiteral("anything")); qDebug() << "Itercm" << (f != iter.constEnd()); return 0; }
we get this output:
Itercm true
but we expect
Itercm false
Attachments
Issue Links
- relates to
-
QTBUG-87686 QVariant segfaults with std::list
- Closed