summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Doc: Remove mentioning of CMake 3.9 minimum versionKai Köhne2021-10-071-2/+0
| | | | | Change-Id: Ia63bc7f305e673588ec57a7405ed5c0fdf3f5074 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix closing and showing a window with a native childVolker Hilsheimer2021-10-071-2/+5
| | | | | | | | | | | | | | | | | | | Closing a window with a native child results in the native child's QWidgetWindow being closed. That explicitly calls setVisible(false) on the child, which will still have the ExplicitShowHide attribute set from the initial (explicit) show. Even though we then reset the ExplicitShowHide, the WState_Hidden attribute will still be set, so Qt considers the window to have been hidden, and not show it again when the parent becomes visible. Add a test case. Fixes: QTBUG-96286 Fixes: QTBUG-79012 Fixes: QTBUG-71519 Change-Id: I482e6d5236c959d82ce66798176b259a3176972c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Return a plain QMetaObject* from toDynamicMetaObject()Ulf Hermann2021-10-072-2/+5
| | | | | | | | | | | | | | | | | | | The only place where we use it, we swiftly cast it to QMetaObject* anyway. Generating an object with virtual methods, only to then cast to its non-virtual base type is dangerous. Also, if we are required to return a QAbstractDynamicMetaObject from a method of QDynamicMetaObjectData, we cannot implement QDynamicMetaObjectData without also implementing QAbstractDynamicMetaObject. This indirectly forces us to copy metaobjects around as we cannot wrap an existing metaobject into a QDynamicMetaObjectData subclass. Copying metaobjects around makes QMetaObject::inherits() unusable because inherits() assumes identity is determined by identity of the pointer. Change-Id: Icbe697efa6fd66649eef3c91260c95cda62e3c90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Silence static analyzer warningVolker Hilsheimer2021-10-071-1/+1
| | | | | | | | | | | | | The static analyzer can't see that the QPointer not being null implies that the QWidget pointer is still valid. Since we reset the widget pointer to nullptr earlier on if the QPointer is null, just test for the widget pointer instead. Amends f6befd3e63fba32ae3f8329630e3ee4af3babbdc and fixes report 020fbdde70065e8de370537304d13d21. Change-Id: I715764956a02b1300766a3cea2d427f840f1cec8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Revert "Support family names that end/start with space"Eskil Abrahamsen Blomfeldt2021-10-071-3/+1
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7fd9ed32012bd9001e78ad692a4802e0e3366e44. While trimming the font name worked for cases with application fonts, it actually introduced an assert for system fonts that ended with a space, because enumerating these failed. So the original assumption that all Windows APIs also trimmed the family name was wrong. The original bug was that the font with the trailing space could not be selected, but when using setFamilies(), it can. So there is a perfectly fine way around the original bug when using a font that has this problem. Therefore, no additional fix is needed for that. [ChangeLog][Windows] Fixed an assert that happened when the system had a font with a trailing or leading space in its name. Pick-to: 5.15 6.1 6.2 Fixes: QTBUG-93885 Task-number: QTBUG-79140 Change-Id: I6d9df31a4f2c6555d38d51da374f69b6fb0f1ecb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPlatformFontDatabase: Don't copy metaobjectsUlf Hermann2021-10-071-2/+2
| | | | | | | | This is expensive and unnecessary here. Change-Id: I542c0309db5839c696f51b066cd5423a63468438 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Always fallback opening URLs to the regular way if portal failsIlya Fedin2021-10-071-14/+6
| | | | | | | | | | | Even if the code fails, the runtime will have a xdg-open binary that supports the required API (portals in flatpak and userd launcher in snap) Task-number: QTBUG-83939 Change-Id: I8527cfe20411c535686b7171ff9ef285ab9e10aa Reviewed-by: Jan Grulich <jgrulich@redhat.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QElfParser: rewrite using elf.hThiago Macieira2021-10-063-167/+499
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rewrite uses the actual structures supplied by the system's C library, so it should be easier to read. It removes hardcoded constants with little evident meaning in favor of sizeof() and the macros from that header. It also removes advancing the data pointer in favor of having absolute offsets. The resulting implementation is stricter than the original, checking more fields in the header. Because the QPluginLoader and QFactoryLoader users may make decisions based on availability of plugins before attempting to load them, it's better to be stricter here than to fail later when trying to dlopen() them. Debugging and testing are much improved. Instead of stored artifacts, I added a routine to modify a valid plugin to make it invalid, given the conditions we've found so far. If you turn debugging on for this category, you'll see things like: not-elf.fcqdMq.so : Not an ELF file (invalid signature) wrong-word-size.QrnSAx.so : ELF 32-bit LSB (GNU/Linux), version 1, shared library or PIC executable, x86-64 invalid-word-size.bOkXvp.so : Invalid ELF file (class 0), LSB (GNU/Linux) unknown-word-size.ogYKeF.so : Invalid ELF file (class 66), LSB (GNU/Linux) wrong-endian.owiElX.so : ELF 64-bit MSB (GNU/Linux), version 1, shared library or PIC executable, x86-64 invalid-endian.FRxClR.so : ELF 64-bit invalid endianness (0) (GNU/Linux) unknown-endian.FfvRrP.so : ELF 64-bit invalid endianness (65) (GNU/Linux) elf-version-0.gPTdpQ.so : ELF 64-bit LSB (GNU/Linux), file version 0 elf-version-2.jlIUUg.so : ELF 64-bit LSB (GNU/Linux), file version 2 executable.LlXiFp.so : ELF 64-bit LSB (GNU/Linux), version 1, executable, x86-64 relocatable.UsOYuy.so : ELF 64-bit LSB (GNU/Linux), version 1, relocatable, x86-64 core-file.hqvNRz.so : ELF 64-bit LSB (GNU/Linux), version 1, core dump, x86-64 invalid-type.CIJgfS.so : ELF 64-bit LSB (GNU/Linux), version 1, unknown type 259, x86-64 wrong-arch.UcNmgz.so : ELF 64-bit LSB (GNU/Linux), version 1, shared library or PIC executable, AArch64 file-version-0.lZYuda.so : ELF 64-bit LSB (GNU/Linux), version 0, shared library or PIC executable, x86-64 file-version-2.ucfdwL.so : ELF 64-bit LSB (GNU/Linux), version 2, shared library or PIC executable, x86-64 no-sections.rSjsHh.so : ELF 64-bit LSB (GNU/Linux), version 1, shared library or PIC executable, x86-64 no-sections.rSjsHh.so : contains 0 sections of 64 bytes at offset 0 ; section header string table (shstrtab) is entry 0 no-sections.rSjsHh.so : no section table present, not able to find Qt metadata qtmetadata-executable.vrxcIf.so : ELF 64-bit LSB (GNU/Linux), version 1, shared library or PIC executable, x86-64 qtmetadata-executable.vrxcIf.so : contains 42 sections of 64 bytes at offset 997256 ; section header string table (shstrtab) is entry 41 qtmetadata-executable.vrxcIf.so : shstrtab section is located at offset 996831 size 423 qtmetadata-executable.vrxcIf.so : section 0 name "" type NULL flags X offset 0x0 size 0x0 qtmetadata-executable.vrxcIf.so : section 1 name ".note.gnu.property" type NOTE flags AX offset 0x2a8 size 0x30 qtmetadata-executable.vrxcIf.so : section 2 name ".note.gnu.build-id" type NOTE flags AX offset 0x2d8 size 0x24 qtmetadata-executable.vrxcIf.so : section 3 name ".hash" type HASH flags AX offset 0x300 size 0x44c qtmetadata-executable.vrxcIf.so : section 4 name ".gnu.hash" type 0x6ffffff6 flags AX offset 0x750 size 0x3b8 qtmetadata-executable.vrxcIf.so : section 5 name ".dynsym" type DYNSYM flags AX offset 0xb08 size 0xd50 qtmetadata-executable.vrxcIf.so : section 6 name ".dynstr" type STRTAB flags AX offset 0x1858 size 0x15d8 qtmetadata-executable.vrxcIf.so : section 7 name ".gnu.version" type 0x6fffffff flags AX offset 0x2e30 size 0x11c qtmetadata-executable.vrxcIf.so : section 8 name ".gnu.version_r" type 0x6ffffffe flags AX offset 0x2f50 size 0xb0 qtmetadata-executable.vrxcIf.so : section 9 name ".rela.dyn" type RELA flags AX offset 0x3000 size 0x480 qtmetadata-executable.vrxcIf.so : section 10 name ".rela.plt" type RELA flags AX offset 0x3480 size 0x7e0 qtmetadata-executable.vrxcIf.so : section 11 name ".init" type PROGBITS flags AX offset 0x4000 size 0x1b qtmetadata-executable.vrxcIf.so : section 12 name ".plt" type PROGBITS flags AX offset 0x4020 size 0x550 qtmetadata-executable.vrxcIf.so : section 13 name ".plt.got" type PROGBITS flags AX offset 0x4570 size 0x8 qtmetadata-executable.vrxcIf.so : section 14 name ".text" type PROGBITS flags AX offset 0x4580 size 0x110e qtmetadata-executable.vrxcIf.so : section 15 name ".fini" type PROGBITS flags AX offset 0x5690 size 0xd qtmetadata-executable.vrxcIf.so : section 16 name ".rodata" type PROGBITS flags AX offset 0x6000 size 0x473 qtmetadata-executable.vrxcIf.so : section 17 name ".qtversion" type PROGBITS flags AX offset 0x6478 size 0x10 qtmetadata-executable.vrxcIf.so : section 18 name ".qtmetadata" type PROGBITS flags AX offset 0x64a0 size 0x19b qtmetadata-executable.vrxcIf.so : found .qtmetadata section qtmetadata-writable.stzwrk.so : ELF 64-bit LSB (GNU/Linux), version 1, shared library or PIC executable, x86-64 Change-Id: I42eb903a916645db9900fffd16a4437af9728eea Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTlsBackend (OpenSSL) : detect incompatible versionsTimur Pocheptsov2021-10-061-1/+13
| | | | | | | | | | | | | OpenSSL v3 among other nice things brought some nasty crashes (essentially, finally breaking what was already not so nice in 1.x: see, e.g. ASN1_ITEM_free and ASN1_ITEM_ptr that we have to use to free resources allocated by openssl). Let's, at least, not use v3 from Qt built with 1.1.1 and vice versa. Pick-to: 6.2 5.15 Change-Id: If14a2a0ce2189a1b7967b7ab7248d11d0f2fc423 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Android: Update and add missing gradle files for jar foldersAssam Boudjelthia2021-10-067-7/+126
| | | | | | | | | | | | Update the build.gradle for main Qt jar code, and add same files for network and network information backend, so the code can be managed from Android Studio. This also adds .gitignore to ignore Android Studio build artefacts. Pick-to: 6.2 Change-Id: Ic06e9d12708070fad112f17e58b8754608d184f3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Android: use gradle repo mavenCentral() instead of jcenter()Assam Boudjelthia2021-10-061-2/+2
| | | | | | | | | | | jcenter() is deprecated and will be shutdown by next year [1], thus the replacement mavenCentral() could be used instead. [1] https://blog.gradle.org/jcenter-shutdown Pick-to: 6.2 Change-Id: Ic9d1c15d657f23712ee4c866d5c1a45706353429 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add a safer way to use QThreadPool::reserveThreadAllan Sandfeld Jensen2021-10-062-0/+54
| | | | | | | | | Add startOnReservedThread that specifically releases a reserved thread and uses it atomically for a given task. This can make a positive number of reserved threads work. Change-Id: I4bd1dced24bb46fcb365f12cbc9c7905dc66cdf1 Reviewed-by: David Faure <david.faure@kdab.com>
* Add support for EGL_EXT_platform_xcbIlya Fedin2021-10-062-1/+10
| | | | | | | | This allows to create EGL context without involving Xlib. This extension was created a year ago and is present in Mesa since 21.0 Change-Id: Id9bcbffe8c46cb00d9cc0a9a425c1706d1b52b28 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QLocalSocket/Win: stop reading in close()Alex Trotsenko2021-10-063-4/+22
| | | | | | | | | | After calling close(), the socket can enter 'Closing' state, in which we try to write buffered data before disconnecting. As the device is already closed, we must disable any pipe reader activity and clear the read buffer. Change-Id: I8994df32bf324325d54dd36cbe1a1ee3f08022d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* macOS: Disable PCRE JIT when running under RosettaTor Arne Vestbø2021-10-051-0/+6
| | | | | | | | | | | | | | | | | Although the Apple docs claim that Rosetta can translate apps that contain just-in-time (JIT) compilers, it seems to have problems with the PCRE JIT. https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment To be on the safe side we disable the JIT explicitly when detecting that we are running under Rosetta. It's already disabled when we're running on macOS ARM natively (see 2f8df4d1a87df9dd67913b016171dac20839d16e). Fixes: QTBUG-97085 Pick-to: 6.2 Change-Id: I0e133939f28087560d4bc8354b7e49013e94a9f9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Ensure cancelOperation is sent as regular key eventWang Chuan2021-10-051-1/+3
| | | | | | | | | | | | | | Since 9e1875483ceaf907226f84cd6a58ab59f7f16f80 the logic of sending QKeyEvent was changed to only happen when we explicitly decided to not treat input as complex text, or when a selector for a command was not found. This missed the case where we handle cancelOperation by falling back to sending a regular key event. We now set m_sendKeyEvent to true to trigger this logic. Fixes: QTBUG-97119 Pick-to: 6.2 Change-Id: Ibb72f4b068cce735db8d76e5e0a1882aae115207 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Update Harfbuzz to version 3.0.0Ievgenii Meshcheriakov2021-10-0555-6987/+7701
| | | | | | | | | [ChangeLog][Text] Updated bundled Harfbuzz to version 3.0.0. Change-Id: I8d9fb465586bc1dbe58ce91b7f49c8483982c75a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QTest: support initMain() in QTEST_APPLESS_MAINGiuseppe D'Angelo2021-10-051-0/+1
| | | | | | | | | | | | | The various macros that implement a test's main() call a test object initMain() static function, except for QTEST_APPLESS_MAIN. Add it to it. [ChangeLog][QtTest] initMain() is now also supported when using QTEST_APPLESS_MAIN. Change-Id: I46b1eae5ce3bb8c9a5aca525f193c9250e520c6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Support transformations in pattern/texture brushes in pdfEirik Aavitsland2021-10-051-0/+2
| | | | | | | | | | | | The brush transform was ignored for pattern/texture brushes. Since fill patterns always have a transform in pdf anyway, we can just multiply in the brush transform. Fixes: QTBUG-96978 Pick-to: 6.2 Change-Id: I80357f61fb879dfb1226d4ef9469ae5c9a9c1147 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* xcb: Flush scrolled region of backingstore to client when requesting imageTor Arne Vestbø2021-10-051-1/+6
| | | | | | | | | | | | We were doing this for composeAndFlush already, which accesses the image via graphicsBuffer(). Task-number: QTBUG-64504 Task-number: QTBUG-64414 Pick-to: 6.2 Change-Id: I51cc002db8a15991f8a8aa32e849c07318e6e74c Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add basic android multi-abi support for CMake projectsAlexey Edelev2021-10-053-15/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use CMake external project to crosscompile android libraries for mutliple android ABIs at the same time. The idea behind is to use pre-compiled Qt for each android ABI in external projects, compile libraries and then utilize results of compilation in common androiddeployqt call. By default multi-abi build uses the main ABI that qt toolchain file belongs to. The list of the autodetected Qt for Android ABIs is stored in QT_DEFAULT_ANDROID_ABIS cache variable. Users may change the set of the Android ABIs project-wide using QT_ANDROID_ABIS CMake variable or for the specific target by adding the ANDROID_ABIS argument when calling qt6_add_executable. To enable build for the autodetected ABIs user may set the QT_ANDROID_BUILD_ALL_ABIS option to TRUE. By default build procedure is looking for the respective android_<abi> folders to run per-abi build. If user's Qt for Android folder structure is different then one is created by Qt installer, path to the each Qt for Android might be overwritten using QT_PATH_ANDROID_ABI_<abi> CMake variable. Note: This only adds support for the multi-abi build of user's applications. TODO: This commit limits projects to not have in-tree library dependencies. That means that executable targets may have dependencies only from Qt directories or android sysroots. See QTBUG-94714 for details. [ChangeLog][Android][Platform Specific Changes] Added basic support for multi-abi builds of user projects. Task-number: QTBUG-88841 Change-Id: I3239ffe61e6b437e170c8decc5c36a9e774ed0fb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QSFPM: remove redundant call to update_source_sort_column()David Faure2021-10-051-2/+1
| | | | | | | | | | | | | | | | | | | | | Everywhere else in this code, it says if (update_source_sort_column() && dynamic_sortfilter) so, doing the same here. This originally comes from commit 3ffcfc357dbc51bf62ffb but skelly isn't around anymore, and Milian (reviewer) had no objection to this change either. Looking into the implementation, calling it twice is a no-op anyway, create_mapping will early-return with "already done". On the other hand, now it has a chance of returning true, while before it would always return false in the second call ("return true if the column was changed"). I couldn't write a unittest for that case though, it would require that a source reset also changes the proxy->source column mapping somehow, but I don't see how that can be done (the latter being the QSFPM setup). Change-Id: Ie560facf1039a1afc02543e83bfdef0f8f2e09fc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove qshadergraph filesJuan Casafranca2021-10-0517-2852/+0
| | | | | | | | | | | | - Those files were moved as part of Qt3D as its the sole user of these - Also removed associated unit tests Pick-to: 6.2 5.15 Change-Id: I302bc219218a58071c86d2447cb4449601fca32c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QNetworkInformation: refactor NetworkManager backend a littleMårten Nordheim2021-10-051-12/+10
| | | | | | | | | Using individual booleans to track that the value had changed was not necessary. Change-Id: Ieb4712776339aa78bdc75d7608fd74f96d19bbae Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Do not highlight DTLS client/serverKai Köhne2021-10-051-3/+1
| | | | | | | | | | | The client and server do in practice depend on each other. So setting up things is a tad more complicated, and the use case not big enough to warrant both to be highlighted. Task-number: QTBUG-96575 Pick-to: 6.2 Change-Id: I0ed69f7a20ec490cc977bde7f1b09162153d0bd2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: remove unnecessary newline in snippetKai Köhne2021-10-051-1/+0
| | | | | | Pick-to: 6.2 Change-Id: I6031fe8db971be4cbcaec8f1dc6fa7346edb601b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Make it explicit when CMake API is definedKai Köhne2021-10-0520-0/+55
| | | | | | | | Task-number: QTBUG-96239 Pick-to: 6.2 Change-Id: Iaa99024f98f5422aa39f148a89594186b40344bf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove QWeakPointer::operator->Fabian Kosmale2021-10-051-4/+0
| | | | | | | | | | | | | operator-> was only defined if QWEAKPOINTER_ENABLE_ARROW is defined. However, even in that case it would call QWeakPointer<T>::data, which does not actually exist. Take this as an indicator that nobody actually uses operator->, and remove the code completely. Note that the QWEAKPOINTER_ENABLE_ARROW was not documented, and neither was operator->. Change-Id: I2f4aa961a64281542c8c1b248a993e83471c059d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QLocalSocket/Win: add missing check to waitForBytesWritten()Alex Trotsenko2021-10-051-1/+1
| | | | | | | | | | | | | | | Calling pipeWriter->checkForWrite() can indirectly close the socket even if the bytesWritten() signal has not been sent. So, we need to make sure the handle is valid before checking pipe state in the reader. There is no harm in calling PeekNamedPipe() with an invalid handle, but the wrong call should be avoided. This patch amends b2c3b3e8fe0d8bdc88051d0120aaa8d5cf8acce0. Change-Id: I5d2ecbbbe0af817aac68ad6f1173b0ed9b324e98 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QPlugin: pass the direct header to qJsonFromRawLibraryMetaData()Thiago Macieira2021-10-045-7/+23
| | | | | | | | This is done in preparation for storing the metadata without the magic string in static plugins and in ELF notes. Change-Id: I3eb1bd30e0124f89a052fffd16a820454dd56d3e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QHash: suppress annoying GCC warning about allocation size too bigThiago Macieira2021-10-041-20/+31
| | | | | | | | | | | GCC is right, the maximum memory allocation is half the VM size, not the full VM size or multiple times that. QHashPrivate::Span is big. qhash.h:552:17: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] Change-Id: Ie72b0dd0fbe84d2caae0fffd16a071ffb5d0c70f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* wasm: add simd supportLorn Potter2021-10-052-1/+8
| | | | | | | | | | | | | | | | | | Emscripten only supports SSE1, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, and 128-bit AVX instruction sets at this time. https://emscripten.org/docs/porting/simd.html Browsers might need to enable simd support in the advanced configurations about: config or chrome:flags Enable by configuring Qt with -sse2 Pick-to: 6.2 Fixes: QTBUG-63924 Change-Id: Ifeafae20e199dee0d19689802ad20fd0bd424ca7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix __cpp_lib_hypot related error when building in macosAlexey Edelev2021-10-052-2/+2
| | | | | | | | | | | | | | | If __cpp_lib_hypot is undefined in macos you may observe the error: error: '__cpp_lib_hypot' is not defined, evaluates to 0 [-Werror,-Wundef] Adding the explicit check for definition suppresses the warning that is treated as an error. Change-Id: Ie4c185fefde2f5bab699d8fc79b6a170e64af393 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* QPlugin: add error messages to the qt_get_metadata()Thiago Macieira2021-10-041-6/+7
| | | | | | | This is the already-loaded counterpart to the file scanning code Change-Id: I3eb1bd30e0124f89a052fffd16a81f518fa95f0d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPlugin: simplify handling of exact results from Q{Elf,Mach}ParserThiago Macieira2021-10-042-41/+27
| | | | | | | | | | Those two scanners always return exact results, if the metadata is present, so we don't need to re-scan (haven't needed since Qt 5.0). Especially since we scan from the end, we were spending cycles doing unnecessary work. Change-Id: I42eb903a916645db9900fffd16a4ccfdc7342278 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Q{Elf,Mach}Parser: harmonize the arguments passedThiago Macieira2021-10-045-69/+51
| | | | | | | | | | | | | | Both functions took a QString for the input file name, but while the ELF parser had an optional QLibrary pointer (which was never null) where to store the error string, the Mach-O parser received a pointer to a QString. So make both of them take a single in/out QString pointer, which has the file name on input and is cheap for us because of COW. Drive-by fix the name of the static function in qmachparser.cpp from "ns" (which stood for "not suitable") to "notfound". Change-Id: I3eb1bd30e0124f89a052fffd16a8182f4f8541c3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPlugin: update the arch requirements to match the x86-64 ISA levelsThiago Macieira2021-10-043-7/+79
| | | | | | | | | | When we created the functionality, the levels were not yet standardized. Now they are and you can use -march=x86-64-v3 (for example) to get to them. We're making a split between "v1" and "baseline" here for the benefit of 32-bit, which is not included in the ISA levels. Change-Id: I2de1b4dfacd443148279fffd16a397a700b9a15a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPlugin: use one global metadata magic stringThiago Macieira2021-10-042-34/+20
| | | | | | | And use QByteArrayView where applicable. Change-Id: I2de1b4dfacd443148279fffd16a39ec22908f75f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPlugin: move some of the logic from moc's output to qplugin.hThiago Macieira2021-10-042-55/+129
| | | | | | | | | | | | | | This will allow us to make changes in QtCore itself, without having to worry about moc compatibility. The output uses an #ifdef so this version of moc can still be used to compile earlier versions of Qt (usually, in cross-compilation environments). See discussion in the mailing list[1]. [1] https://lists.qt-project.org/pipermail/development/2021-September/041732.html Change-Id: I2de1b4dfacd443148279fffd16a39784c80c5f3b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPlugin: change the generic metadata scan to forwardsThiago Macieira2021-10-041-30/+10
| | | | | | | | | | | The reason it scanned backwards was valid, but unfortunately that doesn't work if the metadata magic appears in the debug info that comes after the metadata. Task-number: QTBUG-67461 Change-Id: I2bbf422288924c198645fffd16a9276767ca2589 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* src/corelib/plugin: sort #includesThiago Macieira2021-10-047-44/+40
| | | | | Change-Id: I2de1b4dfacd443148279fffd16a3e4bdb1a49f88 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QEventLoop: remove unnecessary bits of Qt 5 suggestionThiago Macieira2021-10-041-3/+1
| | | | | | Pick-to: 6.2 Change-Id: I2bbf422288924c198645fffd16a974803ab43b7f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Allow providing custom QT_ANDROID_SDK_BUILD_TOOLS_REVISIONAssam Boudjelthia2021-10-041-2/+5
| | | | | | | | | | | The current CMake configuration sets QT_ANDROID_SDK_BUILD_TOOLS_REVISION only internally, taking the latest build-tools found. A project might still want to manually set specific build-tools version. Pick-to: 6.2 Task-number: QTBUG-97002 Change-Id: I553563638160fdef7a27b9b334d1d9aae5d8b7e1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Respect font stretch if set together with font styleAlbert Astals Cid2021-10-041-1/+1
| | | | | | Fixes: QTBUG-77854 Change-Id: I2bf9cea9d5ecd151a9d96bbe93e9477a9159ca1f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix QPainterPath with QFont::SmallCapsAlbert Astals Cid2021-10-041-1/+1
| | | | | | | | | | | | | | Previous code was getting the QFontEngine from the font+script instead of from the QTextEngine. The font+script is not enough information to know if a given character is smallcaps or not, while the QTextEngine actually has access to the information needed and returns a properly a scaled fontengine if character is small caps Pick-to: 6.2 Fixes: QTBUG-13965 Change-Id: I9f95bd2f3c3bdff76c3acb94fa2edc99cdeb0a13 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove an overly-complex assertionEdward Welbourne2021-10-041-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | It tried to sanity-check the correction being made to the time as a result of converting zone to UTC, but handling also the case where the correction avoided a gap. However, there are too many quirky cases to permit a simple condition. The latest to trip it up is a case of a zone leaving local solar mean time; a time in the gap that hits is shunted by the width of the gap, which could be any old thing, and won't show up on the data describing the zone before or after the transition. In any case, one branch of the check was doubling the zone's standard time offset, which makes no sense. As that was checking for double-DST, it would need to check standard offset plus twice the usual DST offset; but the data it's looking at probably has its DST offset set to the doubled one that needs to deal with. In general a change in DST without going via standard time will have problems here, and a change to standard time could also present problems. Stop trying to shore up the assert and just trust the offset we got. Change-Id: I4519f47e79dfb7595f4a12c259b80a338bc7033c Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add overview pages to CMake APIKai Köhne2021-10-0421-15/+100
| | | | | | | | | | | | | | So far the pages were only 'rooted' in the separate qtcmake documentation. Let them have a page per module too, so that it's easy to navigate. At the same time rename the cmake-macros-qtcore group to cmake-commands-qtcore. This will require a fixup in qtdoc repository. Pick-to: 6.2 Change-Id: Ifc09b27a6c220b5feab64686ca47c60d3342e71a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix reference to quitOnLastWindowClosed in WA_QuitOnClose docsTor Arne Vestbø2021-10-041-1/+1
| | | | | | | | The property is nowadays on QGuiApplication. Pick-to: 6.2 Change-Id: I8759761b08b0cdcef786ca96a7fa6364331f157d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add summary to CMake commandsKai Köhne2021-10-0421-41/+41
| | | | | | | | | | | | For normal \page elements, \brief is just showing in the \generatelist or \annotatedlist commands. Make sure the description is also visible in the actual CMake command/variable/property page by defining a \summary macro. Pick-to: 6.2 Change-Id: I12bc854d547059a2f6309a5922bb0b2a36d4e41c Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* androiddeployqt: only write enabled architectures to build.gradleAndreas Buhr2021-10-041-0/+2
| | | | | | | | | | androiddeployqt writes a list of architectures into the build.gradle file. This list should only contain the architectures which are enabled. This patch adapts the generation of this list accordingly. Amends 07cfab07a2a489e021b56226824a2d9b1211fad7. Change-Id: I5c7c1886c54cc3b9a7e42af6eefbaf2a067a67d5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>