summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove winrtOliver Wolff2020-06-06530-24933/+898
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove unused argument from methodLars Knoll2020-06-061-31/+31
| | | | | | Task-number: QTBUG-84635 Change-Id: I9a1789e0481977e9fa26a915ff3bc776d0a37e75 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove unused function pointers in QVariant::HandlerLars Knoll2020-06-064-37/+2
| | | | | | Task-number: QTBUG-84635 Change-Id: Icfbd1aae26b0453426d93e0af64d84d6403b8e3b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QDir: port from QStringRef/split() to QStringView/tokenize()Marc Mutz2020-06-061-12/+28
| | | | | | | | | | | | Port away from random-access of the returned sequences. That's neither necessary nor does it make the code more readable than the alternative single-pass implementation used here. As a drive-by, make applying NRVO more likely by re-using the `result` variable for all returns after its declaration. Change-Id: I2c3bbaefa6b6f08ebf0b90fb7be62e3c6243f19d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QVariant: use std::addressof instead of operator&Giuseppe D'Angelo2020-06-061-1/+3
| | | | | Change-Id: If7172e9e0e213d99f0c54b387dde8f9e163109d0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QVariant: move and swap in the move assignment operatorGiuseppe D'Angelo2020-06-061-1/+1
| | | | | | | And not pure swap. As per policy, QVariant must leave the rhs empty. Change-Id: I2d5e0f584c4d4fffd05a0a5bfae27ddcb72430e9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QVariant: remove UB and fix semantics in a testGiuseppe D'Angelo2020-06-061-4/+4
| | | | | | | | | | | The code was reading from uninitialized memory when creating a variant. Fixing that reveals that the test semantics are broken: when dealing with datatypes without a registered operator==, QVariant resorts to memcmp, so the two objects would've actually compared equal. Amend that. Change-Id: I36bad7ee6a45154d5d534b7dd8b618cc0a900126 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qmake: Stop using -isystem flagDmitry Shachnev2020-06-065-17/+3
| | | | | | | | | | | This option changes the order of include paths, which can cause problems of various kinds. See https://bugs.debian.org/958479 for an example. The benefit of that option is minimal for what it was intended. Pick-to: 5.15 5.12 Change-Id: I80eeabd09764df290b60bc59aeb2f90d07723608 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString/View: add tokenize() member functionsMarc Mutz2020-06-066-2/+264
| | | | | | | | | [ChangeLog][QtCore][QString, QStringView, QLatin1String] Added tokenize(). Change-Id: I5fbeab0ac1809ff2974e565129b61a6bdfb398bc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build without features.cborstreamwriterTasuku Suzuki2020-06-068-0/+16
| | | | | Change-Id: I970d21d7ac97a602a5f374f6c89cd4bfdcd847b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* cmake: quote paths to prevent issues when no install prefix is setJean-Michaël Celerier2020-06-052-2/+2
| | | | | Change-Id: Ifa7f1ef70c4893e10cb4ce9a54d8a0806d19be93 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove QThreadPool::cancel()Allan Sandfeld Jensen2020-06-054-101/+0
| | | | | | | Deprecated in 5.9 Change-Id: Ib6e2a5da1e7ee2664fb6fa496bdc880fab870901 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix check for malformed input when decoding translationsVolker Hilsheimer2020-06-051-1/+1
| | | | | | | | | | | | | | | | Any integer modulo 1 can never be anything else but 0, so the statement could never be true. The intention is to abort in case of an odd number of bytes, as this would indicate malformed input that can't be decoded into a QString. Note that QTranslator will then silently continue to search for valid translations, and not print any error message at runtime, or otherwise inform the user or developer that an input message file contains malformed content. Change-Id: I957b337ee035f3aca013e0859f8ee70553d9a97b Coverity-Id: 11014 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Fix compilation of lance toolEskil Abrahamsen Blomfeldt2020-06-051-1/+1
| | | | | | | | | The QLayout::setMargin(x) call has been deprecated since Qt 5.13. It was an alias for setContentsMargins(x, x, x, x) so we just replace it with that. Change-Id: I1c89eebfe776e0e3c8d0bdc19244bd452db4ef3c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Clean up docs of qbytearray.cpp's C-string functionsEdward Welbourne2020-06-051-20/+12
| | | | | | | | | | | | | | | Details of MSVC version became irrelevant some time ago; the code now just tests for MSVC. In any case, the reader doesn't need to know how the function is implemented, as long as it does what it claims to do. We do not, in fact, use a random number source when generating the return value for comparisons involving only one nullptr; we quite consistently treat the nullptr as less than the other string. Make explicit that this is true even if the other is empty. Change-Id: Ifd9b00fdf8e814fcf933a05821201670fecfd646 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Include qstringtokenizer.h from qstring.hMarc Mutz2020-06-051-0/+1
| | | | | | | | It's a bit annoying that you have to include <QStringTokenizer> to use the tokenize() methods. The separation is a historic artefact, just fix it. Change-Id: Ied4cc0c8dd2bb6735bf29fbb26fdbf47d07db264 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFactoryLoader: port a local QStringList to QDuplicateTrackerMarc Mutz2020-06-051-3/+3
| | | | | | | | | Apart from a more fitting, minimal, API, QDuplicateTracker also transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or at least reduce, memory allocations. Change-Id: I0a0d1e31fd35d483e0036045847a3759b593c71c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* macOS: Respect window type when determining main window statusTor Arne Vestbø2020-06-051-4/+2
| | | | | | | Fixes: QTBUG-84405 Pick-to: 5.15 5.12 Change-Id: I3fc6b15b07a81e7e7e417a5767c2853083c13516 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QProcess/Win: Fix build in debug modeAlex Trotsenko2020-06-052-3/+4
| | | | | | | | | | Suppress a compile warning: io\qprocess_win.cpp: 623:101: error: format '%d' expects argument of ... Pick-to: 5.15 Change-Id: I9ea94ddfc21afea5d1a78e264507a36435cce063 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Clean out string/character mentions from QByteArray docsEdward Welbourne2020-06-051-290/+276
| | | | | | | | | | | | | | | | | | | | | | In some places QByteArray does interpret bytes as characters and a sequence of them as a text string; everywhere else, however, it now refers to them as bytes. Add a section to the class doc explaining how char* pointers are interpreted; the handling of '\0'-termination is surely familiar to most readers, but making it explicit provides contrast for the explanation of there being no such special treatment of '\0' bytes when a stard address and length are given. Also mention in the class doc that interaction with QString is done via UTF-8 encoding and can be avoided by defining a macro. Shorten, in light of that, the description of that encoding where it appears in affected methods. In the process, clean up lots of phrasings. Change-Id: Ic97dce4a20752e277eeab35a06737322b2074692 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix references to section in QByteArray class doc after title changeEdward Welbourne2020-06-051-10/+6
| | | | | | | | | This amends commit 9dd8e655cdd26eeaae30645b7fe013d9a696547f to fix the various references to section {8-bit Character Conversions}, which is now renamed {Character Case}. Change-Id: I1f777ab359c616a1b12f05a12b1cd7397f3ccb18 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rework testing of qstr*cmp() functionsEdward Welbourne2020-06-051-79/+81
| | | | | | | | | | | | | | | Previously only qstr*icmp() were tested and the test data was sent via QString and {en,de}coding. Use a local data-type to package pointers to actual string literals for passing to these functions that take them. Fold the various tests involving null pointers and empty strings into the general testing, removing from "singularity" tests, and combine the remainders of those tests into a single test of singular cases for QByteArray::ompare. Move all these tests to alongside the existing tests for QByteArray::compare. Use nullptr rather than 0 as the null string. Change-Id: Ie6d01e839c330c2f960af4bcc95e5633539337d6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Prune two un-needed #include files from qbytearray.cppEdward Welbourne2020-06-051-2/+0
| | | | | | | | The QByteArray code doesn't use QLocale or QString. Change-Id: I60966ecad35fdaaef9930ba2746bf732fa9f3cd7 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Create QLocale's default store if missing when setDefault() is calledEdward Welbourne2020-06-051-2/+10
| | | | | | | | | | | | | | | | | | | A check to prevent crash-on-exit if QLocale::setDefault() was called after the default store was torn down had the side-effect of causing setDefault() to not record data if it was called before the first access to the default store caused it to come into being. Change the check to test that the default store has been destroyed and, if not, create it if it doesn't exist yet. This refines commit 4d6572aac0eb1f75f3c810ce8e92635b956d29fc (as modified by commit 11c5c078c7743050a115a4dcc31f52caaa378e35). Fixes: QTBUG-83016 Fixes: QTBUG-83415 Pick-to: 5.15 Change-Id: Icbce9bd9c75d0258d403e2f90957561b5a18bdf3 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Disable tests with qemu-arm & developer-build configurations in the CI"Liang Qi2020-06-054-4/+9
| | | | | | | | | | | We don't want to have untested qtbase. This reverts commit 3598ffcc26dbae14d88c32fabfc8be465eed8f61. This change also skips two network tests on b2qt. Change-Id: I5c6f5e19487775f0a1c0feafa5e085208cbf7e9a Reviewed-by: Liang Qi <liang.qi@qt.io>
* Reuse the non blocking implementation for blocking oneJarek Kobus2020-06-054-252/+248
| | | | | | | | | | | | | | | | | Replace the implementation of blockingMappedReduced(): after calling non-blocking version of mappedReduced() we are getting the future object, so we may call in sequence result(), which will block and return the result when the all tasks are done. The same is done with blockigMapped(), which calls blockingMappedReduced() with a custom reduce function. Looks like with this pattern we can reuse the non-blocking version for implementing blocking version of mapped / filtered methods. Task-number: QTBUG-83918 Change-Id: I7f240cfbd04834d551ff79d717b72194a26996d7 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Port qmake from QStringRef to QStringViewLars Knoll2020-06-0520-113/+109
| | | | | | Change-Id: Ie07a976cd3c634e04c8b9b1e0a6cacd4c2d94939 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port QSettings from QStringRef to QStringViewLars Knoll2020-06-053-10/+10
| | | | | | Task-number: QTBUG-84319 Change-Id: If2b5d8eb78ab5ca78d365f137d9680b1f0646c6b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add possibility to set QNX Screen pipeline valueTeemu Holappa2020-06-051-0/+15
| | | | | | | | The pipeline value is set by window property _q_platform_qnxPipeline. Task-number: QSR-263 Change-Id: I13536936b2335a97a6eeb5a94c4e0f552308d15e Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Fix build without features.shortcutTasuku Suzuki2020-06-052-0/+4
| | | | | Change-Id: I5b0d3b169c7adb3ee340df7b593f84167f1ccc0c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Clean up headersTor Arne Vestbø2020-06-0562-148/+231
| | | | | | | | | | | | | | The headers are now C++ clean and can be used outside of Objective-C code. All includes of Objective-C frameworks have been moved to the implementation files. Header guards have been added in the few places they were missing. All includes are now done via #include, instead of sometimes using the #import variant. Change-Id: Ibb0a9c0bcfefbda4347737212e40e300a3184982 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build without features.completerTasuku Suzuki2020-06-051-0/+2
| | | | | Change-Id: Icaed1963d6306e36653d01ad9d05b68cb50717e5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Clean up AND NOT QT_BUILD_STANDALONE_TESTS in QtAutoDetectAlexandru Croitor2020-06-041-3/+2
| | | | | | | | Now that the whole file is not included when doing standalone tests, the conditions are not needed anymore. Change-Id: I49ddd2fc4a8327e09529948785f40cda5dedbb11 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Protect against Qt toolchain file recursive inclusionAlexandru Croitor2020-06-044-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Three different people have encountered the issue that calling calling qt-cmake on a project prints 1000 inclusion lines of the same qt toolchain file, and then CMake bails out saying can't find the CMAKE_MAKE_PROGRAM Ninja. This happened because people accidentally called qt-cmake to configure qtbase (instead of just cmake), which created a toolchain file that chainloads itself recursively. Error out when configuring qtbase, and when using the generated toolchain file in the case when it would try to include itself. The solution is to remove the qtbase CMakeCache.txt file, and configure qtbase again, so it generates a proper qt.toolchain.cmake file. If somebody feels enthusiastic, they can move the check into the qt-cmake and qt-cmake-private shell scripts, and error out before the qtbase/CMakeCache.txt is polluted with the wrong toolchain file. That is left for people that feel more comfortable with bash and batch scripting. Change-Id: If518c94791fe7c30731e6e462e347f26a5213c64 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix qmake mixing for framework buildsAlexandru Croitor2020-06-042-6/+23
| | | | | | | | | | | | | Include headers in .pri files should point to the framework Headers dirs. The module name in the .pri file is not versioned when it's a bundle. Paths to system frameworks in .prl files should instead be replaced with -framework Foo flags. Change-Id: Ia353d033799fae40a1bc55fad6f86b2c8ef76c56 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix double-conversion usage on macOSAlexandru Croitor2020-06-041-37/+3
| | | | | | | | | | | | | | | | | | We reported that double-conversion was found on macOS if the std library supported sscanf_l and _snprintf_l, but that's different from what qmake does. This caused not to compile and link the bundled double-conversion sources, and caused tst_qvariant to fail when doing double conversions on macOS. Remove the extra config tests, and make it work like in qmake, so that the bundled code is used instead. This makes tst_qvariant pass. Amends 729a73a9cfe774cb49251be8c99ba5b26d516e01 Change-Id: I7ddaed5fe6916f483fb3de1962657d7fb6fb40be Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix tst_qclipboard test on macOSAlexandru Croitor2020-06-044-14/+8
| | | | | | | The helper processes were not in the correct location. Change-Id: I0a80a22a931625ea0c9370db38ff29c881b964cb Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix tst_quuid to pass on macOSAlexandru Croitor2020-06-042-1/+17
| | | | | | | | The helper executable needs to be a bundle, because that's what the test expects. Change-Id: I7c3f72f12b7a744478b4832685d032abfc679e5b Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Regenerate tests/auto/other projectAlexandru Croitor2020-06-042-2/+51
| | | | | Change-Id: I0dbcef3c918b9502528bf2fe0907a7582dcde0ea Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: disable macnativeevents testsAlexandru Croitor2020-06-041-1/+1
| | | | | | | | | It's disabled in qmake too, due to being almost all blacklisted and flaky. Plus locally when i tested, i had to give accessibility permissions manually, otherwise it failed. Change-Id: I55ce7a81c46ac28f41c43f5c159fecc22d489966 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix tst_qregexp testAlexandru Croitor2020-06-041-1/+15
| | | | | | | It was missing the resource files. Change-Id: Iaa97922eaedc8ba55ef4e568a6abfcffd19509fa Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Update the qt_attribution.json for SQLiteAndy Shaw2020-06-041-2/+2
| | | | | | | | | This got forgotten when SQLite was upgraded to v3.32.1, so this amends e10e989ce83027f2f620bb6948be4948f3c91e76 Change-Id: I75799b6c55bc39c4cc050b5eb18a99d9f197410c Pick-to: 5.15 5.12.9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_qobject: fix build when exceptions are disabledFabian Kosmale2020-06-041-0/+2
| | | | | Change-Id: Id98d39b4cc14608661a53df7e5c5bba5fb875022 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Enforce two's complement integersGiuseppe D'Angelo2020-06-041-0/+4
| | | | | | | | | | | C++20 will make this true for everyone, but as far as Qt goes, this has to apply to all platforms even before that. Just add another couple of checks to the list. Change-Id: I0251ce431d4584380cfd3fc3e4b36f1dbdbf9df2 Pick-to: 5.15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate the pause-related APIs of QFuture* classesSona Kurazyan2020-06-0411-133/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecated the pause-related APIs of QFuture* classes and added alternatives having "suspend" in the name instead. With 2f15927f01ceef0aca490746302a5ea57ea9441c new isSuspended()/suspended() APIs have been added to QFuture* classes for checking if pause/suspension is still in progress or it already took effect. To keep the naming more consistent, renamed: - setPaused() -> setSuspended() - pause() -> suspend() - togglePaused() -> toggleSuspended() - QFutureWatcher::paused() -> QFutureWatcher::suspending() Note that QFuture*::isPaused() now corresponds to (isSuspending() || isSuspended()). [ChangeLog][Deprecation Notice] Deprecated pause-related APIs of QFuture and QFutureWatcher. Added alternatives having "suspend" in the name instead. Change-Id: Ibeb75017a118401d64d18b72fb95d78e28c4661c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix to crash in QWindow::event when delete this called on closeEventMiika Pernu2020-06-042-2/+25
| | | | | | | | | | | | | Starting from Qt 5.11 QWindow::event is called after QDialog::closeEvent which would cause a crash if "delete this" was called on closeEvent. The commit that changed this was e0b5ff4ad583befbecbcbe462998e3ed80899531. Added a check before QWindow::event call utilizing QPointer to prevent the function call in case object is destroyed by a user in close event handler. Change-Id: I64a4a0f3271714e55bf7e806177f0d8b39b67fa3 Fixes: QTBUG-84222 Pick-to: 5.15 5.12 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLabel: create the text control when getting polished, if necessaryVolker Hilsheimer2020-06-041-0/+3
| | | | | | | | | | | | This amends 7bee4e9cb3750be4573e1872f52023081b014500, and makes sure that the text control is created even if the attributes that define whether it's needed are changed after a call to setText or setTextInteractionFlags, where it is otherwise created. Task-number: QTBUG-84080 Pick-to: 5.15 Change-Id: I3be27f35bc83944948027345535d1202a7b97163 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* CMake: Fix standalone tests to work properly on reconfigurationAlexandru Croitor2020-06-043-17/+33
| | | | | | | | | | | | | | | | | And also fix qt-cmake-standalone-test to work for prefix builds. The gist of it is that we have to protect tests not to be installed into the Qt install prefix, but we also have to make sure that the CMAKE_INSTALL_PREFIX is not changed globally (via cache value), so that reconfiguration still works. This took way too long to figure out. Amends d6272d774c7415186aa398e59f234d0073458072 Fixes: QTBUG-84346 Change-Id: I18c29574c9957fe05b86f701c8c14ec07e0f045b Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Remove the deprecated QDirModelVolker Hilsheimer2020-06-0433-2547/+14
| | | | | | | | | QFileSystemModel is the documented replacement. It uses threads to populate the model, which QDirModel doesn't. Change-Id: I7818ecd8f849eb566ac176612f382e17a0471c47 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QNX: assume QNX is always UTF-8Samuli Piippo2020-06-041-1/+2
| | | | | | | | | | | Override locale encoding to UTF-8 on supported platforms. QNX has nl_langinfo, but the header is not using extern "C". Tests show that it returns UTF-8 regardless of the locale, so let's assume it's always UTF-8. Change-Id: I0fe98f8441287df9f99c334e537a7b962df105f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>