summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringbuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-031-1/+1
| | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Consistently mark QT_XYZ_CAST_FROM_ASCII with \cKai Koehne2018-12-221-1/+1
| | | | | | | | | | | Otherwise it gets linkified, which looks inconsistent. Instead, use \sa for functions where QT_NO_CAST_FROM_ASCII or QT_RESTRICTED_CAST_FROM_ASCII is referenced. Change-Id: Ic3933d8c4c81c963215de7f3aac4d0a11e61cbc2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Modernize the "textcodec" featureLiang Qi2018-11-071-1/+0
| | | | | | | | | Also clean up QTextCodec usage in qmake build and some includes of qtextcodec.h. Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QStringBuilder: add support for QStringViewMarc Mutz2018-01-081-1/+1
| | | | | | | | | [ChangeLog][QtCore][QStringBuilder] Added support for QStringView. Change-Id: I5b6803397b107ef69d198a935b3ba4339ac95087 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QStringBuilder: add support for char16_t{,*,[]}Marc Mutz2018-01-081-1/+2
| | | | | | | | | | [ChangeLog][QtCore][QStringBuilder] Added support for char16_t characters and strings. Change-Id: Iee727f07226f2a326ae0df28d44930336cd8f71e Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* doc: Correct remaining qdoc warnings in a few filesMartin Smith2018-01-051-4/+4
| | | | | | | | Added missing template clause to \fn commands required by clang-qdoc in qsharedpointer.cpp, qscopedpointer.cpp, and qstringbuilder.cpp. Change-Id: Ifca5b81db96e678a53e40080d351c69f14db604a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: correct incorrect syntax \li commandNico Vertriest2017-04-211-0/+4
| | | | | | | qstringbuilder.cpp:75: warning: Command '\li' outside of '\list' and '\table' Change-Id: I2353462cfd14a4f7cf60d5064ecb069155d1cd34 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Improve QStringBuilder docsMarc Mutz2017-04-121-8/+20
| | | | | | | | | | - Mention you can build QByteArrays, too - Nicer list of types that can be used, separate for QByteArray and QString Change-Id: Ia91445f0cb4872bab12a55f4812c283e9c38dba4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Drop hand-rolled ASCII conversion from QAbstractConcatenable::convertFromAscii()Marc Mutz2016-03-041-15/+1
| | | | | | | | | | QUtf8::convertToUnicode() contains a SIMD-enabled ASCII fast-path already which is likely faster than what the compiler will emit for the old code here. Change-Id: I6afae9689424eb53a9f7c01359cc4f57ffcead26 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QStringBuilder: don't allocate memory in convertFromAscii()Marc Mutz2016-03-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+1
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Make the "\internal" qdoc command stand on its own lineLaszlo Papp2012-08-151-1/+2
| | | | | | | | | | The qdoc manual currently claims that the command must stand on its own line. The change follows the consistency with the rest and how the example looks like inside the qdoc manual for this command. Change-Id: I6b653dc95cf9d84e4adf32220dace5d313678419 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add a QStringBuilder::toUtf8() functionThiago Macieira2012-05-111-0/+4
| | | | | | | Just to match the ones that are already there. Change-Id: I25acc2391feded4cac79ebf65a6bc72176f5f931 Reviewed-by: hjk <qthjk@ovi.com>
* Change QStringBuilder to use UTF-8 tooThiago Macieira2012-05-071-2/+14
| | | | | | | | | | | | | This commit completes the previous commit so that both QString and QStringBuilder now operate on UTF-8 input. A small fix was required in QStringBuilder: an if clause isn't enough to separate the two append versions. Since there are no QString functions that append to char*, if we're converting to a QByteArray, we need to go through a QString first in a separate function. Change-Id: Ic503340c5d0c32d420c90c91cc2e0fc1ae9230f3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-1/+1
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Remove unneeded code to convert to ASCII/Latin1.Robin Burchell2012-02-221-13/+0
| | | | | | | | This isn't used, and isn't wanted with the upcoming utf8 switch. Change-Id: Ibec0fa7f36549df6a1c240353ffcd44beb2976f0 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove custom text codec for C strings.Robin Burchell2012-02-221-16/+0
| | | | | | | | | | This setting is extremely harmful, as code cannot know whether or not to expect it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive, and caused a lot of people to make mistakes with it. Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove stale documentation and fix qdoc errors.Casper van Donderen2011-10-111-6/+0
| | | | | | | Change-Id: I51bb0c52eb32d9d672d115f31b16d414f81708e2 Reviewed-on: http://codereview.qt-project.org/6433 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QAbstractConcatenable::convertFromAscii: make len the actual lengthOlivier Goffart2011-07-221-3/+2
| | | | | | | | | | | | | | | Before, it was the length + 1, to include the ending \0 (for historical reasons) Having it the actual length is more intuitive and less error prone Also added QT_ASCII_CAST_WARN to QConcatenable<QByteArray>::appendTo to show the warnig that convertion from ascii to qstring occurs. Change-Id: Ie7c8552b6b4e7ccb393cb09f5f0ca9b00336c714 Reviewed-by: thiago Reviewed-on: http://codereview.qt.nokia.com/1988 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Unify QLatin1String and QLatin1LiteralLars Knoll2011-07-071-45/+4
| | | | | | | | | | | | | Unify the two classes and get rid of one TODO item for Qt 5. Using strlen in the constructor of QLatin1String works, as the compiler can do the calculation at compile time. Change-Id: I59d98c71a34b86d4211fa0d8cfd40b7d612c5a78 Reviewed-on: http://codereview.qt.nokia.com/1219 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* QStringBuilder: do not crash with null char*Olivier Goffart2011-06-271-0/+2
| | | | | | | | | This is supported by the others operator+ Change-Id: I9a1d1a0afb63acf32935948111d43ca6da370363 Reviewed-on: http://codereview.qt.nokia.com/764 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Doc: Fixed qdoc warnings.David Boddie2011-05-231-1/+2
|
* Doc: Applied pending fixes to API documentation.David Boddie2011-05-231-1/+1
|
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+193
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12