From 7ae55889805bc1d62c0268938eeca20bec9b773c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 14 Jun 2017 16:40:50 +0200 Subject: Visualize mnemonics Unfortunately this comes a bit late in the 5.10 cycle, but this should be released together with the rest of the mnemonics stuff going out in 5.10, because it affects the value of AbstractButton/Menu(Bar)Item::text. As the removed TODO comments and altered tests indicate, previously the ampersand was blatantly stripped out. It would be worse to change it later once people have already started using mnemonics and rely on the behavior in custom styles. The necessary modifications to QQuickText were added in qtdeclarative commit 65ef4ba. Task-number: QTBUG-61422 Change-Id: Iaa73da8c012e9a6019743cf98f5bdc02527064e5 Reviewed-by: Mitch Curtis --- tests/auto/controls/data/tst_abstractbutton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/controls/data/tst_abstractbutton.qml') diff --git a/tests/auto/controls/data/tst_abstractbutton.qml b/tests/auto/controls/data/tst_abstractbutton.qml index 168844a0..90c6567f 100644 --- a/tests/auto/controls/data/tst_abstractbutton.qml +++ b/tests/auto/controls/data/tst_abstractbutton.qml @@ -303,7 +303,7 @@ TestCase { verify(control) control.text = "&Hello" - compare(control.text, "Hello") // ### TODO: visualize mnemonics + compare(control.text, "&Hello") var clickSpy = signalSpy.createObject(control, {target: control, signalName: "clicked"}) verify(clickSpy.valid) @@ -320,7 +320,7 @@ TestCase { compare(clickSpy.count, 2) control.text = "Te&st" - compare(control.text, "Test") // ### TODO: visualize mnemonics + compare(control.text, "Te&st") keyClick(Qt.Key_H, Qt.AltModifier) compare(clickSpy.count, 2) -- cgit v1.2.3