From 0905bf78e2584bbdff05a15826bdaba4170579d6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 30 Nov 2021 12:46:50 +0200 Subject: Avoid using deprecated APIs in Qt5 and Qt6 Note that support for QLinkedList can be enabled with the ODB_QT_FORCE_QLINKEDLIST macro. --- odb/qt/containers/qlinked-list-traits.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'odb/qt/containers/qlinked-list-traits.hxx') diff --git a/odb/qt/containers/qlinked-list-traits.hxx b/odb/qt/containers/qlinked-list-traits.hxx index 378a472..3bfc9e9 100644 --- a/odb/qt/containers/qlinked-list-traits.hxx +++ b/odb/qt/containers/qlinked-list-traits.hxx @@ -6,6 +6,13 @@ #include +#include // QT_VERSION + +// QLinkedList is deprecated since Qt5 5.15 and in Qt6 it has been moved to a +// separate library. +// +#if (QT_VERSION < 0x050F00) || ODB_QT_FORCE_QLINKEDLIST + #include #include @@ -68,6 +75,8 @@ namespace odb }; } +#endif + #include #endif // ODB_QT_CONTAINER_QLINKED_LIST_TRAITS_HXX -- cgit v1.1