summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringlist.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: fix indexOf QRegularExpression overload documentationSamuel Gaist2017-10-111-1/+1
| | | | | | | | That overload documentation was missing the "exact" qualifier regarding the search result. Change-Id: I27a08b60f9b88ae497f8bd9d9ba6a99f4a9ab4d6 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* QStringList: add contains(QLatin1String) overloadAnton Kudryavtsev2017-03-201-6/+28
| | | | | | | | | ... to avoid the expensive conversion from QString to QL1S. [ChangeLog][QtCore][QStringList] Added contains(QLatin1String) overload. Change-Id: Ie75839ce9e46e03fe5155a02c7dcf00277b95c8d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Normalize \since usageTopi Reinio2017-01-311-1/+1
| | | | | | | | | | | Although it's permitted to specify the project name together with a version number for \since, it's unnecessary for Qt classes and functions. This change also normalizes the version formatting: '<major>.<minor>' Change-Id: Ie5a43662077d13c31e241bcde8a7a2849d27d330 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: update QStringList doc with missing QRegularExpression referenceSamuel Gaist2017-01-231-2/+2
| | | | | | | | | The documentation of QStringList is missing some mention of QRegularExpression as well as still using QRegExp in some sample code. This patch fixes that. Change-Id: I4a7c9fe8e5ae7c73497192bb71d1fa66ee864bd2 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Add QStringList::join(QLatin1String) overloadMarc Mutz2016-09-181-7/+33
| | | | | | | | | | | | | | | | Costs only ~300B in text size in QtCore, which is roughly compensated by savings in other QtBase libraries, even without specifically porting users to QL1S. Of course, the raison d'être for this overload is avoiding the expensive QLatin1String -> QString conversion which, for small lists, can take up to 50% of the total runtime (assuming memory allocations dominate over scanning and copying the list). [ChangeLog][QtCore][QStringList] Added join(QLatin1String) overload. Change-Id: I91d7e1d4e2c76d6dc79f2b750cf8e256dd4e0ab6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Remove the operator<< | >> (QDataStream, QStringList)Thiago Macieira2014-12-201-22/+0
| | | | | | | | | | | | | They aren't needed. The template version for QList in qdatastream.h is sufficient. This is binary compatible, since the functions were never exported. It's also source compatible, provided no one tried to do: QDataStream & (*fptr)(QDataStream &, QStringList &) = &operator>>; Change-Id: I8a4449b416154b34c007ef6abacf2b112451028f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove Q_NO_USING_KEYWORDThiago Macieira2014-12-201-23/+0
| | | | | | | | | | | | | | | | | | | There's a lot of code now requiring it. Any compiler that doesn't support the keyword is too old for Qt now. The last time anyone asked about this macro was for QTBUG-27393 and we don't know which compiler that was. As a necessity, this patch contains a reversal of a0c3a57aed5cde37017733e7cf5e41cc6a1174aa [ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses the "using" keyword. Compilers that do not support this keyword are deprecated and will not be able to build Qt. Previous versions of Qt may or may not compile, as no testing was done to ensure it worked. Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Doc: Use title case in section1 titlesNico Vertriest2014-09-301-3/+3
| | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.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>
* Speed up QStringList::removeDuplicates by ~2xDaniel Teske2014-09-151-2/+4
| | | | | | | | | QSet::contains needs to hash the string, which is unnecessary, since we can just check if the size of the set changed. Change-Id: I2c7a42bae6cdf351533d5a582a42079658fa7729 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QStringList: add move ctor from QList<QString>Marc Mutz2014-04-111-0/+10
| | | | | | Change-Id: I93fe4656c1a608ccc828bd9db528d4597a22f070 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStringList: add op= overloads for QList<QString>Marc Mutz2014-04-111-0/+21
| | | | | | | | | | | QStringList = QList<QString> already compiled, but was interpreted as QStringList = QStringList(QList<QString>), which involves the QList copy ctor. Adding the overload saves that copy. Cannot use a using declaration here, since the return type is different. Change-Id: I9f4feb2f97480d2d6a3b6fa7c71b5d511b623601 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStringList: use QList:.swap(int,int) in removeDuplicates instead of assignmentMarc Mutz2014-03-311-1/+1
| | | | | | | | | This is faster because it just swaps the pointers stored instead of touching the refcounts. It's the same as qMove()ing the right-hand-side, but benefits C++98, too. Change-Id: I6b7e3d0e5c7eb81f88fe9069d6662335d24aa86c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QStringList: use a functor instead of a function pointer for std::sortMarc Mutz2014-03-311-4/+9
| | | | | | | | | | A function pointer requires aggressive optimization to inline. A function object otoh is inlined by compilers two decades old. Even shaves off 544B in text size off of a -O3 GCC 4.7 QtCore build. Change-Id: Ibfd41654257360fa0f118701f502e6c23a6c28b3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QStringList::join: micro-optimizationMarc Mutz2014-03-311-1/+1
| | | | | | | | | | | | Don't call that->size() if we have already saved its value in a local temp. Surprisingly, this saves 56B in text size even on a -O3 GCC build, proving that the compiler does _not_ have enough context to const-fold the repeated size() evaluation. Change-Id: I2c41ddc4376f4e1534fc2f0d4789e42b984d3ba6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QStringList: add op<< overload for QList<QString>Marc Mutz2014-03-311-0/+10
| | | | | | | | | | | | QStringList << QList<QString> already compiled, but was interpreted as QStringList << QStringList(QList<QString>), which involves the QList copy ctor. Adding the overload saves that copy. Cannot use a using declaration here, since the return type is different. Change-Id: I119cc98e7e2df24549a1abb158543b729edc30ef Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QStringList: remove copy ctorMarc Mutz2014-03-311-14/+0
| | | | | | | | | | | The compiler-generated one is just fine, and enables the move constructor inherited from QList, too. This is BC and SC since QStringList isn't exported. Change-Id: Ic49000d9feb66504d7ec7e5d519e7a13ca9e5d9e Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-1/+1
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-2/+2
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Remove qSort usages from QStringListGiuseppe D'Angelo2013-09-091-6/+6
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I38d220142d4f5e580503cc10f804e0d16f418cc1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-201-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * | Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSIONGiuseppe D'Angelo2013-01-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp and QRegularExpression are totally independent, therefore using two different defines is the right thing to do. Also, document the new define in qfeatures.{txt,h}. Change-Id: Ice4826ea543f4b22f1cc27bf31ed6e043d0c43b0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Update the documentation for C++11 initializer lists supportLaszlo Papp2013-03-071-1/+2
| |/ |/| | | | | | | | | | | | | The documentation was written for 4.8 when the C++11 standard did not have the name yet. Change-Id: I08640a5ae62385b09e181eefafd4cc831e4de456 Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* QStringList: adapt documentation to cover new join(QChar) overloadMarc Mutz2012-09-221-0/+2
| | | | | Change-Id: Ia73501e1e8a562cfab750d1796fb597cd89eab74 Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* QStringList::join: add an overload taking a single QCharMarc Mutz2012-09-031-3/+9
| | | | | | | | | | | | | | This overload avoids the needless heap allocation that the traditional overload incurs due to the implicit QChar -> QString conversion involved there. In order to share the implementation between the two overloads, QStringList_join now takes the separator as a (Char*,int) tuple instead of as a QString. Change-Id: I92961f13a3f19099de2a6e2df9f4789a12fc83a0 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Doc: Move some remaining files over for modularization.Casper van Donderen2012-05-091-4/+4
| | | | | | | | | The files in this change were still in qtbase/doc/src or required for it. qtbase/doc/src should now only contain example documentation and images for the example documentation. Change-Id: Ia7ca8e7fd2b316e77c706a08df71303bc8294213 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-19/+19
| | | | | | | | | | | | 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>
* make QStringList::sort() to take a Qt::CaseSensitivity paramKonstantin Ritt2012-04-121-4/+15
| | | | | | | | Task-number: QTBUG-12892 Change-Id: I402e6fb12ff24ac26c5a8103bf81547946f9cc58 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QRegularExpression: support for QStringList overloadsGiuseppe D'Angelo2012-03-211-0/+117
| | | | | | Change-Id: Ia9017348742e41187684185d04b56d27edd383b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-1/+1
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.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>
* Remove QBool and use bool instead.David Faure2012-01-201-5/+5
| | | | | | | | | | | | QBool was introduced with Qt-4.0, to detect Qt3-like code like if (c.contains(d) == 2) and break compilation on such constructs. This isn't necessary anymore, given that such code couldn't possibly compile in Qt4 times. And QBool was confusing developers, and creating compile errors (e.g. QVariant doesn't have support for it), so better remove it for Qt 5. Change-Id: I6642f43f5e12b872f98abb56600186179f072b09 Reviewed-by: Lars Knoll <lars.knoll@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>
* Doc: Removed documentation for deleted code.David Boddie2011-07-211-48/+0
| | | | | | | Change-Id: Icdbc05decac3dfe3fc18ce073c494e1fce4ea347 Reviewed-on: http://codereview.qt.nokia.com/1824 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* remove QT3_SUPPORT from corelib/toolsLars Knoll2011-06-291-36/+0
| | | | | | | Change-Id: Ie224cf992be675c7d405d4be05e4acd4157e590e Reviewed-on: http://codereview.qt.nokia.com/863 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.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/+1
|
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+692
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