https://bugs.kde.org/show_bug.cgi?id=382702
Sergio Martins <smart...@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Sergio Martins <smart...@kde.org> --- This is not a false positive, check https://code.woboq.org/qt5/qtbase/src/corelib/tools/qhash.h.html#_ZNK5QHash4keysEv to see how keys() is implemented, it allocates and fills a new container There's no easy way, but you could do: bool keysEqual(const QMap<int, QString> &map1, const QMap<int, QString> &map2) { if (map1.size() != map2.size()) return false; for (auto it1 = map1.keyBegin(), it2 = map2.keyBegin(), e1 = map2.keyEnd(); it1 != e1; ++it1, ++it2) { if (*it1 != *it2) return false; } return true; } Which is a couple orders of magnitude faster -- You are receiving this mail because: You are watching all bug changes.