Ticket #4666: mythtv_tv_play_delete_timers.diff

File mythtv_tv_play_delete_timers.diff, 1.2 KB (added by Shane Shrybman <gnome42@…>, 13 years ago)

delete timers in tv_play

  • libs/libmythtv/tv_play.cpp

     
    740740TV::~TV(void)
    741741{
    742742    QMutexLocker locker(&osdlock); // prevent UpdateOSDSignal from continuing.
     743
     744    if (sleepTimer)
     745    {
     746        sleepTimer->disconnect();
     747        sleepTimer->deleteLater();
     748        sleepTimer = NULL;
     749    }
     750
     751    if (idleTimer)
     752    {
     753        idleTimer->disconnect();
     754        idleTimer->deleteLater();
     755        idleTimer = NULL;
     756    }
     757
     758    if (keyrepeatTimer)
     759    {
     760        keyrepeatTimer->disconnect();
     761        keyrepeatTimer->deleteLater();
     762        keyrepeatTimer = NULL;
     763    }
     764
     765    if (muteTimer)
     766    {
     767        muteTimer->disconnect();
     768        muteTimer->deleteLater();
     769        muteTimer = NULL;
     770    }
     771
     772    if (prevChanTimer)
     773    {
     774        prevChanTimer->disconnect();
     775        prevChanTimer->deleteLater();
     776        prevChanTimer = NULL;
     777    }
     778
     779    if (browseTimer)
     780    {
     781        browseTimer->disconnect();
     782        browseTimer->deleteLater();
     783        browseTimer = NULL;
     784    }
     785
    743786    gContext->removeListener(this);
    744787    gContext->removeCurrentLocation();
    745788