summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2952-204/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* QVarLengthArray: add squeeze functionPeter Kümmel2013-01-282-3/+22
| | | | | | | Add function to move back data to the stack. Change-Id: Ic78a368459bce68629e29602e4eeae2e1afe398b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Switch to struct timespec everywhere instead of timevalThiago Macieira2013-01-282-6/+6
| | | | | | | | | | | | This avoids an extra division by 1000 when getting the current time. This can't overflow, under normal circumstances, even on 32-bit: when adding two values less than 1 billion, the result is less than 2 billion, which is less than 2^31. Change-Id: I6f8e1aadfe2fcf6ac8da584eab4c1e61aee51cbb Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add static dotProduct methods to the QPoint(F) classesLaszlo Papp2013-01-262-0/+30
| | | | | Change-Id: I66ac9433b74341a83569a60038ea2f7a025e81b1 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Added initializer list constructors for Qt associative containers.Roman Pasechnik2013-01-246-0/+101
| | | | | | | | | Affected: QSet, QMap, QMultiMap, QHash, QMultiHash. Task-number: QTBUG-25679 Change-Id: I01f3ecfbca805f4c053a75232188bd2a77fdb1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-23119-120/+120
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-22119-120/+120
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * QRegularExpression: fix wrong argument type for pcre_fullinfoGiuseppe D'Angelo2013-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pcre(3) man page says that the 4th argument of pcre_fullinfo, when requesting PCRE_INFO_OPTIONS, should point to an unsigned long int variable. Change-Id: I72cd5ab208687715329566556c5f279db57f7872 Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Update copyright year in Digia's license headersSergio Ahumada2013-01-18119-119/+119
| | | | | | | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Use stub function gettimeofday for VxWorksPasi Petäjäjärvi2013-01-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Vxworks does not have gettimeofday function, use function implementation from qfunctions_vxworks.h/cpp instead. Change-Id: Iad2a71c8484ba00dd9406706b1c136297260de4b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Don't clear the pointer in QScopedPointer's destructorThiago Macieira2013-01-231-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It helps in valgrinding applications. It's the difference between: ==17609== Address 0x38 is not stack'd, malloc'd or (recently) free'd and ==19789== Address 0x598f478 is 56 bytes inside a block of size 112 free'd ==19789== at 0x4A0736C: operator delete(void*) (vg_replace_malloc.c:480) ==19789== by 0x53A77CD: QObjectPrivate::~QObjectPrivate() (qobject.cpp:239) ==19789== by 0x53B4EB5: QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) (qscopedpointer.h:63) ==19789== by 0x53B3980: QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() (qscopedpointer.h:99) ==19789== by 0x53A8EEC: QObject::~QObject() (qobject.cpp:750) Change-Id: If42107c94401a96c05caa511442d6bd010fd4e29 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Add a note for merging QString::contains(QRE, QREM) overloads in Qt 6Giuseppe D'Angelo2013-01-201-1/+1
| | | | | | | | | | Change-Id: I19609b192618287dbac0de2e893e3e9b40d6a969 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-162-6/+26
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Split QQNXLocaleData::readPPSLocale()Rafael Roquetto2013-01-142-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Because this method creates a QSocketNotifier, it needs to be split into a part that is run on initialization, namely QQNXLocaleData::initialize(), and one that is run delayed through event loop invocation, namely QQNXLocaleData::installSocketNotifier(). Task-number: QTBUG-28701 Change-Id: Ib60000902692bbca4820d3d0bc7719212668dfa9 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Doc: Update the info on the QSharedPointer internalsThiago Macieira2013-01-151-31/+24
| | | | | | | | | | | | | | Some of it still referred to classes that were cleaned up in Qt 5.0 Change-Id: Ief4ed4b4fce074884f755b0d18a526ac40ad1b0b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Added QMessageAuthenticationCodeRuslan Nigmatullin2013-01-143-0/+361
| | | | | | | | | | | | | | | | | | | | QMessageAuthenticationCode is HMAC implementation based on QCryptographicHash abilities. HMAC is often used in OAuth and similar authentication protocols. Change-Id: Ifc73947ad06c36a1b770315b7e89ba5c01c5e79e Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QString::contains overload that returns the match resultsGiuseppe D'Angelo2013-01-142-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This convenience overload allows one to write QRegularExpression re1, re2, ...; QRegularExpressionMatch match; QString subject; if (subject.contains(re1, &match)) { // ... } else if (subject.contains(re2, &match)) { // ... } // .. One can then inspect the results of a successful match in each block (as well as extracting the captured substrings, etc.). Change-Id: I0fb8be8b577656e8db994198f8105c26c4fe67b0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Introduce default ctors for QRegularExpressionMatch(Iterator)Giuseppe D'Angelo2013-01-142-0/+42
| | | | | | | | | | | | | | | | This allows to put them in containers, and to enable subsequent features for QString. Change-Id: I3b3fe695ffe6930331ed9f670738376722e0fc36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Avoid a QVector allocation in QRegularExpressionMatchPrivateGiuseppe D'Angelo2013-01-141-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitely pass the number of capturing groups for which the offsets should be reserved in the capturedOffsets vector, instead of relying on it adding 1 (for the implicit capturing group #0). In case 0 is passed, don't allocate any space for that vector. This is being used in case of NoMatch match type or failing match (invalid regexp, out of bounds offset, etc.). Change-Id: I0ec7646d5bd53e7a7973177100b163a5e5030307 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge branch 'stable' into devSergio Ahumada2013-01-092-5/+5
|\| | | | | | | Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
| * Replace macro qdoc with Q_QDOCDebao Zhang2013-01-082-5/+5
| | | | | | | | | | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge "Merge branch 'stable' into dev" into refs/staging/devJędrzej Nowacki2013-01-073-3/+14
|\ \
| * | Merge branch 'stable' into devFrederik Gladhorn2013-01-073-3/+14
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
| | * remove unused member from QSystemLocalePrivateJoerg Bornemann2013-01-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a refactoring leftover from commit bb86e77cc437b92d49692bb7026c57626d77079f in qt/qt.git. Change-Id: I04993faca44ad0ffca2ae163049770c29d232a47 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
| | * Don't increase the reference count if dynamic_cast failedThiago Macieira2013-01-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the dynamic_cast failed in QSharedPointer::dynamicCast or qSharedPointerDynamicCast, we should avoid creating the QSharedPointer that shares the weak and strong reference counts. In Qt 5, this does not imply a leak since the original pointer is stored internally for deletion. In Qt 4 it implies a leak under certain circumstances, which this change fixes. Task-number: QTBUG-28924 Change-Id: Id2de140de4cf676461e14b201ad250c53666b79d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Clarify how two digit years are parsed by QDateTime::fromString().Mitch Curtis2013-01-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's currently not obvious that two digit years will always be in the 20th century (1900's). Task-number: QTBUG-28797 Change-Id: I7dee9a46e0cb803a8f097debc5443d1789c2f16c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | | Introduce QRegularExpression::NoMatch match typeGiuseppe D'Angelo2013-01-072-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This match type doesn't do any match at all; it's only necessary to properly introduce default constructors for QRegularExpressionMatch and QRegularExpressionMatchIterator (since they return the match type that created them). Change-Id: Ibfe92459c7fdd23129cf3afe073cd443c461ddeb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Provide operators for QMargins.Friedemann Kleint2013-01-072-0/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide addition/subtraction for QMargins as well as multiplication and division for int/qreal similar to QPoint. Add unary minus. Change-Id: If4eb831cfd610b34b5ca361619b1636031811d0a Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Add API dealing with QMargins to QRect.Friedemann Kleint2013-01-073-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Addition of a QMargin to a QRect. - Removal of a QMargin from a QRect. - Remove implementation from Windows platform plugin. Change-Id: Iae54bc13e94a7ece48853b1d3f3de2bfc154d2dd Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSIONGiuseppe D'Angelo2013-01-075-28/+34
|/ / | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix the \since version for QSharedPointer::create().Stephen Kelly2013-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | It is not relevant that it has been part of the class since Qt 4.6. It has always been internal until now. The release where it became public API (5.1) is what is relevant. Change-Id: Ib740f3ed6df190884a94fb2c11dd74cd7edb7b1a Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-0419-85/+115
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
| * Speed up and fix QByteArray::setNum()hjk2012-12-302-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | Going through QLocale and QString is not really needed. This also makes the result of the conversion of negative numbers in bases other than 10 independent of the architecture and implements the documented behavior of treating them as unsigned types. Change-Id: Ibc231dc5241deb5cbadd9796484a8b5f79c29410 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix Clang warning about memcpy a class with vtablesThiago Macieira2012-12-231-1/+1
| | | | | | | | | | Change-Id: I7966014a49cdf4c6c82f012d8b1d16ba8ddc3fcc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix some typosSergio Ahumada2012-12-211-1/+1
| | | | | | | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * Add a Q_ENUMS for MeasurementSystemmfekari2012-12-171-0/+1
| | | | | | | | | | | | Change-Id: Ib60de407f7ec8df907884ad2cf2fbf8e7b2c02f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Docs: Fix referencesChristian Stenger2012-12-131-2/+2
| | | | | | | | | | Change-Id: I48173186afb874d307010f4f303d0e4f97ec0287 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * QLocale: Report RTL text direction for pa_Arab and uz_ArabKonstantin Ritt2012-12-101-9/+16
| | | | | | | | | | Change-Id: I97c785c9cbf550ef1ab330a4905ff7ae97ee6a30 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Doc: Fix some enumsChristian Stenger2012-12-061-2/+5
| | | | | | | | | | Change-Id: I58f2906e9605e8ab09cad29880006ed60cc23e80 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * QtBase: Doc: Fix links to STL-style iteratorsDavid Schulz2012-12-068-50/+50
| | | | | | | | | | Change-Id: I2822c2a7e9bfc1949c20ff81e08961f641e961fb Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * properly syncqt-ize harfbuzz headersOswald Buddenhagen2012-12-043-5/+2
| | | | | | | | | | | | | | | | | | we were already installing them into QtCore/private, so turn them into proper private headers to start with. this cleans up our project files. Change-Id: I0795f79e03b60b5854de9e4dc339e9b5a5e6fd87 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Add support for multiple arguments to QSharedPointer::create()Thiago Macieira2012-12-233-0/+61
| | | | | | | | | | | | | | | | Requires C++11 rvalue references and variadic templates so we can implement perfect forwarding. Change-Id: I62e47d1ffd0c61e8386f9f246aa79031b7430b46 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Update Qt internals to use QChar::ScriptKonstantin Ritt2012-12-215-158/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ...and remove the outdated QUnicodeTables::Script enum. QFontEngineData now has one extra slot that never used (engines[QChar::Script_Inherited]). engines[QChar::Script_Unknown], if accessed, would be set with a Box engine instance, and could be used as a minor optimization some time later. In order to preserve the existing behavior, we map all scripts up to Latin to Common. Change-Id: Ide4182a0f8447b4bf25713ecc3fe8097b8fed040 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Add QChar::Script enumKonstantin Ritt2012-12-205-5796/+6460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...where the values are not aliased to Common script. The old QUnicodeTables::Script enum was retained for compatibility reasons until Qt internals are updated to use QChar::script(). Using QChar::Script instead of QUnicodeTables::Script would improve both the text analysis (itemization, boundary finding) and the text shaping quality. This also a required step for switching to Hurfbuzz-NG. /* This adds 6668 more .rodata bytes */ Change-Id: I5aa3d12c550528d0052542436990f8d0779ea8e5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Elaborate shortDayName(), etc using default locale.Leonard Lee2012-12-141-10/+10
|/ | | | | | | | | | QDate::toString() should explain QDate::shortDayName() and QDate::shortMonthName() will be localized name using the default locale from the system. Task-number: QTBUG-28522 Change-Id: I027a72773b5772bf00344f14a4b522e41c9e63db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add more qtbase implictly-shared classes to the listGiuseppe D'Angelo2012-11-301-0/+1
| | | | | | | QText*Format and QDns* ones are still missing. Change-Id: I8e87fba596e87289ca935717e0a90bfc0b0a26c0 Reviewed-by: hjk <qthjk@ovi.com>
* fix harfbuzz header install locationOswald Buddenhagen2012-11-301-3/+1
| | | | | Change-Id: I2e02f6c80ed7b1df00ad74a3e301997ba3bbd566 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Provide the bundled zlib headers for external accessaavit2012-11-281-2/+9
| | | | | | | | | | | | | | | | | | (Currently, the Qt5 windows packages lack the tiff and mng plugins from qtimageformats because of this issue.) If Qt is configured to use its bundled zlib, it is compiled into QtCore, and the public symbols are exported so that it can be used by other Qt libraries. However, after modularization, this did not work for libraries outside qtbase, since they did not have access to the headers of the bundled zlib. This commit fixes that. Ref. also 1f461ac45bfa8887261510a95fb33a346d68eaba Change-Id: Ie986f47e00fd0c16f2ba04d27f4258a20d61b260 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Qnx: Check if QCoreApplication::instance() exists before using QSocketNotifiermfekari2012-11-281-2/+5
| | | | | | Change-Id: I9f00314ea1ef73b87bc56ca1f8fcf859c9cd1824 Reviewed-by: Bernd Weimer <bweimer@rim.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* QtCore: Make more signals private.Stephen Kelly2012-11-282-9/+25
| | | | | | Change-Id: Ida190e8b9c1ff47a6f54a5bf68673ab50a2f1bfe Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>