diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-11-30 12:46:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-02-16 16:07:12 +0200 |
commit | 0905bf78e2584bbdff05a15826bdaba4170579d6 (patch) | |
tree | eab51ff64a5e87e50763ec510b4b440145adf72e /odb/qt/containers | |
parent | ecaafacbe574069d749f3a006259d179028f2399 (diff) |
Avoid using deprecated APIs in Qt5 and Qt6
Note that support for QLinkedList can be enabled with the
ODB_QT_FORCE_QLINKEDLIST macro.
Diffstat (limited to 'odb/qt/containers')
-rw-r--r-- | odb/qt/containers/qlinked-list-traits.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
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 <odb/pre.hxx> +#include <QtCore/QtGlobal> // 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 <QtCore/QLinkedList> #include <odb/container-traits.hxx> @@ -68,6 +75,8 @@ namespace odb }; } +#endif + #include <odb/post.hxx> #endif // ODB_QT_CONTAINER_QLINKED_LIST_TRAITS_HXX |