diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-24 17:19:40 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-24 21:02:08 +0100 |
commit | 34b14a8472f44f8517577756e033b92ebd4c5912 (patch) | |
tree | 66a0575156d0a17a835430137e218e2b3f04cc65 /src/corelib/tools | |
parent | d34353a065c443aac20376cbd88323480d769183 (diff) | |
parent | edd555425a08f9e074f0a4d9333862636ccaae8d (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
examples/xml/htmlinfo/simpleexample.html
examples/xml/rsslisting/rsslisting.cpp
qmake/generators/win32/msbuild_objectmodel.cpp
src/3rdparty/harfbuzz-ng/src/hb-private.hh
src/corelib/global/qlogging.cpp
src/corelib/io/qstorageinfo_unix.cpp
src/corelib/thread/qwaitcondition_unix.cpp
src/gui/kernel/qguiapplication.cpp
src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
src/testlib/doc/src/qt-webpages.qdoc
tests/auto/other/qaccessibility/tst_qaccessibility.cpp
Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qtimezoneprivate.cpp | 9 | ||||
-rw-r--r-- | src/corelib/tools/qtimezoneprivate_p.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qvector.h | 4 |
4 files changed, 16 insertions, 3 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index d94167466d..eb96757457 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -786,7 +786,7 @@ static inline char qToLower(char c) occurrences of a particular value with another, use one of the two-parameter replace() overloads. - {QByteArray}s can be compared using overloaded operators such as + \l{QByteArray}s can be compared using overloaded operators such as operator<(), operator<=(), operator==(), operator>=(), and so on. The comparison is based exclusively on the numeric values of the characters and is very fast, but is not what a human would @@ -831,7 +831,7 @@ static inline char qToLower(char c) lastIndexOf(), operator<(), operator<=(), operator>(), operator>=(), toLower() and toUpper(). - This issue does not apply to {QString}s since they represent + This issue does not apply to \l{QString}s since they represent characters using Unicode. \sa QString, QBitArray diff --git a/src/corelib/tools/qtimezoneprivate.cpp b/src/corelib/tools/qtimezoneprivate.cpp index 164db5ed0c..8e6a0a0578 100644 --- a/src/corelib/tools/qtimezoneprivate.cpp +++ b/src/corelib/tools/qtimezoneprivate.cpp @@ -625,6 +625,15 @@ QTimeZonePrivate *QUtcTimeZonePrivate::clone() return new QUtcTimeZonePrivate(*this); } +QTimeZonePrivate::Data QUtcTimeZonePrivate::data(qint64 forMSecsSinceEpoch) const +{ + Data d = invalidData(); + d.abbreviation = m_abbreviation; + d.atMSecsSinceEpoch = forMSecsSinceEpoch; + d.offsetFromUtc = m_offsetFromUtc; + return d; +} + void QUtcTimeZonePrivate::init(const QByteArray &zoneId) { m_id = zoneId; diff --git a/src/corelib/tools/qtimezoneprivate_p.h b/src/corelib/tools/qtimezoneprivate_p.h index 803ba1f57a..e15ac801bc 100644 --- a/src/corelib/tools/qtimezoneprivate_p.h +++ b/src/corelib/tools/qtimezoneprivate_p.h @@ -186,6 +186,8 @@ public: QTimeZonePrivate *clone() Q_DECL_OVERRIDE; + Data data(qint64 forMSecsSinceEpoch) const Q_DECL_OVERRIDE; + QLocale::Country country() const Q_DECL_OVERRIDE; QString comment() const Q_DECL_OVERRIDE; diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 5245c4ed10..9d5b749e79 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -154,7 +154,9 @@ public: const const_iterator ce = this->cend(), cit = std::find(this->cbegin(), ce, t); if (cit == ce) return 0; - const iterator e = end(), it = std::remove(c2m(cit), e, t); + // next operation detaches, so ce, cit may become invalidated: + const int firstFoundIdx = std::distance(this->cbegin(), cit); + const iterator e = end(), it = std::remove(begin() + firstFoundIdx, e, t); const int result = std::distance(it, e); erase(it, e); return result; |