summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qregexp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move text-related code out of corelib/tools/ to corelib/text/Edward Welbourne2019-07-101-4609/+0
| | | | | | | | This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Be less laissez-faire with implicit conversions to QCharMarc Mutz2019-07-091-1/+1
| | | | | | | | | | | | | QChar currently is convertible from nearly every integral type. This is bad code hygiene and should be fixed come Qt 6. The present patch is the result of compile fixes from marking these constructors explicit. As is clear from the distribution of fixes, only low-level string handling code used these implicit conversions, an indication that they're not in widespread use elsewhere. Change-Id: Ief5336f21e6d181e03ab92893b3d13a14adc7cb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QString: fix comments for qsizetypeAnton Kudryavtsev2019-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I445ba61513fbafd24834fa48ade849feae4f1324 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-1/+1
| | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-141-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| * QRegExp: remove an out of bounds access into QStringGiuseppe D'Angelo2019-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... spotted with the brand-new checks for that in QCharRef. The rx[i] == ~~~ check is clearly wrong, as rx is the regexp we're building and `i` was not supposed to index into it. The intended meaning was wc[i] == ~~~, testing if we were seeing the closing bracket of a character set. We need to check for that immediately for dealing with the special syntax of []...] where the ] belongs to the character set (it can't be the closing one as character sets cannot be empty). Fix and add a regression test. Bonus: this code was almost unchanged since 2009. Change-Id: I958cd87fc25558e9d202d18b3dd4a35d0db16d8d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: hjk <hjk@qt.io>
* | Move away from using 0 as a pointer constantAllan Sandfeld Jensen2019-06-071-10/+10
| | | | | | | | | | | | | | | | | | Cleans up most of corelib to use nullptr or default enums where appropriate. Change-Id: Ifcaac14ecdaaee730f87f10941db3ce407d71ef9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-031-2/+2
| | | | | | | | | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | qstringalgorithms: add find methodsAnton Kudryavtsev2019-03-221-4/+2
|/ | | | | | | | | Also add qsizetype support. It's needed to add find methods to QStringView Change-Id: I45eac082924e27778c24eebbb19d694221c28978 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Protect all accesses to the global engine cache by a mutexLars Knoll2018-04-251-34/+32
| | | | | | | | | | Otherwise, we'll end up with corrupted memory when using QRegExp from multiple threads. Amends bbdc1b5ccbb19405f997cd67ec53b2c4860105f7. Change-Id: I9d35897629d0bc26503aa0c537c5f99013921fdd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Share and cache QRegExp engines where possibleLars Knoll2018-03-201-5/+15
| | | | | | | | | | | | QRegExpEngine is immutable once created, so we can easily share them between different QRegExp instances. This requires a QHash for engines that are currently in use in addition to the cache for currently unused engines. Task-number: QTBUG-65710 Change-Id: I165c12a7b065c488ecd14258a7cdfe0e62666632 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Support C++17 fallthrough attributeAllan Sandfeld Jensen2016-08-191-3/+3
| | | | | | | | | Replaces our mix of comments for annotating intended absence of break in switches with the C++17 attribute [[fallthrough]], or its earlier a clang extension counterpart. Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVector: preserve capacity in clear()Marc Mutz2016-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | | This is what std::vector implementations usually do, because it minimizes memory fragmentation and useless allocations since no user will call clear() unless she intends to append new data afterwards. Fix calls to resize(0) that show how existing code tried to work around the issue. Adjust test. Port from QVERIFY(==) to QCOMPARE as a drive-by. [ChangeLog][QtCore][QVector] clear() now preserves capacity. To shed capacity, call squeeze() or swap with a default-constructed QVector object, see the documentation for an example. Change-Id: I9cebe611a97e027a89e821e64408a4741b31f1f6 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>
* Doc: Move selected \keywords to be \targets insteadTopi Reinio2015-09-071-1/+1
| | | | | | | | | | | | | | QDoc now handles \keyword slightly differently - it no longer generates a unique html anchor at the location it appears in. Instead, it'll inherit the anchor of the documentation item it appears in. Therefore, switch the \keyword commands that are used for linking to a subsection within a page to be \targets instead, so they'll get an anchor and not link to the top of the page. Change-Id: Iec6d3f0edbcfb0aec95e222615eca9de2b0e153e Reviewed-by: Martin Smith <martin.smith@digia.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-261-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * Add reference to QRegularExpressionSamuel Gaist2015-08-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | Currently there's no mention of QRegularExpression in QRegExp's documentation. This makes it hard to find QRegularExpression for user used to QRegExp. This patch adds that missing reference. Task-number: QTBUG-46816 Change-Id: If3a981d5759fbed3eecd07e046882e6da378cc4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | QRegExp: remove pointless QRegExpCharClass copy special member functionsMarc Mutz2015-07-221-14/+0
| | | | | | | | | | | | | | | | | | They do exactly what the compiler-generated ones would do, but their presence inhibits the move special member function from being synthesized. Change-Id: Ib2046dbcee3c21ac3b5087f41d19e2a4a3e0a54f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add qHash(QRegExp) and qHash(QRegularExpression)Marc Mutz2015-05-051-5/+25
|/ | | | | | | | | | | | | | | | QReg*Exp*s can be compared for equality, so qHash should be overloaded, too. There was a (poor) private implementation of qHash(QRegExpEngineKey) already, which has now been replaced with a better one (the old one didn't take into account all the fields that make up equality, producing unnecessary collisions). [ChangeLog][QtCore][QRegExp] Added qHash(QRegExp). [ChangeLog][QtCore][QRegularExpression] Added qHash(QRegularExpression). Change-Id: I1d22fbcc0508018a3f94b4c24571b13ba6e07df2 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.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>
* QtCore: Use QDebugStateSaver in (almost) all QDebug operator<<Kai Koehne2015-02-091-1/+2
| | | | | | | | | Unify the behavior of the different operator<< by always using QDebugStateSaver (appending an optional space at exit), and making sure that the space(), nospace() setting isn't 'leaked'. Change-Id: I38e4f82fa6f7419d8b5edfc4dc37495af497e8ac Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove Q_STATIC_GLOBALxxx_OPERATOR macrosThiago Macieira2015-01-111-2/+1
| | | | | | | | | | These macros existed for working around an RVCT compiler bug, but since we stopped trying to work around it, the macros are no longer necessary. Change-Id: I76cc88d863b41f74f60cd9975dcc1959778c2740 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* Fix documentation of QRegExpjkobus2014-04-141-2/+2
| | | | | Change-Id: I6c9083941eb791eb34ce982986e3e04ac5a765ad Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Fix typos in QRegExp documentationKai Koehne2014-03-191-2/+2
| | | | | | Change-Id: I80bce716ac1c161fd87291ecdbf21eb8f3f25e5a Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Repack structs with more than one padding holeThiago Macieira2013-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Sizes gained (measured on 64-bit systems) BezierEase: shrunk 8 bytes QRegExpCharClass: shrunk 8 bytes QRegularExpressionPrivate: shrunk 8 bytes QTimeLinePrivate: shrunk 8 bytes QUtcTimeZonePrivate: shrunk 8 bytes QTextStreamPrivate: shrunk 8 bytes QDirPrivate: shrunk 8 bytes QFileDevicePrivate: shrunk 8 bytes Not done: QRegExpEngine: 18 bytes in 6 holes (you deserve high memory usage if you're still using QRegExp) QTextBoundaryFinder: 8 bytes in 2 holes (public class) QIODevicePrivate: 6 bytes in 2 holes, but there's no gain in packing QProcessPrivate: too complex and my copy is modified QThreadData: awaiting change from Marc Change-Id: I2a388b5ce17dec0dafcef18ed2e80d0379aa7d1e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-14/+14
| | | | | | | | | | | | | | | | | 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>
* Doc: Add docs for rvalue references and move constructorsGeir Vattekar2013-09-271-0/+8
| | | | | | | | | These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix WinCE/MSVC2008 build.Sérgio Martins2013-09-241-0/+2
| | | | | | | See QTBUG-33473 for a similar problem. Change-Id: Ib446618945dc1e7e1e7d43819cfae5f3c411f1bb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix some doc errors.Frederik Gladhorn2013-09-211-1/+1
| | | | | | | Change-Id: Ib874d7e9671d9cee75fe41f4dac5d0de7b09245e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Remove qBinaryFind usages from bootstrapped filesGiuseppe D'Angelo2013-09-201-3/+5
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I492b49553bc889892f5ca0c47aa13c75e11518e2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* Docs: Fix referencesChristian Stenger2012-12-131-2/+2
| | | | | Change-Id: I48173186afb874d307010f4f303d0e4f97ec0287 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix for compiling with clang with c++11.Erik Verbruggen2012-11-071-1/+1
| | | | | | | Change-Id: Ibb1e3290edbb2bdc68bb8164be6c484e49b9c69e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove some dead code in switch statementsSergio Ahumada2012-10-291-3/+0
| | | | | | | | | | Following the Code Style described in http://qt-project.org/wiki/Qt_Coding_Style#e289ee44592e9c32d4212069f0806daf There is no need for a 'break' after a 'return'. Change-Id: I1eca350391a7e4e14e504d60b24b69982cc5ac47 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>
* 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>
* QtCore: remove \link usagesGiuseppe D'Angelo2012-05-291-6/+4
| | | | | Change-Id: I0de764b51a972de0b6eb2bf3c04d2b190f581f52 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QRegExp: fix usage of uninitialized valuesGiuseppe D'Angelo2012-05-191-1/+1
| | | | | | | | | | | | | | | | | | A (probable) typo was causing the code dealing with anchors to use uninitialized values. This used to work by chance, but was indeed detected by Valgrind f.i. when running tst_qregexp -- the indexIn test on anc11 data reported: ==3015== Conditional jump or move depends on uninitialised value(s) ==3015== at 0x514B4EA: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1813) [...] ==3015== Uninitialised value was created by a stack allocation ==3015== at 0x514B3EB: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1803) Fixing the code also makes the aforementioned test to succeed. Change-Id: If7b3e518c1bbfcf12573d2637c33ef2eca27c4d5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Revert "[SIC] Make non-const the QRegExp methods that modify the internals"Thiago Macieira2012-05-031-3/+15
| | | | | | | | | | | | This reverts commit 75a0c7f9b52cde47f20fdc1b89e1264d60350848. The source-incompatible change proved to be more trouble than it's worth. Too much intrusion into the porting effort of applications for no appreciable gain, especially considering that we have a replacement class. Change-Id: Ia99a2360390a2062a8ddb6e12c8f2099287a2704 Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003562.html Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* [SIC] Make non-const the QRegExp methods that modify the internalsThiago Macieira2012-04-281-15/+3
| | | | | | | | | | | These methods modify QRegExp internals and should not have been const. It's actually dangerous to have them const, since users may think it's safe to use the matching method in a thread-safe manner. Task-number: QTBUG-25064 Change-Id: Ia370eb42fd0407a94924f420297c5e83d3908214 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-29/+21
| | | | | | | | | | | | 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>
* More qHash(T, uint) overloads for Qt typesGiuseppe D'Angelo2012-04-071-2/+2
| | | | | | | The more we get in 5.0, the better. Change-Id: If00084477709db4fc3f6b2e15024d046491be2ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegExp: remove docs about RegExp2 being default in Qt5Giuseppe D'Angelo2012-03-141-2/+2
| | | | | | | Change-Id: I37f4086d53ce6f2d6774ab204808d0d678a68349 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-186/+186
| | | | | | | | | | | 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>
* QRegExp: fix \i \I \c \C \p \P escape sequencesGiuseppe D'Angelo2012-03-011-13/+26
| | | | | | | | | | | | | | Those escape sequences have a special meaning in the XML Schema 1.1 regular expressions, but not in Perl-compatible ones. An escape sequence that has no special meaning should match the escaped character itself; this patch fixes QRegExp's behaviour in that regard (previously, it added a character class matching nothing). Change-Id: I983f923baa7c2ec19938b96353f3a205e6c06d58 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegExp: fix crashGiuseppe D'Angelo2012-02-271-0/+2
| | | | | | | | | | | | Fixes a crash when invoking various QRegExp methods on an object *before* doing any match. For instance fixes: QRegExp re; re.matchedLength(); // crash Task-number: QTBUG-23352 Change-Id: I9c239ff790a139c7820ef1aeced89d31320ae6b0 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Various documentation fixes ported from Qt 4.8Teemu Katajisto2012-02-151-1/+1
| | | | | | | | | | | | | | | | | | Final set of selected documentation fixes for qtbase from Qt 4.8 commit bacae725e584f51ee2fd83af7bef3e4515de9587 Task-number: QTBUG-13362 Task-number: QTBUG-18356 Task-number: QTBUG-18417 Task-number: QTBUG-18664 Task-number: QTBUG-21562 Task-number: QTBUG-22094 Task-number: QTBUG-18741 Task-number: QTBUG-15921 Task-number: QTBUG-15738 Change-Id: I3bd33bb7ce7aa991913ba82f3ea0e4b124f3ee41 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>