diff options
-rw-r--r-- | LICENSE | 2 | ||||
-rw-r--r-- | manifest | 8 | ||||
-rw-r--r-- | odb/qt/containers/list.hxx | 8 | ||||
-rw-r--r-- | odb/qt/containers/qlinked-list-traits.hxx | 9 | ||||
-rw-r--r-- | odb/qt/containers/qvector-traits.hxx | 10 | ||||
-rw-r--r-- | odb/qt/date-time/sqlite/qdate-time-traits.hxx | 16 | ||||
-rw-r--r-- | odb/qt/date-time/sqlite/qdate-traits.hxx | 20 | ||||
-rw-r--r-- | odb/qt/version-build2.hxx.in | 2 | ||||
-rw-r--r-- | odb/qt/version.hxx | 10 | ||||
-rw-r--r-- | odb/qt/version.options | 2 | ||||
-rw-r--r-- | version | 2 |
11 files changed, 71 insertions, 18 deletions
@@ -1,4 +1,4 @@ -Copyright (c) 2009-2020 Code Synthesis Tools CC. +Copyright (c) 2009-2023 Code Synthesis Tools CC. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as @@ -1,6 +1,6 @@ : 1 name: libodb-qt -version: 2.5.0-b.22.z +version: 2.5.0-b.26.z project: odb summary: Qt ODB profile library license: GPL-2.0-only @@ -16,6 +16,6 @@ build-warning-email: odb-builds@codesynthesis.com builds: all requires: c++11 requires: libqt-core ; Requires not yet packaged libqt-core. -depends: * build2 >= 0.14.0 -depends: * bpkg >= 0.14.0 -depends: libodb [2.5.0-b.22.1 2.5.0-b.23) +depends: * build2 >= 0.16.0- +depends: * bpkg >= 0.16.0- +depends: libodb [2.5.0-b.26.1 2.5.0-b.27) diff --git a/odb/qt/containers/list.hxx b/odb/qt/containers/list.hxx index 7fdec25..143deed 100644 --- a/odb/qt/containers/list.hxx +++ b/odb/qt/containers/list.hxx @@ -46,8 +46,14 @@ public: #endif #ifdef ODB_CXX11 - QOdbList(QOdbList &&x): vector_base (std::move (x)), l_ (std::move (x.l_)) {} + QOdbList(QOdbList &&x) noexcept + : vector_base (std::move (x)), l_ (std::move (x.l_)) {} + + // Note: noexcept is not specified since it can throw while reallocating + // impl_. + // QOdbList &operator=(QOdbList &&other); + #if defined(ODB_CXX11_INITIALIZER_LIST) && \ defined(Q_COMPILER_INITIALIZER_LISTS) QOdbList(std::initializer_list<T> il): l_ (il) {} 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 diff --git a/odb/qt/containers/qvector-traits.hxx b/odb/qt/containers/qvector-traits.hxx index e3905f7..516475d 100644 --- a/odb/qt/containers/qvector-traits.hxx +++ b/odb/qt/containers/qvector-traits.hxx @@ -6,6 +6,14 @@ #include <odb/pre.hxx> +#include <QtCore/QtGlobal> // QT_VERSION + +// In Qt 6 QVector is an alias for QList. +// +#if QT_VERSION >= 0x060000 +#include <odb/qt/containers/qlist-traits.hxx> +#else + #include <QtCore/QVector> #include <odb/container-traits.hxx> @@ -67,6 +75,8 @@ namespace odb }; } +#endif + #include <odb/post.hxx> #endif // ODB_QT_CONTAINER_QVECTOR_TRAITS_HXX diff --git a/odb/qt/date-time/sqlite/qdate-time-traits.hxx b/odb/qt/date-time/sqlite/qdate-time-traits.hxx index 143b0f4..db561fc 100644 --- a/odb/qt/date-time/sqlite/qdate-time-traits.hxx +++ b/odb/qt/date-time/sqlite/qdate-time-traits.hxx @@ -10,6 +10,8 @@ #include <cstddef> // std::size_t #include <cstring> // std::memcpy +#include <QtCore/QtGlobal> // QT_VERSION + #include <QtCore/QDateTime> #include <odb/details/buffer.hxx> @@ -90,7 +92,14 @@ namespace odb else { v.setTimeSpec (Qt::UTC); - v.setTime_t (static_cast <uint> (i)); + + // *Time_t() functions are deprecated in favor of *SecsSinceEpoch(). + // +#if QT_VERSION < 0x060000 + v.setTime_t (static_cast<uint> (i)); +#else + v.setSecsSinceEpoch (static_cast<qint64> (i)); +#endif } } @@ -106,7 +115,12 @@ namespace odb else { is_null = false; + +#if QT_VERSION < 0x060000 i = static_cast<long long> (v.toTime_t ()); +#else + i = static_cast<long long> (v.toSecsSinceEpoch ()); +#endif } } }; diff --git a/odb/qt/date-time/sqlite/qdate-traits.hxx b/odb/qt/date-time/sqlite/qdate-traits.hxx index 2810d02..52721b7 100644 --- a/odb/qt/date-time/sqlite/qdate-traits.hxx +++ b/odb/qt/date-time/sqlite/qdate-traits.hxx @@ -10,7 +10,10 @@ #include <cstddef> // std::size_t #include <cstring> // std::memcpy +#include <QtCore/QtGlobal> // QT_VERSION + #include <QtCore/QDate> +#include <QtCore/QDateTime> #include <odb/details/buffer.hxx> #include <odb/sqlite/traits.hxx> @@ -92,8 +95,14 @@ namespace odb { QDateTime dt; dt.setTimeSpec (Qt::UTC); - dt.setTime_t (static_cast<uint> (i)); + // *Time_t() functions are deprecated in favor of *SecsSinceEpoch(). + // +#if QT_VERSION < 0x060000 + dt.setTime_t (static_cast<uint> (i)); +#else + dt.setSecsSinceEpoch (static_cast<qint64> (i)); +#endif v = dt.date (); } } @@ -108,8 +117,13 @@ namespace odb else { is_null = false; - i = static_cast<long long> ( - QDateTime (v, QTime (0, 0, 0), Qt::UTC).toTime_t ()); + const QDateTime dt (v, QTime (0, 0, 0), Qt::UTC); + +#if QT_VERSION < 0x060000 + i = static_cast<long long> (dt.toTime_t ()); +#else + i = static_cast<long long> (dt.toSecsSinceEpoch ()); +#endif } } }; diff --git a/odb/qt/version-build2.hxx.in b/odb/qt/version-build2.hxx.in index 25d73b9..51f1191 100644 --- a/odb/qt/version-build2.hxx.in +++ b/odb/qt/version-build2.hxx.in @@ -5,7 +5,7 @@ // @@ TODO: need to derive automatically (it is also hardcoded in *.options). // -#define ODB_QT_VERSION 2047200 +#define ODB_QT_VERSION 2047600 // The numeric version format is AAAAABBBBBCCCCCDDDE where: // diff --git a/odb/qt/version.hxx b/odb/qt/version.hxx index 9965709..4f9510a 100644 --- a/odb/qt/version.hxx +++ b/odb/qt/version.hxx @@ -31,23 +31,23 @@ // Check that we have compatible ODB version. // -#if ODB_VERSION != 20472 +#if ODB_VERSION != 20476 # error incompatible odb interface version detected #endif // ODB Qt interface version: odb interface version plus the Qt interface // version. // -#define ODB_QT_VERSION 2047200 -#define ODB_QT_VERSION_STR "2.5.0-b.22" +#define ODB_QT_VERSION 2047600 +#define ODB_QT_VERSION_STR "2.5.0-b.26" // libodb-qt version: odb interface version plus the bugfix version. Note // that LIBODB_QT_VERSION is always greater or equal to ODB_QT_VERSION // since if the Qt interface virsion is incremented then the bugfix version // must be incremented as well. // -#define LIBODB_QT_VERSION 2049972 -#define LIBODB_QT_VERSION_STR "2.5.0-b.22" +#define LIBODB_QT_VERSION 2049976 +#define LIBODB_QT_VERSION_STR "2.5.0-b.26" #include <odb/post.hxx> diff --git a/odb/qt/version.options b/odb/qt/version.options index 4aa3fbe..0fef537 100644 --- a/odb/qt/version.options +++ b/odb/qt/version.options @@ -11,6 +11,6 @@ # --hxx-prologue '#include <odb/qt/version.hxx>' ---hxx-prologue '#if ODB_QT_VERSION != 2047200 // 2.5.0-b.22' +--hxx-prologue '#if ODB_QT_VERSION != 2047600 // 2.5.0-b.26' --hxx-prologue '# error ODB and C++ compilers see different libodb-qt interface versions' --hxx-prologue '#endif' @@ -1 +1 @@ -2.5.0-b.22 +2.5.0-b.26 |