qt5base-lts/tests/auto
Thiago Macieira dda9c9e2bc moc: fix use of escape sequence of more than one character
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>
2022-06-22 13:03:17 -07:00
..
bic/data Add BiC data for the new way to do BiC testing 2022-05-12 13:33:41 +03:00
cmake Fix memory leaks 2022-06-15 23:58:16 +02:00
concurrent QtConcurrent: prevent conversion of ReduceOption to initial value 2022-05-20 17:11:15 +02:00
corelib QJsonValue: fix incorrect to{Array,Object} when the value is empty 2022-06-21 22:25:32 -07:00
dbus QDBusArgument: ensure std::vector isn't seen as an associative container 2022-05-17 01:27:33 +02:00
gui BLACKLIST tst_qfont for Ubuntu 22.04 2022-06-20 17:06:20 +00:00
guiapplauncher
network QNetworkReply: Fix the test compilation 2022-06-10 20:57:19 +00:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Accessibility: don't emit focus change when reason is window activation 2022-06-16 19:29:36 +02:00
printsupport Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
sql Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
testlib FatalSignalHandler: print the signal name on crash 2022-06-08 20:39:18 +00:00
tools moc: fix use of escape sequence of more than one character 2022-06-22 13:03:17 -07:00
widgets Remove unused variable in tst_QTextEdit::setDocumentPreservesPalette() 2022-06-21 21:42:18 +02:00
xml Add QDom internalSubset implementation 2022-06-23 02:18:39 +08:00
CMakeLists.txt Only configure one test for wasm 2022-05-12 18:55:04 +02:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00