Opened 17 years ago
Closed 17 years ago
Last modified 17 years ago
#3131 closed patch (fixed)
Remove double escaping of backslash and quote when registering keys/jumps
Reported by: | Owned by: | stuartm | |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
The attached patch removes the in-application-code escaping of the backslash and quote characters in RegisterKey?() and RegisterJump?().
[6456] modified the MythMainWindow::RegisterKey?() and MythMainWindow::RegisterJump?() functions to use a prepared query and bindValue() rather than using arg() to build up the SQL statement (see http://svn.mythtv.org/trac/changeset/6456#file3 , old lines 476-506, new lines 505-539). Since bindValue() escapes characters in strings, the in-Myth escaping is no longer necessary. Note that both SVN trunk and 0.20-fixes are affected by this bug.
With the double escaping, the Mute action, whose default keybinding is '|,\,F9' is written to the database with a value of '|,
,F9'. Because '
' is not a valid key sequence, the list of keys is not parsed properly, resulting in '|' being the only usable key for Mute.
This issue will only affect users for whom there is no binding for the Mute action. Those who had already specified a binding prior to the time we started using mythui were unaffected. Therefore, once fixed, this patch will ensure users creating new database have a valid keybinding for Mute.
Users who have recreated the binding using MythControls will also have valid bindings, since MythControls worked, in spite of Myth's double-escaping, because it does not reuse the RegisterKey?() or RegisterJump?() functions. Instead, MythControls reimplements the functionality in KeyBindings::CommitAction?() and KeyBindings::CommitJumppoint?(), but without the double escaping.
I did not implement a "fix" for the bad data in dbcheck.cpp. Users affected by the bug can simply redefine their keybindings using MythControls.
Attachments (1)
Change History (4)
Changed 17 years ago by
Attachment: | mythtv-keybinding_jump-double_escaping.patch added |
---|
comment:1 Changed 17 years ago by
Milestone: | unknown → 0.21 |
---|---|
Owner: | changed from Isaac Richards to stuartm |
comment:2 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 17 years ago by
Backports the mythmainwindow.cpp part of [13260] to -fixes.
Removes unnecessary escaping of backslashes and double quotes in MythMainWindow::RegisterKey? and MythMainWindow::RegisterJump?
The DB update isn't included because it's not practical to backport schema changes.
(In [13260]) Closes #3131
Removes unnecessary escaping of backslashes and double quotes in MythMainWindow::RegisterKey? and MythMainWindow::RegisterJump?
Update the keybindings and jumppoints table to remove extra backslashes inserted as a result of the escaping.