summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2011-06-10 10:47:07 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-12 12:28:12 +0200
commit9fea02400c450b4b1a031506655d8c4b165cecd6 (patch)
treed9eef5f7bfc09e24a9260ac83ca59973b8461711 /src/corelib/tools
parentf8ad76417d2c52ef1392302e493d7a13b811915b (diff)
Cleanup reference counting in QDateTimePrivate class.
It is better to use QSharedData which is a common interface for ref counting. Change-Id: I990476d6763901bf383f241bce16fe26665b021c Reviewed-on: http://codereview.qt.nokia.com/1439 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qdatetime_p.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/tools/qdatetime_p.h b/src/corelib/tools/qdatetime_p.h
index 8d931dccc0..c20f2123f9 100644
--- a/src/corelib/tools/qdatetime_p.h
+++ b/src/corelib/tools/qdatetime_p.h
@@ -76,17 +76,16 @@
QT_BEGIN_NAMESPACE
-class QDateTimePrivate
+class QDateTimePrivate : public QSharedData
{
public:
enum Spec { LocalUnknown = -1, LocalStandard = 0, LocalDST = 1, UTC = 2, OffsetFromUTC = 3};
QDateTimePrivate() : spec(LocalUnknown), utcOffset(0) {}
QDateTimePrivate(const QDateTimePrivate &other)
- : date(other.date), time(other.time), spec(other.spec), utcOffset(other.utcOffset)
+ : QSharedData(other), date(other.date), time(other.time), spec(other.spec), utcOffset(other.utcOffset)
{}
- QAtomicInt ref;
QDate date;
QTime time;
Spec spec;