summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix a bug when streaming QVariants containing a QRegExpLars Knoll2020-09-211-4/+3
| | | | | | | | | | Fix a logic error. QRegExp is a UserType in Qt 6 and we need to check for it in the right place. Fixes an autotest failure in the qregexp autotest in qt5compat. Change-Id: I454cfcfd12b36f756b24b69a5412455db9dccbe7 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Cleanup API of QMimeDataLars Knoll2020-09-212-30/+30
| | | | | | | | | | | | | Do not use QVariant::Type anymore, instead use QMetaType For some reason, this pushed the qvariant autotest over the limit where MSVC requires the /bigobj flag, so add that one. [ChangeLog][QtCore][QMimeData] The signature of the virtual retrieveData() function has changed and now takes a QMetaType instead of a QVariant::Type. Change-Id: Ib46773bd731ee2177b1ef74d8162d744be7017ef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Silence qdoc warnings from std::filesystemVolker Hilsheimer2020-09-211-0/+7
| | | | | | | | | We change the declaration of the new APIs using std::filesystem::path for qdoc runs, and need to forward declare it consistently for qdoc builds to avoid a flood of clang warnings when building documentation. Change-Id: Iddcf0ce7d6207b6cc5910790315ab21076bd6ce1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update QList's documentation relevant to prepend optimizationAndrei Golubev2020-09-211-38/+65
| | | | | | Task-number: QTBUG-84320 Change-Id: I550f9dd7810855df0b0cc2bcbc78a97d6abaac7a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix a bunch of qdoc warnings from QList typesVolker Hilsheimer2020-09-212-0/+11
| | | | | | | | | | For documentation purposes, we treat QList, QByteArrayList, and QStringList as simple classes, whereas reality is a bit more complicated. We conditionally change the declaration of the types for qdoc runs, and need to be consistent to avoid a flood of warnings from clang when building documentation. Change-Id: I22d529079e10f8fd3d93edc771e5f05729fa925f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QAbstractEventDispatcher: change event dispatcher timer interval to qint64Liu Yang2020-09-2112-16/+15
| | | | | | | | | Resolve remaining Qt6 TODO [ChangeLog][QtCore][QAbstractEventDispatcher] The signature of the abstract virtual registerTime function now takes a qint64 value for the interval parameter. Change-Id: I10166ad5cfb455edc404d465a3731ff094a8977e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate QMutex in recursive modeLars Knoll2020-09-213-5/+12
| | | | | | | | | Use QRecursiveMutex instead. Pick-to: 5.15 Change-Id: I862fc2b3143deeb5c96dc8d445be5f9fa2535670 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Correct link errors qtbaseNico Vertriest2020-09-212-5/+5
| | | | | | Task-number: QTBUG-86295 Change-Id: I27f6bbdadffb08a8794520a14dfe0e2334979575 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QDir: add note to docs about isAbsolutePath(":foo") returning trueAhmad Samir2020-09-191-1/+5
| | | | | | | | | | | As can be seen in the _q_resolveEntryAndCreateLegacyEngine_recursive method in QFileSystemEngine, paths starting with ':' are treated as QResources, which means that from QFileInfo's POV they're "not relative", which is why QDir::isAbsolutePath would return true. Pick-to: 5.15 5.12 Change-Id: I701d08ce43ea707bc34c928e39bea0b83597a4b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QMetaType: Allow registration of mutable views and register iterablesUlf Hermann2020-09-195-104/+517
| | | | | | | | | | | | | | | In order to modify a container through an iterable, we need the original container to be mutable. The iterable, then, is not a conversion of the container, but rather a view on the container. The concept may be extended to other types. In order to facilitate this, provide a set of methods in QMetaType and QVariant similar to the convert family. The new methods are non-const and expect the original value to stay available during the life time of the view. Change-Id: I363621033f7fc600edcea2acb786820ccba49c86 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Extend QSequentialIterable and add QAssociativeIterableUlf Hermann2020-09-1915-1016/+1991
| | | | | | | | | And add mutable iterators. This requires some refactoring of the existing iterators. Task-number: QTBUG-81716 Change-Id: I61b3a3e8c0df5fd449679257a29d9f0c3d19c4f0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Un-export QVariantRef and QVariantPointerUlf Hermann2020-09-191-2/+2
| | | | | | | Templates should not be exported. Change-Id: I1378414a6e146eab125e43670e538afec00cd917 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QVarLengthArray's private realloc() to reallocate()Jesko von Monkiewitsch2020-09-191-8/+8
| | | | | | | | | | | | | This will enable run-time debugging on Windows, using _CRTDBG_MAP_MALLOC, which uses #define to override the standard library memory management functions, including realloc. Fixes: QTBUG-86395 Change-Id: I51975dd74cab0ae8309436c86d17a59074c561e1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDir: Use QDoc syntaxAhmad Samir2020-09-181-6/+6
| | | | | | | Replace Note/Note: with \note. Change-Id: I9a4cd79836fced9d858a478304a03e6c4bccfed5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Q(Any|Utf8)StringView: move array size deduction feature to fromArrayMårten Nordheim2020-09-189-32/+97
| | | | | | | | | | | | | The constructor taking an array literal will now stop at the first null-terminator encountered. And fromArray is introduced which only supports array literals. Constructs a view of the full size. Explicit so it shouldn't be surprising. Change-Id: I1497c33a5c12453a95e87c990abe6335b2817081 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QByteArrayView: move array size deduction feature to fromArrayMårten Nordheim2020-09-183-24/+42
| | | | | | | | | | | | | | | | 1. Make the ctor unable to construct a QByteArrayView from array literals other than 'char'. With the new behavior it would either be (very likely) unintended to pass e.g. a std::byte array to the ctor. And it would be confusing because you would get different sizes based on signed-ness. 2. Introduce fromArray Only supports array literals. Constructs a view of the full size. Explicit so it shouldn't be surprising. Change-Id: Ifdb55eb21057dfe7053b2561bd81e2c9825e9bc6 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMimeDatabase: fix performance regression when using the internal XMLDavid Faure2020-09-183-3/+26
| | | | | | | | | That XML was parsed over and over again, because the QMimeXMLProvider was re-created instead of re-used. Pick-to: 5.15 Change-Id: I07ff005d3f238afc1490b69a58cf4815e67d418c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTimeParser: skip some needless bracesEdward Welbourne2020-09-181-46/+28
| | | | | | | | | Simplified the logic around reconciling hour12, ampm and hour in the process. Mindless coding-style tidy-up. Change-Id: I0b7cabc57539d0d7201fef33e0120b84f4bb4994 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Improve docs for QtFuture::Launch::Sync policySona Kurazyan2020-09-181-6/+13
| | | | | | | | Updated QFuture docs to be more precise about QtFuture::Launch::Sync policy. Change-Id: Ic267c71f858e04a47ea1fc0996ea342d5eae7744 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWinEventNotifier: reinterpret 'int signaledCount' as a 'bool signaled'Alex Trotsenko2020-09-183-5/+5
| | | | | | | | | | | In fact, this variable can take only two values: 0 and 1. By interpreting its value as boolean, we can use relaxed store operations instead of atomic increments. This is safe, because it's guarded by 'activateEventNotifiersPosted' variable, which already provides a release/acquire semantic. Change-Id: If9adb7d022f1500ee7e8b61f336d8732f9b88d4c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update QByteArray documentation relevant to prepend optimizationAndrei Golubev2020-09-181-7/+39
| | | | | | | | | | [ChangeLog][QtCore][QByteArray] QByteArray is a prepend optimized container similar to QList. Task-number: QTBUG-84320 Change-Id: I45ed1cb75414930f5998be58bfcfe343b1790331 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove an outdated compiler checkSona Kurazyan2020-09-181-2/+0
| | | | | Change-Id: I3af019b65835b2f82161d6f1c24feb0523a32c11 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Rework checkValidDateTime() to avoid needless spec-checksEdward Welbourne2020-09-171-77/+74
| | | | | | | | | | | | | | When we know the spec already, we can route to the correct branch of the check directly. This also prepares the way for avoiding duplicating the expensive check for LocalTime during setMSecsSinceEpoch(). In the process, move duplicated code into massageAdjustedDateTime() from its callers, to avoid adding verification to the duplication; and clean up refresh{now: Zoned}DateTime(). Change-Id: I04d7a417110109d1f246a891b5aa94945821804b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QEventDispatcherWin32: remove unused memberAlex Trotsenko2020-09-172-3/+1
| | | | | Change-Id: I9ec54aca7af190cd7ba7744ff52b05451dd7050a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Tidy up QTimeZone method bodiesEdward Welbourne2020-09-171-55/+27
| | | | | | | | | | | Use ternary operator form, or boolean algebra, for the short returns. Handling invalid differently from valid isn't symmetric, they're qualitatively different branches. Skip a fatuous default-initialization. Change-Id: I01a8a06055c315ecf08fc87d208808c0fe71eb31 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix typo in QDateTime::fromSecsSinceEpoch() parameter nameEdward Welbourne2020-09-171-1/+1
| | | | | | | Task-number: QTBUG-86400 Change-Id: I03f0cca08e05862e2a84ae6ec606a62713766462 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make usage of forkfd_pidfd in QProcess a configurable featureAlexandru Croitor2020-09-174-1/+33
| | | | | | | | | | | | | | | | | | | Our CI cross-compiling arm qemu builds have issues in tests that use QProcess, due to user-space qemu seemingly not supporting pidfds properly. Add a 'forkfd_pidfd' configure.json feature, which can be manually disabled when configuring Qt, causing QProcess to do a regular fork instead of using the new pidfd kernel feature. This will help us avoid the regression of multiple tests failing on the new Ubuntu 20.04 CI host images when they are run via qemu. Task-number: QTBUG-86285 Task-number: QTBUG-86187 Task-number: QTBUG-86198 Change-Id: Ib2209d7e95126e0fb738bf59e39070d5a62c482f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename size parameter to QCommonArrayOps::sizeToInsertAtBegin()Ulf Hermann2020-09-161-8/+8
| | | | | | | | | ... in order to avoid a bogus compiler warning. Change-Id: I25eb435d6d57bdd5ef5c05ccacb0e6413631f6c9 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QFile: for filesystem::path, use iteratorsMårten Nordheim2020-09-161-5/+2
| | | | | Change-Id: I06477d48191e5c02ebf362ee31d8db5b1f76247a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Normalize roundingAllan Sandfeld Jensen2020-09-162-8/+8
| | | | | | | | Change the rounding of negative half values to match standard C++ round, this will also allow future optimizations. Change-Id: I8f8c71bed1f05891e82ea787c6bc284297de9c5c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add porting guide documentsPaul Wicking2020-09-161-0/+2
| | | | | | | | Also add existing such docs to the new document group Task-number: QTBUG-84051 Change-Id: I76f033f0846e09943f249d2beeb1606869eef382 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>