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>
This commit is contained in:
Liang Qi 2017-01-31 08:49:01 +01:00
parent 681c15891e
commit 3cd1c3cb70
4 changed files with 7 additions and 7 deletions

View File

@ -277,7 +277,7 @@ static HB_Bool HB_ThaiConvertStringToGlyphIndices (HB_ShaperItem *item)
}
}
/* Special case to handle U+0E33 (SARA AM, ำ): SARA AM is normally written at the end of a
/* Special case to handle U+0E33 (SARA AM): SARA AM is normally written at the end of a
* word with a base character and an optional top character before it. For example, U+0E0B
* (base), U+0E49 (top), U+0E33 (SARA AM). The sequence should be converted to 4 glyphs:
* base, hilo (the little circle in the top left part of SARA AM, NIKHAHIT), top, then the

View File

@ -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()
*/

View File

@ -714,7 +714,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
}
// Never break between a combining mark (gc= Mc, Mn or Me) and its base character.
// Thus, a combining mark — whatever its script property value is — should inherit
// Thus, a combining mark - whatever its script property value is - should inherit
// the script property value of its base character.
static const int test = (FLAG(QChar::Mark_NonSpacing) | FLAG(QChar::Mark_SpacingCombining) | FLAG(QChar::Mark_Enclosing));
if (Q_UNLIKELY(FLAG(prop->category) & test))

View File

@ -488,7 +488,7 @@ void QTuioHandler::process2DObjSet(const QOscMessage &message)
return;
}
qCDebug(lcTuioSet) << "Processing SET for token " << classId << id << " @ " << x << y << "" << angle <<
qCDebug(lcTuioSet) << "Processing SET for token " << classId << id << " @ " << x << y << " angle: " << angle <<
"vel" << vx << vy << angularVelocity << "acc" << acceleration << angularAcceleration;
QTuioToken &tok = *it;
tok.setClassId(classId);