summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qtimezone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/time/qtimezone.cpp')
-rw-r--r--src/corelib/time/qtimezone.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/time/qtimezone.cpp b/src/corelib/time/qtimezone.cpp
index e95700c64b..5f4589eda0 100644
--- a/src/corelib/time/qtimezone.cpp
+++ b/src/corelib/time/qtimezone.cpp
@@ -112,7 +112,7 @@ public:
// isTimeZoneIdAvailable() and to create named IANA time zones. This is usually the host
// system, but may be different if the host resources are insufficient or if
// QT_NO_SYSTEMLOCALE is set. A simple UTC backend is used if no alternative is available.
- QSharedDataPointer<QTimeZonePrivate> backend;
+ QExplicitlySharedDataPointer<QTimeZonePrivate> backend;
};
Q_GLOBAL_STATIC(QTimeZoneSingleton, global_tz);
@@ -339,11 +339,11 @@ QTimeZone::QTimeZone(const QByteArray &ianaId)
d = new QUtcTimeZonePrivate(ianaId);
// If not a CLDR UTC offset ID then try creating it with the system backend.
// Relies on backend not creating valid TZ with invalid name.
- if (!d->isValid())
+ if (!d.constData()->isValid())
d = ianaId.isEmpty() ? newBackendTimeZone() : newBackendTimeZone(ianaId);
// Can also handle UTC with arbitrary (valid) offset, but only do so as
// fall-back, since either of the above may handle it more informatively.
- if (!d->isValid()) {
+ if (!d.constData()->isValid()) {
qint64 offset = QUtcTimeZonePrivate::offsetFromUtcString(ianaId);
if (offset != QTimeZonePrivate::invalidSeconds()) {
// Should have abs(offset) < 24 * 60 * 60 = 86400.