07ada0b971
Add a QTest::toString() override for QKeySequence. This is just calling QKeySequence::toString(). The default format is PortableText, which should be ascii. Deliberately avoided NativeText as it can return unicode, e.g. on Mac. This is necessary to get helpful information for test failures when using QCOMPARE for QKeySequence instances. Currently, the returned output would not only be not helpful, but even misleading: Actual (edit.keySequence()): <null> Expected (QKeySequence()) : <null> After adding the override, the output is neither misleading nor unhelpful: Actual (edit.keySequence()): "" Expected (keySequence) : "Return" Some special characters would be escaped in the output, like the literal double quote: Actual (edit.keySequence()): "Ctrl+N" Expected (QKeySequence("\"")): "\"" Change-Id: Ib4b28fca30f6f2ad86c62530767f94a151332e0a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |