summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* CMake: disable the attempt to force SIMD on iOS simulator buildsThiago Macieira2022-06-273-21/+4
| | | | | | | | | | | This will stop working with the next commit, which merges all basic x86 SIMD intrinsics into one configure test. As a result, linking almost anything graphical on iOS (which is almost everything) causes the linker to fail with undefined references to SIMD-optimized versions that didn't get compiled. Change-Id: Ib42b3adc93bf4d43bd55fffd16c288f4104a6ccc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QAction: Fix the obsolete menu() docLaszlo Papp2022-06-281-1/+1
| | | | | | | | | | | | 35ddf3498859dc184456346f2b070fe94dabaf26 added QMenu::menuInAction, but the documentation added to cover it contains a typo. The method added to replace QAction::menu() is menuInAction, not menuForAction. It was probably just an oversight. Pick-to: 6.4 6.3 6.2 Change-Id: I2a6ec846bbe7ac8dd9e0c285bc62dd7e08820459 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QDateTime: remove a few hardcoded values in favor of <chrono> constantsThiago Macieira2022-06-271-5/+8
| | | | | Change-Id: I6d3880c7d99d4fc494c8fffd16fb01b9d9480c67 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* FatalSignalHandler: print some more information from siginfo_tThiago Macieira2022-06-282-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | The siginfo_t parameter allows us to show what process sent a signal or the crashing address. Additionally, it allows us to determine if the crashing signal was indeed sent due to a crash. The selftest tst_crashes produces now: $ QTEST_DISABLE_STACK_DUMP=1 ./crashes ********* Start testing of tst_Crashes ********* Config: Using QtTest library 6.4.0, Qt 6.4.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 11.2.1 20220420 [revision 691af15031e00227ba6d5935c1d737026cda4129]), opensuse-tumbleweed 20220428 PASS : tst_Crashes::initTestCase() Received signal 11 (SIGSEGV), code 1, for address 0x0000000000000004 Function time: 0ms, total time: 0ms [1] 201995 segmentation fault (core dumped) QTEST_DISABLE_STACK_DUMP=1 ./crashes The last line comes from the shell. The code isn't decoded, but on Linux it's a SEGV_MAPERR. macOS prints exactly the same thing. I've updated one of the expected_crashes_*.txt output that doesn't seem possible (the "Received a fatal error" message does not appear in Qt anywhere). Pick-to: 6.4 Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16ebc8391234f0e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFont: don't detach the families list in family()Thiago Macieira2022-06-271-1/+1
| | | | | | Pick-to: 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f93a8b9306b89b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QProcess: re-enable pdfork() on FreeBSDThiago Macieira2022-06-271-1/+1
| | | | | | | | | | The forkfd_pidfd is a Linux feature, but we ended up disabling the equivalent functionality on FreeBSD. Pick-to: 6.3 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fabfbc38865f94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QTest: switch some text-conversion functions to use qsizetypeMårten Nordheim2022-06-282-12/+10
| | | | | | | | | To avoid potential narrowing. Pick-to: 6.4 Task-number: QTBUG-104125 Change-Id: I37bfc5c49e7c919f5204a76a905758a92527d864 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* CMake: Remove Gui dependency of androidtestrunnerAlexandru Croitor2022-06-281-2/+2
| | | | | | | | | | It doesn't use any Gui classes and thus shouldn't depend on Gui. Also change PUBLIC_LIBRARIES to LIBRARIES, executables don't need to propagate library dependencies. Pick-to: 6.2 6.3 6.4 Change-Id: I9edae7e555e1d74d63b00afbf9e3931963b502c2 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QString(En|De)coder: Remove noexcept from ctor taking nameFabian Kosmale2022-06-271-2/+2
| | | | | | | | | | | | It is necessary as the QStringConverter ctor is no longer noexcept, as it can now allocate memory. This change is ABI-wise safe, as the method was only changed to be noexcept in 6.4. Amends 122270d6bea164e6df4357f4d4d77aacfa430470. Pick-to: 6.4 Change-Id: Ifab4302d659524e27f38f0f90e5813a2c2a4a452 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid reading outside allocated bufferAllan Sandfeld Jensen2022-06-271-0/+4
| | | | | | | | | Bound the inverse lookup result on the low end as well. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-104583 Change-Id: Id357fe1c39c88776075d737b08fc2864a2b6e829 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Minor fixes for qt-configure-moduleDavid Skoland2022-06-271-1/+3
| | | | | | | | | | | | | | | | | Put quotes around args var and add e and u flags, which do the following: e - terminates the script if an error occurs. This is certainly desirable behavior. We don't want the script to chug along with unpredictable behavior if an error occurred. u - terminates the script if an undefined variable is encountered. It is also desirable to terminate here because it might lead to unexpected behavior. Change-Id: Ia02196ef3eab64521e36771530d033a15bb40ecc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Fix QJniObject::construct() documentationTopi Reinio2022-06-271-1/+1
| | | | | | | | | | | Even though QDoc accepted the \fn signature without a class scope, the documentation does not end up on the class reference unless we mark construct() as a member of QJniObject. Pick-to: 6.4 Change-Id: Icae44f8eb24aa6b269242084479e735f2637c312 Reviewed-by: Luca Di Sera <luca.disera@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QKeySequenceEdit: add a maximumSquenceLength propertyLaszlo Papp2022-06-274-8/+97
| | | | | | | | | | | | | | | At the very least, it would be important to have a single combination key sequence. This is commonly seen in keyboard shortcut editors where QKeySequenceEdit is very much applicable. [ChangeLog][QtWidgets][QKeySequenceEdit] Added a maximumSquenceLength property. Done-with: Marc Mutz <marc.mutz@qt.io> Change-Id: Id7fa5a8593eb150fa67d7e89308492c0a200ac36 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix QDBusInterface crashing with empty path on constructionMårten Nordheim2022-06-272-0/+12
| | | | | | | | | | | | | On some machines having an empty path passed to QDBusInterface would cause a crash. This happened because the code created a QDBusMessage and manually marked it as validated when it was not. The validation would not pass for this object. Change-Id: I496dd922fa64353399655a1e84996b99990f5879 Pick-to: 6.4 6.3 6.2 5.15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHttpHeaderParser: fix int/qsizetype nagsMårten Nordheim2022-06-271-3/+3
| | | | | | | | | | | | These values won't extend past MAX_INT but it may produce warnings nonetheless. Found by clang-tidy. Pick-to: 6.4 6.3 Task-number: QTBUG-104452 Change-Id: Icd8aa80a318274be00a3b32ad26a92745903cecb Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QHttpHeaderParser: fix clang-tidy nagsMårten Nordheim2022-06-271-8/+7
| | | | | | | | | "use empty instead of checking size" "no else following return" "initialize your variables" Change-Id: I4512471ec15a00f7ac1fccf88a3c87b8aa983ad7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QHttpHeaderParser: Allow larger fields but restrict total sizeLars Schmertmann2022-06-276-27/+183
| | | | | | | | | | | | | | | | | | Our limit of 8k for a single header field was too small for certain services which returned Location values or WWW-Authenticate challenges longer than 8k. Instead, taking inspiration from Chromium, we have a limit of 250k for the full header itself. And increasing our field limit to 100k, which would occupy almost half of what the total header allows. Also took the opportunity to make it adjustable from the outside so we can set more strict limits in other components. Fixes: QTBUG-104132 Pick-to: 6.3 6.4 Change-Id: Ibbe139445e79baaef30829cfbc9a59f884e96293 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Doc: Document QML_IMPORTS_PATH and QMLPATHSAndreas Eliasson2022-06-271-1/+25
| | | | | | | Fixes: QTBUG-101615 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I0c83f36db4e4731095610683c4a722438f9b804e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* moc: Cleanup handling of default arguments in functionsAndrei Golubev2022-06-271-35/+18
| | | | | Change-Id: I0a381525b92ce5f0b51296a02d9ab98c7a204efc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Strip parentheses from RESET methods in JSON outputUlf Hermann2022-06-272-3/+3
| | | | | | | | | READ, WRITE, NOTIFY etc all come without parentheses. What we actually want to check in the generator is whether the reset method is empty. Task-number: QTBUG-104508 Change-Id: If8c70c7491b25e3c4d9a39dc2c0add0212e64dea Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Adjust documentation build dir for out of source buildsToni Saario2022-06-271-4/+4
| | | | | | | | As the build dir was changed the location of CMake build files changed, which resulted in "could not load cache" error. Change-Id: I97d55d060bfab08ab54d1b15d9eabbede1776155 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Revise Qt Test Module landing pageAndreas Eliasson2022-06-271-21/+24
| | | | | | | | | | | | Most of the module landing pages now follow a certain content structure. In this case, the reference section should be placed before the licenses and attributions section. Also, to make the wording consistent across all module landing pages, use the globally available word snippets. Pick-to: 6.4 Change-Id: I2b2164eb1b8a0eb91db0f1efea8390956d54b29e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* vulkan: Have a dummy format type if there is no Vulkan headerLaszlo Agocs2022-06-271-0/+1
| | | | | | | | | | | | | | | ...at application build time. Follow what is already done for some other Vk* types. Supports 1df2cf6bad7207f16ddca17344cc1324e50f287e in qtdeclarative, which puts now also VkFormat into a header. We need the function declaration to compile without a Vulkan SDK (so without vulkan.h). Pick-to: 6.4 Fixes: QTBUG-104501 Change-Id: I09c87149a53a45f03c9f75b87baec4323db16b1d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Enabler for fractional scaling of text in Qt QuickEskil Abrahamsen Blomfeldt2022-06-272-2/+11
| | | | | | | | | | | | | | | | | | | | | | | As opposed to the raster engine, in Qt Quick we are using unscaled positions for the glyphs and using the vertex shader to scale these after the fact. However, when picking the correct subpixel rendering for each glyph, we would use the unscaled position's fractional part, meaning that we essentially rendered the glyphs at the wrong subpixel position. This was especially visible when doing fractional scaling, e.g. 125%. Thus we need to get the fraction of the actual on-screen position instead. This has to be done both when populating the cache for the Qt Quick case (this enabler adds it as opt-in) and also when actually selecting the correct rendering of the glyph (change in Qt Declarative). Pick-to: 5.15 6.2 6.3 6.4 Task-number: QTBUG-101008 Change-Id: Ie67948b138f578b5f40d6a950c4aa92394a8f09a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: Do not set release flag for signed packageBartlomiej Moskal2022-06-271-4/+1
| | | | | | | | | | | | | | | Before this change, signing package by androiddeployqt automatically implied the --release option. It is possible to create both debug and release packages when signing on Android, so we shouldn't be enforcing this restriction on Qt app builds. Commit removes setting releasePackage option, when processing the --sign argument in androiddeployqt. Task-number: QTBUG-103281 Change-Id: Id40a41255e51d6820b44f078667dc8318a90bbc5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add a way to declare _exported_ logging categoriesGiuseppe D'Angelo2022-06-278-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Avoid SSE2 punningAllan Sandfeld Jensen2022-06-251-5/+6
| | | | | | | | | It is technical UB, even if GCC promises to let it work, but it also generates inefficient code. Pick-to: 6.4 Change-Id: I8f0cae3490d32287ecbaa16b1e9ace84223cda2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Sync qt_scale_image_argb32_on_argb32_sse2 and qt_scale_image_32bitAllan Sandfeld Jensen2022-06-251-40/+16
| | | | | | | | | | The rounding was different in the SSE2 version compared to the C version. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-85109 Change-Id: I81f0a71ee5425b93da80b6a438e1778a02b9bcfa Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* qmetatype.h: add QT_FOR_EACH_STATIC_PRIMITIVE_NON_VOID_TYPEThiago Macieira2022-06-241-7/+7
| | | | | | | | | | This allows us to simplify the explicit specialization of the QMetaTypeInterface<void> explicit specialization, dropping the warning push/pop, and remove an unnecessary explicit instantiation. Pick-to: 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9bdccf1965b95 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmetatype.h: remove unnecessary EXPORT macroThiago Macieira2022-06-241-9/+2
| | | | | | | | | | | | | | | | | | | It was introduced in commit d9f9bc9bada91e3ec2b6c496d3b2242506ca56bc for Qt 6.0 to avoid extern __declspec(dllexport), which MSVC doesn't like, but was made obsolete by commit 77b99e8111cdd06b4fe12f2e18950a1e40ee2b76 that removed the extern templates altogether for MSVC. This change is NOT a no-op because Q_CORE_EXPORT expands to Q_DECL_IMPORT which is __attribute__((visibility("default"))) on ELF platforms. That's actually a good thing, because the symbol is not defined in any library that is not called QtCore anyway. GCC and Linux are also going towards properly requiring imported symbols to be explicitly marked, which this is. Task-number: QTBUG-93471 Pick-to: 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f99616883281e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: put the qt_meta_stringdata_XXXX_t type in an unnamed namespaceThiago Macieira2022-06-241-1/+6
| | | | | | | | | | | Not all user code is compiled with hidden visibility, so make sure one of the types in the template parameters (the one that is supposed to be unique anyway) is local and therefore causes the full symbol for the inline variable not to be exported outside of the translation unit. Pick-to: 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fb262a59b81283 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: remove the attempt to create one large string literalThiago Macieira2022-06-241-58/+30
| | | | | | | | | | | | | | | | | | | | | | | Commit dda9c9e2bc4fd2efe9e3fb0e451a8c3512f9a4d2 fixed some outstanding issues with moc's calculation of the maximum string length, but it missed one. This commit instead opts to remove the calculation entirely and instead have multiple char array members in the qt_meta_stringdata. We needed a single string back in Qt 4.0 when the stringdata *was* a single char array. Since 5.0, we've used a structure with multiple members and pointer arithmetic going past the end of the arrays, from the top of the object. That's UB, but since it's always been UB and can't be fixed until Qt 7 anyway, let's go full monty on it and have one char array per meta object string. The struct qt_meta_stringdata_Qt_t for namespace Qt now has 1217 stringdataXXX members. Pick-to: 6.2 6.3 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fb0d1573e387dc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: properly indent the output for the metatype arrayThiago Macieira2022-06-241-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7ff7d73f6ac68227500fa95731ce0f04626e600b added the indentation, but there were a few mistakes and it was off by 4 spaces anyway. So re-do it and take the opportunity to add some comments to explain what we're seeing. Before: qt_incomplete_metaTypeArray<qt_meta_stringdata_QTimer_t, QtPrivate::TypeAndForceComplete<bool, std::true_type>, QtPrivate::TypeAndForceComplete<int, std::true_type>, QtPrivate::TypeAndForceComplete<int, std::true_type>, QtPrivate::TypeAndForceComplete<Qt::TimerType, std::true_type>, QtPrivate::TypeAndForceComplete<bool, std::true_type>, QtPrivate::TypeAndForceComplete<QTimer, std::true_type>, QtPrivate::TypeAndForceComplete<void, std::false_type> , QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type> >, After: qt_incomplete_metaTypeArray<qt_meta_stringdata_QTimer_t, // property 'singleShot' QtPrivate::TypeAndForceComplete<bool, std::true_type>, // property 'interval' QtPrivate::TypeAndForceComplete<int, std::true_type>, // property 'remainingTime' QtPrivate::TypeAndForceComplete<int, std::true_type>, // property 'timerType' QtPrivate::TypeAndForceComplete<Qt::TimerType, std::true_type>, // property 'active' QtPrivate::TypeAndForceComplete<bool, std::true_type>, // Q_OBJECT / Q_GADGET QtPrivate::TypeAndForceComplete<QTimer, std::true_type>, // method 'timeout' QtPrivate::TypeAndForceComplete<void, std::false_type>, // method 'start' QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>, // method 'start' QtPrivate::TypeAndForceComplete<void, std::false_type>, // method 'stop' QtPrivate::TypeAndForceComplete<void, std::false_type> >, Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16fa152d040ef922 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* tst_moc: fix build with GCC 12Thiago Macieira2022-06-241-3/+3
| | | | | | | | | | | | | You can't mismatch the export macros. The QT_MOC_EXPORT_PLUGIN_V2 macro defines these functions as Q_DECL_EXPORT so they can be found by QPluginLoader. We must match the macro here, otherwise GCC 12 complains (tst_moc.cpp is compiled with -fvisibility=hidden): tst_moc.cpp.o: non-canonical reference to canonical protected function `qt_plugin_instance' in moc_plugin_metadata.cpp.o Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f99893d5730da5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Emit autolinks in QTextMarkdownWriterShawn Rutledge2022-06-243-8/+16
| | | | | | | | | | | | | | | | | | | When a markdown document contains a "naked" URL, or an angle-bracketed <URL>, md4c recognizes it, and we set the AnchorHref charfmt property. There's no need to expand it into the [text](url) form if the text is the same as the url, there is no tooltip, and the url is valid. QTextMarkdownWriter now writes a CommonMark "autolink" in that case: https://spec.commonmark.org/0.30/#autolinks [ChangeLog][QtGui][Text] QTextMarkdownWriter now writes an autolink whenever a hyperlink has no custom text and no tooltip, including when the document was parsed from Markdown containing a naked URL. Pick-to: 6.4 Fixes: QTBUG-94713 Change-Id: I432db8499c62e1e0b1e913bfd8ef2147e3c2bb2a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Support markdown in QTextEditMimeData; fix pasting trailing newlinesShawn Rutledge2022-06-243-5/+123
| | | | | | | | | | | | | | | | | | | - Since 4edcea762d9ce334c4c1a78234c90c118b81da87 the dropsite example shows markdown if available; and now it shows that when we do DnD of a selection from the richtext example, text/markdown is available. - If we artificially make html unavailable, copying and pasting between widget-based rich text editors uses markdown. In case markdown writer output contains unnecessary backticks due to monospace fonts getting used, the workaround from 1ad456c908467212bc30223a69eb7524b64b86e1 is applied. Pick-to: 6.4 Task-number: QTBUG-76105 Task-number: QTBUG-103484 Change-Id: Ie6ca4dbb450dbc36b3d09fd0df1ae5909aaebca7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Blacklist qtcpsocket bind on arm macOSToni Saario2022-06-241-0/+2
| | | | | | | | This was unblacklisted in b885820c395a0bbfb0ff55ab0ee47a4703aa6b59 however it is still very flaky. Change-Id: If9796231c584c894387106dfeb262c9eb4ce73f5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Network: Update expired certMårten Nordheim2022-06-242-30/+30
| | | | | | Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I233ffee5b720c0554071c1d49d4fb861736b2e2a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QAbstractItemModel: Add revisions to new methodsUlf Hermann2022-06-241-13/+13
| | | | | | | | | | | These methods show up in QML-exposed types. They should be revisioned in order to keep those types backwards-compatible. Pick-to: 6.4 Change-Id: I8e826dc2e7db49d8abe69f67605dfb1991855b96 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Fix typo in codeDuan Ting2022-06-231-1/+1
| | | | | | | | | Found by codespell Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I75f4b14f3eded035a0c904d8a7174cb6f5b7d9ef Reviewed-by: Wang Bo <wangbo@uniontech.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* unblacklist passing tests 2022Anna Wojciechowska2022-06-2310-55/+31
| | | | | Change-Id: Ifb09a997d39fc2c92503e77cf372d443c13c4c2b Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Doc: Skip 'qt5/' part in 3rd party documentationKai Köhne2022-06-231-0/+1
| | | | | | | | Pick-to: 6.4 Fixes: QTBUG-104463 Change-Id: I7596118e147c9b5b12b49c4cf2692626697f309e Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@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>
* moc: add Q_CONSTINIT to the static const variables we emitThiago Macieira2022-06-222-5/+13
| | | | | | | | | | | The macro was added to Qt 6.4, so we define it in each moc output to empty if it wasn't previously defined. Thus, moc retains compatibility with older Qt versions. Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9c1539fa0368f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* moc: replace offsetof with sizeofThiago Macieira2022-06-221-1/+1
| | | | | | | | | | It's the same thing since we have exactly one field in this structure before stringdata0. But there's a far smaller chance of producing a warning in user code. Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cdceec33017d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: fix use of escape sequence of more than one characterThiago Macieira2022-06-222-39/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had the code to calculate the length, but were improperly using it only for the offset, not the length of the string or its containing array. That resulted in the generated moc output containing: QT_MOC_LITERAL(111, 5), // "\xffz" QT_MOC_LITERAL(114, 5), // "\0012" QT_MOC_LITERAL(117, 23), // "slotWithAReallyLongName" The two strings are described as occupying 5 bytes (length 4 + null terminator), which is incorrect. The offset was correct: 114 - 111 = 3 and 117 - 114 = 3. The new output is: QT_MOC_LITERAL(111, 2), // "\xffz" QT_MOC_LITERAL(114, 2), // "\0012" QT_MOC_LITERAL(117, 23), // "slotWithAReallyLongName" The effect of the array size calculation would only be felt if moc decided it needed a second string array (for strings over 65535 bytes), which would cause the offsets in the second array to be all wrong. There was no such test until now. Drive-by fixing of the newline, indentation, and the stale comment referring to QByteArrayData (Qt 5). Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cd01b3e0709a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: fix build with FreeBSD 13.1Thiago Macieira2022-06-221-0/+1
| | | | | | | | | | | | | | | | | | | I don't know if they've just added the libs and therefore the GSSAPI content wasn't enabled before, but libgssapi_krb5.so does not have the symbols we need. ld: error: undefined symbol: gss_acquire_cred >>> referenced by qauthenticator.cpp:1803 (/usr/home/tjmaciei/src/qt/qt6/qtbase/src/network/kernel/qauthenticator.cpp:1803) >>> src/network/CMakeFiles/Network.dir/kernel/qauthenticator.cpp.o:(qGssapiTestGetCredentials(QStringView)) ld: error: undefined symbol: gss_release_name >>> referenced by qauthenticator.cpp:1808 (/usr/home/tjmaciei/src/qt/qt6/qtbase/src/network/kernel/qauthenticator.cpp:1808) >>> src/network/CMakeFiles/Network.dir/kernel/qauthenticator.cpp.o:(qGssapiTestGetCredentials(QStringView)) [...] Pick-to: 6.2 6.3 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fabf70bbd272f5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix prl files not to contain hard-coded library pathsAlexandru Croitor2022-06-222-1/+29
| | | | | | | | | | | | | | | | | | | | | | | Make sure to convert absolute paths generated using the $<TARGET_LINKER_FILE> generator expressions into relative paths. Because prl files are generated for both modules and plugins, we need to pass both a list of qt module locations and qt plugin locations to QtFinishPrl.cmake, and then try to make the absolute path relative to each passed directory. A warning assertion is shown if we no relative path could be made, which will cause an absolute path to be embedded. This should not happen though. Amends f4e998125981038e5e50dab8cc56039faaa0b750 Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-104396 Change-Id: Id68395c0dbb20aad5c510d77835cc931b9396556 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add QDom internalSubset implementationYe ShanShan2022-06-233-0/+100
| | | | | | | | | | | | QDom's internalSubset() always returned empty because nothing actually set the internal data member it returns. When parsing the DECLTYPE, extract the internal subset and save it to the doctype()'s member when present. Pick-to: 5.15 6.2 6.3 6.4 Fixes: QTBUG-53661 Change-Id: I6e41ff8b914381168246073b3289d82205b1c255 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>