summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qhooks.cpp2
-rw-r--r--src/corelib/time/qdatetime_p.h18
2 files changed, 6 insertions, 14 deletions
diff --git a/src/corelib/global/qhooks.cpp b/src/corelib/global/qhooks.cpp
index 020dee3710..79f9b7d6c2 100644
--- a/src/corelib/global/qhooks.cpp
+++ b/src/corelib/global/qhooks.cpp
@@ -67,7 +67,7 @@ quintptr Q_CORE_EXPORT qtHookData[] = {
// The required sizes and offsets are tested in tests/auto/other/toolsupport.
// When this fails and the change was intentional, adjust the test and
// adjust this value here.
- 17
+ 18
};
Q_STATIC_ASSERT(QHooks::LastHookIndex == sizeof(qtHookData) / sizeof(qtHookData[0]));
diff --git a/src/corelib/time/qdatetime_p.h b/src/corelib/time/qdatetime_p.h
index 6e4120d762..f4f00a8b9b 100644
--- a/src/corelib/time/qdatetime_p.h
+++ b/src/corelib/time/qdatetime_p.h
@@ -56,7 +56,7 @@
#include "qplatformdefs.h"
#include "QtCore/qatomic.h"
#include "QtCore/qdatetime.h"
-#include "QtCore/qpair.h"
+#include "QtCore/qshareddata.h"
#if QT_CONFIG(timezone)
#include "qtimezone.h"
@@ -64,7 +64,7 @@
QT_BEGIN_NAMESPACE
-class QDateTimePrivate
+class QDateTimePrivate : public QSharedData
{
public:
// forward the declarations from QDateTime (this makes them public)
@@ -110,13 +110,6 @@ public:
DaylightMask = SetToStandardTime | SetToDaylightTime
};
- QDateTimePrivate() : m_msecs(0),
- m_status(StatusFlag(Qt::LocalTime << TimeSpecShift)),
- m_offsetFromUtc(0),
- ref(0)
- {
- }
-
static QDateTime::Data create(const QDate &toDate, const QTime &toTime, Qt::TimeSpec toSpec,
int offsetSeconds);
@@ -124,10 +117,9 @@ public:
static QDateTime::Data create(const QDate &toDate, const QTime &toTime, const QTimeZone & timeZone);
#endif // timezone
- qint64 m_msecs;
- StatusFlags m_status;
- int m_offsetFromUtc;
- mutable QAtomicInt ref;
+ StatusFlags m_status = StatusFlag(Qt::LocalTime << TimeSpecShift);
+ qint64 m_msecs = 0;
+ int m_offsetFromUtc = 0;
#if QT_CONFIG(timezone)
QTimeZone m_timeZone;
#endif // timezone