summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MSVC: remove the extern templateThiago Macieira2020-08-054-79/+52
| | | | | | | | | | | | The problem was that QtCore exported those classes deriving from containers, which caused applications to try and import those same functions from QtCore, depending on whether they saw the #include or not. Now we don't need the hack anymore. Change-Id: I0a103569c81b4711a649fffd14ec9282454a1fdc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* xcb: avoid a usage of invalid reply in qxcbdragLiang Qi2020-08-061-4/+5
| | | | | | | Fixes: QTBUG-83446 Pick-to: 5.15 Change-Id: I1f148c611dcab6cad951ddd934072933fef75452 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make use of QDecompressHelper for HTTP downloadsMårten Nordheim2020-08-057-141/+69
| | | | | | | | | | Changes are not too big for now. Just replaces use of the previous calls to the zlib decompression function. And initialize QDecompressHelper when we know the content-encoding. Task-number: QTBUG-83269 Change-Id: I41358feaef2e7ac5f48f14e3f95ec094e0c110b7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CMake: Don't build debug tools by default in debug_and_release buildsJoerg Bornemann2020-08-052-0/+10
| | | | | | Fixes: QTBUG-85411 Change-Id: Idd9664d1a9143c31f28549a72823a82df1cff7ec Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QAuth.: Reset the nonce-count when the server requests using a new nonceMårten Nordheim2020-08-051-1/+3
| | | | | | | | | | | | Some servers have an upper limit on how many times a nonce can be reused. Because the nc was not being reset the server would get a high nc and would close the connection. Change-Id: I71d5a316f79777a45c7323d93e28b3845aefcfad Original-patch-by: Benjamin Reikowski Pick-to: 5.15 Fixes: QTBUG-85729 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* wasm: factor visual viewport scale into dprMorten Johan Sørvig2020-08-052-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | By default, mobile browsers create a (layout) viewport much wider than the visual viewport in order to be compatible with web pages created with desktop browsers in mind. This means that the default view is zoomed out. This zoom is not reflected in window.devicePixelRatio, and Qt ends up setting the canvas render size to be larger than actually needed. The window.visualViewport.scale property reflects this “mobile” zoom level: add it as a devicePixelRatio factor. (The value will be less than 1 when zoomed out). User pinch-to-zoom may change the zoom level and resize the visual viewport; install a resize handler as well. For now we limit the devicePixelRatio value in order to avoid creating gigantic backing store images - this is something we can revisit later on. Pick-to: 5.15 Task-number: QTBUG-85662 Change-Id: I96db6121fe17a6c213216e04e4724efc93a9b66a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: set viewport size to device size on mobileMorten Johan Sørvig2020-08-051-1/+8
| | | | | | | | | | | | | | | | | This is a good default, and also works around a couple of current bugs in the Qt implementation. (Applications can change the default values in the .html file as needed.) Change body height to 100% of the visual viewport (“100vh”) to make the html body cover 100% of the viewport after landscape -> portrait transitions on iOS. Pick-to: 5.15 Task-number: QTBUG-85536 Task-number: QTBUG-85662 Change-Id: Iced1aee03940361c96f1fe3c104f3e6eb983cb90 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* XCB: Update logical DPI on “Xft/DPI” changeMorten Johan Sørvig2020-08-051-0/+14
| | | | | | | | | | Install XSettings property change callback on the “Xft/DPI” property. Update QxcbVirtualDesktop::m_forcedDpi and QScreen logicalDPI on change. Pick-to: 5.15 Change-Id: I578ebe9017fee58acd7a5c432cbd614fd35f2f55 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Establish baseline for QIcon test on dpr > 1Morten Johan Sørvig2020-08-056-26/+71
| | | | | | | | | | | | | | | | | | | | | | After enabling Qt::AA_UseHighDpiPixmaps, QIcon::pixmap() now returns pixmaps larger than the requested size on devicePixelRatio > 1 screens. Adapt tests to account for this changed behavior. Skip tests where it’s unclear what the the expected behavior is, or where the test logic does not apply to dpr > 1. This gives a clearer indication of where we are (39 passed, 0 failed, 9 skipped), and enables using the qicon test to catch regressions also when running at dpr > 1. Remove the "lowdpi" testcase flags from the qmake and cmake project files. Change-Id: Ia7ce722ae356fc496a91b54e9f5d590d13b9df62 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Teach QMacVersion to deal with 32-bit Mach-O headersTor Arne Vestbø2020-08-052-5/+3
| | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: I7946aa35722bc76326e2d6cf0820353c4ba13fad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Clear old triangulated vertex data when a path is completely clippedJoni Poikelin2020-08-051-1/+1
| | | | | | | | | | | Old data was held in buffers which caused OpenGL paint engine to re-render previous shape again with current settings if the current path was completely clipped. Pick-to: 5.15 Fixes: QTBUG-35513 Change-Id: I0cd448e0b18d199af11e82d79b1ab72d0f89c79e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* CMake: Don't use std=gnu++11 when building Qt internal targetsAlexandru Croitor2020-08-053-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic is a bit involved in qmake. The Qt internal qt_common.prf adds CONFIG += strict_c++ which applies to qt modules, qt plugins, qml plugins, qt helper libs, winmain and qt_apps, qt_tools, but NOT tests (which is important because the tests on Windows MinGW fail to build without the GNU extensions). Then default_post.prf checks for the strict_c++ value and either uses the strict or non-strict C++ standard flags. default_post.prf is loaded for all qmake projects, not just the Qt internal ones. Now CMake doesn't provide a transitive based option to disable C++ GNU extensions with a mechanism similar to target_compile_features. It only provides the CXX_EXTENSIONS property and it's associated CMAKE_CXX_EXTENSIONS variable. We can't set the variable at a directory scope, because that is too coarse grained. So we rely on setting the property via a function in every relevant qt_add_<target> function. Now the naming of the function is weird. We name the function as qt_internal_<...>, because it's not meant to be used by Qt users. We prepend an underscore to the name because we need to place it in Qt6CoreMacros, so that the function can be called by qt_add_qml_module which IS a public function. That's because in Qt5 load(qml_plugin) was private API, but in Qt 6 + CMake we decided to make qt_add_qml_module() as public API. Change-Id: Id014626b087d590e25cb46843f93d0c67fc36e44 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Tidy up unicode table generationEdward Welbourne2020-08-052-49/+43
| | | | | | | | | | Eliminate some needless parentheses, tidy up some spacing and indentation and split some long lines. Change first += after declaration to initializer. Change-Id: I05ff2a6337b7ed14e0a2dc9c03fc784c92b63515 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: fix NoSuchMethodException exception in QtActivity.javaAssam Boudjelthia2020-08-051-0/+124
| | | | | | | | | | | | | | Adding these method definitions because QtApplication might fail to find them. Change 80f7494e8a9f9a70e3b53833a098d74d8c2331d9 added few exceptions printStackTace(), the line src/android/java/src/org/qtproject/qt5/android/bindings/QtApplication.java#106 prints error of java.lang.NoSuchMethodException for these methods. Pick-to: 5.15 Change-Id: I63b1f0d3abd5a7fe7d9e87bbff252c437300722f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Privately introducing QDecompressHelper for network purposesMårten Nordheim2020-08-0520-2/+3027
| | | | | | | | | To support streaming decompression in QNAM. Will also be used to refactor existing decompression code in QNAM. Task-number: QTBUG-83269 Change-Id: Iecf3e359734163f15686c949f75d41fa4794a00e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Define unix platform interfaces also without openglSamuli Piippo2020-08-051-2/+2
| | | | | | | Fix build without opengl. Change-Id: I691fd4112d69b16690915fcf33f5ae30ca2d7a93 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QNX: adapt to new event APIsSamuli Piippo2020-08-051-9/+40
| | | | | | | | | | | Use the new event APIs and split the single mouse event into three separate events (move, press, release). QNX events only give us current state, deduce the pressed and released buttons by comparing to the previous state. Change-Id: I9e647922679ddb792b10cb5e6ceee7ede4878444 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* Fix compiler issues when qreal is floatMichal Klocek2020-08-055-6/+6
| | | | | Change-Id: Ide3b5a3b0f2d93708409edac8aa999eb25c3ab54 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix "rectange" typos in qtbaseOliver Wolff2020-08-054-5/+5
| | | | | | Pick-to: 5.15 Change-Id: If064fae5eaaeb2e53e3dd05cb9dc1cdf49ad1f04 Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
* Add an AES-based qHash function, inspired on Go'sThiago Macieira2020-08-041-0/+137
| | | | | Change-Id: I09100678ff4443e6be06fffd1481e94089c47799 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QDebug: add operator<<(const char16_t *)Thiago Macieira2020-08-043-10/+67
| | | | | | | | | | | Avoids the conversion from UTF-8 for uses that are not dumping a string. Mass conversion of Qt sources left for future opportunity. Fixes: QTBUG-85811 Change-Id: I4ca4a35b687b46c39030fffd1626ae6c3294cacf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QList: properly declare operator== for MSVCGiuseppe D'Angelo2020-08-041-16/+22
| | | | | | | | | | | | | | | | The operators were declared as friend function templates (so, free functions in the Qt namespace). Unfortunately, the template argument of the operators was also defaulted -- causing MSVC trying to instantiate those functions at all times, causing interesting recursive template instantiation errors (C2968). It's extremely likely that we're facing a MSVC bug, but work around it by not defaulting the template argument. This in turn requires to move the function definition outside QList's definition, otherwise an extern template definition (like the ones we have for QList<QPoint>) would cause a template redefinition error... Change-Id: If03477ac1fa0a72aa252bb9e08e2a19c2b517b1b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Document the changed semantics when passing arrays to QByteArray methodsSona Kurazyan2020-08-042-2/+20
| | | | | | | | | | | | | | | | | | | After adding QByteArrayView overloads of QByteArray methods that used to take char*, the way of determining the length of passed fixed-sized array data has changed, due to the QByteArraiyView's optimization to deduce the length at compile time for arrays. Document the behavior and add a changelog item. [ChangeLog][QtCore][QByteArray] When passing fixed size C arrays to QByteArray methods, the length of the data on which the method will operate is determined by array size, and not by scanning for the first '\0' terminator, as it was in Qt 5. Task-number: QTBUG-85815 Change-Id: I11cba17d428791e06c9bd4c7a727b7bd6b6aec3c Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Avoid possible ambiguities with QByteArrayView's comparison operatorsSona Kurazyan2020-08-041-8/+13
| | | | | | | | | | | | | | QByteArrayView's comparison operators are declared in the global namespace, which can collide with the ones declared for other types that are implicitly convertible to QByteArrayView (see the example attached to the bugreport). Changing them to be hidden friends will make them visible only when at least one of the operands is a QByteArrayView, so the ambiguity will be avoided. Fixes: QTBUG-85880 Change-Id: Ic3582269d9bda9a2105336ef0f044ea619af37ba Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSslSocket: remove a redundant forward declarationTimur Pocheptsov2020-08-041-1/+0
| | | | | Change-Id: I9a3b6ccc022a036fa82d429ad008adeabe46f4ce Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: use Q_DISABLE_COPY_MOVETimur Pocheptsov2020-08-046-6/+6
| | | | | | | | | We have several classes inheriting QObject (directly or not) and disabling copy (thus non-movable implicitly). Let's make them non-movable explicitly now. Change-Id: I509a066e9977480b30842afef26319b8afec6001 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Don't generate prl libs for Windows shared libsAlexandru Croitor2020-08-041-7/+15
| | | | | | | | | | | | | Windows shared library prl files should not have a QMAKE_PRL_LIBS section. Such information is not useful because it's not used by the linker as per 523c7e3fd55c853dd424d57f28e225d57439cf89 Amends 46d7abc9172f82756ccd3641a314dcc066353c3f Task-number: QTBUG-85240 Task-number: QTBUG-85801 Change-Id: Ic40491a568f72c507a16322f6f0c61f98d3a5913 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use %zd for size-type formatting in unicode table generatorEdward Welbourne2020-08-041-2/+2
| | | | | | | | | | Qt6 makes sizes qsizetype; and one of these was already sizeof()-sized. While qsizetype might not be ssize_t, it's at least no bigger, so we can safely use its format specifier, with a suitable cast. Change-Id: I433f654f6b139d74b4d5358b804b44ab1f0ada15 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix deprecation warnings (s/hex/Qt::hex/gw) in unicode table generatorEdward Welbourne2020-08-041-13/+9
| | | | | | | | Removed three warnings, rather than fixing them, as Konstantin Ritt tells me they've been redundant since Unicode 6 or so. Change-Id: I4507e852bceb08a0252c77a8b383aceac212aad9 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix compilation error in unicode table generatorEdward Welbourne2020-08-041-2/+2
| | | | | | | | | Don't include a QString::number() in a sum of QByteArray and C strings. Change-Id: I7544e835fcf5625b1fe1ee2055a48600200daafd Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNotifiedProperty: avoid crashFabian Kosmale2020-08-042-1/+30
| | | | | | | | | | | | We can end up in a situation where a (soon to be destroyed) observer is owned by a binding which is about to be deleted. If in that situation the binding is destroyed first, we end up with a dangling pointer and ensuing memory corruption. Instead, we now first transfer the ownership of the observer and only destroy the binding afterwards. Fixes: QTBUG-85824 Change-Id: I721c0319281ada981ae7896bd2e02e9a0cc901b8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compiler warning about qsizetype/int mismatchLars Knoll2020-08-041-1/+1
| | | | | Change-Id: I58624d8c5de0734bd0851e6744ed34c1408dfda6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Resolve SDK and deployment target OS from load commandTor Arne Vestbø2020-08-041-7/+25
| | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: Icce79186645f173b7f9be8ee6da0abed25cf3da0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix -Wshadow warningsGiuseppe D'Angelo2020-08-041-2/+2
| | | | | | | Turns out headersclean doesn't run on this header... Change-Id: Ice8691dc0b4b46b2bde38467ca398b61b569a769 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove InfoFlag from docsMichal Klocek2020-08-041-4/+7
| | | | | | | It seem to be a leftover after 4e400369. Change-Id: I1c12bfa70cb3716d5cd9d1306db23242b58f3096 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove last remaining bits of QtPlatformHeadersTor Arne Vestbø2020-08-0449-705/+46
| | | | | | 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>
* Remove const volatile qualifier on return type in testTor Arne Vestbø2020-08-041-6/+6
| | | | | | | | | | | | Fixes warning by Clang: warning: 'const volatile' type qualifiers on return type have no effect [-Wignored-qualifiers] const volatile unsigned long long * const volatile func_KVPKVull() {...} ^~~~~~~~~~~~~~~ Change-Id: Ia4aae6521c84f4a18d92ad5035af5b247d283140 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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-036-21/+59
| | | | | | | | | | 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-036-6/+6
| | | | | | | | | | | 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-012-3/+40
| | | | | Change-Id: I2fd342465475e3a694c8459a54957149f8b418a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList: Add a append(QList &&) overloadMårten Nordheim2020-08-013-0/+259
| | | | | | | | 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>
* Remove no-longer-applicable -Wno-error for GCCThiago Macieira2020-07-311-9/+0
| | | | | | | | | | | | We don't appear to have implicit fallthroughs in our code anymore. The last deprecated copies and redundant moves are also gone. The other warning never had an explanation and doesn't show up when building full Qt anyway. Change-Id: Iad959315ad374ef288f5fffd15d683599a1a11b9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>