summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove QByteArray's methods taking QString and their usesSona Kurazyan2020-06-2516-275/+11
| | | | | | | | | | [ChangeLog][QtCore][QByteArray] Remove method overloads taking QString as argument, all of which were equivalent to passing the toUtf8() of the string instead. Change-Id: I9251733a9b3711153b2faddbbc907672a7cba190 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Fix qmake mixing with static build and system_xcb_inputJoerg Bornemann2020-06-251-2/+3
| | | | | | | | | | | The .prl generation uses a very simple generator expression evaluator that cannot cope with the $<TARGET_EXISTS> expression used in src/plugins/platforms/xcb/CMakeLists.txt. Replace this genex with a conditional qt_extend_target call. Change-Id: Id17a230d66f701eb0938d10d6b6b7b680290b1c8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix pcre2 compilation with intelcet part 2Alexandru Croitor2020-06-252-0/+80
| | | | | | | | | | | | | I somehow forgot that we build the pcre2 sources not only as part of the bootstrap library and qmake, but also as separate library as well. Apply the flags to the bundled library. Amends 976fa5134aea52741df7b25a196fa36251dc932f Amends fa98adbd04de9d44ce921436b92589a41f285dcd Change-Id: Ia1db3a8bd731c7e3ee4d7109be8e2ef98c594070 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Place framework .prl files under ResourcesAlexandru Croitor2020-06-251-0/+8
| | | | | | | Adapts to qmake's 74abe983204dab35dcce59001308c54d34ad2c02 change Change-Id: If1d6ce063d53dda4835a224661a16219cf9a9476 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Avoid converting supersized QRectF to QRectAllan Sandfeld Jensen2020-06-251-3/+8
| | | | | | | | | | | Check that the sizes are even representable when checking if clipping is necessary. Fixes oss-fuzz 23630 Pick-to: 5.15 5.12 Change-Id: I95d6873d28b0e4f47aae7666f7ee96b745dc997b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Use QList instead of QVector in network testsJarek Kobus2020-06-256-8/+8
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic96dc8d29b5d720810ca636284f5fd37e4307acd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in dbus testsJarek Kobus2020-06-253-6/+3
| | | | | | Task-number: QTBUG-84469 Change-Id: I37d169770f188837118b4e33aa3a3894bf7aed2c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in sqlJarek Kobus2020-06-2510-16/+16
| | | | | | Task-number: QTBUG-84469 Change-Id: I942aec7d949331a52d7f12fa2725d8d9707f605f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: Don't pause when in multi window modeAndy Shaw2020-06-251-1/+2
| | | | | | | | | | When the application is in multi window mode then when pausing it should not suspend the application as it can still be visible in the background. Change-Id: I03a561459b2aa04c808b7d4220cd3e558671dd17 Pick-to: 5.15 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix compile warnings when passing short ints into printf formattingVolker Hilsheimer2020-06-251-2/+2
| | | | | | | Use %hd instead of %d. Change-Id: I0062a507140d70263770cd7fe923efe94822d00e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Allow qMin, qMax and qBound for types that can be losslessly convertedLars Knoll2020-06-256-0/+74
| | | | | | | | | | | | | | | | Add overloads for qMin and friends where the arguments are of different type, but one can be easily promoted to the other. Return the promoted type. Promotions are only allowed if both types are either signed, unsigned or floating point numbers. This should simplify writing code in many case (as for example qMin(myint64, 1)) and also help reduce source incompatibilities between Qt 5 and Qt 6, where the return types for sizes of our containers changes from int to qsizetype. Change-Id: Ia6bcf16bef0469ea568063e7c32f532da610d1cd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Skip proxy widgets that can't take focus when (back)tabbingVolker Hilsheimer2020-06-252-4/+52
| | | | | | | | | | | | | | Fixes regression introduced in b4981f9d4ca914c6ecaa49bfdd69e51806a3671a, due to which it was possible to back-tab into a widget even though it or its focusProxy had a NoFocus policy. As a drive-by, split the complicated if-statement up a bit for improved readability. Change-Id: Ib0ac2604076e812e340b11534c23ae8ae958d082 Fixes: QTBUG-76924 Pick-to: 5.15 5.12 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't pollute global namespace with #define PVolker Hilsheimer2020-06-251-4/+13
| | | | | | | | | | | Breaks the build if any global header has using P = SomeType; statement, and unnecessary to do so before the headers are included. Change-Id: I3b8cc705bf662f768b8895e4b3ec1428ab39ef27 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QMetaObject: Compare threadIds when checking receiver threadMike Achtelik2020-06-251-9/+16
| | | | | | | | | Comparing threadIds is faster, especially if invoked from a non qt thread, where QThread::currentThread() needs to create a QAdoptedThread/QThreadData first. Pick-to: 5.15 Change-Id: I44b3013283754f1a5ac9d62debcf4c82be77c554 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix conversion of QVariant() in QJsonArrays and Objects (through CBOR)Thiago Macieira2020-06-243-10/+49
| | | | | | | | | | | | | | | | | | | | | When I wrote the QCborValue to QJsonValue conversion, I used QJsonValue::Undefined because it allowed to keep some level of compatibility in CBOR, despite the function documentation saying that CBOR undefineds became JSON nulls. Which they did. But when we converted QJson{Array,Object} to be backed by CBOR classes, that Undefined meant the insertion into the array/object actually deleted the entry. [ChangeLog][JSON] Fixed a regression from 5.14 that caused values of default-constructed QVariants in QVariantLists, QVariantMaps and QVariantHashes to disappear when converting to JSON via fromVariant{,List,Map,Hash}. Fixes: QTBUG-84610 Pick-to: 5.15 Change-Id: Ic0987177fe463f352db9bd84993f116e2bdacc75 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPointingDevice: Parent the default mouse to QCoreApplicationUlf Hermann2020-06-241-1/+2
| | | | | | | Otherwise it will leak. Change-Id: I1c522dace0139dac3e626399963f58c56f052aba Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPair: add a check that SB works as expectedMarc Mutz2020-06-241-0/+51
| | | | | | | | | | We have no doubt it does, because it's compiler-synthesized, but we might want to implement the tuple protocol for QPair in the future and then this will act as a safety net, emulating what users are currently already doing with QPair. Change-Id: Ie37f0214bb1aa64210d25be8a256606f4572febe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* pro2cmake.py: Parse qmldir import statements with versionsUlf Hermann2020-06-241-3/+6
| | | | | | | | | | | | You can write the following in a qmldir file these days: import QtQuick auto import QtQml 2.4 pro2cmake should understand and convert these to cmake. Change-Id: Ica1728de0c8d7a0b2b5aa341d20e60b23dfa7fe1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* forkfd/linux: add support for RISC-VAndreas Schwab2020-06-231-1/+1
| | | | | | Pick-to: 5.15 Change-Id: I758a401abd6851839908e09aec51edbe4aa95925 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* forkfd/linux: handle failure from sys_cloneAndreas Schwab2020-06-231-0/+2
| | | | | | Pick-to: 5.15 Change-Id: I98a28a816fdc089cefcbf8f42053ddffedc10cdf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix living QLibrary member after shutdown of QCoreApplicationMike Achtelik2020-06-231-1/+19
| | | | | | | | | | | | LibResolv uses a QLibrary which is a QObject that must be deleted if the QCoreApplication is being destroyed to release the underlying library. A Q_GLOBAL_STATIC won't release any memory and is not able to manually release it. Pick-to: 5.15 Task-number: QTBUG-84234 Change-Id: I97fe5faca309e9c1e85435f602ad7f8c3f633b48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use ranged for loops in place of foreach in QTimeZone testsEdward Welbourne2020-06-238-13/+15
| | | | | | | | | This (and use of Q_SLOTS for the test slots) makes it possible to enable QT_NO_KEYWORDS and QT_NO_FOREACH in all the corelib/time/ tests. Change-Id: I85fd358f3d1a72c9269d5260d0224640c1751f2d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Raise the Android SDK build requirement to lvl 28 - compile fixAlex Blasche2020-06-232-2/+2
| | | | | | | | | | | | | | | First of all cmake and qmake used a different standard. Secondly, the qmake logic enforced lvl 23 (if it was installed which is the case on the failing machine). When this is combined with f71a400bf61 which requires lvl 28 API to build, the android build fails to compile. cmake logic was even worse as it enforced lvl 21 API to be used if installed. This change requires pick to 5.15 as f71a400bf61 was picked as well. Pick-to: 5.15 Change-Id: I89a7193b711b8bf927d02907343a49d6f27082ce Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use QList instead of QVector in uic testsJarek Kobus2020-06-231-2/+2
| | | | | | Task-number: QTBUG-84469 Change-Id: I2d3a8e7eb7094844544e841145fa5d2de8c66adb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Example: Connect to correct slotPaul Wicking2020-06-231-1/+1
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-85009 Change-Id: Id4db9a20e6c92ae86c764abb723fbe4ad426f2f8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Allow specifying custom configure.cmake file for moduleAlexandru Croitor2020-06-231-1/+4
| | | | | | | | | | | This is required for qttools, where the configure.cmake file lives in the top-level source dir, but the module is in src/global. The new CONFIGURE_FILE_PATH option allows specifying a different location for the configure.cmake instead of the default value. Change-Id: I260d7c93dd49337ebe07ae4cc871394da9e9c2c6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add a warning and tidy some triviaEdward Welbourne2020-06-231-8/+3
| | | | | | | | | | | | | An attempt to setSpec(TimeZone) gets treated as setSpec(LocalTime), as the method has no parameter to carry *which* zone; this was done silently, but should be brought to the caller's attention. So warn. Moved a declaration closer to its use, folded an if/else into a single assignment using ?: and removed a fatuous \fn just before the function it desribed. Change-Id: Ia35c87e0ba373675d3ae1e6ef3bf05016c06c48d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Save DST status when computed for a mutable QDateTimeDataEdward Welbourne2020-06-231-0/+1
| | | | | | | | | | Most calls to localMSecsToEpochMSecs() happen from functions that can't save the DST status it repots (due to the data being const); but refreshDateTime() can and (given its name) clearly should. Pick-to: 5.15 Change-Id: Ib53c88d2233925da275f0ac52f768cada92c5d2d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QList instead of QVector in examplesJarek Kobus2020-06-2382-158/+156
| | | | | | Task-number: QTBUG-84469 Change-Id: Id14119168bb1bf11f99bda7ef6ee9cf51bcfab2e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* CMake: Fix include paths for AUTOMOC when using frameworksAlexandru Croitor2020-06-231-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qml app was crashing when used by qtdeclarative auto tests. It complained about unregistered QML types. qmltyperegistrar didn't create registration info for these types. moc didn't output class info about these types because the build system didn't provide the proper include paths. In qmake land, moc was given 2 sets of paths when building a module: the non-installed framework dirs as -F flags, and also the $repo_build_dir/include paths as regular -I flags. In CMake land we only gave include paths to the non-installed framework dirs as -I flags, not -F flags. That's because AUTOMOC checks for a specific pattern in the include paths to transform them into framework include paths (existence of Foo.Framework/Headers symlink), and we didn't pass such an include path. Make sure to mimic what qmake does, and pass -I flags to $repo_build_dir/include as public include paths, but only via BUILD_INTERFACE aka when building Qt itself. Also pass -F flags by specifying framework include paths in the pattern that AUTOMOC expects. Fixes the following qtdeclarative tests tst_qdebugmessageservice tst_qqmlinspector tst_qqmlenginedebuginspectorintegration tst_qqmlpreview Task-number: QTBUG-84886 Change-Id: Iab9693d9889bf6d2c40fed067ab9b9da8683a053 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix living QObject member after shutdown of QCoreApplicationAndré Klitzing2020-06-231-2/+19
| | | | | | | | | | | | | | QHostInfoLookupManager has a QThreadPool as member. QThreadPool is a QObject and must be deleted if the QCoreApplication is being destroyed to release the underlying ThreadData. A Q_GLOBAL_STATIC won't release any memory is not able to manually release it. Pick-to: 5.15 Task-number: QTBUG-84234 Change-Id: I96be4601c3af38fa7c753a6f7acb8273ee277a27 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Simplify QSqlResultPrivate::fieldSerial()Andy Shaw2020-06-231-15/+1
| | | | | | | | | | Now that the bound values are kept in placeholder order we can depend on that and not have to ensure that fieldSerial() would give us something that is in alphabetical order should it end up being sorted. Change-Id: I3a3e443bef150a06f455e18e3502235b1ae4d242 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QString: add char8_t overload of fromUtf8()Marc Mutz2020-06-236-1/+28
| | | | | | | | | | | | | Use the overload-with-template trick from P1423 to avoid ambiguities when existing callers pass 0 or nullptr. Add a qdoc-ignored macro to hide the fact that the overload is a template. [ChangeLog][QtCore][QString] Added char8_t overload of fromUtf8(). Change-Id: Iaa2d365bfa161ef36cc73fa3bad50aabf34d01db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix living QObject after shutdown of QCoreApplicationAndré Klitzing2020-06-232-4/+11
| | | | | | | | | | | | QThreadPool is a QObject and must be deleted if the QCoreApplication is being destroyed to release the underlying ThreadData. A Q_GLOBAL_STATIC won't release any memory is not able to manually release it. Pick-to: 5.15 Task-number: QTBUG-84234 Change-Id: Ia82bcff2b564b753ed687f025ff86fa1bed1e64c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCborMap: remove the optimization not to detach from non-const find()Thiago Macieira2020-06-232-8/+66
| | | | | | | | | | | | | | | | | All our tests were find() == end() or !=, which depends on the evaluation order of the arguments to operator==(). If end() is called first, then the detach happens before find() and all is well. But if find() is called first, it may return end() before end() detaches. [ChangeLog][QCborMap] Fixed a bug that could cause the iterator returned from a failing key search with find() not to match end(). Now, every call to find() will detach in shared QCborMaps; to avoid this, use constFind() and constEnd(). Fixes: QTBUG-84583 Pick-to: 5.15 5.12 Change-Id: I552d244076a447ab92d7fffd161793496a8d03a8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QMimeDatabase/zlib: fix build with z_const macro emptyThiago Macieira2020-06-231-1/+1
| | | | | | | | | | | The next_in pointer in z_stream is defined as "z_const Bytef *" but z_const is actually an empty macro in most builds. Since our data is read-only constexpr, we need this const_cast to compile. Fixes: QTBUG-84457 Pick-to: 5.15 Change-Id: Ied637aece2a7427b8a2dfffd1612a01ae46f7c1a Reviewed-by: David Faure <david.faure@kdab.com>
* Prospective fix for trying to build FontConfig on WindowsFriedemann Kleint2020-06-223-3/+7
| | | | | | | | | | Strawberry Perl has been found to ship a libfontconfig. Change the exclusion to win32. Fixes: QTBUG-85184 Change-Id: Ic953ba3226c275a204720ff83161fba138eae0cb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QVarLengthArray: add missing move special member functionsMarc Mutz2020-06-224-15/+150
| | | | | | | | | | | | | | | | A QVLA is copyable, so it should be movable, too. Added a helper function a la P1144's uninitialized_relocate_n to deal with the QTypeInfoQuery stuff. This way, the code is re-usable everywhere it's needed. The same cannot be said for QArrayDataOps, which only a parent can love... [ChangeLog][QtCore][QVarLengthArray] Added missing move constructor and move-assignment operator. Task-number: QTBUG-39111 Change-Id: If0dc2aa78eb29062d73dcd3dc4647ba345ae39e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QList instead of QVector in mocJarek Kobus2020-06-225-59/+75
| | | | | | Task-number: QTBUG-84469 Change-Id: Id95a656e6277a7c348c02c3267a45ac176c1643b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use QList instead of QVector in concurrent testsJarek Kobus2020-06-223-21/+22
| | | | | | | Task-number: QTBUG-84469 Change-Id: Ia8113ef044a918e46176bfa3f4b34781dc69dd03 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Use QList instead of QVector in moc testsJarek Kobus2020-06-221-90/+58
| | | | | | Task-number: QTBUG-84469 Change-Id: I6a775b32a82658485216a4827a43503b395161c6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use QList instead of QVector in uicJarek Kobus2020-06-226-162/+162
| | | | | | Task-number: QTBUG-84469 Change-Id: I2ce8ca51409c8e29a84d88bdda968e6dec419bea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use global share context in QRhiGles2Jüri Valdmann2020-06-221-0/+4
| | | | | | | | Needed for using native textures in WebEngine. Task-number: QTBUG-78682 Change-Id: I8458b17767bb992357064d85f159781ea24e61dc Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Avoid Freetype synthesizing for large font sizesEirik Aavitsland2020-06-221-1/+1
| | | | | | | | | | Freetype's fake emboldening does not give good results for large font sizes. Pick-to: 5.15 Fixes: QTBUG-84570 Change-Id: I1a7722c1482e3450e5a549c31c9766d930fcd13a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove confusing comment in CoreText font engineEskil Abrahamsen Blomfeldt2020-06-221-1/+0
| | | | | | | | | | The comment says we don't need synthetic italic for oblique, but synthetic italic actually *is* oblique, since there is no way to synthesize italic. So just remove the comment as it is unclear what its purpose is. Change-Id: I72f727b958e817e376d73f6c001d410a5f55a152 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Enable access to the VAO resolvers through QOpenGLContextPrivateGiuseppe D'Angelo2020-06-225-37/+62
| | | | | | | | | | | | | | | | | | | This is a commit in preparation for an upcoming change in QtQuick. We want to store the resolved functions for managing VAOs somewhere; the "least worst" choice is next to the all other function resolvers, which are in QOpenGLContext(Private). To avoid moving the VAO resolvers themselves, leave a hook in QOGLCPrivate, similar to e.g. the texture function resolvers. The hook gets populated when the VAO resolvers for a given context are requested. This removes memory management burden from the users of those functions (again, just like other function resolvers), and makes the initialization of the functions automatic. Change-Id: I0eba30a85bf8ad82946a5d68e91009d8b4bd91cf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QNAM: Make QNetworkConnectionMonitor able to move to another threadMårten Nordheim2020-06-224-14/+51
| | | | | | | | | | | | | | | | | Requires moving construction and destruction of the IConnectionPoint (contained in QNetworkListManagerEvents contained in QNetworkStatusMonitorPrivate) and the calls to CoInitialize and CoUninitialize to start()/stop() so it can be taken down and brought up in a reasonable way. Partial squashed cherry pick of bde6b27882143acbafa8c0b2e8055c3808ae3dd4 and the following fixup patch 84be436ef0f8253af87cdd2742858107e54c228b. Task-number: QTBUG-84031 Change-Id: I9d644261c6c730ea511e28d75da91bd34504bd03 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit bde6b27882143acbafa8c0b2e8055c3808ae3dd4) (cherry picked from commit 84be436ef0f8253af87cdd2742858107e54c228b)
* QSslSocket: remove certificate-related settersTimur Pocheptsov2020-06-225-214/+14
| | | | | | | | | | They were deprecated with replacements in QSslConfiguration proposed (and some without alternative, which we'll provide if there is any demand in such an API). Special thanks to M.N. for a nice hint on how to amend the test without introducing a new API. Change-Id: I7841a5b3f30469d8204b61cb65921c34275e0650 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Replace "no devices registered" warnings with qCDebugShawn Rutledge2020-06-223-13/+12
| | | | | | | | | | The idea was to keep nagging us to update all the platform plugins to do device registration. But besides being annoying, it would cause test failures if we start adding QTest::ignoreMessage() all over, and then some platforms start doing device registration properly. Change-Id: Ia0fbb64cf86f33532be032ec9eebe6e4ad607f20 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use QList instead of QVector in QtConcurrentJarek Kobus2020-06-225-5/+5
| | | | | | | Task-number: QTBUG-84469 Change-Id: I99e41c1fef5459d7358b20a97a1dbefcd43bb4e5 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>