summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Regenerate src/pluginsAlexandru Croitor2020-05-2920-156/+134
| | | | | Change-Id: Icceceeb42023e7fa5edf320bb21f03d11bd357b7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate tools and 3rd partyAlexandru Croitor2020-05-293-2/+11
| | | | | Change-Id: I38e065cddc954e8594a5dce823c3bb5385a8a1e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate src/openglAlexandru Croitor2020-05-292-5/+17
| | | | | Change-Id: I6a648c5fd2fa90e6e70d0ccffb34fd3cb1161e5e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate src/corelibAlexandru Croitor2020-05-292-4/+5
| | | | | Change-Id: I985f9cca78e173f066d65e704c101d499668163a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate src/guiAlexandru Croitor2020-05-292-71/+91
| | | | | | | | Remove the manual modifications, and let the script do its work and use the .pro file as the source of truth. Change-Id: I510d5487a326d72a9c19e8148ec1daac9a23394b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix UB in QGraphicsScene::wheelEvent()Lars Knoll2020-05-291-1/+2
| | | | | | | | | | | operator--() would iterate before begin() if the list was empty. This is UB, and will crash in Qt 6, where begin()/end() can return an iterator pointing to a nullptr if the list is empty. Change-Id: I39c3a8ebb09fcad75d42019b02426ac5ac05eed9 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add toInt() and friends to QStringViewLars Knoll2020-05-294-0/+258
| | | | | | | | | Make the API more symmetric with regards to both QString and QStringRef. Having this available helps making QStringView more of a drop-in replacement for QStringRef. QStringRef is planned to get removed in Qt 6. Change-Id: Ife036c0b55970078f42e1335442ff9ee5f4a2f0d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move QPlatformBackingStoreOpenGLSupport handling out of platform pluginsTor Arne Vestbø2020-05-2912-51/+53
| | | | | | | | Allows them to not depend on QtOpenGL just to provide the default backing store OpenGL support backend. Change-Id: I90d6d9247ce76848d9d03e2d512fb736c81488d3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CMake: Check CMAKE_CONFIGURATION_TYPES when doing automoc extractionAlexandru Croitor2020-05-291-1/+1
| | | | | | | | | | Otherwise when configuring a standalone example without specifying a CMAKE_BUILD_TYPE (so it's empty), building fails because qt6_generate_meta_types_json_file thinks it's being called with a multi-config generator. Change-Id: I360c7dbb19522155d8e72f98836fb663916715a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Use default location for installing metatypes json filesAlexandru Croitor2020-05-291-47/+66
| | | | | | | | | | | | | | | | | | | | | Previously configuring a standalone example that had no explicit INSTALL_DIR option for qt6_generate_meta_types_json_file would fail. When no explicit location is specified to qt6_generate_meta_types_json_file via INSTALL_DIR option, default to installing into a lib/metatypes location relative to the install prefix. This is required for supporting calling qt6_generate_meta_types_json_file when building standalone applications or libraries (not part of the Qt build). Make sure not to install the metatypes.json file for executables. Install it only for libraries (aka modules). Task-number: QTBUG-84403 Change-Id: Ie0dd75fca0cde71ccb4eb48030871e72d31d1725 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Cosmetic whitespace / indentationIvan Tkachenko2020-05-292-55/+65
| | | | | | | | | | Split long signature into multiple lines, and indent some existing misaligned signatures. Change-Id: Icaed7b703c3f0b20472400b186ac2a28f1ff1dd1 Pick-to: 5.15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add a way of notifying QFutureWatcher when pause is in effectSona Kurazyan2020-05-299-17/+97
| | | | | | | | | | | | | | | | | | | | | | | | Because setting QFutureInterface to paused state does not mean that the computations that are already in progress will stop immediately, it may be useful to get notified when pause actually takes effect. Introduced the QFutureWatcher::suspended() signal, to be emitted when there are no more computations in progress, and no more result ready or progress reporting signals will be emitted, i.e. when pause took effect. Added {QFuture, QFutureWatcher}::isSuspended() methods for checking if pause took effect. QtConcurrent will now to send QFutureCallOutEvent::Suspended event when the state is paused and there are no more active threads. [ChangeLog][QtCore][QFutureWatcher] Added a new QFutureWatcher::suspended() signal, to be emitted when pause took effect, meaning that there are no more computations in progress. Added {QFuture, QFutureWatcher}::isSuspended() methods for checking if pause took effect. Fixes: QTBUG-12152 Change-Id: I88f2ad24d800cd6293dec63977d45bd35f9a09f0 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* CMake Build: Do not set "lib" prefix for modules (plugins)Cristian Adam2020-05-291-0/+4
| | | | | | | CMake sets "lib" as default prefix for Windows-GNU platforms. Change-Id: I49e3123c385610307c84c584a21f5f3827a6fafd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Export the highlighter function so that we can use it in QtSvgWidgetsVolker Hilsheimer2020-05-291-4/+1
| | | | | | | That allows us to remove the copy of that function in QtSvgWidgets. Change-Id: I99d54408781c99b877c4df8fc9fc5f4139dcebb2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a typo and an odd phrasingEdward Welbourne2020-05-291-7/+6
| | | | | | | | | | | One initializes data "byte by byte" not "byte per byte", at least in any dialect I'm familiar with. A byte array can be "created from raw data" but if it was "from a" thing it'd have to be a datum of some sort. Change-Id: Id9706b191f08f03418b9ea6f481797d93a278dff Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* CA fetcher (Windows) - relax the logic a bitTimur Pocheptsov2020-05-298-58/+252
| | | | | | | | | | | | | | | | | | | | | In case a certificate chain is missing an intermediate, for a certificate having "Authority Information Access" extension it's possible to fetch this intermediate and build the chain up to the trusted root. Unfortunately, it's not always possible to install the root certificate in the system "ROOT" store and then an application wants to set it in the socket's configuration, using setCaCertificates(). But this call also disables CA fetcher ('no on demand root loading'). It makes sense to relax this logic for such certificates and try to fetch the intermediate CA and then have the complete chain verified. Pick-to: 5.15 Fixes: QTBUG-84173 Change-Id: I5b9b4271767eba6f5fd2b5cf05e942360c6aa245 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update src/gui/CMakeLists.txtOliver Wolff2020-05-291-14/+5
| | | | | | | The result of running pro2cmake.py Change-Id: Iaaf959069db527c43c8bcdc2cf51e2813bf8d140 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Implement support for QProperty<T> with a static observerSimon Hausmann2020-05-285-4/+382
| | | | | | | | | | | | | | | | | | | | | | | A common pattern in Qt Quick will be QProperty members that are connected to a callback that needs to perform something when the value changes, for example emitting a compatibility signal or marking scene graph node data dirty. To make such a pattern more efficient, a new QNotifiedProperty type is introduced that offers the same API as QProperty<T>, with two changes: (1) The template instantiation not only takes the property type as parameter but also a callback pointer-to-member. (2) Since that member itself cannot be called without an instance and to avoid storing an instance pointer permanently, the API for setBinding and setValue are adjusted to also take the instance pointer. For the former it gets stored in the binding, for the latter it is used to invoke the callback after setting the new value. Change-Id: I85cc1d1d1c0472164c4ae87808cfdc0d0b1475e1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add missing number/setNum() overloadsLars Knoll2020-05-282-0/+46
| | | | | | | | QString has the overloads taking a long/ulong. QByteArray also has toLong/ULong(), so add these to make the API symmetric. Change-Id: I6d1f98ca95fabd32b012f1c3df603dc54e187ec3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move QtPlatformCompositorSupport into QtOpenGLTor Arne Vestbø2020-05-2837-86/+61
| | | | | | Task-number: QTBUG-83255 Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix ExtendedRgb and Rgb encoding comparisonsAllan Sandfeld Jensen2020-05-281-0/+10
| | | | | | | | ExtendedRgb should be treated as Rgb as it can be an automatic upgrade. Pick-to: 5.15 Change-Id: I2942a1067ed5cacb2f60f303f467887cb44c36dd Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix most obvious typos in doc commentsIvan Tkachenko2020-05-283-18/+18
| | | | | | | | | | | Just opened some files with spell checker turned on, and corrected what was underlined. Also, see QTBUG-84427. Change-Id: I702b5bf2cfe1f23c928a6a57f117a2f571ad86ea Pick-to: 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* rhi: Harmonize create-destroy API pattern with the rest of QtLaszlo Agocs2020-05-2813-490/+492
| | | | | | | | | | For historical reasons we use build and release instead of create and destroy. This becomes confusing now that more modules in Qt start taking QRhi into use. Migrate to the more familiar naming, so those who have used QWindow or QOpenGLContext before will find it natural. Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* rhi: d3d11: Use qstrncpy to avoid MSVC warningLaszlo Agocs2020-05-281-4/+2
| | | | | | | | | | | | | Switch strncpy to qstrncpy, which internally uses strncpy_s with MSVC. This way we will not get the following warning: qrhid3d11.cpp(933): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. Change-Id: Iaed86033b0fc182e68804f311ac382c93c72abda Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Doc: Fix issues with Qt Test documentation configurationTopi Reinio2020-05-281-2/+2
| | | | | | | | Remove '/' as an example directory. We do not want to retrieve the directory tree of the entire system. Change-Id: I1caa7ef659dfe326515a4d81193682dacb373856 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Actually apply the shadow stack Intel CET flagsGiuseppe D'Angelo2020-05-281-2/+2
| | | | | | | | | | C&P mistake dropped $$ from qmake variables, my fault. Will squash manually in 5.15 to avoid introducing a bug there. Amends fa98adbd04. Change-Id: I3ce33dba16f512cd20c8d3c6adc4c1a09506c1ea Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Use -fapplication-extension when building Qt libraries on macOSAlexandru Croitor2020-05-283-0/+12
| | | | | | | | | | | | | | | | | Needed to avoid linker warnings transformed into errors, when linking QtWebEngine with qmake mixing. ld: warning: linking against a dylib which is not safe for use in application extensions: The flag is added to libraries and plugins, unless opted out. CMake equivalent of 944110089d4cb1c229dba422989e154db65a67fd Task-number: QTBUG-83929 Task-number: QTBUG-75666 Change-Id: I3e9acca4712c9a266bf54c6e35e2fd2c0096692b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cache system zone ID when fetched from the file-systemEdward Welbourne2020-05-281-64/+141
| | | | | | | | | | | | | | Record the device and inode numbers when found and assume we can safely re-use the name if those have not changed. Tidy up some preprocessor trivia in the process and moved zone-availability check functions to before the system name lookup. Pick-to: 5.15 Task-number: QTBUG-75585 Change-Id: I3660922ef3c94b553a20f887a676e8921693b30f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make threadCount a const member of ReduceKernelJarek Kobus2020-05-281-1/+2
| | | | | Change-Id: I8e75263d3e02a6e6a20520ebecfdb4e40b562bbf Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Pass the thread pool into ReduceKernelJarek Kobus2020-05-283-7/+7
| | | | | | | | | This was overlooked when enabling setting a custom thread pool for various concurrent methods. Fixes: QTBUG-53465 Change-Id: I189a7776fa02bbc3e995538cc154a7246ad1ad7a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Pass the thread pool into BlockSizeManagerJarek Kobus2020-05-282-4/+4
| | | | | | | | | This was overlooked when enabling setting a custom thread pool for various concurrent methods. Fixes: QTBUG-53465 Change-Id: I8b0a0086e46639639051fe99cf52d049f7bb3bb2 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Make some members of IterateKernel constJarek Kobus2020-05-281-5/+6
| | | | | Change-Id: Ifeabebcbb7212a8c2799a37665b290983fd64105 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Address Coverity defect about buffer overrunDimitrios Apostolou2020-05-281-3/+23
| | | | | | | | | | | | | | | | Coverity warned that chunk could be >= tldChunkCount (2), and tldData[chunk] (array of length 2) would be accessed out of bounds. This can not happen, but it was unclear. Clarify logic with comments and asserts, that Coverity will hopefully understand now. Change-Id: I2a38c685cfcbc69ed123918e8cbed360b20b1035 Coverity-Id: 178254 Pick-to: 5.15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Regenerate qurltlds_p.hDimitrios Apostolou2020-05-281-13868/+13941
| | | | | | | | | | With the recent changes in the utility that generates it, it now has improved readability and constexpr arrays, usable in static asserts. It also has an updated list of TLDs. Change-Id: Ibdc986d667feebeb141ff81f6fddbc05b6be8488 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Make QDateTimeParser recognize local time offsetsAndrei Golubev2020-05-281-13/+10
| | | | | | | Fixes: QTBUG-84209 Pick-to: 5.15 Change-Id: Iedbc7beafcaa55c72fec3ac5a5f519c6ed5f7770 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTableWidget: simplify QTableWidgetSelectionRangeChristian Ehrlicher2020-05-282-47/+17
| | | | | | | | Simplify QTableWidgetSelectionRange by removing the unneeded user-defined functions - the compiler can generate them by it's own. Change-Id: Ia96ea29f595851e58c5b714bb316174406d42b8e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix compilation of PCRE2 under Intel CETGiuseppe D'Angelo2020-05-271-0/+5
| | | | | | | | | | | | Ubuntu 20.04 enables -fcf-protection by default. PCRE2 10.35 sees this but complains that -mshstk is also necessary to build its JIT. Detect whether the compiler is enabling Intel CET automatically, and if so, build PCRE2 with the right options. Pick-to: 5.15 Change-Id: I3440e689b81f4f07055f211a4fa7331a43eb410d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move windowsuiautomation API support into QtGuiFriedemann Kleint2020-05-2724-62/+38
| | | | | | Task-number: QTBUG-83255 Change-Id: Ibface71931b6384494842ba9744d76f738c5ca85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Fix use of deprecated NSOffStateTor Arne Vestbø2020-05-271-1/+1
| | | | | | Pick-to: 5.15 Change-Id: Ic799c52350f99a14f57efa9907db772d19264ca2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix qmake builds of Windows applications against a CMake-built QtJoerg Bornemann2020-05-271-0/+3
| | | | | | | | | | | | | | | QMake's windows.prf expects the WinMain library to be named 'qtmain[d].lib' and not 'Qt6WinMain[d].lib'. We're renaming the library to 'qtmain[d].lib' in the CMake build now to avoid adjusting the qmake build of Qt. Also, we have to add the private library shell32.lib to WinMain to make it appear in qtmain.prl and having it linked to Windows GUI applications. Fixes: QTBUG-84425 Change-Id: Ia94090b89e037b17ebfded359b293c8586371d59 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move CoreText font engine/database to QtGuiTor Arne Vestbø2020-05-2723-47/+47
| | | | | | Task-number: QTBUG-83255 Change-Id: Id34ed1759fdebbb1d09e51009f0370736002167c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QNetworkReplyFileImpl: Fix typoMårten Nordheim2020-05-271-1/+1
| | | | | | | | Causes emission to not happen and prints a warning Pick-to: 5.15 Change-Id: Ie80cc89549741079c243e6fd4269f793bccca9fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move FreeType font engine/database to QtGuiTor Arne Vestbø2020-05-2725-27/+38
| | | | | | Task-number: QTBUG-83255 Change-Id: If6be7057d6bd25b34acd99e18658744161985ed0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add a QPropertyAliasUlf Hermann2020-05-273-10/+399
| | | | | | | | | | | | A property alias is the equivalent of the "alias" keyword in QML. It provides the same API as QProperty, but redirects any access to the QProperty it was initialized with. When the original property is destroyed the binding becomes invalid and ignores any further acccess. Task-number: QTBUG-84370 Change-Id: I0aef8d50e73a2aa9e7703d51194d4c5480573578 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Never include windows.h directly in Qt codeLars Knoll2020-05-272-2/+2
| | | | | | | Please use qt_windows.h instead, so we avoid having min/max defined. Change-Id: Ic1b29666c427bf24556da5494af45ee5953ae827 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix various offset issues with DirectWrite font engineEskil Abrahamsen Blomfeldt2020-05-271-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 318a991907b6c08f52786160bafea1e30d3ad9bd and its follow-up commit beede51bca1a43befe42499ad784af57d2450162. This fix was incorrect and caused regressions elsewhere (QTBUG-84357) The issue in QTBUG-71928 (offsets on emojis) turned out to be much simpler: The emojis are expected to be drawn without any margin, but since we retrieved the margin for A32 there would be a mismatch between the margin used for positioning and the actual margin in the returned QImage from the font engine. Passing the correct margin in bitmapForGlyph() fixes this. But reverting these fixes reintroduces a clipping bug when using software rendering in Qt Quick: QTBUG-80180. This needs to be addressed in Qt Quick. It also exposes an existing issue with positioning in Qt Quick NativeRendering: QTBUG-84454. In addition, it caused an assert when running with ClearType disabled, which turned out to be because we were using the A32 margin in the A8 case in the DirectWrite engine. This was also the cause of QTBUG-50024 before, which is now also fixed. However, it also needs to work with Qt Quick, where the text is currently offset by margin * dpr and glyphs are clipped with the software renderer, possibly because of the offset in position. Task-number: QTBUG-71928 Task-number: QTBUG-84042 Task-number: QTBUG-80180 Task-number: QTBUG-84454 Fixes: QTBUG-84357 Fixes: QTBUG-50024 Pick-to: 5.15 Change-Id: I2c8f9f9e7dfb34d492e9833a02fa0c93e6a19513 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Do a proper convert from [0-65535] to [0-255] on QColor integer readsAllan Sandfeld Jensen2020-05-271-29/+30
| | | | | | | | | We need to divide by 257 and round to undo our setter. Pick-to: 5.15 Fixes: QTBUG-84168 Change-Id: I55d2a8d1d05125d9560309cd77459cc94a92030f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove deprecated QProcess methodsVolker Hilsheimer2020-05-272-187/+3
| | | | | | | | | | | | | Add default parameter for arguments in start, startDetached, and execute for better source compatibility with Qt 5.15. This has the risk of then hiding incorrect calls to the previous overload taking a single "command" strings if code is ported from pre-5.15 or ignores deprecation warnings. This is acceptable, given that the alternative is that all calls to these functions would require a default constructed QStringList as the second parameter. Change-Id: I1ba4df97ac4894d007da5083c8359015d784ddbb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QTextMarkdownImporter: allow nesting text span formattingShawn Rutledge2020-05-271-0/+2
| | | | | | | | | | | | | | | The bold+italic combination indicated by ***triple stars*** requires this; but it enables combinations of italics, bold, strikeout, anchor text (and associated link formatting), image alternate text, and inline code formatting (monospace). A code span overrides the formatting from surrounding spans (which might be a bug to fix in another patch, if we compare to how md2html formats code nested in bold-italics for example), but the format stack restores state when any char format span ends. Task-number: QTBUG-81306 Pick-to: 5.15 Change-Id: I289556fa53de400eb50a4d159b9b344eafc517da Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QRhiVertexInputAttribute : Add unsigned int formats for vertex inputInho Lee2020-05-277-5/+80
| | | | | | Task-number: QTBUG-83173 Change-Id: I640cd1fe74227d2cc96672d6c7aaac93e1930bcd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>