summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix build without features.completerTasuku Suzuki2020-06-051-0/+2
| | | | | Change-Id: Icaed1963d6306e36653d01ad9d05b68cb50717e5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@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>
* 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-049-96/+378
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-041-2/+6
| | | | | | | | | | | | | 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>
* Remove the deprecated QDirModelVolker Hilsheimer2020-06-0413-1628/+12
| | | | | | | | | 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>
* QNX: add missing includeSamuli Piippo2020-06-041-0/+1
| | | | | | | | | src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp:149:42: error: incomplete type 'QTouchDevice' used in nested name specifier m_touchDevice->setType(QTouchDevice::TouchScreen); ^~~~~~~~~~~ Change-Id: I83fbecfb3b0745d2f8f30d946f3ee3bd5d6c7459 Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* QNX: fix build error without PPS featureSamuli Piippo2020-06-041-0/+2
| | | | | | | | | | | Use matching ifdef's as is done for the declaration. src/plugins/platforms/qnx/qqnxintegration.cpp:430:24: error: no declaration matches 'QPlatformInputContext* QQnxIntegration::inputContext() const' QPlatformInputContext *QQnxIntegration::inputContext() const ^~~~~~~~~~~~~~~ Change-Id: I7afddba514833279fe560c1807da0cb060aead29 Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* QtNetwork remove deprecated signalsTimur Pocheptsov2020-06-049-64/+1
| | | | | | | | | | Use 'errorOccurred' instead of 'error' and 'sslHandshakeErrors' instead of 'sslErrors'. Fixes: QTBUG-82605 Change-Id: I19d4845b16c7b636af7b0658d4fbbba4eef9d029 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkReplyHttpImpl: resolve a todo after the bearer removalMårten Nordheim2020-06-042-24/+3
| | | | | | | | | | | Not quite "next commit" like I wrote originally, but better late than never. As the comment said (and the code shows) it only returns true now so the extra function and if-check isn't needed anymore. Change-Id: I9e8fb8891a116475ab78c3848d7cfcdb659ac521 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macOS: Build print support plugin directly into QtPrintSupportTor Arne Vestbø2020-06-049-108/+31
| | | | | | Task-number: QTBUG-83259 Change-Id: I74f60519fbccfa5f208397bf3d65f0a4f64cb6f0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Remove QtWidget dependency from platform pluginTor Arne Vestbø2020-06-048-79/+11
| | | | | | | | | The dialog helpers don't depend on widgets themselves, and should be built regardless of whether the widget dialogs are enabled, as these helpers can (and should) be used by other layers, such as Qt Quick. Change-Id: I1c66b474ab2f29748f1256aea90229c51c12a16f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Limit QByteArray's 8-bit support to ASCIIEdward Welbourne2020-06-042-154/+129
| | | | | | | | | | | | | | | | | | | | | Previously it handled Latin-1, which made it incompatible with UTF-8, which is now our preferred 8-bit encoding. For Qt6 it is limited to ASCII. Adjusted tests to match. QLatin1String::compare() turned out to be relying on qstrnicmp()'s Latin-1 handling. Removed some spurious Q_UNLIKELY()s and tidied up code a little in the process. [ChangeLog][QtCore][Important Behavior Changes] Encoding-dependent features of QByteArrray are now limited to ASCII, where previously they worked for the whole of Latin-1. This affects case-insensitive comparison, notably including qstricmp() and qstrnicmp(), and case-transforming functions. Fixes: QTBUG-84323 Change-Id: I2925d9908f8654599195a2860847b17083911b41 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Overhaul documentation of QByteArray numeric conversionsEdward Welbourne2020-06-041-74/+96
| | | | | | | | | | | | | | | | | | | | | | A few pet peeves, a bunch of missing details and some phrasing I like better. Telling folk you're using "base 10" in fact communicates no information; it *assumes* a base that folk shall read that text with and tells them they are indeed using that. If they happen to be reading with a different assumption than you, they'll duly see you confirming their expectation. If you mean "base ten", say so. Values "between 2 and 36" may nor may not include the bounds, depending on weird cultural cues and contextual complications. Be explicit about octal being base 8 and hexadecimal being base 16; most readers shall know, but best to be clear. Be explicit about the digits used for bases beyond ten. Mention that QLocale is the way to do locale-sensitive conversions. Change-Id: I4efcec6242644f37a48ff6391b96ed5b371d5be8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QByteArray: clean up docs of trimmed() and simplified()Edward Welbourne2020-06-041-15/+17
| | | | | | | | | Make the set of spacing characters explicit (rather than "includes" hinting that there might be more) and makes explicit that this is an ASCII operation. Change-Id: I61b543bcb450ee82bcce980ecb469901e287b46f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Rename snippet files to match the carved up corelib/tools/Edward Welbourne2020-06-0419-159/+159
| | | | | | | | | | | This is a folllow-up to commits 548513a4bd050d3df0a85fed6e2d1a00ce06d2ab and a9aa206b7b8ac4e69f8c46233b4080e00e845ff5, renaming the snippets files referenced by the files moved out of corelib/tools/ to match the new locations of the files using them. Change-Id: I59f5d3c217ef835e9244387cc769e7212de9d8f5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Set the dontPrint attribute correctly for the character being checkedAndy Shaw2020-06-041-1/+1
| | | | | | | | | This amends 36325f9d86249a4f17f7efbbc1122c462708d909 so that the dontPrint attribute is set before incrementing i Change-Id: I0be7386253d8607596489ce1025d2f3f8d468ab4 Pick-to: 5.15 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* sqlite: Upgrade to 3.32.1Andy Shaw2020-06-045-2134/+3057
| | | | | | | | | | | The patches applied are now removed as they are all included in v3.32.1 [ChangeLog][QtSQL][sqlite] Upgraded to v3.32.1 Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ib5b26fb36d7ca49c1108a96097a48fe5b797f291 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build without features.actionTasuku Suzuki2020-06-042-1/+2
| | | | | Change-Id: Ie37036e44da9b552dc7e46ce94db7b50ce2f8a0b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move macOS print support from platform plugin into QtPrintSupportTor Arne Vestbø2020-06-0418-123/+75
| | | | | | Task-number: QTBUG-83256 Change-Id: I29044b6c3f952c259f501f94a175c8ef2cbaae55 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Long live QStringTokenizer!Marc Mutz2020-06-033-0/+797
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is designed as C++20-style generator / lazy sequence, and the new return value of QString{,View}::tokenize(). It thus is more similar to a hand-coded loop around indexOf() than QString::split(), which returns a container (the filling of which allocates memory). The template arguments of QStringTokenizer intricately depend on the arguments with which it is constructed, so QStringTokenizer cannot be used directly without C++17 CTAD. To work around this issue, add a factory function, qTokenize(). LATER: - ~Optimize QLatin1String needles (avoid repeated L1->UTF16 conversion)~ (out of scope for QStringTokenizer, should be solved in the respective indexOf()) - Keep per-instantiation state: * Boyer-Moore table [ChangeLog][QtCore][QStringTokenizer] New class. [ChangeLog][QtCore][qTokenize] New function. Change-Id: I7a7a02e9175cdd3887778f29f2f91933329be759 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use QByteArray instead of QStringJonas Karlsson2020-06-033-55/+73
| | | | | | | | | | Since the variable names in QShaderDescription are later compared to QByteArrays we can gain some performance from not having to convert them to QByteArrays later. Task-Id: QTBUG-83706 Change-Id: Iaf80d0966f45cbb09e7c1000b7854bc488e57bb3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Enable the scenegraph to remove its QMatrix4x4_Accessor hackLaszlo Agocs2020-06-032-5/+29
| | | | | | | | | Expose flagBits via a public function marked as internal. Task-number: QTBUG-82670 Change-Id: Ia64d934d3dda3e718357cf4e3c32866a613a4722 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Fix and compactify QNotifiedPropertyUlf Hermann2020-06-033-14/+82
| | | | | | | | | | | | The static observer can live in a union with the inline observers. We only need to take care of calling the ctors and dtors manually then. In order for any observers to be called in the presence of a static observer, the static observer has to be called after the other observers. Change-Id: I2f56fa64f3fe6fcd7f06cc403929362da7d86f65 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix build without features.menuTasuku Suzuki2020-06-043-3/+7
| | | | | | | qaction_widgets.cpp needs qwidget_p.h for qWidgetShortcutContextMatcher. Change-Id: I9144a4158af2f25f20b6f13badd0ddcd50075b67 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move QAbstractFileIconEngine into QtGuiTor Arne Vestbø2020-06-0319-25/+19
| | | | | | Task-number: QTBUG-83255 Change-Id: Iab502c51600b96f315113b08fa473ed28a5457fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Do not multithread if already in a global threadpool threadAllan Sandfeld Jensen2020-06-037-15/+48
| | | | | | | | | | This can lead to a deadlock if we block all the worker threads, waiting for the worker threads to finish. Pick-to: 5.15 Fixes: QTBUG-84619 Change-Id: I92b7f96007897d86ece0c34223bab0df4ccbed9a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Support winding fonts like Windows doesAllan Sandfeld Jensen2020-06-031-0/+4
| | | | | | | | | | Map Latin-1 characters to the Winding unicode entries for symbol fonts to render those fonts like Windows does. Pick-to: 5.15 Fixes: QTBUG-84409 Change-Id: I60b81d93412d970d25a98606545773db6c8ab723 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QEventDispatcherWin32: retrieve PM_REMOVE value as a bit flagAlex Trotsenko2020-06-031-1/+5
| | | | | | | | | | | | | | Windows unexpectedly passes PM_NOYIELD flag in wParam parameter to the hook procedure, if ::PeekMessage(..., PM_REMOVE | PM_NOYIELD) is called from the event loop. So, to ignore undocumented flag, we should interpret wParam as a bit field. Thanks to Robin Lobel for research. Pick-to: 5.15 Fixes: QTBUG-84562 Change-Id: Ib16d7d747aebc9a3628e4ee67478c4d3edeb96f1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QPoint(F): API cleanupsGiuseppe D'Angelo2020-06-031-117/+117
| | | | | | | Unexport the classes, plaster noexcept, and port to constexpr. Change-Id: I5cc7928fb08e8e32c67cff2d84c1b0ed9d46a2fa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add QT_QPA_SYSTEM_ICON_THEME to override icon theme nameShawn Rutledge2020-06-031-0/+3
| | | | | | | | | | | On a plain X11 desktop, it otherwise ends up empty. Pick-to: 5.15 Task-number: QTBUG-25351 Task-number: QTBUG-25718 Task-number: QTBUG-74252 Change-Id: I50a522a3e1761e422d5949d5338869ceb9e5e89d Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* Fix build for Android on macOSEskil Abrahamsen Blomfeldt2020-06-033-3/+1
| | | | | | | | | | The FreeType engine has moved out of the fontdatabases library, so the .a file would be empty. This caused the error "attempt to map 60 bytes at offset 72 exceeds size of file" when building for Android on macOS. Change-Id: I9d9afca67e7626d3b5c6a62fcde33fed029fe04c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Make sure the default AndroidManifest is compatible with Qt CreatorAssam Boudjelthia2020-06-031-7/+2
| | | | | | | | | | | | | When adding the default AndroidManifest.xml to a project, Qt Creator edits some pieces because of autoformat and shows that something is changed, but the user changed nothing, and this can be confusing. Let's make them on the same page. Pick-to: 5.15 Task-number: QTCREATORBUG-23768 Change-Id: I76088358dc31be45adb766bed29e2c9d889a8f09 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Add missing lock in QFactoryLoaderAlex Blasche2020-06-031-0/+1
| | | | | | | | | | | libraryList is modified in a code section that was not yet properly locked. This was overlooked by 7ca66b1e66e73a0cb35705df04507ef9f3440cab. Task-number: QTBUG-42855 Change-Id: I028ad21a7df314133931f860ad49453bb2db9da0 Pick-to: 5.15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add Q_OS_WEBOS to qsystemdetectionDominik Holland2020-06-031-0/+4
| | | | | | | | | | This can be used to guard WebOS specific patches. Change-Id: Ia770562b92c59fc3410d6254acd1313776d15a28 Pick-to: 5.15 Fixes: QTPM-1826 Reviewed-by: Johannes Oikarinen <johannes.oikarinen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix qdoc warningsPaul Wicking2020-06-031-10/+10
| | | | | | | Use \li for list items. Change-Id: I5ab253e22077cd7132f28c8690aa2a9a4b8b489c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows: Fix QPainter warnings when using some fontsEskil Abrahamsen Blomfeldt2020-06-031-0/+3
| | | | | | | | | | | | | | | | | | | Some fonts, like Segoe UI, have empty glyphs defined for characters such as space. When there is a margin on the glyphs, we would previously render them as 4x4 completely transparent images. This is a waste of time, and in the case of DirectWrite, we fixed it in bb67c3b68b00fb2075a971f4f0d58e1867ef7128 so that it will always return an invalid image when the glyph does not have dimensions. But since we did not account for this in alphaMapBoundingBox(), the texture glyph cache did not detect this case and would request the empty image and try to add it to the cache. Fixes: QTBUG-84629 Pick-to: 5.15 Change-Id: I470a4a55577c5e9239bf77de81c2b381bf8e6a49 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* H2 protocol handler: make sure inflateEnd gets called on z-streamTimur Pocheptsov2020-06-031-0/+3
| | | | | | | | | | | | | | | The request/reply pair is created out of QNetworkRequest, we set autoDecompress data-member on the request, but not reply. As a result, reply in its destructor fails to release memory, allocated by z-lib (by failing to call inflateEnd). Since with H1 requests it does not seem to be a problem (no leaks detected), I'm limiting this change to H2 handler only. Later it will be retired by the stream decompression change in Qt 6, but will be picked to 5.15. Fixes: QTBUG-84560 Pick-to: 5.15 Change-Id: I82e19d2b0a83624b730edd20d7d45721e7001731 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: fix some typos in QRegularExpression documentationSamuel Gaist2020-06-031-8/+8
| | | | | | Pick-to: 5.15 Change-Id: Ibf96fc775b08df4de0b20d499d8779204ff7df30 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Move QtAccessibilitySupport into QtGuiTor Arne Vestbø2020-06-0220-63/+14
| | | | | | Task-number: QTBUG-83255 Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QPainter: replace manual memory management [1/5]: dummyStateMarc Mutz2020-06-022-4/+5
| | | | | | | Use a unique_ptr to indicate ownership. Change-Id: I15e8c48fac1424d5605e869adcfba6965b16c218 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTranslator: replace manual memory handling with std::unique_ptrMarc Mutz2020-06-021-18/+14
| | | | | | | | The QTranslator owns its QResource and its sub-translators, so hold them in unique_ptr to show what's going on. Change-Id: I65dfa8c3b6dd774066a01de23ae6cff7449b363a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Do not fully initialize QIconLoader when setting the fallback themeAlbert Astals Cid2020-06-022-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need this because without this patch you get bugs both if you call QIcon::setFallbackThemeName before creating the QGuiApplication and if you call QIcon::setFallbackThemeName after creating QGuiApplication Why do you get a bug if you call QIconLoader::setFallbackThemeName before creating the QGuiApplication: * QIcon::setFallbackThemeName calls QIconLoader::instance * QIconLoader::instance calls QIconLoader::ensureInitialized * QIconLoader::ensureInitialized calls systemThemeName * systemThemeName asks the current QPlatformTheme for its QPlatformTheme::SystemIconThemeName * But since we're calling this before creating the QGuiApplication there is no current QPlatformTheme yet, so systemThemeName is set to empty, which is obviously not what we want Why do you get a bug if you call QIconLoader::setFallbackThemeName after creating the QGuiApplication: * QGuiApplicationPrivate::init calls QGuiApplicationPrivate::createPlatformIntegration * QGuiApplicationPrivate::createPlatformIntegration sets the current QPlatformTheme and at the end of the very same function uses QIcon::fromTheme * Since we haven't called QIconLoader::setFallbackThemeName yet there is at least one icon lookup that doesn't take the fallback theme we would like to have into account This patch makes it so calling QIconLoader::setFallbackThemeName before creating the QGuiApplication works. The only thing we want to do from QIcon::setFallbackThemeName is set the internal m_userFallbackTheme, it doesn't care about doing further initialization of QIconLoader, if it's done, great it's done, if it is not initialized yet, great it will be initialized later when someone actually tries to use the QIconloader. So it's OK for ensureInitialized() to return early if there is no platform theme yet, because it will be called again later. Pick-to: 5.12 Pick-to: 5.15 Fixes: QTBUG-74252 Change-Id: I65268fc3d3d0bd282d76c76cf75e495bcc9d1a30 Done-with: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Make it possible to build tools when cross-compilingLeander Beernaert2020-06-0217-26/+42
| | | | | | | | | | | | | | | | | | | This patch allows tools to be built for the target platform when the QT_BUILD_TOOLS_WHEN_CROSSCOMPILING parameter is set at configuration time. To avoid naming conflicts, the target tools are suffixed with "_native". The qt_get_tool_target_name() function can be used to get the tool name for both scenarios (cross and non-cross compilation). Extend pro2cmake to refer to the right target name for tools. The relevant write_XXX functions have a new target_ref parameter that will be "${target_name}" for tools and literally the target name for everything else. Fixes: QTBUG-81901 Change-Id: If4efbc1fae07a4a3a044dd09c9c06be6d517825e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QMetaType: create metatype for voidFabian Kosmale2020-06-022-11/+23
| | | | | | | | | | | Create a QMetaTypeInterface for void. This allows us differentiate QMetaType::Unknown from QMetaType::Void. In addition, this will enable the usage of QMetaMethod::metaReturnType in QMetaMethod::returnType, and will facilitate using metaReturnType in declarative, which needs to distinguish between Unknown and Void. Change-Id: I83296b49587f3deb7ec73e25a33f0d8c98cf8da0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* MetaObject: Store the QMetaType of the methodsFabian Kosmale2020-06-0241-92/+280
| | | | | | | | | | | | | | | | | | | | | | | | This does the analog of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 for the methods we care about (signals, slots, Q_INVOKABLEs). In addition to the actual QMetaType, we store an array with offsets so that we later can do a mapping from methodIndex to metatype. The newly added QMetaMethod::{return,parameter}MetaType methods can then be used to retrieve the metatypes. This does however require that all involved types are complete. This is unfortunately not a feasible requirement. Thus, we only populate the metatype array on a best effort basis. For any incomplete type, we store QMetaType::Unknown. Then, when accessing the metatype, we fall back to the old string based code base if it's Unknown. Squashes "moc: support incomplete types" and "Fix compile failures after QMetaMethod change" Fixes: QTBUG-82932 Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix issues with Qt Widgets documentation configurationTopi Reinio2020-06-021-2/+2
| | | | | | | | Remove '/' as an example directory. We do not want to retrieve the directory tree of the entire system. Change-Id: I911f8eea12b4960319a9a4cbea820b910a35aede Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* High DPI/Windows style: Fix potential crash when drawing buttons of ↵Friedemann Kleint2020-06-021-1/+1
| | | | | | | | | | | | | | | | maximized QMdiSubWindow In QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), pass the correct rectangle (reflecting the correction factor) to the function fixAlphaChannel(). Amends e56b8e1e59b6df7c7abd48b163abe6846849eb7a. Pick-to: 5.15 Fixes: QTBUG-84613 Task-number: QTBUG-75927 Change-Id: I5357bb8c55ed26a50cc322ea7a05df4487212fb8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>