summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove last remaining bits of QtPlatformHeadersTor Arne Vestbø2020-08-0444-696/+37
| | | | | | Task-number: QTBUG-84220 Change-Id: I951e04bfe9358a99951d1d61ff47b675584b7f81 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove QWaylandWindowFunctionsTor Arne Vestbø2020-08-043-99/+0
| | | | | | | | | | | The subsurface sync/desync functions were unimplemented on the qtwayland side, so this is all dead code. We will introduce the platform interfaces if an actual use-case with an implementation comes up. Task-number: QTBUG-84220 Change-Id: I921ee7262e5f0a7171058aaf0ff2102d9e6f438e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add qHash implementations for QRect and QSizeShawn Rutledge2020-08-042-0/+12
| | | | | | | We need them to implement qHash for QQuickPixmapKey. Change-Id: Ia67de25ec0068b9e1b889bc9c6ee077e24eb71a8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce swap functions for QPromise/QFutureInterfaceAndrei Golubev2020-08-034-15/+35
| | | | | | | | | | Made QPromise::swap public, added free standing swap() for QFutureInterface and QPromise. Updated QPromise special member functions. Extended tests Task-number: QTBUG-84977 Change-Id: I5daf6876df306d082441dbcdf5ae4dee3bfc0ead Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Doc: Document QGradient::Preset enum valuesTopi Reinio2020-08-031-1/+170
| | | | | | | | Pick-to: 5.15 Fixes: QTBUG-85749 Change-Id: Ie77145e851ff64d4c88fce7211135d66e9b94a84 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Android: Install the qmldir files when configuring for a single abiAndy Shaw2020-08-031-1/+1
| | | | | | | | | | | This amends 0ef46b41d86b9fad4fc4a18bd577d208afa1fce8 to ensure the new configuration is styled correctly for qmake. Task-number: QTBUG-80938 Change-Id: Iebfff3ff0570d2e92d01d4eb1178c0d6261468f9 Pick-to: 5.15 Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix doc signature in QOpenGLContextLaszlo Agocs2020-08-031-1/+1
| | | | | | | | | Just T makes qdoc's clang parsing fail, it needs template<typename T>. Also, the return type is T*, not T. Change-Id: I210676aff3122b432888c3d79d9967e249ac88e1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add more doc fixes for Vulkan typesLaszlo Agocs2020-08-031-0/+3
| | | | | | | | Add dummy typedefs just for qdoc, this way the types show up in the generated docs. Change-Id: I408eeb5c4c1cbbb8cd7df8ca3c9c6b7c64b0ca88 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Do not skip the initial SetCrtcLaszlo Agocs2020-08-031-8/+3
| | | | | | | | | | | | | | Trying to be clever seems to cause issues on some systems, for example AMD (RADV) on Ubuntu 20.04 gives totally garbled output by default. Remove the undocumented ALWAYS_SET_MODE env.var. as well, it won't have much of a purpose since we'll in effect hit the SetCrtc path always now once on startup. Change-Id: Ibaa463ff913eb0c1251d6d3435aa4799fe5c8a29 Fixes: QTBUG-85797 Pick-to: 5.15 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: Prevent printing a warning in every widget-based appLaszlo Agocs2020-08-031-5/+1
| | | | | | | | | | | | Attempting to reflect reality with the value of AA_ShareOpenGLContexts was a valiant attempt, but it is not possible to do setAttribute without getting a warning now once QGuiApplication is constructed. So just leave the attribute as is, changing its value is not strictly required. Fixes: QTBUG-85796 Pick-to: 5.15 Change-Id: I0f0f981bb4883856b216b2a9aad3b5bf2d7da01a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Move-enable QByteDataBuffer::{append,prepend}Mårten Nordheim2020-08-011-2/+26
| | | | | Change-Id: I2fd342465475e3a694c8459a54957149f8b418a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList: Add a append(QList &&) overloadMårten Nordheim2020-08-012-0/+64
| | | | | | | | We already had append(const QList &) and now there's an overload taking an rvalue reference. Change-Id: Id2fbc6c57badebebeee7b80d15bb333270fa4e19 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix undefined use of memcpy and memcmpAllan Sandfeld Jensen2020-07-314-9/+17
| | | | | | | Don't call them on a nullptr, even with a length of 0. Change-Id: I7fee23303562e5771697a16365cae12e3e87af6f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Try again to fix Clang's -Wconstant-logical-operand warningThiago Macieira2020-07-311-0/+7
| | | | | | | | | Commit daaa55725969aed87665c366d7cc96304c4e5f4c changed the enum to bool, but the warning is still happening. Pick-To: 5.15 Change-Id: Ibdc95e9af7bd456a94ecfffd1603f332a356c788 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSharedPointer: do allow calling deleters on null pointersThiago Macieira2020-07-312-11/+15
| | | | | | | | | | | | | I don't know why std::shared_ptr allows this, but why not. [ChangeLog][Important Behavior Changes] QSharedPointer objects will now call custom deleters even when the pointer being tracked was null. This behavior is the same as std::shared_ptr. Fixes: QTBUG-85285 Pick-to: 5.15 Change-Id: I24006db8360041f598c5fffd161c260df0313b55 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QString::vasprintf: fix 't' modifier for integers on 64-bitThiago Macieira2020-07-311-2/+5
| | | | | | | | | | | | | ‘t’ Specifies that the argument is a ‘ptrdiff_t’. This modifier was introduced in ISO C99. We use qsizetype, which is the same width as ptrdiff_t, so it makes no difference in va_arg(). Change-Id: Iea47e0f8fc8b40378df7fffd16255730109413a5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove deprecated binary json featureEdward Welbourne2020-07-3119-2075/+4
| | | | | | | | | Deprecated in 5.15 in favor of CBOR. Fixes: QTBUG-81239 Change-Id: I711d4bd7dd1247f58e77ac9fa53304cbe5028918 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Document that keys() and values() run in linear timeMitch Curtis2020-07-313-0/+28
| | | | | | | | | | | | keys() and values() can be slower for large containers. I ran into this recently when profiling, and was surprised that keys() had to build the list of keys (by appending in a loop). Pick-to: 5.15 5.12 Change-Id: I73215f5a917790236704ad7ef78cefc4a049cd89 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build with MSVC2019Mitch Curtis2020-07-311-0/+13
| | | | | | | | | | | | | | | | | The error was: src\virtualkeyboard\qvirtualkeyboardinputcontext_p.cpp(305): error C2678: binary '!=': no operator found which takes a left-hand operand of type 'QList<QInputMethodEvent::Attribute>' (or there is no acceptable conversion) This patch fixes the issue by manually defining an operator== for QInputMethodEvent::Attribute. Change-Id: Idb283cf7b6ff4388a38ea7780c3d5c1c5f77038d Fixes: QTBUG-85789 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add float->qfloat16 rounding and fix the testsAllan Sandfeld Jensen2020-07-311-2/+14
| | | | | | | | | | | | Our hardware optimized conversions of float to qfloat16 rounds to even where our table based conversion truncated to zero. The rounding is not in this patch exactly round to even like the hardware implementation but much closer. Change-Id: I4c5e72c15fef9079d3660680b2727ff7ba4e768a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rhi: QRhiGLes2::gatherUniforms fix gathering in structPaul Lemire2020-07-311-1/+2
| | | | | | | | In the case we don't have an array of structs, structPrefix needs to be suffixed with a dot to get the proper uniform names. Change-Id: I50ed54c2f7c3cc4556ed1854419bc4fe3a2989f7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QtCore: Use system-wide libb2 if presentLinus Jahn2020-07-317-19/+76
| | | | | | | | | | | | This adds the option to build Qt with libb2, which is especially recommended, if you care about the performance of the BLAKE2 hashing algorithms. The bundled version is the pure reference C implementation of BLAKE2, while libb2 has many additional hardware optimizations. However, the API of both is the same, so no changes to the code were necessary here. Change-Id: I3563982f4e07be300291fe103c38b16a404b3ebb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QCryptographicHash: Add BLAKE2b and BLAKE2s hashing algorithmsLinus Jahn2020-07-313-2/+92
| | | | | | | | | | | | | | | | | | | | BLAKE2 does not specify requirements about specific hash sizes and since QCryptographicHash does not support dynamic hash sizes, only the most common hash sizes could be covered by this. The supported hash sizes were chosen to match the ones supported by the Linux kernel. The new hashing algorithms for QCryptographicHash are: * BLAKE2b (160 bit, 256 bit, 384 bit, 512 bit) * BLAKE2s (128 bit, 160 bit, 224 bit, 256 bit) [ChangeLog][QtCore][QCryptographicHash] Added BLAKE2b and BLAKE2s hashing algorithms. Fixes: QTBUG-78198 Change-Id: Id9e0180a974093982fdf1cdd6180988a2e5e9f4f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 3rdparty: Add reference C implementation of BLAKE2Linus Jahn2020-07-316-0/+1436
| | | | | | | | | This is required for adding support of the BLAKE2 hashing algorithms in QCryptographicHash. Change-Id: Icc981c3a99a2713fdd1c18766b05619254650622 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make initStyleOption virtual for various classesThorbjørn Lund Martsum2020-07-3127-23/+39
| | | | | | | | | | | | | | | | | | | | Often a simple change in the styleoptions is needed in e.g a paintEvent, but it was impossible without copying the whole paint-function which is not always trivial and also wouldn't be kept up-to-date if it was changed in Qt. The initStyleOption is similar to viewOptions in QAbstractTableView and it is handy that this function is virtual. Furthermore QStyledItemDelegate::initStyleOption is already virtual. This change only makes initStyleOption virtual for public classes. [ChangeLog][QtWidgets] InitStyleOption has been made virtual in public Qt classes to make override of stylebehavior more simple. Change-Id: I38974c6d4dd0793ca5976ecf3aa28892215a1579 Task-number: QTBUG-77642 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QFileSystemModel: make sure files are stat'ed in the worker threadVolker Hilsheimer2020-07-313-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | QFileInfoGatherer creates QFileInfo objects in the worker thread to offload the work from the UI thread, but it never calls any methods on the QFileInfo objects that would trigger a stat'ing of the files. For large directories on remote file system, that easily results in the UI thread being blocked for a very long time. Add a private 'stat' method to QFileInfo which allows forcing it to stat all attributes from the worker thread, and make QFileInfoGatherer a friend so that it can call the function from the worker thread. This way, QFileSystemModel can access the cached data for each QFileInfo object, without having to touch the file system from the UI thread. Also reduce the amount of signal emissions for drive information, batch all drives (which can safely be assumed to be at most a two digit figure) into a single emission instead. Change-Id: Ifdcae150406187db9984d0fec9add93597b5f85b Fixes: QTBUG-41373 Pick-to: 5.15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-3149-121/+123
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* CMake: Regenerate load(qt_app) projectsAlexandru Croitor2020-07-313-6/+15
| | | | | | | To use the new qt_internal_add_app function. Change-Id: I9776ce18c3a8b01f1a42e8da346cfd0a98374ef8 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Introduce qt_internal_add_appAlexandru Croitor2020-07-311-1/+1
| | | | | | | | | | | | | | | This new function is meant to be used where load(qt_app) is used. It delegates functionality to qt_add_executable, while handling some additional behavior via a finalization function (mostly handling of macOS Info.plist files and icons, as well as Windows icons and resource files) It uses a new PlatformAppInternal interface target. Task-number: QTBUG-85757 Change-Id: I1a2d5851b137fcd4a6323e0e06fb154f91619800 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Regenerate projectsAlexandru Croitor2020-07-313-3/+5
| | | | | Change-Id: Iac12acd07513e790e531ae93366fdae70c1c61a5 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Expose QMetaTypeInterface::alignof in QMetaTypeFabian Kosmale2020-07-312-2/+24
| | | | | | | | | | We already have the information in the QMetaTypeInterface, and provide functions to access sizeof. Adding alignof support seems natural, and should make it easier to handle over-aligned types. This should also be helpful in QVariant. Change-Id: I166be76f4b7d2d2e524a3a1e513bd2f361e887c1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix warning in QStringView::compare(QChar) on qsizetype->intThiago Macieira2020-07-301-1/+4
| | | | | | | | | | | | | | | | | | size() - 1 is converted to int as the result, but size() is a qsizetype and could be bigger than INT_MAX. So rewrite to not depend on the cast. This was introduced on b2f79cceb11dfd15ac9eea631bc18ad6b036eb91. I could have replaced size() - 1 with int(size() > 1) - 1, but that's even more complex. To simplify, I split the function in two while retaining the C++11 constexpr requirements. Bonus: removes the use of the ambiguously-named "empty()" function that looks like a verb. Fixes: QTBUG-85665 Pick-to: 5.15 Change-Id: Ieffc3453b88c4517a1dbfffd162338fdb084a376 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QLocale: update qt_asciiToDouble to use qsizetypeThiago Macieira2020-07-312-13/+19
| | | | | | | | No need to change the output variable from int to qsizetype. That would complicate the use of libdouble-conversion, which uses ints. Change-Id: Iea47e0f8fc8b40378df7fffd1624bfdba1189d81 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Be clearer about the locale-aware comparison QString supportsEdward Welbourne2020-07-301-95/+61
| | | | | | | | | | | | | | | | The docs didn't make clear that there's a case where a rather poor locale-aware compare may be in use - which turns out to be in use on Android. In the process, stop duplicating (in two slightly different variants) the same paragraph in many places when we can use a \sa to refer to a sub-section of the class doc. Pick-to: 5.15 Task-number: QTBUG-63518 Change-Id: I5a41b0a269e477e74236131310992e70462734d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Document run-time acceleration of using the conversions functionsAllan Sandfeld Jensen2020-07-301-0/+10
| | | | | | Pick-to: 5.15 Change-Id: I985b93135b9d8fdfdd64e9183b23cbf8a7b4e3eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix no-PCH build on Apple platformsTor Arne Vestbø2020-07-291-0/+1
| | | | | Change-Id: I5257af8079e6b2f26893d1bc44adb48ad4a1684b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Register QPlatformBackingStoreOpenGLSupport when neededTor Arne Vestbø2020-07-295-13/+15
| | | | | | | | | | | | Static builds can not rely on a constructor function in the QtOpenGL library, as that will be linked out unless something in the application pulls it in. Instead we export a helper function that clients that depend on OpenGL support in QPlatformBackingStore can use to bring it it. Change-Id: Ic54058bf413a476287884c78df5624b862f97695 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QFileInfo: Fail faster when stat'ing filepath on a disconnected driveVolker Hilsheimer2020-07-291-6/+8
| | | | | | | | | | | | | The Windows implementation of QFileSystemEngine tries hard to fill the metadata for a file, even if GetFileAttributesEx returns with error. This is good in many situations, but when the error code indicates that the drive on which the file resides has been disconnected, then we should fail quickly. Task-number: QTBUG-6039 Pick-to: 5.15 Change-Id: I7574c5a2e524e913306d0b470b4f227416442c13 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QEventDispatcherWin32: redesign event notifiers activationAlex Trotsenko2020-07-293-78/+66
| | | | | | | | | | | | | | The previous implementation multiplexed callback-based event notification into a single proxy event (cf. 85403d0af), which was in turn object-waited for (this was the case since the beginning of public qt history). It makes more sense to multiplex into a posted message, because that also works with foreign event loops that do not know anything about our event objects. Task-number: QTBUG-64443 Change-Id: I97945ac8b5d7c8582701077134c0aef4f3b5a18f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Revert "Add missing override" for 3rdparty vk_mem_alloc.hAlexander Volkov2020-07-292-70/+73
| | | | | | | | | This partially reverts 9bad3508fccb058261d47e023400868147f2d733. Disable -Wsuggest-override for gcc when including the header instead. Change-Id: Id2507ce731da62bbd64aa6477b181735ba62adc1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add proper dependencies for doc snippetsTor Arne Vestbø2020-07-291-0/+4
| | | | | | | | On iOS the plugin is statically linked into the app. We need to wait for the plugin library to build before we can build the snippets. Change-Id: I79c89c5615f16d63a46c25481c9a40bf2b4a7eaa Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* iOS: Add Metal framework as dependencyTor Arne Vestbø2020-07-293-1/+3
| | | | | Change-Id: I7d8d8cef8252a65378b24af1ade87bb484d5fa68 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QOperatingSystemVersion support for macOS Big SurTor Arne Vestbø2020-07-297-114/+144
| | | | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ide57f675b20b08210f301da5177df45d008423c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix build of testlib doc snippetsTor Arne Vestbø2020-07-291-2/+1
| | | | | | | | The file src_qtestlib_qtestcase was built twice, causing duplicate main symbols Change-Id: I18750b87eee27603d9f56129fd6c30fddf4a4828 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Windows: Prevent event processing during QDesktopServices::openUrl()Friedemann Kleint2020-07-291-4/+24
| | | | | | | | | | | | The platform implementation uses the Win32 API ShellExecute(), which may spin an event loop to do COM processing, causing things like QMetaCallEvent being processed. Run it in a thread to suppress this. Pick-to: 5.15 Fixes: QTBUG-85676 Change-Id: I240ca78b41b39ded22e466662ffce8e9b03c10a2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* wasm: fix setTransferTimeoutLorn Potter2020-07-294-6/+8
| | | | | | | | | | WebAssembly does not need the http feature, but these functions were hidden behind that feature. Fixes: QTBUG-83867 Pick-to: 5.15 Change-Id: I7cd9aa73003f45ccbc2613c67c21e4067d6edddd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix network headers logicLorn Potter2020-07-291-6/+8
| | | | | | | Fixes: QTBUG-85083 Pick-to: 5.15 Change-Id: Iaf0f3365ee20fe257f3edac0e1105bdfcc5ba0da Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Make qfloat16 helper functions consistent with float/double versionsAllan Sandfeld Jensen2020-07-281-5/+5
| | | | | | | | | | Infinite is only when the mantissa is 0, everything else is NaN. std::isnormal returns false on zero. Pick-to: 5.15 Change-Id: I897fc0dc3b8a9c557bb1922ea7ca8df501e91859 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocale: fix conversion of "\0" to doubleThiago Macieira2020-07-281-1/+1
| | | | | | | | That is not a valid conversion. An empty string is a valid conversion; a string containing a null should fail. Change-Id: Iea47e0f8fc8b40378df7fffd1624c088f3bd1b14 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QLocaleData: remove unused internal functionThiago Macieira2020-07-282-13/+0
| | | | | | Pick-to: 5.15 Change-Id: Iea47e0f8fc8b40378df7fffd1624bf3469e66c90 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>