From a94e9329450be060256e5040c095c6175d5ec19e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Martsum?= Date: Thu, 26 Sep 2013 15:28:33 +0200 Subject: QVarLengthArray - doc fix. QVarLengthArray actually does support iterators. It was added in Qt 4.8. Change-Id: I9f714a09eab1d2e5dc023bd701ab7c743b078ec0 Reviewed-by: Olivier Goffart Reviewed-by: Giuseppe D'Angelo --- src/corelib/tools/qvarlengtharray.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc index 93aa5e993e..4452bcf1cd 100644 --- a/src/corelib/tools/qvarlengtharray.qdoc +++ b/src/corelib/tools/qvarlengtharray.qdoc @@ -70,8 +70,8 @@ structure. The main differences between the two classes are: \list - \li QVarLengthArray's API is much more low-level. It provides no - iterators and lacks much of QVector's functionality. + \li QVarLengthArray's API is much more low-level and it lacks + some of QVector's functionality. \li QVarLengthArray doesn't initialize the memory if the value is a basic type. (QVector always does.) -- cgit v1.2.3 From 3705c1263d4d2232d5527361692d25a8519c222b Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Thu, 26 Sep 2013 12:16:39 +0200 Subject: Doc: Add docs for rvalue references and move constructors These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion Reviewed-by: Stephen Kelly --- src/corelib/tools/qbitarray.cpp | 17 ++++++++++++++++ src/corelib/tools/qbytearray.cpp | 17 ++++++++++++++++ src/corelib/tools/qcommandlineoption.cpp | 8 ++++++++ src/corelib/tools/qcontiguouscache.cpp | 8 ++++++++ src/corelib/tools/qeasingcurve.cpp | 17 ++++++++++++++++ src/corelib/tools/qhash.cpp | 17 ++++++++++++++++ src/corelib/tools/qlinkedlist.cpp | 17 ++++++++++++++++ src/corelib/tools/qlist.cpp | 17 ++++++++++++++++ src/corelib/tools/qmap.cpp | 17 ++++++++++++++++ src/corelib/tools/qregexp.cpp | 8 ++++++++ src/corelib/tools/qshareddata.cpp | 34 ++++++++++++++++++++++++++++++++ src/corelib/tools/qstring.cpp | 16 +++++++++++++++ src/corelib/tools/qtimezone.cpp | 9 +++++++++ src/corelib/tools/qvector.cpp | 17 ++++++++++++++++ 14 files changed, 219 insertions(+) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp index da2f48c071..4f1fce3077 100644 --- a/src/corelib/tools/qbitarray.cpp +++ b/src/corelib/tools/qbitarray.cpp @@ -110,6 +110,23 @@ QT_BEGIN_NAMESPACE \sa QByteArray, QVector */ +/*! + \fn QBitArray::QBitArray(QBitArray &&other) + + Move-constructs a QBitArray instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + +/*! + \fn QBitArray &QBitArray::operator=(QBitArray &&other) + + Move-assigns \a other to this QBitArray instance. + + \since 5.2 +*/ + /*! \fn QBitArray::QBitArray() Constructs an empty bit array. diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 975894a516..92d0d30f54 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -910,6 +910,15 @@ static inline char qToLower(char c) \sa operator=() */ +/*! + \fn QByteArray::QByteArray(QByteArray &&other) + + Move-constructs a QByteArray instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + /*! \fn QByteArray::QByteArray(QByteArrayDataPtr dd) \internal @@ -965,6 +974,14 @@ QByteArray &QByteArray::operator=(const char *str) return *this; } +/*! + \fn QByteArray &QByteArray::operator=(QByteArray &&other) + + Move-assigns \a other to this QByteArray instance. + + \since 5.2 +*/ + /*! \fn void QByteArray::swap(QByteArray &other) \since 4.8 diff --git a/src/corelib/tools/qcommandlineoption.cpp b/src/corelib/tools/qcommandlineoption.cpp index b30f7d25b4..9827547c56 100644 --- a/src/corelib/tools/qcommandlineoption.cpp +++ b/src/corelib/tools/qcommandlineoption.cpp @@ -87,6 +87,14 @@ public: \sa QCommandLineParser */ +/*! + \fn QCommandLineOption &QCommandLineOption::operator=(QCommandLineOption &&other) + + Move-assigns \a other to this QCommandLineOption instance. + + \since 5.2 +*/ + /*! Constructs a command line option object with the given arguments. diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp index b92c4d3fe9..6ccdb7b771 100644 --- a/src/corelib/tools/qcontiguouscache.cpp +++ b/src/corelib/tools/qcontiguouscache.cpp @@ -202,6 +202,14 @@ MyRecord record(int row) const Assigns \a other to this cache and returns a reference to this cache. */ +/*! + \fn QContiguousCache &QContiguousCache::operator=(QContiguousCache &&other) + + Move-assigns \a other to this QContiguousCache instance. + + \since 5.2 +*/ + /*! \fn void QContiguousCache::swap(QContiguousCache &other) \since 4.8 diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 23451f095c..fc9a1ca867 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -1065,6 +1065,15 @@ static QEasingCurveFunction *curveToFunctionObject(QEasingCurve::Type type) return curveFunc; } +/*! + \fn QEasingCurve::QEasingCurve(QEasingCurve &&other) + + Move-constructs a QEasingCurve instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + /*! Constructs an easing curve of the given \a type. */ @@ -1097,6 +1106,14 @@ QEasingCurve::~QEasingCurve() Copy \a other. */ +/*! + \fn QEasingCurve &QEasingCurve::operator=(QEasingCurve &&other) + + Move-assigns \a other to this QEasingCurve instance. + + \since 5.2 +*/ + /*! \fn void QEasingCurve::swap(QEasingCurve &other) \since 5.0 diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 4b9d120bb3..b6257c8907 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -941,6 +941,15 @@ void QHashData::checkSanity() \sa clear() */ +/*! + \fn QHash::QHash(QHash &&other) + + Move-constructs a QHash instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + /*! \fn QHash::QHash(std::initializer_list > list) \since 5.1 @@ -974,6 +983,14 @@ void QHashData::checkSanity() Assigns \a other to this hash and returns a reference to this hash. */ +/*! + \fn QHash &QHash::operator=(QHash &&other) + + Move-assigns \a other to this QHash instance. + + \since 5.2 +*/ + /*! \fn void QHash::swap(QHash &other) \since 4.8 diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp index 6e7a7a2635..c6e79c02a3 100644 --- a/src/corelib/tools/qlinkedlist.cpp +++ b/src/corelib/tools/qlinkedlist.cpp @@ -125,6 +125,15 @@ const QLinkedListData QLinkedListData::shared_null = { Constructs an empty list. */ +/*! + \fn QLinkedList::QLinkedList(QLinkedList &&other) + + Move-constructs a QLinkedList instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + /*! \fn QLinkedList::QLinkedList(const QLinkedList &other) Constructs a copy of \a other. @@ -740,6 +749,14 @@ const QLinkedListData QLinkedListData::shared_null = { Assigns \a other to this iterator. */ +/*! + \fn QLinkedList &QLinkedList::operator=(QLinkedList &&other) + + Move-assigns \a other to this QLinkedList instance. + + \since 5.2 +*/ + /*! \fn T &QLinkedList::iterator::operator*() const Returns a modifiable reference to the current item. diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 760c944c29..4770054d79 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -479,6 +479,15 @@ void **QListData::erase(void **xi) \sa QListIterator, QMutableListIterator, QLinkedList, QVector */ +/*! + \fn QList::QList(QList &&other) + + Move-constructs a QList instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + /*! \fn QList QList::mid(int pos, int length) const @@ -527,6 +536,14 @@ void **QListData::erase(void **xi) list. */ +/*! + \fn QList &QList::operator=(QList &&other) + + Move-assigns \a other to this QList instance. + + \since 5.2 +*/ + /*! \fn void QList::swap(QList &other) \since 4.8 diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index 71b90bcada..01a6a22631 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -516,6 +516,15 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa clear() */ +/*! + \fn QMap::QMap(QMap &&other) + + Move-constructs a QMap instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + /*! \fn QMap::QMap(const QMap &other) Constructs a copy of \a other. @@ -567,6 +576,14 @@ void QMapDataBase::freeData(QMapDataBase *d) Assigns \a other to this map and returns a reference to this map. */ +/*! + \fn QMap &QMap::operator=(QMap &&other) + + Move-assigns \a other to this QMap instance. + + \since 5.2 +*/ + /*! \fn void QMap::swap(QMap &other) \since 4.8 diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index ef2dba5700..5debb1a238 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -4012,6 +4012,14 @@ QRegExp &QRegExp::operator=(const QRegExp &rx) return *this; } +/*! + \fn QRegExp &QRegExp::operator=(QRegExp &&other) + + Move-assigns \a other to this QRegExp instance. + + \since 5.2 +*/ + /*! \fn void QRegExp::swap(QRegExp &other) \since 4.8 diff --git a/src/corelib/tools/qshareddata.cpp b/src/corelib/tools/qshareddata.cpp index cee0c1d450..0afda357a6 100644 --- a/src/corelib/tools/qshareddata.cpp +++ b/src/corelib/tools/qshareddata.cpp @@ -306,6 +306,14 @@ QT_BEGIN_NAMESPACE data pointer in \a other. */ +/*! + \fn QSharedDataPointer &QSharedDataPointer::operator=(QSharedDataPointer &&other) + + Move-assigns \a other to this QSharedDataPointer instance. + + \since 5.2 +*/ + /*! \fn bool QSharedDataPointer::operator==(const QSharedDataPointer& other) const Returns true if \a other and \e this have the same \e{d pointer}. This function does \e not call detach(). @@ -320,6 +328,15 @@ QT_BEGIN_NAMESPACE Constructs a QSharedDataPointer initialized with a null \e{d pointer}. */ +/*! + \fn QSharedDataPointer::QSharedDataPointer(QSharedDataPointer &&o) + + Move-constructs a QSharedDataPointer instance, making it point at the same + object that \a o was pointing to. + + \since 5.2 +*/ + /*! \fn QSharedDataPointer::~QSharedDataPointer() Decrements the reference count of the shared data object. If the reference count becomes 0, the shared data object @@ -465,6 +482,14 @@ QT_BEGIN_NAMESPACE Returns true if \a other and \e this have the same \e{d pointer}. */ +/*! + \fn QExplicitlySharedDataPointer &QExplicitlySharedDataPointer::operator=(QExplicitlySharedDataPointer &&other) + + Move-assigns \a other to this QExplicitlySharedDataPointer instance. + + \since 5.2 +*/ + /*! \fn bool QExplicitlySharedDataPointer::operator==(const T* ptr) const Returns true if the \e{d pointer} of \e this is \a ptr. */ @@ -489,6 +514,15 @@ QT_BEGIN_NAMESPACE is deleted. \e This is then destroyed. */ +/*! + \fn QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(QExplicitlySharedDataPointer &&o) + + Move-constructs a QExplicitlySharedDataPointer instance, making it point at the same + object that \a o was pointing to. + + \since 5.2 +*/ + /*! \fn QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(T* sharedData) Constructs a QExplicitlySharedDataPointer with \e{d pointer} set to \a sharedData and increments \a{sharedData}'s reference diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 239cf0446a..1ba9e81b59 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -929,6 +929,15 @@ const QString::Null QString::null = { }; \sa isEmpty() */ +/*! + \fn QString::QString(QString &&other) + + Move-constructs a QString instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + /*! \fn QString::QString(const char *str) Constructs a string initialized with the 8-bit string \a str. The @@ -1349,6 +1358,13 @@ QString &QString::operator=(const QString &other) return *this; } +/*! + \fn QString &QString::operator=(QString &&other) + + Move-assigns \a other to this QString instance. + + \since 5.2 +*/ /*! \fn QString &QString::operator=(QLatin1String str) diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp index cdd0aba102..762ad6fd09 100644 --- a/src/corelib/tools/qtimezone.cpp +++ b/src/corelib/tools/qtimezone.cpp @@ -422,6 +422,15 @@ QTimeZone &QTimeZone::operator=(const QTimeZone &other) return *this; } +/*! + \fn QTimeZone &QTimeZone::operator=(QTimeZone &&other) + + Move-assigns \a other to this QTimeZone instance, transferring the + ownership of the managed pointer to this instance. + + \since 5.2 +*/ + /*! Returns true if this time zone is equal to the \a other time zone. */ diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp index a443a6b4e8..8982e797d9 100644 --- a/src/corelib/tools/qvector.cpp +++ b/src/corelib/tools/qvector.cpp @@ -195,6 +195,15 @@ \sa resize() */ +/*! + \fn QVector::QVector(QVector &&other) + + Move-constructs a QVector instance, making it point at the same + object that \a other was pointing to. + + \since 5.2 +*/ + /*! \fn QVector::QVector(int size) Constructs a vector with an initial size of \a size elements. @@ -246,6 +255,14 @@ vector. */ +/*! + \fn QVector &QVector::operator=(QVector &&other) + + Move-assigns \a other to this QVector instance. + + \since 5.2 +*/ + /*! \fn void QVector::swap(QVector &other) \since 4.8 -- cgit v1.2.3 From 475cbed2446d0e3595e7b8ab71dcbc1ae5f59bcf Mon Sep 17 00:00:00 2001 From: John Layt Date: Fri, 27 Sep 2013 14:15:31 +0200 Subject: QDateTime - Fix round-trip of second occurrence times At the Daylight Tme to Standard Time transition, the local time repeats itself, i.e. 2am occurs twice. Qt's behavior when setting this using the local time is ambiguous, as it depends on the system implementation of mktime, which behaves differently on different platforms. Currently this behavior remains undefined. When setting using an msecs or time_t value however we can determine the correct instance to use and cache it to ensure that any conversion back from local time to msecs is performed consistantly on all platforms. Note that caching this value will result in any calculations being wrong should the system time zone change, or its rules change. This will be fixed in Qt 5.3 when the system time zone change signal is implemented and QDateTime switches to using QTimeZone instead of mktime to provide consistnt behavior across platforms. The QTimeZone spec does not require this fix as it already caches the correct offset in setMSecsFromEpoch(). Change-Id: I799588db474e744a6d81e80f6a0442920569ebd3 Reviewed-by: Thiago Macieira --- src/corelib/tools/qdatetime.cpp | 54 +++++++++++++++++++++++++++++++++-------- src/corelib/tools/qdatetime_p.h | 16 ++++++++---- 2 files changed, 55 insertions(+), 15 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index d64d929d5a..4839560c51 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -2224,7 +2224,7 @@ static QString qt_tzname(QDateTimePrivate::DaylightStatus daylightStatus) #endif // Q_OS_WINCE } -// Calls the platform variant of mktime for the given date and time, +// Calls the platform variant of mktime for the given date, time and daylightStatus, // and updates the date, time, daylightStatus and abbreviation with the returned values // If the date falls outside the 1970 to 2037 range supported by mktime / time_t // then null date/time will be returned, you should adjust the date first if @@ -2288,7 +2288,10 @@ static qint64 qt_mktime(QDate *date, QTime *time, QDateTimePrivate::DaylightStat local.tm_year = yy - 1900; local.tm_wday = 0; local.tm_yday = 0; - local.tm_isdst = -1; + if (daylightStatus) + local.tm_isdst = int(*daylightStatus); + else + local.tm_isdst = -1; #if defined(Q_OS_WIN) int hh = local.tm_hour; #endif // Q_OS_WIN @@ -2481,7 +2484,7 @@ static bool epochMSecsToLocalTime(qint64 msecs, QDate *localDate, QTime *localTi // Convert a LocalTime expressed in local msecs encoding into a UTC epoch msecs // Optionally populate the returned values from mktime for the adjusted local -// date and time and daylight status +// date and time and daylight status. Uses daylightStatus in calculation if populated. static qint64 localMSecsToEpochMSecs(qint64 localMsecs, QDate *localDate = 0, QTime *localTime = 0, QDateTimePrivate::DaylightStatus *daylightStatus = 0, QString *abbreviation = 0, bool *ok = 0) @@ -2614,6 +2617,7 @@ void QDateTimePrivate::setTimeSpec(Qt::TimeSpec spec, int offsetSeconds) { clearValidDateTime(); clearTimeZoneCached(); + clearSetToDaylightStatus(); #ifndef QT_BOOTSTRAPPED m_timeZone = QTimeZone(); @@ -2688,6 +2692,30 @@ void QDateTimePrivate::getDateTime(QDate *date, QTime *time) const *time = QTime(); } +// Set the Daylight Status if LocalTime set via msecs +void QDateTimePrivate::setDaylightStatus(QDateTimePrivate::DaylightStatus status) +{ + if (status == DaylightTime) { + m_status = m_status & ~SetToStandardTime; + m_status = m_status | SetToDaylightTime; + } else if (status == StandardTime) { + m_status = m_status & ~SetToDaylightTime; + m_status = m_status | SetToStandardTime; + } else { + clearSetToDaylightStatus(); + } +} + +// Get the Daylight Status if LocalTime set via msecs +QDateTimePrivate::DaylightStatus QDateTimePrivate::daylightStatus() const +{ + if ((m_status & SetToDaylightTime) == SetToDaylightTime) + return DaylightTime; + if ((m_status & SetToStandardTime) == SetToStandardTime) + return StandardTime; + return UnknownDaylightTime; +} + // Check the UTC / offsetFromUTC validity void QDateTimePrivate::checkValidDateTime() { @@ -2748,12 +2776,14 @@ void QDateTimePrivate::refreshDateTime() QDate testDate; QTime testTime; qint64 epochMSecs = 0; + if (m_spec == Qt::LocalTime) { + DaylightStatus status = daylightStatus(); + epochMSecs = localMSecsToEpochMSecs(m_msecs, &testDate, &testTime, &status); #ifndef QT_BOOTSTRAPPED - if (m_spec == Qt::TimeZone) + } else { epochMSecs = zoneMSecsToEpochMSecs(m_msecs, m_timeZone, &testDate, &testTime); - else #endif // QT_BOOTSTRAPPED - epochMSecs = localMSecsToEpochMSecs(m_msecs, &testDate, &testTime); + } if (testDate == date && testTime == time) { setValidDateTime(); // Cache the offset to use in toMSecsSinceEpoch() @@ -3189,7 +3219,8 @@ QString QDateTime::timeZoneAbbreviation() const #endif // QT_BOOTSTRAPPED case Qt::LocalTime: { QString abbrev; - localMSecsToEpochMSecs(d->m_msecs, 0, 0, 0, &abbrev); + QDateTimePrivate::DaylightStatus status = d->daylightStatus(); + localMSecsToEpochMSecs(d->m_msecs, 0, 0, &status, &abbrev); return abbrev; } } @@ -3218,8 +3249,9 @@ bool QDateTime::isDaylightTime() const return d->m_timeZone.d->isDaylightTime(toMSecsSinceEpoch()); #endif // QT_BOOTSTRAPPED case Qt::LocalTime: { - QDateTimePrivate::DaylightStatus status; - localMSecsToEpochMSecs(d->m_msecs, 0, 0, &status, 0); + QDateTimePrivate::DaylightStatus status = d->daylightStatus(); + if (status == QDateTimePrivate::UnknownDaylightTime) + localMSecsToEpochMSecs(d->m_msecs, 0, 0, &status, 0); return (status == QDateTimePrivate::DaylightTime); } } @@ -3424,8 +3456,10 @@ void QDateTime::setMSecsSinceEpoch(qint64 msecs) case Qt::LocalTime: { QDate dt; QTime tm; - epochMSecsToLocalTime(msecs, &dt, &tm); + QDateTimePrivate::DaylightStatus status; + epochMSecsToLocalTime(msecs, &dt, &tm, &status); d->setDateTime(dt, tm); + d->setDaylightStatus(status); break; } } diff --git a/src/corelib/tools/qdatetime_p.h b/src/corelib/tools/qdatetime_p.h index f52108d764..70771844d6 100644 --- a/src/corelib/tools/qdatetime_p.h +++ b/src/corelib/tools/qdatetime_p.h @@ -77,10 +77,10 @@ public: // Daylight Time Status enum DaylightStatus { - NoDaylightTime, - UnknownDaylightTime, - StandardTime, - DaylightTime + NoDaylightTime = -2, + UnknownDaylightTime = -1, + StandardTime = 0, + DaylightTime = 1 }; // Status of date/time @@ -90,7 +90,9 @@ public: ValidDate = 0x04, ValidTime = 0x08, ValidDateTime = 0x10, - TimeZoneCached = 0x20 + TimeZoneCached = 0x20, + SetToStandardTime = 0x40, + SetToDaylightTime = 0x80 }; Q_DECLARE_FLAGS(StatusFlags, StatusFlag) @@ -129,6 +131,9 @@ public: void setDateTime(const QDate &date, const QTime &time); void getDateTime(QDate *date, QTime *time) const; + void setDaylightStatus(DaylightStatus status); + DaylightStatus daylightStatus() const; + // Returns msecs since epoch, assumes offset value is current inline qint64 toMSecsSinceEpoch() const { return (m_msecs - (m_offsetFromUtc * 1000)); } @@ -146,6 +151,7 @@ public: inline bool isTimeZoneCached() const { return (m_status & TimeZoneCached) == TimeZoneCached; } inline void setTimeZoneCached() { m_status = m_status | TimeZoneCached; } inline void clearTimeZoneCached() { m_status = m_status & ~TimeZoneCached; } + inline void clearSetToDaylightStatus() { m_status = m_status & ~SetToStandardTime & ~SetToDaylightTime; } #ifndef QT_BOOTSTRAPPED static qint64 zoneMSecsToEpochMSecs(qint64 msecs, const QTimeZone &zone, -- cgit v1.2.3 From 00a8f0b6439b5fd6011d8bb415852135d98ecc57 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 30 Sep 2013 09:02:45 +0200 Subject: Fix grammar in QScopedPointer. have => has Change-Id: Ib77110b8ffd2f970e15c2159480e56be9ef964ca Reviewed-by: Jerome Pasion --- src/corelib/tools/qscopedpointer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index fb0025c1ff..e0c369ecad 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE QScopedPointer guarantees that the object pointed to will get deleted when the current scope disappears. - Consider this function which does heap allocations, and have various exit points: + Consider this function which does heap allocations, and has various exit points: \snippet code/src_corelib_tools_qscopedpointer.cpp 0 -- cgit v1.2.3 From 660aed3516f91c047383f9759c286e739da9222e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 30 Sep 2013 11:47:27 +0200 Subject: Remove unused static function msecsToSystemtime() from qtimezoneprivate_win.cpp. Change-Id: I8d6b4c9215fb4499affefd0b892cea1b77aa8ac9 Reviewed-by: John Layt --- src/corelib/tools/qtimezoneprivate_win.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qtimezoneprivate_win.cpp b/src/corelib/tools/qtimezoneprivate_win.cpp index 51300c0cad..c219a49e1e 100644 --- a/src/corelib/tools/qtimezoneprivate_win.cpp +++ b/src/corelib/tools/qtimezoneprivate_win.cpp @@ -106,17 +106,6 @@ static QDate msecsToDate(qint64 msecs) return QDate::fromJulianDay(jd); } -static SYSTEMTIME msecsToSystemtime(qint64 forMSecsSinceEpoch) -{ - FILETIME utcFileTime; - ULONGLONG nsecs = (forMSecsSinceEpoch * 10000 ) + FILETIME_UNIX_EPOCH; - utcFileTime.dwLowDateTime = (DWORD) (nsecs & 0xFFFFFFFF); - utcFileTime.dwHighDateTime = (DWORD) (nsecs >> 32); - SYSTEMTIME utcTime; - FileTimeToSystemTime(&utcFileTime, &utcTime); - return utcTime; -} - static qint64 systemtimeToMsecs(const SYSTEMTIME &systemtime) { FILETIME utcFileTime; -- cgit v1.2.3