summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QStaticPlugin: Reorder class membersVolker Hilsheimer2020-09-251-5/+4
| | | | | | | | Address ### Qt6 comment. Task-number: QTBUG-85700 Change-Id: I31b65a76662b3dcdfa1400a3747c2e3c730b5ee3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove traces of QObject::trUtf8 from documentationVolker Hilsheimer2020-09-254-15/+7
| | | | | | | | ... and from the duplicated Q_DECLARE_TR_FUNCTION macro for QXmlStream. We expect source code to be utf8 encoded in Qt 6, so the function is gone. Change-Id: Ie25329a54e709dc92a22893ad5ab023852300d81 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix qdoc warning and typo in QMetaSequenceVolker Hilsheimer2020-09-251-2/+2
| | | | | | | There is no parameter called value in removeValueAtBeing/End. Change-Id: Ife91d2014ea35ea636e9cfb1c815424e5f4ef7a6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: fix minor line indentationAssam Boudjelthia2020-09-251-2/+2
| | | | | | Pick-to: 5.15 Change-Id: I1f064ecb38fcd6b0a59f3eaeb079cabbb7a8029f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qt_add_plugin: Get CLASS_NAME as a one value parameter, add TYPEMårten Nordheim2020-09-251-2/+1
| | | | | | | | | | | | I accidentally made the CLASS_NAME a multi-value parameter when adding it. Add a TYPE argument, which was likely intended to be there since it is already used in an android branch. Change-Id: Ic44dbbaeebc6863a984a7c2effbc00c3c2796b0b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use c++20 when available at compile timeAllan Sandfeld Jensen2020-09-251-8/+7
| | | | | | | | Also std::end is constexpr where std::next sometimes isn't always with sanitizers active. Change-Id: Ibe4c11eb4945fb286247e841b6a7f6cc3ff1eaa6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Doc: Update CMake snippets to Qt 6Kai Koehne2020-09-251-2/+2
| | | | | | | Change-Id: I53021781a25c141db5d5fc6771192cd8d6ed732a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Replace Q_REQUIRED_RESULT with [[nodiscard]]Allan Sandfeld Jensen2020-09-2524-418/+405
| | | | | | | It was already used many places directly making the code inconsistent. Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qwaitcondition_win.cpp: Fix deprecation warning about QMutex::isRecursive()Friedemann Kleint2020-09-251-4/+0
| | | | | | | | | Remove the check since a QMutex can no longer be recursive, fixing: qwaitcondition_win.cpp:164:28: warning: 'bool QMutex::isRecursive() const' is deprecated: Use QRecursiveMutex instead of a recursive QMutex [-Wdeprecated-declarations] Task-number: QTBUG-85700 Change-Id: Ic1631c1e671cf3234b5823d6d20121d746304c8e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qdoc warning from undocumented enum valueVolker Hilsheimer2020-09-251-0/+1
| | | | | Change-Id: Ie6ea916388867cc705a87544e893e55f715e83d7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QScopedValueRollback: code tidiesGiuseppe D'Angelo2020-09-251-5/+7
| | | | | | | Add constexpr + deploy std::exchange. Change-Id: I4c5e6f5d35cd74c464667f633344d27c0656f0eb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix qdoc warning from QLibraryInfo after API changeVolker Hilsheimer2020-09-241-18/+23
| | | | | | | In 557623cc4f22295e5e89462dfdff20d78b3b9cdc, QLibraryInfo::location became path. Change-Id: I71d61e44d3612b4613e1de58f2340174579eee3d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix some qdoc warnings in QMetaType and QVariantVolker Hilsheimer2020-09-242-50/+33
| | | | | | | | Document new enum values, remove documentation for implicit members, fix parameters, and tie documentation to function definitions. Change-Id: I5f32d45be8709e5f614d099ddf21252e23e144f8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QDateTime change documentation to reflect usage of C localeAndreas Buhr2020-09-231-48/+28
| | | | | | | | | | In the past, string formatting and parsing was done in the users locale. Now, the C locale is consistently used in QDate(Time) and localized functions are offered in QLocale. This patch reflects this change in the documentation. Change-Id: I81afda9063fa232d06841d63f69e19b49f8083f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a ValidWhenMask to QDateTimePrivate::StatusFlagEdward Welbourne2020-09-232-14/+6
| | | | | | | | | This saves some repetition of verbose status-setting code. At the same time, save the function that uses it a repeated getStatus() call hidden inside its getSpec() by inlining getSpec(). Change-Id: I32aee521c1885408f822ecb47ab1ed76f92852a1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QDateTime() unconditionally noexceptEdward Welbourne2020-09-232-6/+7
| | | | | | | | | As proposed by Lars in code-review; its Data::Data() is in fact noexcept even when CanBeSmall is false. Task-number: QTBUG-86400 Change-Id: I351e4332660f5895fff34b950227cbb811fd9f81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Assert some conditions instead of testing for themEdward Welbourne2020-09-231-14/+7
| | | | | | | In one case, handle an error by an early return so that we can do so. Change-Id: If98eaaf2dfd47c1df1d09497fcc3e9ab784dc6df Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make more consistent use of m_offsetFromUtc()Edward Welbourne2020-09-232-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | In QDateTime::toMSecsSinceEpoch(), all non-short date-times know their offsets from UTC, so can use that, saving the TimeZone ones the need to call (costly) zoneMSecsToEpochMSecs() and, when not short, the LocalTime ones the need to call localMSecsToEpochMSecs(). Moved the setting of offset clear of refreshZonedDateTime()'s check that the date and time match the milliseconds being handled, so that a sensible offset value is set even when the date-time comes back invalid due to being in a spring forward. As refreshZonedDateTime() now sets d's m_offsetFromUtc for both specs, it no longer needs QDateTimePrivate::setUtcOffsetByTZ(). In any case, the private time-zone access that provided is equivalent to the difference we already have between msecs and epochMSecs, except in a zone-gap. Add assertions to confirm this in zoneMSecsToEpochMSecs(). This brought to light a problem with whole-day transitions, where QDate::startOfDay() assumed the gap it was hitting would end by end of day. Search backwards from noon tomorrow, instead; likewise, for endOfDay(), search forward from yesterday. Task-number: QTBUG-75585 Change-Id: I6151d1dfccab321605753c98e01152281461bfe2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use same-msecs optimization more in QDateTime comparisonEdward Welbourne2020-09-231-2/+33
| | | | | | | | | | | | QDateTime's comparisons just compare milliseconds when both values are local times and their statuses (hence DST-ness) match. It can do the same for time-zones. While doing the same for UTC and fixed offsets wins nothing, it also costs nothing, given that we're already checking the spec. Task-number: QTBUG-75585 Change-Id: Ib6d824569aba8def2f1319ef3a11cca6869a5b5e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStringBuilder: use qsizetype for size() methodsEdward Welbourne2020-09-231-15/+15
| | | | | | | | Prompted by a ### Qt 6 comment on one of them. Task-number: QTBUG-85700 Change-Id: Id78a05a7bf77ba04207e0f5bc2a316984b13c9ae Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qdoc warnings for QByteArrayViewVolker Hilsheimer2020-09-232-5/+8
| | | | | | | Provide simplified declaration of fromArray for qdoc runs; fix a small typo. Change-Id: I8c7300a014270e8ab7f18afd94ee66af4734e0c7 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix qdoc warning: use correct parameter type in QVariant c'torVolker Hilsheimer2020-09-231-2/+2
| | | | | Change-Id: Ic935c8ac22c6ac8955439353c9d36dd7ba46021c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix qdoc warning from flag instead of enum type in \enumVolker Hilsheimer2020-09-231-1/+1
| | | | | Change-Id: Ia6b1152c99905ac805b411c9a77144879adfd848 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix qdoc warnings from removed enum valuesVolker Hilsheimer2020-09-232-11/+0
| | | | | Change-Id: Icd7a941ed1d8c7a4674482ace4b280a15e592c1a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix qdoc warning: yet another std::filesystemVolker Hilsheimer2020-09-231-1/+1
| | | | | Change-Id: If3c2e7ea3ae32e9596c51623449a405b16b27a5f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix some qdoc warnings from QByteArrayVolker Hilsheimer2020-09-232-18/+1
| | | | | | | | A snippet bug, and removed overloads. Change-Id: I82aee3627ba1a4e75e392b28d8ec72d470c395db Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Documentation: purge QSet and QHash members that no longer existVolker Hilsheimer2020-09-233-442/+54
| | | | | | | | | | | | QMutableSet/HashIterator can not walk backwards, neither can the STL iterator. When function documentation was shared with other iterator types, move it into separate section to avoid linking to incorrect see-alsos. Remove or fix other member function documentation that had errors, e.g. in parameter types after move to qsizetype. Change-Id: Ic7f97a295eff63ee748998b10f08a160706fa650 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: partially revert 00a1e5dAssam Boudjelthia2020-09-231-0/+4
| | | | | | | | | | 00a1e5da7e1aea373a7e6be1d51e1573ff167dd8 wrongfully added parts of QtPlatformAndroid.cmake which were removed in 32121e9882bc69ad72d8e08ee7c21a684db921c1. This removed the part in question again Change-Id: Ie18968e6a165f52c68f4941ced6add266985bc48 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove ### comment on QT5_NULL_STRINGSEdward Welbourne2020-09-231-1/+1
| | | | | | | | | Commented recommended turning it off by default in Qt 6, but Lars changed his mind once he saw how much broken on doing that. Task-number: QTBUG-85700 Change-Id: I1aeec408400978821e0e64d082dbb73cf982e54a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-233-207/+207
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QMetaPropertyBuilder: support bindable flagFabian Kosmale2020-09-232-0/+23
| | | | | Change-Id: I0d6ad00e49fd5df4c3b9c0692839404d53d8f6ed Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix some qdoc warnings: QRegularExpression parametersVolker Hilsheimer2020-09-222-6/+8
| | | | | Change-Id: Ib4d33327c6c059e11d8615bac0f72d9f028d5860 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QLibrary: Use QTaggedPointer for the did_load flagUlf Hermann2020-09-222-19/+19
| | | | | | | | This makes the size nicely aligned and conveniently intializes everything to the right values. Change-Id: Ibad2defbbd323fd5cdd4bed8374f40558d80acc0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Apply some code cosmetics to iterablesUlf Hermann2020-09-222-6/+6
| | | | | Change-Id: I552eca017d5a473ea91ca43d0a0459ef2e8288b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: link QModelRoleData and QModelRoleDataSpan documentationVolker Hilsheimer2020-09-221-17/+17
| | | | | Change-Id: I49bb356d5296dc73effd18399b7a205f00c24252 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix some qdoc warnings: std::filesystem::path gettersVolker Hilsheimer2020-09-223-4/+4
| | | | | | | Those APIs need to be declared for qdoc runs, even if cxx17_filesystem is not. Change-Id: Iaa437aa424f35d0414b6b79328bcafb49af872b3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix some qdoc warnings: function names in "see also"Volker Hilsheimer2020-09-222-5/+5
| | | | | Change-Id: I6b2b444ccc4de6629d800933802ffa8f75682b96 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix some qdoc warnings: function parameter namesVolker Hilsheimer2020-09-222-4/+4
| | | | | | | In QTextDocument and QTextFormat, standardize language a bit. Change-Id: I7c81ecc7a32e36ec32214e6b5386a2827cfcbc3f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix various qdoc warningsVolker Hilsheimer2020-09-224-11/+16
| | | | | | | Parameter types and names, missing enum values, and \since 6.0. Change-Id: I1b028fcf2ef0b57accb1ef7cebf17dab9f6d571e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QMimeDatabase: fix handling of glob-deleteallDavid Faure2020-09-224-17/+26
| | | | | | | | | | | | | | | | Binary provider: It was not possible to remove the first glob in a local override, because the mainPattern handling would re-add the first glob back. XML provider: It didn't support glob-deleteall. Also, the order of the providers was wrong. We want to pick local overrides first, the internal DB has to go last in the list. Fixes: QTBUG-85436 Pick-to: 5.15 Change-Id: I9a4523f37cd962c730df9a6ed992bd01c075bf03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFile::copy: call syncToDisk on destinationThiago Macieira2020-09-221-1/+1
| | | | | | | | Syncing the source makes no sense. Fixes: QTBUG-86806 Change-Id: I0d3ff441bec041728945fffd1637205d9cf6ab72 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QLatin1Char in place of QChar in a few more placesEdward Welbourne2020-09-221-4/+4
| | | | | | | | | | QDateTimeParser mostly uses QLatin1Char where it can, but missed a few cases. Change-Id: I3df37c350047214aeb843c3290014fa45b4656fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Count digits in QDateTimeParser::parseSection()'s numeric fieldsEdward Welbourne2020-09-221-1/+1
| | | | | | | | Assuming everything up to the first space is a digit is not sound. Change-Id: Iab5bb134c8e3299da726625c53b6a9b23f09dbb4 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Inline various date-time fromString(const QString &...) methodsEdward Welbourne2020-09-222-26/+6
| | | | | | | | | As requested in code-review. Task-number: QTBUG-86400 Change-Id: I14e051e4bad3e8e227c6401e699f979663ffd10f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Regenerate projectsAlexandru Croitor2020-09-222-52/+34
| | | | | | | | | Clean up the state of the projects, before changing the internal CMake API function names. Task-number: QTBUG-86815 Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove default ctor for QIterableUlf Hermann2020-09-224-6/+10
| | | | | | | MSVC has strange problems with it and we don't actually need it. Change-Id: I2c443946d52d475208800f310b5f910da165c99b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix some MSVC conversion warningsFriedemann Kleint2020-09-223-4/+4
| | | | | Change-Id: Ib2c1fdb7b84f89201136438362ab5962126ec929 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix some qdoc warnings: typos and qdoc syntaxVolker Hilsheimer2020-09-222-5/+5
| | | | | Change-Id: Idf5c1490330e0f2e5d4bcf920eb03fc9993b3c8a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove some deprecation comments from qmap.hEdward Welbourne2020-09-212-7/+5
| | | | | | | | | Lars says documenting that the methods are slow is sufficient, no need to deprecate them. Task-number: QTBUG-85700 Change-Id: I7b1d19e91e30205df7d8198e3704cecc72a853e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Define inverted QRects consistentlyAllan Sandfeld Jensen2020-09-212-84/+100
| | | | | | | | | | | | | | | | Changes the definition of invalid QRects to be more consistent. This simplifies the logic, and makes it possible for us to fix normalized() so dimensions don't change. The actual API is not changed except for inverted rects. Only one use-case for the old normalized() function existed, and has been reimplemented as QRect::span(). Fixes: QTBUG-22934 Change-Id: I29dad2952dc6c8e84a6d931898dc7e43d66780f3 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>