summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Unduplicate the implementations of next power of twoAllan Sandfeld Jensen2014-06-261-13/+2
| | | | | | | | | | | Qtbase contains four identical implementations of next power of two, these should be shared and the implementation made available to other qt modules, as it is also used many places outside of qtbase. [ChangeLog][QtCore][QtMath] Introduced qNextPowerOfTwo methods. Change-Id: Id23fbe5ad6bae647b30d5a4212c0330e48a50278 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Introduce std::string conversion to QByteArrayAllan Sandfeld Jensen2014-06-254-3/+34
| | | | | | | | | | | | | Add conversion methods similar to those in QString to QByteArray. This is often more useful than the QString version since std::string like QByteArray are byte arrays. [ChangeLog][QtCore][QByteArray] Added convenience methods to convert directly to and from std::string. Change-Id: I92c29d4bb1d9e06a667dd9cdd936970e2d272006 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-054-15/+10
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * qfreelist: fix data race on v[at].nextDavid Faure2014-06-051-5/+5
| | | | | | | | | | | | | | | | Detected by clang's -fsanitize=thread in tst_qcoreapplication. Task-number: QTBUG-39024 Change-Id: I60b7cece0384f89dc62ac5128faf39a4084e72e2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * remove HSTRING instancesMaurice Kalinowski2014-06-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | HSTRING needs to be released or handles will be leaked. Instead use HString which takes care of resource management on its own. Task-Number: QTBUG-38115 Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * Remove unused QMapNode{,Base}::minimumNodeThiago Macieira2014-05-281-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | These functions are not used anywhere. Since the classes are not documented, we're free to remove the inline functions. The implementation of the const function in QMapNode is also bogus: it discards a const qualifier. Task-number: QTBUG-39301 Change-Id: Ib8fd10a4da4b58a62cef17017ea6127c4d964325 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix typos in comments (qfreelist and qmutex)David Faure2014-05-261-1/+1
| | | | | | | | | | Change-Id: I782b18b9f82a72a29371564838252e1838faf86c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * WinRT: Fix compile warningsMaurice Kalinowski2014-05-261-0/+1
| | | | | | | | | | Change-Id: If223dd73b9558a0f5144be38f19a61316f8c807b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Make QWeakPointer's ctor constexprGiuseppe D'Angelo2014-05-291-1/+1
| | | | | | | | | | Change-Id: Ia23406ee80e83071a129606b76f78e2b6d0cf32e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add support for single-file multi-target intrinsics in QtThiago Macieira2014-05-272-19/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 4.9 now allows us to #include any and all intrinsics headers, not just the one for which we're compiling code, a behavior that ICC and MSVC have had for some time. With that, we're able to have the functions for different targets in the same source file. See the GCC manual: http://gcc.gnu.org/onlinedocs/gcc/Function-Multiversioning.html This functionality is notified by the QT_COMPILER_SUPPORTS_HERE(XXX) macro, which indicates that all the intrinsics from QT_COMPILER_SUPPORTS_xxx are available and enabled. To complement, a QT_COMPILER_SUPPORTS(XXX) macro is also added. Unlike ICC and MSVC, GCC requires a special function attribute, which will also cause code optimization. That's the QT_FUNCTION_TARGET macro. Note: because of the absence of the target attribute, ICC and MSVC will not generate instructions with the VEX prefix unless they only exist with the VEX prefix or if -mavx / -arch:AVX are enabled. Change-Id: I0c1880c20324bd8e0fc68a863e36d1fa7755dff0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-224-7/+12
|\| | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * Disable hash seeding for bootstrapped toolsThiago Macieira2014-05-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any bootstrapped tool is a development tool, by definition. So the effects of seeding the hash with a random number can cause the same source input to produce different binary results, which can throw some caching tools into disarray (like the Open Build System). There should be minimal fall out from the reduced protection against DoS. Since those are only development tools, "specially crafted" input implies the developer is DoS'ing him/herself. Note: the change to qhash.cpp applies to moc and rcc, which are always bootstrapped. Change-Id: I061ab52036e40627c0703f1bf881455cbf848f43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
| * Fix minor coding style issues in new code in QtCoreThiago Macieira2014-05-192-2/+4
| | | | | | | | | | | | | | Change-Id: I444daf8e81257f55746f9d32fbcb60a2e1b69444 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Call tzset() before localtime_r() as the docs say.Gunnar Sletta2014-05-161-0/+3
| | | | | | | | | | | | | | | | Without it, one might run the risk of QDateTime::currentDateTime() returning an invalid QDateTime the first time after changing timezone. Change-Id: I3efb04d41e7fe4685f6cc5fb41b68424eb4b9eb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-141-1/+1
| |\ | | | | | | | | | Change-Id: If1abbe7810ea43ae750db91066f9f579c79b2289
| | * Fix an off-by-4 error in qHash with CRC32Thiago Macieira2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | I tested only the 64-bit build. The 32-bit build was reading garbage past the end of the strings in some cases. Change-Id: If6d239754e16a17cc4e8bb71e2b7778429dfa7ba Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Improve a few string operations with AVX2Thiago Macieira2014-05-211-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AVX2 brings the new PMOVZXBW instruction that extends from one 128-bit SSE register to an 256-bit AVX register. With that, the main decoding code is just two instructions (the loop requires a couple more to maintain the offset counter and do the end-of-loop check). This buys us another 4% performance improvement in the fromLatin1 code, calculated on top of the VEX-encoded SSE2 code (which is already a little better than plain SSE2). Change-Id: I675fa24de4fa97683b662f19d146047251f77359 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | | qscopedvaluerollback: add convenience constructorRichard Moe Gustavsen2014-05-212-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a common need to assign a variable to something when entering a code block, and then revert it upon exit. qscopedvaluerollback can be used for this. But as a convenience, this patch adds an extra constructor so that you can "protect" and set a variable in one go instead of using two lines. Change-Id: If4b89d3a5ba32ef2304bda058b1b6050932612ed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Stop using setSharable in the Java-style mutable iteratorsThiago Macieira2014-05-183-34/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First and foremost, the STL-style iterators don't do this. Those don't provide a guarantee that the container won't get shared again while the iterator is active. Second, there's no protection against a second mutable iterator being created and resetting the sharable flag back to true. [ChangeLog][Important behavior changes] The mutable Java-style iterators like QListMutableIterator and QHashMutableIterator no longer set the parent container to unsharable mode. If you create a copy of the container being iterated on after the iterator, any changes done with the iterator might affect the copy too. Discussed-on: http://lists.qt-project.org/pipermail/development/2014-February/015724.html Change-Id: Iccfe411d5558c85ae459cff944215614c392388e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Optimize QVector::midJędrzej Nowacki2014-05-161-5/+7
| | | | | | | | | | | | | | | Change-Id: Iff7d9ec85a095c6712e6045e7708bb88eac629e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | Unify all mid() functions in QtBase.Jędrzej Nowacki2014-05-168-60/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to now, Qt had at least 3 different implementations of the mid(). Only QString::mid implementation was not crashing on edge cases and was protected against overflows, therefore I picked that one as the base implementation, even if it has weird semantics for an invalid input. As a side effect QVector::mid was slightly optimized to not detach in all cases (which follows current QList behavior). Documentation of QVector::mid and QList::mid was updated to not mention "copy of data" which could suggest that the mid() result is detached. QStringRef::mid was fixed and now it follows general Qt behavior, by returning a null value for a null input. Change-Id: Ie9ff5d98372bd193d66508e6dd92b6ed1180ad9b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Do not build or link to PCRE if QRegularExpression is disabledGiuseppe D'Angelo2014-05-151-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per Oswald's suggestion, just don't touch PCRE if it's not needed. This can save ~500kB between text and data in QtCore. Change-Id: Ia10c819c7fff562dda84ab0b77194baffbc8904e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-7/+14
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp Change-Id: Ibe75603dc8a51769db6550ea3f07bc8d19b0be85
| * | QDateTime: Fix sign handling in the timezone offset writerDaniel Seither2014-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, this produced wrong results, for example -3:30 became -3:-30. Change-Id: I10efdfb48e5542b917c86b29cf8a99bfc26f7fe0 Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDateTime: Fix sign handling in the timezone offset parserDaniel Seither2014-05-081-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, parsing negative timezone offsets with minutes != 00 produced wrong results. Examples (in -> out) -00:15 -> +00:15 -01:15 -> -00:45 Change-Id: I6fa30810a08bdf2996365661720b2e362e8aeb93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: John Layt <jlayt@kde.org>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-05-131-7/+1
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-7/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| | * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-031-7/+1
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Manually fixed up: isES -> isOpenGLES src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp Change-Id: I57d2ef26c3d4a7b40ace09f4e8560b7686650ea5
| | | * Fix more double release in QTimeZone on MacJean-Philippe Proulx2014-05-021-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several objects are released without being retained. This causes double free crash. Task-number: QTBUG-37582 Task-number: QTBUG-35890 Change-Id: Ic64419c22ab555ba77ada1864feaff247798d3ad Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * Fix double release in QTimeZone on MacJean-Philippe Proulx2014-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m_nstz is released in the destructor but not retained when using the QTimeZone(QByteArray) constructor. Task-number: QTBUG-35890 Task-number: QTBUG-37582 Change-Id: Ia569830bcd3c2f2cea04ad6696e681c4f2a3c137 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | | Document behavioral dependencies to ICU in QLocaleKai Koehne2014-05-131-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, Qt5Core does not link against ICU anymore. So it's worthwhile to point out that QLocale::toUpper(), QLocale::toLower() will just fall back to QString equivalents / "C"-locale conversions. Change-Id: Icadc20f3033aa39fcee93e61e082562945951c08 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | QRegularExpression: allow users to skip the UTF-16 check of the subject stringGiuseppe D'Angelo2014-05-122-3/+14
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCRE does not handle invalid UTF-16 sequences. For this reason we always check a subject string's UTF-16 validity before attempting any match over it (actually we let PCRE do that). The only exception so far has been global matching -- once the first match was done, we skipped re-doing the check over and over again the same string (PCRE actually checks the /entire/ string, not only the part it uses for matching). Still, users had no way to skip this check if they were 100% sure the string was a valid UTF-16 string. This commit introduces a way for them to skip the check. Change-Id: Iea352c06f531aa2153863b3a1681acaab7ac375c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-0620-42/+113
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-0112-33/+56
| |\| | | | | | | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| | * Deprecate setSharable in Qt containersThiago Macieira2014-04-2411-13/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ability to set a container to be unsharable has very little use and it costs us an extra conditional for every refcount up and possibly down. This change is a no-op for current Qt 5. It shuffles a few things around just so Qt can compile if you define QT_NO_UNSHARABLE_CONTAINERS. That is done to ease the fixing of the code in Qt 6 and to make my life easier: I'll keep that defined in my local Qt build so I can catch any misuses of this deprecated API. The newly deprecated methods are not marked QT_DEPRECATED because the bootstrapped tools wouldn't build -- they're built with QT_NO_DEPRECATED defined, which causes build errors. [ChangeLog][QtCore] The setSharable() and isSharable() functions in Qt containers has been deprecated and will be removed in Qt 6. New applications should not use this feature, while old applications that may be using this (undocumented) feature should port away from it. Discussed-on: http://lists.qt-project.org/pipermail/development/2014-February/015724.html Change-Id: I789771743dcaed6a43eccd99382f8b3ffa61e479 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Document QString's UTF-8 conversion behaviorsThiago Macieira2014-04-241-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We haven't handled the Unicode non-characters specially since Qt 5.2 (since commit 9327bc87c3abf58bb471693b5448cd78e3db1b46), so this part of the documentation was stale. Since Qt 5.3 (since 8dd47e34b9b96ac27a99cdcf10b8aec506882fc2), QString will insert one replacement character for each byte that can't be decoded properly. [ChangeLog][Important Behavior Changes][UTF-8 decoding] The QString UTF-8 decoder changed behavior slightly: when it encounters invalid sequences, it will insert one replacement character per byte that is invalid, instead of one replacement character for the whole invalid length. Change-Id: Ia4ec78afded9445bbe937311d6be80f71bd1a55f Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Allow building against static ICU libs also on UnixKai Koehne2014-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For dynamic builds of ICU, libicudata is an implicit dependency. Anyhow, it doesn't harm to explicitly link against it, either. So let's do this everywhere ... Task-number: QTBUG-38445 Change-Id: I420ba096e2ce5e1b8d81814ffb4aa7b300143b01 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Doc: QSize::isValid does >= 0 instead of > 0 comparisonsThiago Macieira2014-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The member function documentation was correct, just the class description was off. Task-number: QTBUG-38535 Change-Id: I55dded9d5ea79d93ce4984911acbeec8bbe6884a Reviewed-by: Martin Smith <martin.smith@digia.com>
| * | Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-234-4/+47
| |\| | | | | | | | | | Change-Id: Id13b4a3803664692f32f9d57549be8a0c4a08567
| | * Fix warning with -Wswitch-enumKonstantin Ritt2014-04-232-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | > warning: enumeration values 'Joining_None', 'Joining_Left', and 'Joining_Transparent' > not explicitly handled in switch [-Wswitch-enum] Change-Id: I314b486462451e7d62980b6185b46cd115be1547 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Improve the Unicode script itemization implementationKonstantin Ritt2014-04-141-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it closer to the Unicode specs (UAX#24): * Common now inherits the preceding character's script, if any; * In a combining character sequence, if the base character is of Common script, the entire sequence is treated like if it were of the first non-Inherited, non-Common script in the sequence. See http://www.unicode.org/reports/tr24/tr24-21.html for more details. [ChangeLog][QtGui] Fixed regression in arabic text rendering. Task-number: QTBUG-28813 Task-number: QTBUG-29930 (related) Task-number: QTBUG-35836 Change-Id: Id85761965b08ca94c674d5f3613fe58b82b2ce9c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
| | * Doc: document QTimeZone::swap()Marc Mutz2014-04-101-0/+7
| | | | | | | | | | | | | | | | | | Change-Id: I80d55df65546b671772ed93cb852e88ee040114a Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | QCollator: Add note about ICU dependency.Friedemann Kleint2014-04-161-0/+5
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-28766 Change-Id: If661915457c4874a72e1111b85897aea596362bf Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix documentation of QRegExpjkobus2014-04-141-2/+2
| |/ | | | | | | | | Change-Id: I6c9083941eb791eb34ce982986e3e04ac5a765ad Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | QRegularExpression: remove a boolean trap in private APIGiuseppe D'Angelo2014-05-061-6/+12
| | | | | | | | | | | | | | Small improvement to the code by using an enum instead of a boolean. Change-Id: Ib792cf97224b5204fd36ca215387fc7be34f2c32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRegularExpression: lock a mutex only if there's actual work to doGiuseppe D'Angelo2014-05-061-2/+2
| | | | | | | | | | | | | | | | | | We can do the (atomic) test of studyData before locking the mutex protecting the entire function body. Change-Id: I3006e3a0028608f21668ddaebe8a799aed56362f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRegularExpression: add an option to prevent automatic optimizationGiuseppe D'Angelo2014-05-062-8/+27
| | | | | | | | | | | | | | | | | | | | If a user doesn't like that QRegularExpression might do an uncontrolled CPU/memory spike when it decides to optimize a pattern, offer a way to disable the automatic optimization. Change-Id: I38a98a3bfb239cfad9f977b0eeb75903268e747f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRegularExpression: add ways to force an immediate optimizationGiuseppe D'Angelo2014-05-062-5/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fact that we kick in a pattern study and possibly a JIT compilation after an undocumented number of usages is suboptimal, for a number or reasons: users may want to JIT compile a pattern immediately, and at the same time they may not want a random delay in the program (due to the pattern getting optimized at a random usage). So: add an optimize() call to force an immediate pattern optimization, and a pattern option to force an optimization on the first usage. Change-Id: I95efdecfd31f11ca7cceb9c05037df613601a11c Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRegularExpression: update the error strings to the ones in PCRE 8.35Giuseppe D'Angelo2014-04-281-1/+10
| | | | | | | | | | Change-Id: Iee03fff5971712c3eb51a32d632cb1a6c276699c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QRegularExpression: enable JIT study for partial matching tooGiuseppe D'Angelo2014-04-281-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-38034 Change-Id: I0edc1c0b5e3be5fd12a91007b68e5eff7ccc7e40 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>