diff options
author | Liang Qi <liang.qi@qt.io> | 2017-01-31 08:49:01 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-02-01 08:35:42 +0000 |
commit | 3cd1c3cb70dd57df939ad067f5668e8304d32237 (patch) | |
tree | 759f9c14dc4fbfb50bd84a8d8e6815e274e0ed87 /src/corelib/tools/qstring.cpp | |
parent | 681c15891e723925a876f5d3e8d711b503384285 (diff) |
Fix libs build with msvc on Chinese locale on Windows
Chinese locale means Code Page 936 here. It's also related with
removing C4819 warnings.
And it's also following Conventions in Qt source code: All code
is ascii only (7-bit characters only, run man ascii if unsure)
See also http://wiki.qt.io/Coding_Conventions
Task-number: QTBUG-56155
Task-number: QTBUG-58161
Change-Id: I37fa7a0e6a82a16eaf80e1cc99be801099ab87de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index aae4aab4c9..247119d178 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -1840,7 +1840,7 @@ QString &QString::operator=(const QString &other) Q_DECL_NOTHROW */ QString &QString::operator=(QLatin1String other) { - if (isDetached() && other.size() <= capacity()) { // assumes d->alloc == 0 → !isDetached() (sharedNull) + if (isDetached() && other.size() <= capacity()) { // assumes d->alloc == 0 -> !isDetached() (sharedNull) d->size = other.size(); d->data()[other.size()] = 0; qt_from_latin1(d->data(), other.latin1(), other.size()); @@ -1899,7 +1899,7 @@ QString &QString::operator=(QLatin1String other) */ QString &QString::operator=(QChar ch) { - if (isDetached() && capacity() >= 1) { // assumes d->alloc == 0 → !isDetached() (sharedNull) + if (isDetached() && capacity() >= 1) { // assumes d->alloc == 0 -> !isDetached() (sharedNull) // re-use existing capacity: ushort *dat = d->data(); dat[0] = ch.unicode(); @@ -8357,7 +8357,7 @@ QString &QString::setRawData(const QChar *unicode, int size) Returns the character at position \a pos in this object. \note This function performs no error checking. - The behavior is undefined when \a pos < 0 or \a pos ≥ size(). + The behavior is undefined when \a pos < 0 or \a pos >= size(). \sa operator[]() */ @@ -8368,7 +8368,7 @@ QString &QString::setRawData(const QChar *unicode, int size) Returns the character at position \a pos in this object. \note This function performs no error checking. - The behavior is undefined when \a pos < 0 or \a pos ≥ size(). + The behavior is undefined when \a pos < 0 or \a pos >= size(). \sa at() */ |