summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringlist.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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