[mythtv-commits] mythtv commit: r14908 - in trunk by danielk
mythtv at cvs.mythtv.org
mythtv at cvs.mythtv.org
Mon Nov 19 16:44:59 UTC 2007
Author: danielk
Date: 2007-11-19 16:44:58 +0000 (Mon, 19 Nov 2007)
New Revision: 14908
Changeset: http://cvs.mythtv.org/trac/changeset/14908
Modified:
trunk/mythplugins/mytharchive/mytharchive/editmetadata.cpp
trunk/mythplugins/mytharchive/mytharchive/editmetadata.h
trunk/mythplugins/mytharchive/mytharchive/exportnativewizard.cpp
trunk/mythplugins/mytharchive/mytharchive/fileselector.cpp
trunk/mythplugins/mytharchive/mytharchive/importnativewizard.cpp
trunk/mythplugins/mytharchive/mytharchive/logviewer.cpp
trunk/mythplugins/mytharchive/mytharchive/logviewer.h
trunk/mythplugins/mytharchive/mytharchive/main.cpp
trunk/mythplugins/mytharchive/mytharchive/mythburnwizard.cpp
trunk/mythplugins/mytharchive/mytharchive/recordingselector.cpp
trunk/mythplugins/mytharchive/mytharchive/videoselector.cpp
trunk/mythplugins/mythbrowser/mythbrowser/tabview.cpp
trunk/mythplugins/mythcontrols/mythcontrols/keygrabber.h
trunk/mythplugins/mythcontrols/mythcontrols/mythcontrols.cpp
trunk/mythplugins/mythgallery/mythgallery/iconview.cpp
trunk/mythplugins/mythgame/mythgame/gamehandler.cpp
trunk/mythplugins/mythgame/mythgame/gamesettings.cpp
trunk/mythplugins/mythgame/mythgame/gamesettings.h
trunk/mythplugins/mythgame/mythgame/gametree.cpp
trunk/mythplugins/mythgame/mythgame/rominfo.cpp
trunk/mythplugins/mythmusic/mythmusic/cdrip.cpp
trunk/mythplugins/mythmusic/mythmusic/directoryfinder.cpp
trunk/mythplugins/mythmusic/mythmusic/editmetadata.cpp
trunk/mythplugins/mythmusic/mythmusic/globalsettings.cpp
trunk/mythplugins/mythmusic/mythmusic/importmusic.cpp
trunk/mythplugins/mythmusic/mythmusic/importmusic.h
trunk/mythplugins/mythmusic/mythmusic/playbackbox.cpp
trunk/mythplugins/mythmusic/mythmusic/search.cpp
trunk/mythplugins/mythmusic/mythmusic/search.h
trunk/mythplugins/mythmusic/mythmusic/smartplaylist.cpp
trunk/mythplugins/mythmusic/mythmusic/smartplaylist.h
trunk/mythplugins/mythnews/mythnews/mythnews.cpp
trunk/mythplugins/mythphone/mythphone/phoneui.cpp
trunk/mythplugins/mythvideo/mythvideo/editmetadata.cpp
trunk/mythplugins/mythvideo/mythvideo/fileassoc.cpp
trunk/mythplugins/mythvideo/mythvideo/main.cpp
trunk/mythplugins/mythvideo/mythvideo/parentalcontrols.cpp
trunk/mythplugins/mythvideo/mythvideo/titledialog.cpp
trunk/mythplugins/mythvideo/mythvideo/videodlg.cpp
trunk/mythplugins/mythvideo/mythvideo/videodlg.h
trunk/mythplugins/mythvideo/mythvideo/videofilter.cpp
trunk/mythplugins/mythvideo/mythvideo/videogallery.h
trunk/mythplugins/mythvideo/mythvideo/videomanager.h
trunk/mythplugins/mythvideo/mythvideo/videoscan.cpp
trunk/mythplugins/mythvideo/mythvideo/videotree.cpp
trunk/mythplugins/mythweather/mythweather/weatherSetup.cpp
trunk/mythplugins/mythzoneminder/mythzoneminder/zmevents.cpp
trunk/mythplugins/mythzoneminder/mythzoneminder/zmliveplayer.cpp
trunk/mythtv/libs/libmyth/dialogbox.cpp
trunk/mythtv/libs/libmyth/dialogbox.h
trunk/mythtv/libs/libmyth/mythcontext.cpp
trunk/mythtv/libs/libmyth/mythcontext.h
trunk/mythtv/libs/libmyth/mythdialogs.cpp
trunk/mythtv/libs/libmyth/mythdialogs.h
trunk/mythtv/libs/libmyth/mythmediamonitor.cpp
trunk/mythtv/libs/libmyth/mythwidgets.cpp
trunk/mythtv/libs/libmyth/mythwidgets.h
trunk/mythtv/libs/libmyth/settings.cpp
trunk/mythtv/libs/libmyth/settings.h
trunk/mythtv/libs/libmyth/uilistbtntype.cpp
trunk/mythtv/libs/libmyth/uitypes.cpp
trunk/mythtv/libs/libmyth/virtualkeyboard.cpp
trunk/mythtv/libs/libmyth/virtualkeyboard.h
trunk/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
trunk/mythtv/libs/libmythtv/channeleditor.cpp
trunk/mythtv/libs/libmythtv/channeleditor.h
trunk/mythtv/libs/libmythtv/customedit.cpp
trunk/mythtv/libs/libmythtv/diseqcsettings.cpp
trunk/mythtv/libs/libmythtv/diseqcsettings.h
trunk/mythtv/libs/libmythtv/playgroup.cpp
trunk/mythtv/libs/libmythtv/playgroup.h
trunk/mythtv/libs/libmythtv/previouslist.cpp
trunk/mythtv/libs/libmythtv/profilegroup.cpp
trunk/mythtv/libs/libmythtv/profilegroup.h
trunk/mythtv/libs/libmythtv/progdetails.cpp
trunk/mythtv/libs/libmythtv/progdetails.h
trunk/mythtv/libs/libmythtv/proglist.cpp
trunk/mythtv/libs/libmythtv/proglist.h
trunk/mythtv/libs/libmythtv/programinfo.cpp
trunk/mythtv/libs/libmythtv/recordingprofile.cpp
trunk/mythtv/libs/libmythtv/recordingprofile.h
trunk/mythtv/libs/libmythtv/scanwizardhelpers.cpp
trunk/mythtv/libs/libmythtv/scanwizardhelpers.h
trunk/mythtv/libs/libmythtv/scanwizardscanner.cpp
trunk/mythtv/libs/libmythtv/scheduledrecording.cpp
trunk/mythtv/libs/libmythtv/scheduledrecording.h
trunk/mythtv/libs/libmythtv/storagegroup.cpp
trunk/mythtv/libs/libmythtv/storagegroup.h
trunk/mythtv/libs/libmythtv/transporteditor.cpp
trunk/mythtv/libs/libmythtv/transporteditor.h
trunk/mythtv/libs/libmythtv/tv_play.cpp
trunk/mythtv/libs/libmythtv/videosource.cpp
trunk/mythtv/libs/libmythtv/videosource.h
trunk/mythtv/libs/libmythui/myththemedmenu.cpp
trunk/mythtv/programs/mythfrontend/main.cpp
trunk/mythtv/programs/mythfrontend/playbackbox.cpp
trunk/mythtv/programs/mythfrontend/playbackbox.h
trunk/mythtv/programs/mythfrontend/statusbox.cpp
trunk/mythtv/programs/mythtv-setup/main.cpp
trunk/mythtv/programs/mythwelcome/welcomedialog.cpp
trunk/mythtv/programs/mythwelcome/welcomedialog.h
Log:
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.
More information about the mythtv-commits
mailing list