summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-0312-52/+225
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * Don't assign iterator to const_iteratorSérgio Martins2015-06-021-4/+4
| | | | | | | | | | | | | | | | It should also be possible to use QT_STRICT_ITERATORS in Qt's own code base Change-Id: I0914db480d4d2b06e71e3a2588163efdd3ff6d27 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Translate AM/PM under the QDateTimeParser context so it is consistentAndy Shaw2015-05-282-8/+9
| | | | | | | | | | | | | | | | | | | | In order to ensure that the same text will be used in both QDateTimeParser and QDateTimeEdit, use the QDateTimeParser context for the AM and PM strings. Task-number: QTBUG-251 Change-Id: I89b0809825251181440bf19cbe5828024a43acfb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Fix compilation of QContiguousCache::operator=Thiago Macieira2015-05-201-1/+1
| | | | | | | | | | | | | | | | | | freeData() takes a Data*, not a QContiguousCacheData*. Task-number: QTBUG-45783 Change-Id: I96d7ac38dac24b418138ffff13d7fdf09b1d6b07 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Doc: added doc to undocumented functionsNico Vertriest2015-05-186-28/+200
| | | | | | | | | | | | | | Task-number: QTBUG-36985 Change-Id: Ia98654f88cf5da77245b3fcd903b860d12862fc2 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * QSize, QSizeF: Add Q_REQUIRED_RESULTSérgio Martins2015-05-131-9/+9
| | | | | | | | | | | | | | | | ...to signatures matching the pattern: T T::<verb in past tense>() const; Change-Id: I75d724a3eef5cb94559e31d86914c6e0655b7f13 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Add Q_REQUIRED_RESULT in several placesSérgio Martins2015-05-042-2/+2
| | | | | | | | | | | | Change-Id: Icda3000f1d9f0d41612a50a816aa5de5e32028d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QSet: Introduce intersects().Sérgio Martins2015-05-303-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | The pattern "mySet.intersect(other).isEmpty()" has been spotted in the wild and in Qt codebase. intersects() is much cheaper because it bails out as soon as we find one common item and doesn't do any allocations. [ChangeLog][QtCore][QSet] Added intersects(). Change-Id: I44a350dc4cdb9deb835a23eee99fc99d6ca24c82 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QHash: Add a findNode() overload that doesn't calculate hashSérgio Martins2015-05-301-8/+16
| | | | | | | | | | | | | | | | | | Needed for QSet::intersects() for optimization purposes. No need to calculate the hash when we already have it. Change-Id: I247602bb0558ca8d1fb8333de9d5f339146c576d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QRingBuffer: merge indexOf() overloadsAlex Trotsenko2015-05-282-19/+1
| | | | | | | | | | Change-Id: Icfed4a29bc2ac95b3e0300eb4579751fe7e57e77 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Add shared implementation of a NSAutoreleasePool wrapper to qglobalTor Arne Vestbø2015-05-271-13/+1
| | | | | | | | | | | | | | | | | | | | | | We have at least 5 different (but equal) implementations of a wrapper in Qt, and some code uses explicit NSAutoreleasePools. Having a shared implementation lets us clean up things a bit and makes it easier to reason about which pools are actually needed. Change-Id: I2fd8eefc3ae7308595ef9899b7820206268362a5 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QVector: add const first/last gettersGiuseppe D'Angelo2015-05-262-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | Convenience to avoid annoying detaching (instead of using at()), especially on temporary vectors (returned by functions or so). [ChangeLog][QtCore][QVector] Added the convenience constFirst and constLast functions. Change-Id: If61b1f0096f6a7a1c9074340e237cc2376ce3d18 Task-number: QTBUG-46026 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Deinline QRingBuffer classAlex Trotsenko2015-05-203-243/+351
| | | | | | | | | | | | | | | | Reduce the size of .text section in QtCore by 4.5KB and in QtNetwork by 26.5KB. Change-Id: If7998776166b9681c1e4b24c51d40444aa996d7a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QList: partially revert ab8366b5923ec0feb730df98040885669f7bbe38Marc Mutz2015-05-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That commit removed the user-defined copy constructors, under the assumption that this would be ok for these non-exported classes. But the change is still BiC, because it turns the iterators into trivial types, which changes the way they are passed into functions by value. So, delay the change until Qt 6. Change-Id: I8065ff1ff78f5722505328447f2496777d1e8957 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Fixing the build of the SIMD support for WEC2013.Bjoern Breitmeyer2015-05-121-1/+3
| | | | | | | | | | | | | | Change-Id: Ib0dd8d34f0a5d68acb1efbc37680165e7d7933bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Gunnar Roth Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Check the maximum size of a QByteArray more preciselyAlex Trotsenko2015-05-111-3/+4
| | | | | | | | | | | | | | | | | | Also document that the QByteArrray::MaxSize takes a trailing '\0' into account. Change-Id: I89e9a0d1a80a49b33efbac16ff7aa2a98f0e5670 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add qHash(QRegExp) and qHash(QRegularExpression)Marc Mutz2015-05-054-5/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-05-041-1/+2
|\| | | | | | | Change-Id: I487a4b7c05687a10c498ac219c31367d4db6fbc0
| * QRegularExpression: add error strings from PCRE 8.37Giuseppe D'Angelo2015-05-011-1/+2
| | | | | | | | | | | | | | Change-Id: Id62abd91c1584e4e63b95afec0520995125fe807 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-273-17/+16
|\| | | | | | | | | | | | | | | Conflicts: src/tools/qdoc/tree.cpp tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: Iaa78f601a63191fa643aabf853520f913f2f0fdc
| * Doc: Bring QSizeF/QPointF::isNull() documentation up to dateTopi Reinio2015-04-272-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | Since Qt 5.0 (commit 09dd19df) sign is ignored when testing whether a QPointF or QSizeF is null. This updates the documentation accordingly. Change-Id: I3de1c748f3caa63b8bd8990006de5ba572eac83e Task-number: QTBUG-45669 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
| * QVector: Save one copy-CTOR call if we don't reallocSérgio Martins2015-04-241-5/+12
| | | | | | | | | | Change-Id: Ie0f2eb922500bc3d76852939cf2c5d28d65a43ae Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QLocale: Exclude null-byte in QString generated from script_code_list.Milian Wolff2015-04-241-1/+1
| | | | | | | | | | Change-Id: I2b9b85dd052360ea6bd96f18180b1b97cf4daaeb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-228-37/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
| * qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignalMartin Smith2015-04-201-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signals marked with QPrivateSignal had the QPrivateSignal marker ifdefed out for qdoc. This is no longer necessary, so the #ifdefs are removed. Change-Id: Idb334ed311c6ed6883d7b7b5a3fcdede60c4a1f8 Task-number: QTBUG-45535 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * QScopedValueRollback: add two strategic qMove()sMarc Mutz2015-04-161-2/+2
| | | | | | | | | | | | | | | | Use moves instead of copies when the rhs is no longer needed afterwards. Change-Id: If053bfce03b886099688452ada74f6a6f36db5c2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QScopedValueRollback: use ctor-init-listMarc Mutz2015-04-161-4/+2
| | | | | | | | | | | | | | Avoids calls to the default ctor for member 'oldValue'. Change-Id: Ieb9570b74e4a46b28c04625fac3ce267074c4a76 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QList: make QListSpecialMethods dtors protectedMarc Mutz2015-04-163-1/+14
| | | | | | | | | | | | | | | | | | QList publicly inherits from QListSpecialMethods. Thus, any specialisation of QListSpecialMethods should make their destructor protected, to avoid deletion through a pointer to QListSpecialMethods invoking UB. Change-Id: I7e317606f84826cc0faf1bfc05dee97da6eaf2eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-153-10/+10
| |\ | | | | | | | | | Change-Id: I004854a25ebbf12b1fda88900162fe7878716c58
| | * Doc: Fix using Apple-related terminology in Qt CoreAlexander Volkov2015-03-313-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the name "OS X" instead of "Mac OS X", "Mac OS" and "OSX", and mention iOS. Replace "Carbon Preferences API" by "CFPreferences API" in the QSettings documentation. Change-Id: Ia7f9fb874276c7c445a1649df521b96ff43daa0c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | Add qHash(QVector)Marc Mutz2015-04-202-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | QVectors can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtCore][QVector] Added qHash(QVector). Change-Id: I2aacce55d416abf2492631a504a02c6e8fc4ff1c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Add qHash(QList)Marc Mutz2015-04-202-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | QLists can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtCore][QList] Added qHash(QList). Change-Id: I9ad91811f12479764cc17d87192539612ceb0b4c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Remove <qhash.h> where it's not usedMarc Mutz2015-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5) in public headers. Change-Id: I6117e8a6b11200d2f1a0a94a0e87d5c27538218e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace <qhash.h> with <qhashfunctions.h> where applicableMarc Mutz2015-04-202-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5) in public headers. Change-Id: Ic3398f4f330e15a3b55065858add26b90fd70e6c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QList: remove (const_)iterator copy ctorsMarc Mutz2015-04-171-2/+0
| | | | | | | | | | | | | | | | | | | | | The compiler-generated ones are just fine. Change-Id: I528431040552326dad043b3b8d0db6af8146d3d2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QRingBuffer: allow to peek bytes from any positionAlex Trotsenko2015-04-101-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | Add an ordinary peek() function which also allows retrieving data from a specified position. We need this functionality in several places. Change-Id: Ia4a1b6fe1d7f76cb8f6f1ea34b3e4b89e05a2a68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devLiang Qi2015-04-096-39/+40
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-086-39/+40
| |\| | | | | | | | | | | | | | Change-Id: I04f9f2749f68c0cb5a427b8d84e43b44bb143e4d
| | * | QByteArray: begin()/end() are not \internalMarc Mutz2015-04-071-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Docs copied from corresponding QString functions. Change-Id: Ia2b0f0521780246d82003a1fda539c132823b294 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | docs: QString contains characters, not itemsMarc Mutz2015-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I479a731780dfce81e138d1aca950385437266763 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | Remove unnecessary QDateTime::detach() functionThiago Macieira2015-04-072-22/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Last commit changed QDateTime::d to be a QSharedDataPointer that implicitly detaches on non-const operator->() calls. That means we no longer need to explicitly call detach(). More than that, we should not do it, so we avoid checking the ref count and try to detach on every use. To do that, in functions where the d pointer was accessed more than once, I detach at the top and shadow the "d" variable with a local plain pointer. We don't compile our sources with -Wshadow, so this should not be a problem. Change-Id: Ic5d393bfd36e48a193fcffff13b969c281c36d0c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * | Use QT_WARNING_.. instead of #pragma GCC diagnostic ..Konstantin Ritt2015-04-071-7/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I0bb55a7f1074f3b8d6fb681b1d4dab5105ae7569 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | QQueue: unhide QList::swap(int, int)Marc Mutz2015-04-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-34197 Change-Id: I0b405ab0fabff8852b2705d651848fbff74fc4c2 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | | | Split qHash()-related code into separate headerMarc Mutz2015-04-083-97/+158
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reduces the amount of code the compiler has to parse when all the header does is implement its own qHash(). I left the implementation in qhash.cpp, as it doesn't influence qHash*() users. Change-Id: Id320d690a33769bae78b03ccc3b08f7124123459 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-069-45/+94
|\| | | | | | | | | | | Change-Id: If9fd98525b6b4ca07e5e006fc98bf372a73b8a21
| * | Removed unused code on QT_STRING_UCS4 macroThiago Macieira2015-04-051-6/+0
| | | | | | | | | | | | | | | | | | | | | This isn't defined or used anywhere else. Change-Id: I9a75ad8521ae4e5cbbe5ffff13d2356883b82dbc Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * | QVLA: Add operator= for initializer listsKai Koehne2015-04-042-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a dedicated operator=(std::initializer_list) that first resizes the QCLA, and then replaces the elements one by one. This should be usually faster than creating a temporary QCLA and then copying it, except for the case where the new array does not fit into the allocated stack - but this is IMO nothing to optimize for. Task-number: QTBUG-45041 Change-Id: I147d6d01186b1ca3c635b2c8365d8f6e638ce6fe GPush-Base: 08de3113051e1289f0de0651ec5647c9ee6feb27 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Liang Qi2015-04-012-21/+32
| |\ \
| | * | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-312-21/+32
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| | | * Core: fix crash in QCollator if ucol_open() failedLiang Qi2015-03-111-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If ucol_open() failed, call back to QString::compare() implementation. Task-number: QTBUG-44796 Change-Id: I03446e5227e1dedac6c5f824ac6d74a494fc0ace Reviewed-by: Gergely Nagy <ngg@tresorit.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>