aboutsummaryrefslogtreecommitdiff
path: root/odb/qt/date-time
diff options
context:
space:
mode:
Diffstat (limited to 'odb/qt/date-time')
-rw-r--r--odb/qt/date-time/date-time-common.options1
-rw-r--r--odb/qt/date-time/date-time-mssql.options1
-rw-r--r--odb/qt/date-time/date-time-mysql.options1
-rw-r--r--odb/qt/date-time/date-time-oracle.options1
-rw-r--r--odb/qt/date-time/date-time-pgsql.options1
-rw-r--r--odb/qt/date-time/date-time-sqlite.options1
-rw-r--r--odb/qt/date-time/exceptions.cxx1
-rw-r--r--odb/qt/date-time/exceptions.hxx1
-rw-r--r--odb/qt/date-time/mssql/default-mapping.hxx1
-rw-r--r--odb/qt/date-time/mssql/qdate-time-traits.hxx1
-rw-r--r--odb/qt/date-time/mssql/qdate-traits.hxx1
-rw-r--r--odb/qt/date-time/mssql/qtime-traits.hxx1
-rw-r--r--odb/qt/date-time/mysql/default-mapping.hxx1
-rw-r--r--odb/qt/date-time/mysql/qdate-time-traits.hxx1
-rw-r--r--odb/qt/date-time/mysql/qdate-traits.hxx1
-rw-r--r--odb/qt/date-time/mysql/qtime-traits.hxx1
-rw-r--r--odb/qt/date-time/oracle/default-mapping.hxx1
-rw-r--r--odb/qt/date-time/oracle/qdate-time-traits.hxx1
-rw-r--r--odb/qt/date-time/oracle/qdate-traits.hxx1
-rw-r--r--odb/qt/date-time/oracle/qtime-traits.hxx1
-rw-r--r--odb/qt/date-time/pgsql/default-mapping.hxx1
-rw-r--r--odb/qt/date-time/pgsql/qdate-time-traits.hxx1
-rw-r--r--odb/qt/date-time/pgsql/qdate-traits.hxx1
-rw-r--r--odb/qt/date-time/pgsql/qtime-traits.hxx1
-rw-r--r--odb/qt/date-time/sqlite/default-mapping.hxx1
-rw-r--r--odb/qt/date-time/sqlite/qdate-time-traits.hxx17
-rw-r--r--odb/qt/date-time/sqlite/qdate-traits.hxx21
-rw-r--r--odb/qt/date-time/sqlite/qtime-traits.hxx1
28 files changed, 32 insertions, 32 deletions
diff --git a/odb/qt/date-time/date-time-common.options b/odb/qt/date-time/date-time-common.options
index 5bffbfd..d813259 100644
--- a/odb/qt/date-time/date-time-common.options
+++ b/odb/qt/date-time/date-time-common.options
@@ -1,5 +1,4 @@
# file : odb/qt/date-time/date-time-common.options
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
--profile qt/version
diff --git a/odb/qt/date-time/date-time-mssql.options b/odb/qt/date-time/date-time-mssql.options
index 4fb0371..7e35b4d 100644
--- a/odb/qt/date-time/date-time-mssql.options
+++ b/odb/qt/date-time/date-time-mssql.options
@@ -1,5 +1,4 @@
# file : odb/qt/date-time/date-time-mssql.options
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
--profile qt/version
diff --git a/odb/qt/date-time/date-time-mysql.options b/odb/qt/date-time/date-time-mysql.options
index 7d800d3..fdbb364 100644
--- a/odb/qt/date-time/date-time-mysql.options
+++ b/odb/qt/date-time/date-time-mysql.options
@@ -1,5 +1,4 @@
# file : odb/qt/date-time/date-time-mysql.options
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
--profile qt/version
diff --git a/odb/qt/date-time/date-time-oracle.options b/odb/qt/date-time/date-time-oracle.options
index aa2cfe2..c339ce3 100644
--- a/odb/qt/date-time/date-time-oracle.options
+++ b/odb/qt/date-time/date-time-oracle.options
@@ -1,5 +1,4 @@
# file : odb/qt/date-time/date-time-oracle.options
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
--profile qt/version
diff --git a/odb/qt/date-time/date-time-pgsql.options b/odb/qt/date-time/date-time-pgsql.options
index 2f73492..9d80d48 100644
--- a/odb/qt/date-time/date-time-pgsql.options
+++ b/odb/qt/date-time/date-time-pgsql.options
@@ -1,5 +1,4 @@
# file : odb/qt/date-time/date-time-pgsql.options
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
--profile qt/version
diff --git a/odb/qt/date-time/date-time-sqlite.options b/odb/qt/date-time/date-time-sqlite.options
index 2cde697..8eb1110 100644
--- a/odb/qt/date-time/date-time-sqlite.options
+++ b/odb/qt/date-time/date-time-sqlite.options
@@ -1,5 +1,4 @@
# file : odb/qt/date-time/date-time-sqlite.options
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
--profile qt/version
diff --git a/odb/qt/date-time/exceptions.cxx b/odb/qt/date-time/exceptions.cxx
index 68d4856..48f0540 100644
--- a/odb/qt/date-time/exceptions.cxx
+++ b/odb/qt/date-time/exceptions.cxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/exceptions.cxx
-// copyright : Copyright (c) 2005-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#include <odb/qt/date-time/exceptions.hxx>
diff --git a/odb/qt/date-time/exceptions.hxx b/odb/qt/date-time/exceptions.hxx
index 1bfcb98..7a73be2 100644
--- a/odb/qt/date-time/exceptions.hxx
+++ b/odb/qt/date-time/exceptions.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/exceptions.hxx
-// copyright : Copyright (c) 2005-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_EXCEPTIONS_HXX
diff --git a/odb/qt/date-time/mssql/default-mapping.hxx b/odb/qt/date-time/mssql/default-mapping.hxx
index 263c64d..a8acb6b 100644
--- a/odb/qt/date-time/mssql/default-mapping.hxx
+++ b/odb/qt/date-time/mssql/default-mapping.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/mssql/default-mapping.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_MSSQL_DEFAULT_MAPPING_HXX
diff --git a/odb/qt/date-time/mssql/qdate-time-traits.hxx b/odb/qt/date-time/mssql/qdate-time-traits.hxx
index 296d054..5fd8a98 100644
--- a/odb/qt/date-time/mssql/qdate-time-traits.hxx
+++ b/odb/qt/date-time/mssql/qdate-time-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/mssql/qdate-time-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_MSSQL_QDATETIME_TRAITS_HXX
diff --git a/odb/qt/date-time/mssql/qdate-traits.hxx b/odb/qt/date-time/mssql/qdate-traits.hxx
index 960330a..caa5d3c 100644
--- a/odb/qt/date-time/mssql/qdate-traits.hxx
+++ b/odb/qt/date-time/mssql/qdate-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/mssql/qdate-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_MSSQL_QDATE_TRAITS_HXX
diff --git a/odb/qt/date-time/mssql/qtime-traits.hxx b/odb/qt/date-time/mssql/qtime-traits.hxx
index 76c363d..88fbf41 100644
--- a/odb/qt/date-time/mssql/qtime-traits.hxx
+++ b/odb/qt/date-time/mssql/qtime-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/mssql/qtime-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_MSSQL_QTIME_TRAITS_HXX
diff --git a/odb/qt/date-time/mysql/default-mapping.hxx b/odb/qt/date-time/mysql/default-mapping.hxx
index 20f0dd3..a88c507 100644
--- a/odb/qt/date-time/mysql/default-mapping.hxx
+++ b/odb/qt/date-time/mysql/default-mapping.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/mysql/default-mapping.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_MYSQL_DEFAULT_MAPPING_HXX
diff --git a/odb/qt/date-time/mysql/qdate-time-traits.hxx b/odb/qt/date-time/mysql/qdate-time-traits.hxx
index ecd1aa6..92279eb 100644
--- a/odb/qt/date-time/mysql/qdate-time-traits.hxx
+++ b/odb/qt/date-time/mysql/qdate-time-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/mysql/qdate-time-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_MYSQL_QDATETIME_TRAITS_HXX
diff --git a/odb/qt/date-time/mysql/qdate-traits.hxx b/odb/qt/date-time/mysql/qdate-traits.hxx
index 2078c49..12a00ec 100644
--- a/odb/qt/date-time/mysql/qdate-traits.hxx
+++ b/odb/qt/date-time/mysql/qdate-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/mysql/qdate-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_MYSQL_QDATE_TRAITS_HXX
diff --git a/odb/qt/date-time/mysql/qtime-traits.hxx b/odb/qt/date-time/mysql/qtime-traits.hxx
index b35139c..c96e13f 100644
--- a/odb/qt/date-time/mysql/qtime-traits.hxx
+++ b/odb/qt/date-time/mysql/qtime-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/mysql/qtime-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_MYSQL_QTIME_TRAITS_HXX
diff --git a/odb/qt/date-time/oracle/default-mapping.hxx b/odb/qt/date-time/oracle/default-mapping.hxx
index 196553d..32a733a 100644
--- a/odb/qt/date-time/oracle/default-mapping.hxx
+++ b/odb/qt/date-time/oracle/default-mapping.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/oracle/default-mapping.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_ORACLE_DEFAULT_MAPPING_HXX
diff --git a/odb/qt/date-time/oracle/qdate-time-traits.hxx b/odb/qt/date-time/oracle/qdate-time-traits.hxx
index 2c2bfe4..ba90075 100644
--- a/odb/qt/date-time/oracle/qdate-time-traits.hxx
+++ b/odb/qt/date-time/oracle/qdate-time-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/oracle/qdate-time-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_ORACLE_QDATETIME_TRAITS_HXX
diff --git a/odb/qt/date-time/oracle/qdate-traits.hxx b/odb/qt/date-time/oracle/qdate-traits.hxx
index 101e18a..f293e2d 100644
--- a/odb/qt/date-time/oracle/qdate-traits.hxx
+++ b/odb/qt/date-time/oracle/qdate-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/oracle/qdate-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_ORACLE_QDATE_TRAITS_HXX
diff --git a/odb/qt/date-time/oracle/qtime-traits.hxx b/odb/qt/date-time/oracle/qtime-traits.hxx
index 7f1b175..0d9aff4 100644
--- a/odb/qt/date-time/oracle/qtime-traits.hxx
+++ b/odb/qt/date-time/oracle/qtime-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/oracle/qtime-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_ORACLE_QTIME_TRAITS_HXX
diff --git a/odb/qt/date-time/pgsql/default-mapping.hxx b/odb/qt/date-time/pgsql/default-mapping.hxx
index 1d83a07..cd3b1b5 100644
--- a/odb/qt/date-time/pgsql/default-mapping.hxx
+++ b/odb/qt/date-time/pgsql/default-mapping.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/pgsql/default-mapping.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_PGSQL_DEFAULT_MAPPING_HXX
diff --git a/odb/qt/date-time/pgsql/qdate-time-traits.hxx b/odb/qt/date-time/pgsql/qdate-time-traits.hxx
index 4e91456..a9fe757 100644
--- a/odb/qt/date-time/pgsql/qdate-time-traits.hxx
+++ b/odb/qt/date-time/pgsql/qdate-time-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/pgsql/qdatetime-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_PGSQL_QDATETIME_TRAITS_HXX
diff --git a/odb/qt/date-time/pgsql/qdate-traits.hxx b/odb/qt/date-time/pgsql/qdate-traits.hxx
index d21323c..b7cc7d4 100644
--- a/odb/qt/date-time/pgsql/qdate-traits.hxx
+++ b/odb/qt/date-time/pgsql/qdate-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/pgsql/qdate-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_PGSQL_QDATE_TRAITS_HXX
diff --git a/odb/qt/date-time/pgsql/qtime-traits.hxx b/odb/qt/date-time/pgsql/qtime-traits.hxx
index 4f48f32..86a594b 100644
--- a/odb/qt/date-time/pgsql/qtime-traits.hxx
+++ b/odb/qt/date-time/pgsql/qtime-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/pgsql/qtime-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_PGSQL_QTIME_TRAITS_HXX
diff --git a/odb/qt/date-time/sqlite/default-mapping.hxx b/odb/qt/date-time/sqlite/default-mapping.hxx
index 03e146c..a150ca9 100644
--- a/odb/qt/date-time/sqlite/default-mapping.hxx
+++ b/odb/qt/date-time/sqlite/default-mapping.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/sqlite/default-mapping.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_SQLITE_DEFAULT_MAPPING_HXX
diff --git a/odb/qt/date-time/sqlite/qdate-time-traits.hxx b/odb/qt/date-time/sqlite/qdate-time-traits.hxx
index 2c08b29..db561fc 100644
--- a/odb/qt/date-time/sqlite/qdate-time-traits.hxx
+++ b/odb/qt/date-time/sqlite/qdate-time-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/sqlite/qdatetime-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_SQLITE_QDATETIME_TRAITS_HXX
@@ -11,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>
@@ -91,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
}
}
@@ -107,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 825ce1b..52721b7 100644
--- a/odb/qt/date-time/sqlite/qdate-traits.hxx
+++ b/odb/qt/date-time/sqlite/qdate-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/sqlite/qdate-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_SQLITE_QDATE_TRAITS_HXX
@@ -11,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>
@@ -93,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 ();
}
}
@@ -109,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/date-time/sqlite/qtime-traits.hxx b/odb/qt/date-time/sqlite/qtime-traits.hxx
index 8b57abd..dd86399 100644
--- a/odb/qt/date-time/sqlite/qtime-traits.hxx
+++ b/odb/qt/date-time/sqlite/qtime-traits.hxx
@@ -1,5 +1,4 @@
// file : odb/qt/date-time/sqlite/qtime-traits.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_QT_DATE_TIME_SQLITE_QTIME_TRAITS_HXX