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>
This commit is contained in:
parent
f8ad76417d
commit
9fea02400c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user