diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-02-11 13:10:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-02-11 13:10:15 +0200 |
commit | 3ffac6eb9deee851b5e792127916a1ac7552b2a0 (patch) | |
tree | 4829b1e0db14c2c8a556d69fc658ef0cb523aae1 | |
parent | f3c317cc640413de79e92ae69bc6b2aa856c6cc0 (diff) |
QList::swap(Qlist) is only available since Qt 4.8
-rw-r--r-- | odb/qt/containers/list.hxx | 4 | ||||
-rw-r--r-- | odb/qt/containers/list.ixx | 2 | ||||
-rw-r--r-- | odb/qt/details/config.hxx | 2 |
3 files changed, 7 insertions, 1 deletions
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 <odb/pre.hxx> #include <odb/details/config.hxx> // ODB_CXX11 +#include <QtCore/QtGlobal> // QT_VERSION #include <QtCore/QList> #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 <typename T> inline void QOdbList<T>:: swap (QOdbList<T>& x) @@ -55,6 +56,7 @@ swap (QOdbList<T>& x) l_.swap (x.l_); vector_base::swap (x); } +#endif template <typename T> inline void QOdbList<T>:: 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 <QtGlobals>, which is where the test for PIC/PIE is. While +// including <QtGlobal>, which is where the test for PIC/PIE is. While // newer versions of Qt (from 4.7) have <QtConfig>, 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. |