From 3ffac6eb9deee851b5e792127916a1ac7552b2a0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 11 Feb 2013 13:10:15 +0200 Subject: QList::swap(Qlist) is only available since Qt 4.8 --- odb/qt/containers/list.hxx | 4 ++++ odb/qt/containers/list.ixx | 2 ++ odb/qt/details/config.hxx | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/odb/qt/containers/list.hxx b/odb/qt/containers/list.hxx index c5f385f..5cd7168 100644 --- a/odb/qt/containers/list.hxx +++ b/odb/qt/containers/list.hxx @@ -8,6 +8,7 @@ #include #include // ODB_CXX11 +#include // QT_VERSION #include #ifdef ODB_CXX11 @@ -39,7 +40,10 @@ public: QOdbList(const QOdbList &x): vector_base (x), l_ (x.l_) {} // ~QOdbList(); QOdbList &operator=(const QOdbList &l); + +#if QT_VERSION >= 0x040800 void swap(QOdbList &other); +#endif #ifdef ODB_CXX11 QOdbList(QOdbList &&x): vector_base (std::move (x)), l_ (std::move (x.l_)) {} diff --git a/odb/qt/containers/list.ixx b/odb/qt/containers/list.ixx index b40d06a..2cbce99 100644 --- a/odb/qt/containers/list.ixx +++ b/odb/qt/containers/list.ixx @@ -48,6 +48,7 @@ operator= (base_list_type&& x) } #endif +#if QT_VERSION >= 0x040800 template inline void QOdbList:: swap (QOdbList& x) @@ -55,6 +56,7 @@ swap (QOdbList& x) l_.swap (x.l_); vector_base::swap (x); } +#endif template inline void QOdbList:: diff --git a/odb/qt/details/config.hxx b/odb/qt/details/config.hxx index 5662673..42d2f43 100644 --- a/odb/qt/details/config.hxx +++ b/odb/qt/details/config.hxx @@ -15,7 +15,7 @@ // Qt profile), we are going to define __PIE__ ourselves just to silence // Qt. We also want to try to minimize this to cases where it is actually // necessary. To achieve this, we need to include the Qt config file without -// including , which is where the test for PIC/PIE is. While +// including , which is where the test for PIC/PIE is. While // newer versions of Qt (from 4.7) have , to support older // versions we will include qconfig.h directly. This file appears to be // present in all the versions starting with Qt 4.0. -- cgit v1.1