No way to escape an ampersand in UCAction
Bug #1587580 reported by
Stefano Verzegnassi
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Medium
|
Cris Dywan |
Bug Description
Let's say we have an Ubuntu.Action as follow:
import Ubuntu.Components 1.3 as Ubuntu
Ubuntu.Action {
text: "Apps & Scopes"
}
UCAction translates the ampersand as a mnemonic, using QKeySequence.
A way to escape a mnemonic in Qt is to add another ampersand. The resulting string is "Apps && Scopes".
The UITK component seems not to take in account this situation, since:
- How the string should be shown in e.g. an ActionBar:
"Apps & Scopes"
- How the string is displayed instead in an ActionBar:
"Apps && Scopes"
QKeySequence returns no mnemonic as expected, but UCAction shows two ampersands.
Related branches
lp://qastaging/~ubuntu-sdk-team/ubuntu-ui-toolkit/escapeLittleAmpersand
- ubuntu-sdk-build-bot: Approve (continuous-integration)
- Zsombor Egri: Approve
-
Diff: 59 lines (+8/-6)2 files modifiedsrc/UbuntuToolkit/ucaction.cpp (+5/-3)
tests/unit/visual/tst_shortcuts.13.qml (+3/-3)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Christian Dywan (kalikiana) |
importance: | Undecided → Medium |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Status changed to 'Confirmed' because the bug affects multiple users.