summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-111-13/+72
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
| * QStringRef: add missing {c,}r{begin,end}()Marc Mutz2016-04-071-13/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most containers have them in Qt 5.7, so add them to QStringRef, too. Brush up the docs, use the const_iterator typedef in the API, for consistency with QString's docs. [ChangeLog][QtCore][QStringRef] Added reverse iterators, rbegin(), rend(), crbegin(), crend(). Change-Id: I3d2884a1b2faae02c610ab3871552b65bc6e2521 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtCore: Remove Windows CE.Friedemann Kleint2016-03-301-8/+5
| | | | | | | | | | | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-03-221-7/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/common/wince/qplatformdefs.h src/plugins/platforms/directfb/qdirectfbbackingstore.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-6/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| | * QString::vasprintf(): Use quintptr when casting pointer for %p.Friedemann Kleint2016-03-091-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the macro Q_OS_WIN64 was checked, causing warnings: tools\qstring.cpp(6183): warning C4311: 'reinterpret_cast': pointer truncation from 'void *' to 'unsigned long' tools\qstring.cpp(6183): warning C4302: 'reinterpret_cast': truncation from 'void *' to 'unsigned long' when compiling WinRT/64bit, where it is not defined. Change-Id: Ib9d8405108c85170aba18b13f9c64083136bc5ee Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QString, QJson, QHash: Fix UBs involving unaligned loadsMarc Mutz2016-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: src/corelib/tools/qstring.cpp:587:42: runtime error: load of misaligned address 0x2acbf4b7551b for type 'const long long int', which requires 8 byte alignment src/corelib/json/qjson_p.h:405:30: runtime error: store to misaligned address 0x0000019b1e52 for type 'quint64', which requires 8 byte alignment src/corelib/tools/qhash.cpp:116:27: runtime error: load of misaligned address 0x2b8f9ce80e85 for type 'const qlonglong', which requires 8 byte alignment src/corelib/tools/qhash.cpp:133:26: runtime error: load of misaligned address 0x2b8f9ce80e8d for type 'const ushort', which requires 2 byte alignment Fix by memcpy()ing into a local variable. Wrap this trick in template functions in qsimd_p.h. These are marked as always- inline and use __builtin_memcpy() where available in an attempt to avoid the memcpy() function call overhead in debug builds. While this looks prohibitively expensive, from the pov of the C++ abstract machine, it is 100% equivalent, except for the absence of undefined behavior. In one case, the cast produces a local temporary which is then copied into the function, and in the other case, that local variable comes from return value of qUnalignedLoad(). Consequently, GCC compiles these two versions into identical assembler code (only verfied for ucstrncmp, but there's no reason to believe that it wouldn't hold for the other cases, too). Task-number: QTBUG-51651 Change-Id: Ia50d4a1d7580b6f803e0895c9f3d89c7da37840c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * | QStringBuilder: don't allocate memory in convertFromAscii()Marc Mutz2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use new QUtf8::convertToUnicode(QChar*, const char*, int) overload instead of QString::fromUtf8(). The QUtf8 overload allocates no memory, and is therefore marked as nothrow. Using this function in convertFromAscii() allows to mark this function nothrow, too. All functions of QAbstractConcatenable can now be marked as nothrow. Since QUtf8::convertToUnicode() does not deal with lengths of -1, insert a strlen() call when the len == -1 ASCII fast path fails due to non-ASCII chars. Saves 1.1KiB in text size on optimized GCC 5.3 Linux AMD64 builds of QtCore (other libraries are compiled without exceptions, so this change should not have an effect on those). Change-Id: I7333e35844033831eae2a04203d13d9792c5d460 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QLatin1String: add at()/op[]/mid()/right()/left()Marc Mutz2016-02-191-0/+72
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLatin1String can be used as a string-view-like type. When attempting to do so in uic, mid() and at() were found to be missing. Added the others for completeness. Use the new functions in uic, for which they were originally conceived. [ChangeLog][QtCore][QLatin1String] Added at(), operator[](), mid(), right(), left(). Change-Id: I4cfe3e9ed1157dedee754b2012d9678fe72b161e Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-24/+30
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * QString: optimize case conversion codeKonstantin Ritt2016-01-211-24/+30
| | | | | | | | | | | | | | | | | | | | Handle special case mapping of length 1 explicitly; Skip calculating of high surrogate for the same plane; Optimize branch prediction with Q_LIKELY/Q_UNLIKELY; Replace peekNext() + advance() with just next() in the caller function. Change-Id: I0d37969749bd8ca855321242e6a0e72c405c5f8d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QStringRef: add missing op[]Marc Mutz2016-01-261-1/+13
| | | | | | | | | | | | | | [ChangeLog][QtCore][QStringRef] Added subscript operator. Change-Id: Ia85d5efcb7747d2961ba55922ddabe6a46bdf20b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Update the Intel copyright yearThiago Macieira2016-01-211-1/+1
| | | | | | | | | | | | | | | | | | Not that we require it, but since The Qt Company did it for all files they have copyright, even if they haven't touched the file in years (especially not in 2016), I'm doing the same. Change-Id: I7a9e11d7b64a4cc78e24ffff142b4c9d53039846 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-14/+5
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * QString: prevent resize() from shedding capacityMarc Mutz2016-01-061-14/+5
| | | | | | | | | | | | | | | | | | | | ...even if reserve() hasn't been called before. [ChangeLog][QtCore][QString] resize() will no longer shrink the capacity. That means resize(0) now reliably preserves capacity(). Change-Id: If499a20990bbf3a20553da14e50a42918d310c9f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtCore: eradicate all Q_FOREACH loops [tools]Marc Mutz2016-01-041-2/+2
| | | | | | | | | | | | | | | | Saves just under 5.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I6d868a7d2e469cf0564127b0e66cd7b272a0c9cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QString: add resize(int, QChar)Marc Mutz2015-12-281-3/+20
| | | | | | | | | | | | | | | | | | | | This will be used in QTextStream to speed up padding processing. [ChangeLog][QtCore][QString] Added resize(int, QChar) overload. Change-Id: Id51f8cdacb167310157100b05cacf20e9a5d2716 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-2/+22
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * Doc: Circumvented qdoc parsing by removing '!'Nico Vertriest2015-12-091-1/+1
| | | | | | | | | | | | | | | | | | Qdoc gave warning "Cannot link this to anything" Task-number: QTBUG-43810 Change-Id: Id903040ed7b2860a2ec64a52f7fbe8269c6927b0 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * QString: where possible, re-use existing capacity in op(QChar/QL1S)Marc Mutz2015-12-081-1/+21
| | | | | | | | | | | | | | | | | | If the LHS is detached and has existing capacity that is large enough to hold the RHS, re-use the memory instead of allocating a new buffer and throwing away the old. Change-Id: I53d42825da92c264c7301e8e771cba9fb35c321b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QString: mark relational operators (and compare()) nothrowMarc Mutz2015-12-131-13/+13
| | | | | | | | | | | | | | Saves ~3K in QtCore text size on GCC 4.9 Linux AMD64 relase builds. Change-Id: I74171ba5499de200b9584660241ca1fae4bcad79 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QString::vasprintf: Extract Method parse_length_modifierMarc Mutz2015-12-081-47/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and simplify it: De-duplicate ++c by moving it from every case into the switch statement, undoing it only in the default case. Introduce a small helper function can_consume() for dealing with the two-letter length modifiers. Also return the result from each case instead of storing it in a temp variable. Change-Id: I28a527920aabba067ebb2152a67995c8f2ec7ae7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Add flags to omit/reject padding in scientific notation exponentsUlf Hermann2015-11-231-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The EcmaScript format for printing doubles in exponent form differs from Qt's format only in this aspect. EcmaScript explicitly prohibits leading zeroes in exponents. It is thus worthwhile to add those flags in order to be able to generate and parse doubles in compliance with EcmaScript. [ChangeLog][QtCore][QLocale] Additional flags in QLocale::NumberOption allow generating and parsing doubles in EcmaScript compliant format. Change-Id: Ia7b82c2e67bb8b80bd890014ff5cd4563faf2a03 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QString::vasprintf: remove egcs-2.91.66 workaroundMarc Mutz2015-11-201-2/+1
| | | | | | | | | | | | | | We don't support that compiler anymore. Change-Id: I6d100a2d149ce4e506c7f8be3b56a33fa9d7092f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QString::vasprintf: avoid allocating memory for format text copied verbatimMarc Mutz2015-11-191-1/+9
| | | | | | | | | | | | | | | | | | | | | | ... by using the new QUtf8::convertToUnicode() function in conjunction with QString::resize(). For this to be a clear optimization, resize() must be banned from shrinking capacity, which another patch will implement. Change-Id: I6394af95ef1aaae131e23a4227734eb76fa685cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QString::vasprintf: avoid allocating memory just to parse a numberMarc Mutz2015-11-191-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port parse_field_width from constructing a QString and then calling toInt() on it to use qstrtoull(). Not only do we not allocate memory anymore, we even don't need to copy the digits out of the format string - qstrtoull() does it all for us. In order to preserve behavior with the previous code, which consumed all digits before performing error checking on them, we also consume all digits, even if qstrtoull() would have returned the start of the range as the end pointer. Change-Id: Ief941ce3a8ea43d2e5475d9eab77d7d0d7abc450 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QString::vasprintf: Extract Method parse_field_widthMarc Mutz2015-11-191-18/+15
| | | | | | | | | | | | | | | | | | | | ... and reuse the function to parse precision, too. This also allows to more easily simplify it (done in a follow-up commit). Change-Id: I9da27c4b06565f676e15ef9cab7c53b5d464515e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QString::vasprintf: Extract Method parse_flag_charactersMarc Mutz2015-11-191-17/+18
|/ | | | | | | | | | | | | ... and simplify the method afterwards: Drop the boolean that was used to control program flow when the code was still part of vasprintf(), by taking advantage of the fact that we can now just return from the function to break out of both the switch and the loop. Change-Id: I97f050b63c0c309aaed3cb0fe979d53c8d970003 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QString: Fix in-place toUpper/Lower when there's size expansionThiago Macieira2015-11-181-4/+37
| | | | | | | | | | When that happens, we need to detach (in-place conversion won't work), so we recurse back into the same function, but the template version that does detaching. Task-number: QTBUG-49181 Change-Id: Idba8c29717f34c70a58fffff1412fea3acc95f98 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Move CasexTraits from qstring.cpp to qunicodetables_p.hKonstantin Ritt2015-11-161-24/+0
| | | | | | | | and implement TitlecaseTraits as well, to be re-used in the following commit. Change-Id: I5c0bff42fe3b9bc9c2454cc16916cc2be87f604f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Mark qt_from_latin1() as nothrowMarc Mutz2015-11-051-1/+1
| | | | | | | | | | | | | | It's used from a different TU, too, so we can't rely on the compiler to inspect it to draw this conclusion itself. This function has technically not a wide contract, because the output buffer needs to be large enough to hold the result. However, this precondition cannot be checked from within the function, therefore no assertion can ever be added and the nothrow marker becomes acceptable (even desireable). Change-Id: I2dc6c4f3d9d8147c6483865c5c4bbc8e9af291b7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Doc: Fix snippet tags for QString::[last]indexOf() overloadsTopi Reinio2015-11-021-2/+2
| | | | | | | | | Duplicate identifiers were introduced for QString code snippets, resulting in the wrong snippets to be quoted. Change-Id: I75e9c99cbc73bf39262079f7f53342a6ac90c2a7 Task-number: QTBUG-49111 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* [docs] QLatin1String: add some guidance as to when to use itMarc Mutz2015-10-201-0/+7
| | | | | | | Change-Id: I391be8bda3a5cb4873b89b437d2b76b1cd88261f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QLatin1String: add default ctorMarc Mutz2015-10-201-0/+6
| | | | | | | | | | A pending change in uic depends on this. [ChangeLog][QtCore][QLatin1String] Added default constructor. Change-Id: Ie6f5dfc7b38683a488b0ff7f31404800ef5ee188 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLatin1String: add testMarc Mutz2015-10-191-5/+1
| | | | | | | | QLatin1String wasn't really tested except as a drive-by. Unearthed a discrepancy with docs. Fixed the docs. Change-Id: I1246bb33888132edbc4e22da792a480a156357bf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtCore: Don't compare QChars to literal 0sMarc Mutz2015-10-111-1/+1
| | | | | | | | | | This is prone to ambiguities, even though we currently don't run into them. Use QChar::isNull() instead. Change-Id: I71843878b3f4f8a5deae2ef57a6f6628461be216 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix warning due to undocumented function argumentLouai Al-Khanji2015-08-251-2/+7
| | | | | | Change-Id: Ia3a54f296b1edcdce5950bf7acad1b4436d9564a Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warning due to undocumented function argumentLouai Al-Khanji2015-08-251-0/+2
| | | | | Change-Id: I00654b72a654c7b2a762ace773a9caef37b1bdd5 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Remove invalid uses of \relates commandTopi Reinio2015-08-191-2/+2
| | | | | | | A function cannot be both a member and a non-member of the same class. Change-Id: I07d1e04c09fea2ba1171b3692e716660044cd37a Reviewed-by: Martin Smith <martin.smith@digia.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-15/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * QtCore: Fix const correctness in old style castsThiago Macieira2015-07-201-15/+15
| | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c8d4b2920a11fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: Increase accuracy of QString documentation discussing size()Topi Reinio2015-07-291-13/+14
| | | | | | | | | | | | | | | | | | | | There are multiple QString and QStringRef functions that document behavior "if n is greater than size(), ...", but a comprehensive, correct statement is "if n is greater than or equal to size(), ...". Change-Id: I5d2112e08013edaf6f2f6d7e8a6740ea26a076e2 Task-number: QTBUG-47479 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-07-171-2/+2
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
| * Fix compilation with GCC 4.9.2 and up in debug modeThiago Macieira2015-07-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | Somehow the const int is no longer understood to be an immediate. GCC 4.8 still compiles this fine. qstring.cpp:316:34: error: the fifth argument must be an 8-bit immediate Change-Id: Ib056b47dde3341ef9a52ffff13ef24d541833abc Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtCore: mark some more types as movable/primitiveMarc Mutz2015-07-071-0/+1
| | | | | | | | | | | | | | | | These are already held in QVectors. Change-Id: I6fe831ba5b75d792fd13e63ef0d2e178b52e1107 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QString: add {const_,reverse_iterator}, {c,}r{begin,end}()Marc Mutz2015-07-071-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | Had to mark {,c,const}{begin,end}() inline, since they are, and mingw complains about inconsistent dllimport attributes. [ChangeLog][QtCore][QString] Added rbegin(), crbegin(), rend(), crend(), and reverse_iterator and const_reverse_iterator typedefs. Task-number: QTBUG-25919 Change-Id: I1d48729c76e510c1e49c0e5dc41691aa662fdf21 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-011-0/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * Improve QString doc when using non-spaced numbered place markerSamuel Gaist2015-06-191-0/+19
| | | | | | | | | | | | | | | | | | | | | | Currently when a developer uses a string like QString("%1%3%2").arg(x).arg(y).arg(z) he can be bitten by the sequential replacement done by QString. Adding an example with a little explanation should help future Qt user avoid generating buggy strings. Task-number: QTBUG-44044 Change-Id: I81e20af8d9fb2a07e12ec61dcd5bb4544d863777 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | doc: Fix qdoc errors in qstring.cppMartin Smith2015-06-221-3/+3
| | | | | | | | | | | | | | | | Fixed a few qdoc errors. Change-Id: I9ede1c1d3b22e9613978e31722c8140ae966194e Task-number: QTBUG-46796 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>