path: root/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
diff options
authorMikolaj Boc <>2022-07-29 08:57:16 +0200
committerMikolaj Boc <>2022-08-10 12:25:36 +0200
commit784555cc2fa9d1625a4cac458c15d28cf0c1f4d7 (patch)
treee15072f2e48c4186ec04ea5cd50dd0686d2058bb /tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
parent595526e44623b950acd2bae1e958d21d55df0333 (diff)
Refactor QWasmEventTranslator for added readability
Change listing: - change names of abbreviated structures/variables (e.g. KeyTbl -> WebToQtKeyCodeMappings) - add constants for commonly used magic strings ("Dead", StringTerminator) - use common idioms for common tasks (find_if, std::optional) - use binary search as facilitated by the sorted array instead of a full search - this optimizes the code at no cost - remove dead code (double translateEmscriptKey in QWasmEventTranslator::getKey, remove sticky dead key support as it was write-only, remove the dead setIsMac and g_usePlatformMacSpecifics, remove the dead getWindowAt). - cull the public interface on QWasmEventTranslator as some functions are only used internally (translateEmscriptKey) - simplify / shorten functions by short-circuiting - modernize definitions (= default) - auto-format the changes using clang-format The file is now much easier to read and understand. Change-Id: I5ea2bdafd9b9abc009feeb5516ddd87fb0ca212e Reviewed-by: Morten Johan Sørvig <>
Diffstat (limited to 'tests/auto/corelib/tools/qmargins/tst_qmargins.cpp')
0 files changed, 0 insertions, 0 deletions