[mythtv-commits] Ticket #4132: In some menu's ESCAPE action is not handled appropriately
    MythTV 
    mythtv at cvs.mythtv.org
       
    Mon Nov 19 16:45:02 UTC 2007
    
    
  
#4132: In some menu's ESCAPE action is not handled appropriately
---------------------+------------------------------------------------------
 Reporter:  danielk  |        Owner:  danielk
     Type:  patch    |       Status:  closed 
 Priority:  minor    |    Milestone:  0.21   
Component:  mythtv   |      Version:  head   
 Severity:  medium   |   Resolution:  fixed  
  Mlocked:  0        |  
---------------------+------------------------------------------------------
Changes (by danielk):
  * status:  new => closed
  * resolution:  => fixed
Comment:
 (In [14908]) Fixes #4132. Escape action was not handled correctly in a
 number of dialogs after [14478].
 This creates a DialogCode enum and uses it for the return value of the
 MythTV dialogs in lib/libmyth. This allows us to fix an inconstency in
 reject() handling that exists due to Qt using a reject value of 0 while we
 have used both -1 and 0 in the past.
 While -1 is more like how C handles error returns from functions the
 inconsitency lead to many errors the Qt object were inherited publicly so
 child dialogs would sometimes use those exec() functions and slots. From
 looking at the code of many people in MythTV this has lead to many ways to
 solve the problem; many with signals and slots that should not be needed.
 All of the solutions use one of three methods to check returns: hard coded
 ints, QDialog::Accepted/QDialog::Rejected, or after [14478]
 MythDialog::Accepted/MythDialog::Rejected. In [14478], I tried to keep the
 affected code to a minimum to avoid needing to test dialogs unrelated to
 the ones I was fixing, but when I tried to fix the escape problem using
 this policy it just didn't work. In this change I've instead changed all
 hard coded ints to check against the enumerated DialogCodes and those
 dialog codes are consistent with the existing QDialog return code enum and
 the MythDialog return code enum introduced in [14478]; during testing I
 temporarily changed DialogCode to a class so as to catch all the implicit
 casts of this value to int.
 Obviously, I've done a lot of testing in the last two weeks of the
 mythfrontend, mythtv-setup and plugins; and Paul has also tested most of
 the plugins. We needed to fix some bugs along the way as referenced in the
 ticket in order to test the dialogs in some of the plugins that were
 broken. But there are a large number of dialogs in MythTV and they have
 not all been tested, if you wind any strange behaviour please note it on
 this ticket or create a new ticket and I'll attend to the problem.
 This change requires mythtv and its plugins to be recompiled.
-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4132#comment:18>
MythTV <http://svn.mythtv.org/trac>
MythTV
    
    
More information about the mythtv-commits
mailing list