diff options
author | Liang Qi <liang.qi@qt.io> | 2018-05-14 14:51:46 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-05-14 14:51:46 +0200 |
commit | 7e1b504f31dcdad0b055c1532209e44f81033bc9 (patch) | |
tree | b7ab4b258a50af69179fa6efb4871c7218e475e1 /src/corelib/tools/qbytearray.cpp | |
parent | 432df3f8c8504b333ecc76df4ce19a7b2c04ae77 (diff) | |
parent | 627de835b1b87280741eb96ae77ea42b1f6ef5dc (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
mkspecs/features/qt_module_headers.prf
tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
tests/auto/widgets/kernel/qwidget/BLACKLIST
Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
Diffstat (limited to 'src/corelib/tools/qbytearray.cpp')
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index d9cd20ffbf..3468580bf1 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -782,19 +782,6 @@ QByteArray qUncompress(const uchar* data, int nbytes) } #endif -static inline bool qIsUpper(char c) -{ - return c >= 'A' && c <= 'Z'; -} - -static inline char qToLower(char c) -{ - if (c >= 'A' && c <= 'Z') - return c - 'A' + 'a'; - else - return c; -} - /*! \class QByteArray \inmodule QtCore @@ -4208,9 +4195,10 @@ QByteArray &QByteArray::setNum(double n, char f, int prec) QLocaleData::DoubleForm form = QLocaleData::DFDecimal; uint flags = QLocaleData::ZeroPadExponent; - if (qIsUpper(f)) + char lower = latin1_lowercased[uchar(f)]; + if (f != lower) flags |= QLocaleData::CapitalEorX; - f = qToLower(f); + f = lower; switch (f) { case 'f': |