diff --git a/src/corelib/tools/qflatmap_p.h b/src/corelib/tools/qflatmap_p.h index d7f8ff48cb..3b847fc63a 100644 --- a/src/corelib/tools/qflatmap_p.h +++ b/src/corelib/tools/qflatmap_p.h @@ -993,6 +993,9 @@ private: containers c; }; +template> +using QVarLengthFlatMap = QFlatMap, QVarLengthArray>; + QT_END_NAMESPACE #endif // QFLATMAP_P_H diff --git a/tests/auto/corelib/tools/qflatmap/tst_qflatmap.cpp b/tests/auto/corelib/tools/qflatmap/tst_qflatmap.cpp index af616f0a4c..1ba060cc91 100644 --- a/tests/auto/corelib/tools/qflatmap/tst_qflatmap.cpp +++ b/tests/auto/corelib/tools/qflatmap/tst_qflatmap.cpp @@ -558,8 +558,7 @@ void tst_QFlatMap::viewIterators() void tst_QFlatMap::varLengthArray() { - using Map = QFlatMap, - QVarLengthArray, QVarLengthArray>; + using Map = QVarLengthFlatMap; Map m{ { 2, "twee" } }; m.insert(1, "een"); m.remove(1);