aboutsummaryrefslogtreecommitdiff
path: root/odb/qt/containers
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-02-11 13:10:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-02-11 13:10:15 +0200
commit3ffac6eb9deee851b5e792127916a1ac7552b2a0 (patch)
tree4829b1e0db14c2c8a556d69fc658ef0cb523aae1 /odb/qt/containers
parentf3c317cc640413de79e92ae69bc6b2aa856c6cc0 (diff)
QList::swap(Qlist) is only available since Qt 4.8
Diffstat (limited to 'odb/qt/containers')
-rw-r--r--odb/qt/containers/list.hxx4
-rw-r--r--odb/qt/containers/list.ixx2
2 files changed, 6 insertions, 0 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>::