summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant define for QT_LARGEFILE_SUPPORTSona Kurazyan2022-08-101-4/+0
| | | | | | | | It's unconditionally set in qconfig.h by configure.cmake. Pick-to: 6.4 6.3 6.2 Change-Id: If10b5a34111856f4c279a1cf7bfc4ea3a995ef2b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Generate forward headers for Q{,Const, NonConst}OverloadSona Kurazyan2022-08-101-1/+0
| | | | | | | | These headers were generated before extracting qoverload.h. This amends ff8de321e22b1e91f7fc04ffe54609b045f23835. Change-Id: I8f0e8dc3725f9776b8f6dc96782c97b0b5566b9d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add pragmas to the header files that needs to be skipped by syncqtAlexey Edelev2022-08-093-0/+15
| | | | | | | | | | | | | Add the qt_sync_skip_header_check and qt_sync_stop_processing pragmas to: qtbase/src/corelib/global/qsystemdetection.h qtbase/src/corelib/global/qprocessordetection.h qtbase/src/corelib/global/qcompilerdetection.h to avoid checking by synqt. These files were previously blacklisted in syncqt.profile. Change-Id: I268a3063e7eafb9a78e9e8d1cb67cd2def490b35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QT6_CALL_NEW_OVERLOAD_TAILIvan Solovev2022-08-091-1/+1
| | | | | | | | | | | There was a typo in the used macro name. This commit amends 0a3ff697380555538a0d035b768ddf10f772b55a Pick-to: 6.4 Change-Id: I6b8cb1e3872cb96780af26bfaf722d83d17ba4fe Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qputenv: port to QByteArrayViewMarc Mutz2022-08-062-12/+19
| | | | | | | | | | | | | | | | | | | | The vast majority of in-tree users pass simple and short C string literals as the value. By porting to QByteArrayView, we document that we'll accept non-NUL-terminated data, and do the NUL-termination internally, using SSO'ed std::string, saving memory allocations in the common case of short strings. I didn't bother to check which direction std::string takes for nullptrs these days (there was a change accepted in that area for C++20 or 23), so play it safe and protect against them. Follow-up to Task-number: QTBUG-105302 Change-Id: I2369acc62f1d5cbc26135396cfe0602d8c75300c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qputenv: defend against non-NUL-terminated QByteArray valuesMarc Mutz2022-08-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | The old code assumed that a QByteArray's data() is always NUL-terminated. Due to the conflation of owners and non-owners in QByteArray (but also in case we ever get efficient substringing), this is not always the case, e.g. QByteArray::fromRawData() does not ensure NUL-termination. From QString::utf16(), we learn that the condition to check for is QArrayData::isMutable(). After working around the fact that QByteArray::data_ptr() doesn't exist for const QBAs and that empty QBAs always refer to QByteArray::empty_, which is !isMutable(), we can detect this situation and re-allocate without introducing new API. This is the fix for Qt ≤ 6.4. For Qt 6.5, we'll port the function to QByteArrayView. Pick-to: 6.4 6.3 6.2 5.15 Fixes: QTBUG-105302 Change-Id: I3416535ab09d601e0e87b2767f2c024ba1217e64 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Fix return type of QLEInteger/QBEInteger post-in/decrement opsJoerg Bornemann2022-08-051-4/+4
| | | | | | | | | Those operators return a value, not a reference. Fixes: QTBUG-104940 Pick-to: 5.15 6.2 6.3 6.4 Change-Id: I117892f12d20c6bf32a12f37c1bdfec1817614c6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move Q_ASSUME and Q_UNREACHABLE to qassert.hSona Kurazyan2022-08-054-74/+75
| | | | | | | | | As a drive-by, add a link back to Q_ASSUME() in Q_LIKELY() docs. Change-Id: I4a46e281d0fbf55c11001f15667fcc4faa3b0c5b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Move Q_CHECK_PTR and related helpers to qassert.hSona Kurazyan2022-08-054-77/+83
| | | | | | | Task-number: QTBUG-99313 Change-Id: Ia4152f0aad15975d8aebbbc506c8a76c8fbe144f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix generation of the forward header for QFunctionPointerSona Kurazyan2022-08-052-1/+4
| | | | | | | | | | | | | | The forward header for QFunctionPointer was being generated by accident, apparently syncqt is confused because of some of the preceding lines. If the lines are rearranged or removed, the header won't be generated. Not sure if there's much value in generating a header for it, but at least one of Qt sources (qeglfsemulatorintegration.h) is using it in an include statment, and there's a chance it's used in the user code as well. Change-Id: Iced505881ddb07e7a8336fcdfb7d3e5397c6466c Pick-to: 6.4 6.3 6.2 5.15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extract header qassert.h from qglobal.hSona Kurazyan2022-08-054-90/+125
| | | | | | | | | | | | For now qassert.h is included in the middle of qglobal.h, since some of the code below needs it, but this will be cleaned up when that code is moved in its own header. Task-number: QTBUG-99313 Change-Id: I2cdfed44f5c8772c1dad4797cf8edc6cb4c964b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Move qt_error_string to qlogging.hSona Kurazyan2022-08-052-4/+3
| | | | | | | | | | qcontainerfwd.h was relying on the forward declaration of QString in qglobal.h, so add the missing forward declaration there. Task-number: QTBUG-99313 Change-Id: Id3ecaed5ce3b64dabb8454647a43d1520d30e713 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Pull some processing out of environmentMutex critical sectionsMarc Mutz2022-08-041-4/+12
| | | | | | | | | | | | | | | Move most string handling code out of the environmentMutex critical sections to increase parallelism (Amdahl's Law). I drew the line at temporarily dropping the mutex to allocate memory for the return QByteArrays, as that would have meant to loop over obtaining the size, allocating it, and then copying the data which would have overly complicated the code. Pick-to: 6.4 Change-Id: I980cbf7fda76fc8057f84b2539b4a299e06cae82 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port qenvironmentvariables.cpp to qsizetypeMarc Mutz2022-08-041-5/+4
| | | | | | | | | | | | | | | | | | | | | | I don't expect environments to allow values or names > 2 Gi characters, so this is just for consistency (int is a code smell these days). As a drive-by, replace QString buffer; buffer.resize(n); with QString buffer(n, Qt::Uninitialized); Task-number: QTBUG-103527 Pick-to: 6.4 6.3 6.2 Change-Id: I0e41a6e7e9c44ff1ec22377329735538d5f95181 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: move some of the helpers into a header dedicated to itThiago Macieira2022-08-041-12/+8
| | | | | Change-Id: Id0fb9ab0089845ee8843fffd16f9d080029f2f7f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix qYieldCpu() for ARM < ARMv7Marc Mutz2022-08-041-1/+1
| | | | | | | | | | | | | Apparently, we still support these architecture versions, and there's no way to detect ARMv6k-or-greater specifically, so exclude yield for ARM < ARMv7. Amends 877c158c5976bebffd0ff02c39b6b66a842c6344. Fixes: QTBUG-104316 Pick-to: 6.4 6.3 Change-Id: I51a2f0f8e0993dba41e47bb6110473ac8e7cd32a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move q{,Utf8, Utf16}Printable to qstring.hSona Kurazyan2022-08-042-79/+0
| | | | | | | Task-number: QTBUG-99313 Change-Id: I76ef84e4c90ab04a3e04c165ba46800e27ea6122 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qoverload.h: add the missing QT_{BEGIN, END}_NAMESPACE macrosSona Kurazyan2022-08-041-0/+6
| | | | | | | Amends ff8de321e22b1e91f7fc04ffe54609b045f23835 Change-Id: I2437274ae365ef896b22408bc90f763141359618 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disable constinit for MSVC compilersOliver Wolff2022-08-031-6/+3
| | | | | | | | | | | | | | https://developercommunity.visualstudio.com/t/C:-constinit-for-an-optional-fails-if-/1406069 does not only affect constinit thread_local but also constinit in general on MSVC compilers when C++20 is being used. So disable the feature for these compilers in general for now. This commit amends d9531593a248e19f7da7862b2870a6af2f413e75 Fixes: QTBUG-105234 Pick-to: 6.4 Change-Id: I1855f0857d85487895460fc7c56675fb864bfa73 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSysInfo::prettyProductName(): add missing macOS product namesYuhang Zhao2022-08-031-2/+9
| | | | | | | Pick-to: 6.2 6.3 6.4 5.15 Change-Id: I9163917187b7a4cbf48e443303313b25473b229f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qUtf16Printable: avoid creating a copy of a QStringSona Kurazyan2022-08-021-1/+1
| | | | | | | | Amends daa7f5375c58464bbe92744599f1e2258445e259. Change-Id: I569efc4556341bfbce452bdf169c50a3b4be9ca7 Pick-to: 6.4 6.3 6.2 5.15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove outdated docs for qOverload()Sona Kurazyan2022-08-011-10/+0
| | | | | Change-Id: Ie641b1f7100e7053e1fe0299a0b2b0bd708326af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extract header qtdeprecationmarkers.h from qglobal.hSona Kurazyan2022-07-313-266/+282
| | | | | | Task-number: QTBUG-99313 Change-Id: Ief3d7ddb9dc0962bd3404f1fe61d292f2fe434cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extract header qtversionchecks.h from qglobal.hSona Kurazyan2022-07-294-52/+68
| | | | | | Task-number: QTBUG-99313 Change-Id: Iaaa6a055367e861d095b92e3e85e5bc340e6bbc1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extract header qenvironmentvariables.h from qglobal.hSona Kurazyan2022-07-294-340/+372
| | | | | | | | | | | | | qcontainerfwd.h was relying on the forward declaration of QByteArray in qglobal.h, so add the missing forward declaration there. Additionally, had to move the implementations of qTzSet() and qMkTime() to qenvironmentvariables.cpp along with environmentMutex. Task-number: QTBUG-99313 Change-Id: I233aff305c2fedaf0a48362cc99ff2d6f6c0ee54 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move the check for -fPIC compile flag to qcompilerdetection.hSona Kurazyan2022-07-292-7/+7
| | | | | | Task-number: QTBUG-99313 Change-Id: I9072b73a75599381f5f2be0799bca5bf149122de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extract header qoverload.h from qglobal.hSona Kurazyan2022-07-294-114/+129
| | | | | | Task-number: QTBUG-99313 Change-Id: Id827f95b5aa5d4e0d57dcc1060a0746bcaa34db3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extract header qtranslation.h from qglobal.hSona Kurazyan2022-07-294-229/+249
| | | | | | | | As a drive-by, fixed the sorting order of header includes. Task-number: QTBUG-99313 Change-Id: I731e397f8488460657b31839c49f07ff3c476c66 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the unused forward declaration for QDataStream from qglobal.hSona Kurazyan2022-07-291-6/+0
| | | | | | | | | | | The comment suggests that there should be function declarations that need QDataStream, but there are none. It's probably a leftover from the old code. Change-Id: Iacefccc6b862d9a4ec111ebac8970b1ef01bcf39 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QT_INLINE_SINCE: take version into accountIvan Solovev2022-07-221-0/+84
| | | | | | | | | | | | | | | | | | This patch improves the QT_INLINE_SINCE(maj, min) macro to take deprecation version into account. If the specified (maj, min) version is less than or equal to the version defined by QT_DISABLE_DEPRECATED_BEFORE, the macro will expand to "inline", and the out-of-line fallback will be removed from the library. This is achieved by introducing the helper QT_IF_DEPRECATED_SINCE(major, minor, whenTrue, whenFalse) macro. Fixes: QTBUG-104131 Pick-to: 6.4 Change-Id: I285029dad7b71126072b024a3be6d7b11341996d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Move minimal compiler version checks to qcompilerdetection.hIvan Solovev2022-07-212-24/+23
| | | | | | | | Task-number: QTBUG-99313 Change-Id: Ia333ef8ee3c26f3511be7953e262aef3a0d7cc6c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Hide template magic for MSVC from documentationKai Köhne2022-07-211-1/+5
| | | | | | | | | | | QT_POST_CXX17_API_IN_EXPORT_CLASS (introduced in commit e996253774) works around a deficiency of MSVC by marking affected methods as templated. Anyhow, this doesn't need to be reflected in the documented API. Pick-to: 6.4 Change-Id: I9d5dd8b979a84f2fecc582613c2e944bb33eb790 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Long live QT6_{DECL,IMPL,CALL}_NEW_OVERLOAD!Marc Mutz2022-07-203-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have in the past found ourselves in need of disambiguating new overloads from older, QT_REMOVED_SINCE'ed ones, which we usually did by adding a defaulted int argument, cf. e.g. QMetaType::id(). The problem with a defaulted int argument is twofold: First, an int is a valid argument type, and users may get confused as to its meaning when presented with the signature in the IDEs auto-completion popup, and a lot of things implicitly convert to an int, so any errornous parameter passing may stay unnoticed until we remove these fake arguments come Qt 7. Second, this way of doing things requires a lot of ifdef'ery to keep the additional argument out of both the docs and future Qt 7 builds. The solution presented in this patch is to create a tag type, QDisambiguated_t, which a) more clearly communicates its purpose and b) doesn't implicitly convert from anything. To help with the invariably ugly ifdef'ery, provide a set of macros that hide this stuff from qdoc and Qt 7 builds. Use the macros to replace the fake int arguments that were added for 6.4. Pick-to: 6.4 Change-Id: I6916f38c8eb9793ad6dea5f61e7e5fff7e75e273 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Windows QPA: Add MSWindowsNoRedirectionBitmap flag"Tor Arne Vestbø2022-07-142-9/+0
| | | | | | | | | | | | This reverts commit 417bb463526d3ec3d80d66b029c1064fde88391f. The API addition was premature, as it can potentially be handled by the platform plugin automatically, and if not, should possibly live in QSurfaceFormat instead. Change-Id: I5c7050ce9c50b6c6a93ddfa6d2e842db0b9eed0d Reviewed-by: Yuhang Zhao <2546789017@qq.com> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: Add MSWindowsNoRedirectionBitmap flagYuhang Zhao2022-07-142-0/+9
| | | | | | | | | | | | This flag will be useful for windows that only use 3D graphics API to do the rendering, such as Qt Quick applications. As a drive-by, fix a typo in the above line. Pick-to: 6.4 Change-Id: Ic6edcb7610055693734a5d5aff5e906991d4b911 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Doc: Hide weak overload template magic from documentationKai Köhne2022-07-131-1/+5
| | | | | | | | | | | | | | | | Hide the 'template magic' to implement Q_WEAK_OVERLOAD from the documentation. So far Q_WEAK_OVERLOAD void foo() lead to template <typename> void foo() in the generated documentation, which is arguably confusing to the uninitiated. And people interested in implementation details & exact overload resolution will arguably just read the .h files themselves. Fixes: QTBUG-104851 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I5e0b1b337b28e621e6a627241aa8037da0a879a7 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSysInfo: update docs to mention the latest osYuhang Zhao2022-07-091-10/+8
| | | | | | | | | | | | Update to the latest stable version. Beta/preview versions not included. Removed Amazon Linux AMI because it's no longer maintained. Removed tvOS because it now shares the same version with iOS and iPadOS. Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I40e5286b132b8198bf315a2868f89428e8c2f23a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move numeric functions from qglobal.h to qnumeric.hIvan Solovev2022-07-083-84/+84
| | | | | | Task-number: QTBUG-99313 Change-Id: Ic7f7d6ea6d2b81a8593c7cfe05aee1d62921afd1 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* wasm: remove message handler lockMorten Sørvig2022-07-061-7/+0
| | | | | | | | | We have now upgraded the minimum emsdk to one where Emscripten properly synchronizes stdout/stderr output. Pick-to: 6.4 Change-Id: I537897b31916a52303a3fdb1d255f03b4aeaffef Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* x86/RDSEED: Work around QNX compiler missing the rdseed intrinsicThiago Macieira2022-07-061-0/+4
| | | | | | | | | | | Since it's no big deal, we can disable this. Making it use rdseed via inline assembly or detect when the compiler is fixed is Someone Else's Problem. Fixes: QTBUG-104697 Change-Id: I89c4eb48af38408daa7cfffd16feabb5408e2fbf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Compiler macros: remove accidental undefsMårten Nordheim2022-07-061-4/+0
| | | | | | | | | | | | | | I'm not sure why they're here, but they only undo the work from earlier. Spotted in the API review Amends 20104bb237d5231640649bcc610d4e51e03ea617. Pick-to: 6.4 Change-Id: Ifc0fa66a304f819c1f59ef8e4e498ab14f859ef8 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Darwin: Replace deprecated symbol kIOMasterPortDefault with equivalentTor Arne Vestbø2022-07-061-1/+2
| | | | | | | | | | | | | | We can't use the replacement kIOMainPortDefault yet, as it's not available in operating system versions we still support, but the kIOMasterPortDefault documentation explicitly says that passing NULL as a port argument indicates "use the default". As the underlying type of a mach_port_t is potentially either a pointer or an unsigned int, we initialize the default to 0. Pick-to: 6.2 6.3 6.4 5.15 Change-Id: I288aa94b8f2fbda47fd1cbaf329799db7ab988a0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: update the x86 intrinsic checksThiago Macieira2022-06-281-27/+37
| | | | | | | | | | | | | | | | | | | | | | | | Merge all the existing checks into a single one, which is a simple pass or fail, since all our supported compilers support all the intrinsics up to Cannon Lake. The two I've recently added (AVX512VBMI2 and VAES) aren't yet supported everywhere, so they stay. For some reason, all intrinsics seem to be disabled on Android. It looks like some support was missing during the CMake port and this was never again looked at. I'm leaving it be. As for WASM, discussion with maintainers is that the WASM emulation of x86 intrinsics is too hit-and-miss. No one is testing the performance, particularly the person writing such code (me). They also have some non-obvious selection of what is supported natively and what is merely emulated. Using the actual WASM intrinsics is preferred, but someone else's job. Change-Id: Ib42b3adc93bf4d43bd55fffd16c10d66208e8384 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add a way to declare _exported_ logging categoriesGiuseppe D'Angelo2022-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a library declares a logging category that needs to be used by clients (e.g. via inline methods, macros, etc.), then the logging category function generated by Q_DECLARE_LOGGING_CATEGORY has to be exported. We've seen this problem with Q_NAMESPACE, Q_GADGET, etc.: these macros also declare functions or objects that in some cases need to be exported. And precisely like Q_NAMESPACE, Q_GADGET, etc., people end up relying on the implementation details of Q_DECLARE_LOGGING_CATEGORY (specifically, what does it expand to) in order to place the export directives in the right place. Introduce a more robust solution and apply it around qtbase. Cleanup some minor code as a drive-by (remove `extern` and useless semicolons). [ChangeLog][QtCore][QLoggingCategory] Added the Q_DECLARE_EXPORTED_LOGGING_CATEGORY macro, in order to allow dynamic libraries to declare a logging category that can be then used by client code. Change-Id: I18f40cc937cfe8277b8d62ebc824c27a0773de04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Use [[noreturn]] attributeKai Köhne2022-06-231-1/+5
| | | | | | | | | | | Use __has_cpp_attribute mechanism to check availability of [[noreturn]]. For MSVC 2019 and 2022, this is always the case, so we can also remove the (now dead) __declpsec(noreturn) definition. Pick-to: 6.4 Change-Id: Ie7b39bd93bc5e1a173e245a3a5d5ff7e9067a59f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MSVC: Remove dead Q_DECL_DEPRECATED* definitionsKai Köhne2022-06-231-4/+0
| | | | | | | | | | | | | | | | Later on we redefine them to [[deprecated]], [[deprecated("")]], if the attribute is available. Since both MSVC 2019 and 2022 support the attribute, the __declspec() definition was never used. https://docs.microsoft.com/en-us/cpp/cpp/attributes Pick-to: 6.4 Fixes: QTBUG-93748 Change-Id: I3e12f2ace414e316a811f2ceb44e6f312803439a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add the qt_class pragma to file listed in sync.profile classnames mapAlexey Edelev2022-06-224-0/+17
| | | | | | | | | This makes header files self-contained and reduces the number of 'sources of truth' for syncqt procedure. Change-Id: I7f5865abc69934603139d23e1b5452da46ccb110 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qsimd: don't enforce shstk (CET) feature on launchThiago Macieira2022-06-201-0/+6
| | | | | | | | | | | Clang with -march=tigerlake or -march=sapphirerapids pre-defines __SHSTK__, which QtCore require the feature, even if the OS does not have support for it. That's of no consequence because the compiler does not generate shadow stack operations on its own. Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16fa1ad910f008b8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QOperatingSystemVersion: Add new Windows versionYuhang Zhao2022-06-202-9/+31
| | | | | | | | And also update some docs to provide more detailed info. Pick-to: 6.4 Change-Id: I7b51fcb6613399cb4f1dd5d75cf3168df195577b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Endian: Remove old special integer bitfieldsUlf Hermann2022-06-161-75/+0
| | | | | | | | | | | | | | The only way to use them was to put them in a union and then write all the members of the union to set the various bit ranges. As only one member of a union can be active at any time, the compiler is free to optimize those writes away, though. This has started happening in the wild now. As we have a replacement, we can remove the old and broken code now. Task-number: QTBUG-99545 Change-Id: I90718ec06662258d1c15220f54da9eed2186c5a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>