[mythtv-commits] Ticket #3131: Remove double escaping of backslash and quote when registering keys/jumps
MythTV
mythtv at cvs.mythtv.org
Fri Feb 23 21:42:45 UTC 2007
#3131: Remove double escaping of backslash and quote when registering keys/jumps
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean at thirdcontact.com> | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium |
----------------------------------------------+-----------------------------
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.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/3131>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list