summaryrefslogtreecommitdiffstats
path: root/src/testlib
Commit message (Collapse)AuthorAgeFilesLines
* Add assertions to qtestlog.cpp where it branches on variant typeEdward Welbourne9 hours1-0/+8
| | | | | | | | | For ignored messages, only string and regex are possible. For messages to warn about, a null variant is also possible. Pick-to: 6.10 6.9 Change-Id: I3a1b0ebaf541fb8e26794409feb4c5ef9b61d3c3 Reviewed-by: Thiago Macieira <[email protected]>
* Convert qtestlog.cpp to use QVariant::get_if<>(QVariant *)Edward Welbourne9 hours1-11/+10
| | | | | | Pick-to: 6.10 6.9 Change-Id: I30aefa3dafa0975e53f6a7fb253a37032bb9492a Reviewed-by: Thiago Macieira <[email protected]>
* Clean up some #if-ery in qtestlog.cppEdward Welbourne9 hours1-10/+8
| | | | | | | | | | Initially motivated by the fact that both branches of a #if closed a parenthesis that was opened only once before it. Found two more instance that could also be tidied up. Pick-to: 6.10 6.9 Change-Id: I268fb8559d0882540746d65ac53d6eee16f1425b Reviewed-by: Thiago Macieira <[email protected]>
* Doc: Update the benchmarking option descriptionsAlexei Cazacov5 days1-3/+5
| | | | | | | | | | This commit adds a `perf` option description and mentions that the `tickcounter` options requires a hardware support. Fixes: QTBUG-134795 Pick-to: 6.10 6.9 6.8 Change-Id: I8462073850b6811508776b40e867e62eb88f78e7 Reviewed-by: Dennis Oberst <[email protected]>
* QTest::CrashHandler: print the Unix signal si_code nameThiago Macieira2025-06-121-1/+140
| | | | | | | | | | | | | | It's easier to interpret an "SEGV_MAPERR", "FPE_INTDIV", or "ILL_ILLOPC" rather than "code 1". Alongside the decoded instruction pointer from the previous commit, we now get a message like: Received signal 11 (SIGSEGV), code SEGV_MAPERR, at address 0x00005637dd5c1346, for address 0x0000000000000004 Change-Id: Ic9f54e06fd2956fea3ccfffde7aa7b54167333b7 Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QTRY_IMPL: revert an incorrect change to a code commentMarc Mutz2025-06-121-1/+1
| | | | | | | | | | | | | | | | The comment in the QTRY_IMPL macro definition pertains to the following using namespace std::chrono_literals, which has nothing to do with the default timeout of QTRY_ macros, because that is determined somewhere else. Further, "5 seconds" is not a valid chrono literal, as "5s" was. Partially reverts 55f163382d36ddf908fc2884f2020a1b92340c10. Found in API-review. Pick-to: 6.10 Change-Id: Ic1242436bf87d7067e3c5240eb2687505e24800f Reviewed-by: Ahmad Samir <[email protected]>
* Make QTest::failOnWarning() fail also on any message type >= warningEdward Welbourne2025-06-101-8/+37
| | | | | | | | | Particularly for the no-parameter case, which fails on any warning, it makes no sense to not also fail on a critical. Pick-to: 6.10 6.9 Change-Id: I36f02a7dfb195616ce68babedbccc61480935fb9 Reviewed-by: Mitch Curtis <[email protected]>
* Doc: Fix links in see also documentationDavid Boddie2025-06-102-2/+2
| | | | | | Pick-to: 6.9 6.10 Change-Id: Ie2b6964550ea166def27de311c2b948afba5bf04 Reviewed-by: Volker Hilsheimer <[email protected]>
* QTestResult: remove unused QTestResultPrivate forward declarationMarc Mutz2025-06-061-1/+0
| | | | | | | | | | | This class was never pimpled in Qt 5. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I5761bb0e8401dd654a885b5edcf821be9e4c2694 Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Fix WASM build for the recent qtestcrashhandler changesEdward Welbourne2025-06-041-1/+1
| | | | | | | | | | | | | Amends commit fddb6fceaa28df2a24f7bdd216792985bf8141d1 - the code in qtestcrashhandler_unix.cpp is written to compile for WASM, and some declarations in the _p.h aren't excluded on WASM, so the exclusion of the .cpp when WASM lacks threads lead to linker errors. Pick-to: 6.10 Change-Id: Idb941643302ed5a4c084d0fd2b4dfc07a44122e3 Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Piotr Wierciński <[email protected]>
* Doc: Enable automatic linking to sources on code.qt.ioTopi Reinio2025-05-271-0/+3
| | | | | | | | | | | | Since 6.10, QDoc is capable of generating links to the declaration in the source code for each documented C++ API entity in their `Detailed description`. Add the required configuration to enable this feature in online documentation builds. Change-Id: Iaafabc5aea50a6cd72549bb1c04007bb4de498ca Reviewed-by: Paul Wicking <[email protected]>
* QTest::CrashHandler: extract the address of the crashing instructionThiago Macieira2025-05-251-1/+40
| | | | | | | | | | | | | | | | | | | | | | From the user and machine context provided in the signal handler. Linux w/ GDB prints: 0x563bb2ab7346 <_ZN11tst_Crashes5crashEv+28>: movl $0x1,(%rax) FreeBSD w/ LLDB prints: (lldb) x/i 0x0000319a0ae86996 0x319a0ae86996: c7 40 04 01 00 00 00 other movl $0x1, 0x4(%rax) macOS w/ LLDB prints (after disabling the check for SIP): (lldb) x/i 0x00000001054086c8 0x1054086c8: movl $0x1, 0x4(%rax) Done-With: Samuel Gaist Done-With: Ivan Solovev Change-Id: Iac02025b1922b6b4d927fffd3efe210ef51fc759 Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Samuel Gaist <[email protected]>
* QTest::CrashHandler: prepare to disassemble the crashing instructionThiago Macieira2025-05-253-13/+38
| | | | | | | | This is the infrastructure code, without actually getting the instruction pointer from the machine context. Change-Id: Iadd2c78913b2d0177949fffdeafa12e9fc3daf87 Reviewed-by: Edward Welbourne <[email protected]>
* QTest::CrashHandler: switch to execvp() instead of execlp()Thiago Macieira2025-05-251-5/+24
| | | | | | | | There will be variable options. Change-Id: Ie633615daeac87e8bd2cfffd962666a85d91d5cd Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QTest::CrashHandler: add asyncSafeToHexString()Thiago Macieira2025-05-231-6/+17
| | | | | | | | | Extracted from existing code; I'm going to need it for some GDB/LLDB commands in an upcoming commit. Change-Id: I7bdb7ef287ecd924df5cfffdc5aa3617540f7756 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QTest::CrashHandler: use string_view for writeToStderr() for the inputsThiago Macieira2025-05-231-18/+9
| | | | | | | | | | For regular strings, it'll call strlen() for us, removing the need of our doing it. We just have to remove the one case where we were passing iovec into it: make asyncSafeToString() return a string_view too. Change-Id: I7d17e5c4525637df23f1fffd5e5c381632386f49 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QTest::CrashHandler: reorganize Unix header blocksThiago Macieira2025-05-231-18/+19
| | | | | | Change-Id: Ib45e7e913fcc2e00f198fffdcc216e9f74c97e15 Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QTest::CrashHandler: move the enum definition to the headerThiago Macieira2025-05-233-4/+9
| | | | | | | | | It's common between the two implementations, though currently completely unused on Windows because we don't start debuggers. Change-Id: I7a42db2db35cf6191693fffd3e4e46d482032630 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QTest::CrashHandler: move the Unix signal-handling code into the .cppThiago Macieira2025-05-232-79/+67
| | | | | | | | This further reduces the size of the header. Change-Id: I24a16daec8aed5a38e1ffffd812629cc7e7377f7 Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QTest::CrashHandler: move the Unix async-safe I/O code to the .cppThiago Macieira2025-05-233-80/+61
| | | | | | | | | | | | | | This declutters the header from code that doesn't need to be there and is only used in the .cpp anyway. This code used to be in qtestcase.cpp before commit c0014becca2cd376eadd5c8a0265e5cf47c9aa01, which we now amend. Additionally, since Windows code doesn't need to be async-safe anyway, we can simplify it. I'm also going to need the toHexString() lambda in another place. Change-Id: Ic9571bac864dfb31564cfffd785e8ab15cab3ae5 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QTest::CrashHandler: move windowsFaultHandler() out of the classThiago Macieira2025-05-232-5/+4
| | | | | | | | | It accesses no members (there are none!), which further simplifies the header. Change-Id: Ic1251d8b56dc6cfeb136fffd7baf4d8bc7143750 Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QTest::CrashHandler: move DebugSymbolResolver to the .cppThiago Macieira2025-05-232-53/+56
| | | | | | | | It doesn't need to be in the header. Change-Id: I2e80568174e6637c6be0fffde4837ac502f4641a Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QTest::CrashHandler: split into Unix and Windows (2/2)Thiago Macieira2025-05-232-677/+16
| | | | | | | | | | | | | | This file is convoluted and hard to read due to #if all over the place. Let's split the two very different implementations. This is the conclusion, which removes the Unix code from the Windows file and the Windows code from the Unix file. Drive-by remove the unnecessary header #includes. Change-Id: Iec7bd36d0aeabdc3c445fffd17bad22050c6b208 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QTest::CrashHandler: split into Unix and Windows (1/2)Thiago Macieira2025-05-233-1/+687
| | | | | | | | | | | This file is convoluted and hard to read due to #if all over the place. Let's split the two very different implementations. This is the first commit, which just copies the files around without any changes, to help with Git history. Change-Id: I758dad7a07d927ccb61dfffd0199fb5e1e544c98 Reviewed-by: Edward Welbourne <[email protected]>
* QTest::CrashHandler: ask GDB for the memory mapping layout on crash tooThiago Macieira2025-05-191-0/+1
| | | | | | | | | | | | Processes usually crash due to invalid pointers, but sometimes it's hard to know if a given value is valid or not just by eyeballing it. So let's ask GDB to print it. I don't think LLDB has a way to do it. Pick-to: 6.9 Change-Id: I35e35bd3b79eeba49192fffd61474054cd089301 Reviewed-by: Edward Welbourne <[email protected]>
* ensurePositionTopLeft - always return true on AndroidFrédéric Lefebvre2025-05-141-0/+3
| | | | | | | | | | Due to synchronous position handling, it is not necessary to wait for event based geometry updates. Always return true on Android. Change-Id: Iad1da66e38b2ec1193c5569b4d1764c7202ea319 Reviewed-by: Axel Spoerl <[email protected]>
* Doc: Update QTest documentation to reference Qt6TestDheerendra Purohit2025-04-101-1/+1
| | | | | | | | | | | | | The QTest documentation incorrectly referenced Qt5Test instead of Qt6Test. This has been updated to reflect the correct module name. Fixes outdated references in the documentation and ensures consistency with Qt 6 naming conventions. Fixes: QTBUG-134395 Change-Id: I254df83ecbea542c1a47b17aa0b756ed8a6f562a Reviewed-by: Alexandru Croitor <[email protected]>
* Refactor default QTRY_* timeout value into one placeMitch Curtis2025-04-031-10/+18
| | | | | | | | | | Move it into a global static, so that we can allow changing it in a follow-up commit. Task-number: QTBUG-81979 Change-Id: I795002054f9aa7781157739b94fc2b85bcb61705 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QTestLib: fix crashes when using qDebug()s from threads with -junitxmlDavid Faure2025-04-022-8/+17
| | | | | | | | | | | | | | | Other test loggers just output things immediately, but the junit test logger appends messages to a vector, so this needs to be mutex-protected. In case of qDebug()s from long-running threads, we also need to protect creation/destruction of systemOutputElement and systemErrorElement -- and in case of qFatal(), currentTestCase. Pick-to: 6.9 6.8 6.5 Change-Id: If35055fc232276a778951ebbfeaccd185b04f46b Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Jason McDonald <[email protected]>
* QTestLib: fix race on QElapsedTimers from WatchDog threadDavid Faure2025-03-311-3/+12
| | | | | | | | | The WatchDog thread calls printTestRunTime() which reads the two timers, created and started in the main thread. Pick-to: 6.9 6.8 6.5 Change-Id: I1a337648fddf87190075b7902311544d0ab21ac3 Reviewed-by: Marc Mutz <[email protected]>
* QTest::ignoreMessage: Clarify what encoding we assume for parameterMårten Nordheim2025-03-281-0/+2
| | | | | | | | | | So future-me and others don't have to look through the source code to figure it out. Pick-to: 6.9 6.8 6.5 Change-Id: I1f6e46cec256112226cad4d24ed52e4818635ae8 Reviewed-by: Giuseppe D'Angelo <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* Add QTestPrivate::ensurePositionTopLeft() for reliable positioningFrédéric Lefebvre2025-03-261-0/+19
| | | | | | | | | | | | | | | | Implement ensurePositionTopLeft() to set a window's position to the available top-left corner and verify that it is correctly positioned. Incorrect updates to window.position and window.framePosition have been identified as one of the main sources of flakiness on Opensuse. This test function addresses this issue and improves test reliablity. Task-number: QTQAINFRA-7050 Change-Id: I946f74c7d2c1db9cfe4fec7db272e12876b3ed43 Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Axel Spoerl <[email protected]>
* QJUnitTestLogger: include what you useGiuseppe D'Angelo2025-03-201-0/+1
| | | | | | | | | Adds a missing include for QElapsedTimer. Pick-to: 6.9 6.8 Change-Id: I3dbc19eb38bb44cae1e38a0c72981a14bc571cd5 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Marc Mutz <[email protected]>
* QElapsedTimer: port some restart() calls to start()Giuseppe D'Angelo2025-03-182-3/+3
| | | | | | | | | | | | | | | | ...when the return value is unused. The code should already be safe from restart()'s preconditions: either the timer is explicitly checked for validity before the call, or we can reason about the code (in testlib, the functions are called after the one that starts the timer, making it valid). Therefore, this is just a "cosmetic" cleanup (and a super-micro-optimization), but Marc doesn't want to think about the qtestlib changes and says to pick it all the way, "just in case". Pick-to: 6.9 6.8 6.5 Change-Id: I73cf287ce1314fc3626734ec64ddf5884afe3383 Reviewed-by: Marc Mutz <[email protected]>
* QSignalSpy: Drop the RegisterMethodArgumentMetaType metacallFabian Kosmale2025-02-261-8/+2
| | | | | | | | | | | | | | | | | | | | There's nothing the meta-call could achieve: If the argument tpye was complete when the meta-object was created, we would already have created the metatype-interface for it, and would return a QMetaType constructed from it in QMetaMethod::parameterMetatype. If the type wasn't complete, parameterMetatype would have done the name to type lookup. Consequently, if the lookup failed so far, calling RegisterMethodArgumentMetaType would not help either, unless we would have a dynamic meta-object with a custom implementation of RegisterMethodArgumentMetaType. Such an implementation does not exist in Qt. This removes the last remaining user of RegisterMethodArgumentMetaType. Change-Id: I9b9abbc3b4ba573b242027ecaa230ea27cb2ebf6 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]>
* QT_TEST_EQUALITY_OPS: insert QCOMPARE before the current codeThiago Macieira2025-02-221-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | The macro, as it was, makes debugging REALLY hard: FAIL! : tst_QStorageInfo::operatorEqual() The computed value is expected to be equal to the baseline, but is not Computed (lhs == rhs) : 0 Baseline (expectedEqual): 1 Loc: [qcomparisontesthelper_p.h(178)] It prints the location of the macro helper, not the line that called it, so one has to guess which of the many uses in a function has failed. And it prints the boolean of whether the comparison result is the expected value, not the values of left and right. QT_TEST_ALL_COMPARISON_OPS also needs a similar fix, but I don't have time for it. Ideally we'd replace the qScopeGuard with a proper QTest failure report, which would extract the printers for Left and Right. Pick-to: 6.9 Change-Id: I7a643066137c5fcdb9e7fffd83d9bf7cf4cccd6c Reviewed-by: Rym Bouabid <[email protected]> Reviewed-by: Ivan Solovev <[email protected]>
* Fix bad signal restoration which can cause infinite loopEric Beuque2025-02-191-2/+2
| | | | | | | | | | | | This fix the FatalSignalHandler destructor to restore properly the signal handler which cause an infinite loop when a signal is emitted like SIGABRT or SIGINT and when we are using two QTest object in same program. Fixes: QTBUG-132121 Pick-to: 6.9 6.8 6.5 Change-Id: Ie9476e1ff9c0f29c3e35ae6dff565fab4a77ba86 Reviewed-by: Thiago Macieira <[email protected]>
* QBenchmarkPerfEvents: help Coverity understand the codeMarc Mutz2025-02-191-1/+1
| | | | | | | | | | | | | | | Coverity thinks that r may be negative and not -1 and warns that the cast to quint64 may overflow. Change the check for `== -1` to `< 0` to help Coverity (and other readers of the code) understand that this cannot happen. Amends c63420a117fe67107466d806890e901d091cb1d5. Pick-to: 6.9 6.8 6.5 6.2 5.15 Coverity-Id: 474172 Change-Id: I7615e0ef152e1e6e9cbc6dec1b8ecd4f8879521c Reviewed-by: Thiago Macieira <[email protected]>
* QTest::toString: remove massageExponent()Thiago Macieira2025-02-141-29/+1
| | | | | | | | We don't need it after tst_selftests got code to normalize floating point string representations. Change-Id: Id9cd1293ade99e77b900fffd0bd292418a6ea475 Reviewed-by: Edward Welbourne <[email protected]>
* QTest::toString(): print FP with full precision and in hexfloatThiago Macieira2025-02-141-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's very annoying to try and debug why the values are different when QCOMPARE(_xx) says they are the same: FAIL! : tst_QCborStreamReader::floatingPoint(QByteArray:2.^64-epsilon) The computed value is expected to be equal to the baseline, but is not Computed (reader.toDouble()): 1.84467440737e+19 Baseline (expectedValue) : 1.84467440737e+19 Now: Computed (reader.toDouble()): 1.844674407370955e+19 (0x1.fffffffffffffp+63) Baseline (expectedValue) : 1.844674407370952e+19 (0x1.ffffffffffffp+63) %a formatting is required by C11, which is required for C++17, which we require. I've modified tst_selftests to normalize the representation of floating point numbers on-the-fly, so we don't have to deal with differences in how the different libc print floating point values[1]. This allows us to remove qtestcase.cpp's massageExponent() function, if we want to in the future. I've chosen to use std::regex instead of QRegularExpression so we don't break tst_selftests in case we break QRE or our PCRE dependency. I've also moved the floating point comparison that was in tst_cmptest to tst_float, where all other floating point were. Ideally we'd also print the NaN payload when not zeroes, but that's a job for another day. [ChangeLog][QtTest] QtTest now prints floating point values in hexadecimal notation and has increased the precision for the decimal format, so different values can be observed in the output when QCOMPARE or QCOMPARE_xx fail. [1] For example, whether 1 is 0x1p+0 or 0x8p-3. For me, the 0x1 prefix is objectively more useful because the part after the dot matches the mantissa bits in the variable and the exponent matches the stored exponent (minus the bias). Task-number: QTBUG-85779 Task-number: QTBUG-127280 Change-Id: Idc6cb070c750d2acbd26fffdc8defad7d7ae8733 Reviewed-by: Edward Welbourne <[email protected]>
* QTest: fix bug dereferencing nullptr in toString<std::nullptr_t>()Thiago Macieira2025-01-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends commit 0756cc1eae5fd8981983319fef1d084762a67b8d. The generic instantiation of this function had a std::nullptr_t * parameter, but callers had special code to pass a nullptr there because we never needed a value of a nullptr (it's always a null pointer). For example, in compare_ptr_helper(): auto lhsFormatter = Internal::pointerToString<QObject>; auto rhsFormatter = Internal::genericToString<std::nullptr_t>; return compare_helper(t1 == nullptr, "Compared QObject pointers are not the same", const_cast<const QObject *>(t1), nullptr, lhsFormatter, rhsFormatter, actual, expected, file, line); But in debug mode, some compilers did emit a load from this memory location, causing a crash. So we just specialize this function to avoid such. We had a test for this... except it was never reached because the earlier QCOMPARE() had already failed. For the test, this amends commit ae021882330abc5f6fbaadca290e6e5670c89028. Fixes: QTBUG-133330 Pick-to: 6.9 6.8 Change-Id: I2cd3bb475788431c6a0dfffd28e730e8b613e033 Reviewed-by: Christian Ehrlicher <[email protected]> Reviewed-by: Ivan Solovev <[email protected]>
* Update testlib's copy of Linux's perf_event_p.h headerEdward Welbourne2025-01-292-8/+85
| | | | | | | | | | | | | | | | This isn't strictly necessary, as it doesn't affect anything we use the header for, but it brings us back in sync so future updates don't involve as many changes to review. Document why we amend the upstream SPDX identifier (to a non-deprecated equivalent). [ChangeLog][Third-Party Code][QtTest] The perf_event_p.h from Linux is updated to match Linux kernel 6.13. Pick-to: 6.9 6.8 Task-number: QTBUG-132871 Change-Id: I101734b743f6689ca64054008455b98e4f6b827c Reviewed-by: Lucie Gerard <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* QTest: Reset repeat counter for each call to QTest::qRun()Jøger Hansegård2025-01-291-4/+3
| | | | | | | | | | | | | | | | | This fix ensures that each call to QTest::qRun() runs all tests the requested number of repetitions. This fixes an issue where QTEST_QUICKCONTROLS_MAIN would only test the first style, and skip remaining styles. The cause was that the repeat counter was not reset between QTest::qRun() calls. Subsequent calls to QTest::qRun() would therefore not run any tests. Amends: 80a14c86b2739492d7f7fbdb1cbde1da85d1341d Fixes: QTBUG-133207 Pick-to: 6.9 6.8 6.7 Change-Id: Idb164fd01ac0b8e04e5dd74c3625f2c343f742c5 Reviewed-by: Mitch Curtis <[email protected]>
* QTestLib: Add helper function to check for keychain access issuesTimur Pocheptsov2025-01-241-0/+33
| | | | | | | | | | | | To be used in network-related tests where we potentially are using private/public keys and (on macOS) end-up with keychain access blocking a test with dialogs requesting a permission to access the keychain. Task-number: QTBUG-132645 Pick-to: 6.9 6.8 Change-Id: Ide74633bf88b0453d5d8f8de56282c8cf8207380 Reviewed-by: Tor Arne Vestbø <[email protected]>
* QtTest: Update valgrind (fatuously) to v3.24.0Edward Welbourne2025-01-212-2/+2
| | | | | | | | | | | | | | Nothing has changed in the headers we use, aside from the version number, since v3.23.0, so we may as well declare ourselves up to date. [ChangeLog][Third-Party Code][QtTest] Valgrind headers are up to date with Valgrind v3.24.0. Pick-to: 6.9 6.8 Task-number: QTBUG-132871 Change-Id: Ib2ad8d73e662535a014d241b46cc50214b45f50b Reviewed-by: Ahmad Samir <[email protected]>
* Correct description of 3rd-party CPU cycle countersEdward Welbourne2025-01-211-1/+1
| | | | | | | Pick-to: 6.9 6.8 Task-number: QTBUG-132871 Change-Id: Ia0a467297393be72ff7d39b7333ad86e09057dff Reviewed-by: Tor Arne Vestbø <[email protected]>
* Testlib: wrap cycle_p.h headerGiuseppe D'Angelo2025-01-186-3/+27
| | | | | | | | | | | | | The header triggers compile warnings -- -Wundef, to begin with. Since it's included from multiple places, we either fix the header or wrap it. The header isn't maintained upstream (we actually keep patches "on the side"), so I'll go with the wrapping option, and suppress -Wundef in there. Task-number: QTBUG-132900 Change-Id: I8fdd32fa2ec1cde83ef28945259bce836439f73f Reviewed-by: Thiago Macieira <[email protected]>
* QTestLog: use the right preprocessor test for C++ featuresGiuseppe D'Angelo2025-01-181-1/+1
| | | | | | | | | | Use ifdef, not if, otherwise we trigger -Wundef if the feature is unsupported. Pick-to: 6.9 6.8 Task-number: QTBUG-132900 Change-Id: I8a779da59bf2c7add14ace6405faf19b7ca48c28 Reviewed-by: Thiago Macieira <[email protected]>
* Replace qdebug.h includes in public headers with forward-declarationsAhmad Samir2025-01-151-0/+1
| | | | | | | | | | | | | | | | | | | qdebug.h includes many Qt and STL headers, so if you include a Qt header you get all those transitive includes, which may affect build time. - Where appropriate use the printf-like syntax of qDebug() and co., these don't need the QDebug streaming operators - qfloat16 is used in an inline member function, so include it explicitly [ChangeLog][Potentially Source Incompatible Changes] Various Qt public headers don't include QDebug any more; if you need QDebug's streaming you'll have to include it in your code. Task-number: QTBUG-132439 Pick-to: 6.9 Change-Id: I750587e17a3b38fa226cd3af8eaccc8da580f436 Reviewed-by: Thiago Macieira <[email protected]>
* QTestLib: handle all Qt::Key values in keyToAsciiVolker Hilsheimer2025-01-141-1/+3
| | | | | | | | | | | | | | Since the function is implemented to return 0 for many non-alpha-numeric keys already, make that the default implementation and remove the Q_ASSERT(false). Instead, emit a warning. Amends 1a820560000c7669812de9e2283a539118b24e51, after which the QQuickShortCut test in Qt Quick trips the assert. Change-Id: I6c6ac0a80043c1bbb7683bc47c1092a12b9cf230 Reviewed-by: Vlad Zahorodnii <[email protected]> Reviewed-by: Jules Bertholet <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>