Ticket #5178: programs_mythfrontend-ctor-need-no-scoping-operators.patch

File programs_mythfrontend-ctor-need-no-scoping-operators.patch, 1.8 KB (added by Erik Hovland <erik@…>, 16 years ago)

class scoping fixes in programs/mythfrontend/

  • programs/mythfrontend/manualschedule.cpp

    Using class scope with ctors is dangerous.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     programs/mythfrontend/manualschedule.cpp |   10 +++++-----
     1 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/programs/mythfrontend/manualschedule.cpp b/programs/mythfrontend/manualschedule.cpp
    index c30abb4..0259f65 100644
    a b ManualSchedule::ManualSchedule(MythMainWindow *parent, const char *name) 
    125125    QTime thisTime = m_nowDateTime.time();
    126126    thisTime = thisTime.addSecs((30 - thisTime.minute() % 30) * 60);
    127127   
    128     if (thisTime < QTime::QTime(0,30))
     128    if (thisTime < QTime(0,30))
    129129        m_startdate->setCurrentItem(m_startdate->currentItem() + 1);
    130130
    131131    message = tr("Time:");
    ManualSchedule::ManualSchedule(MythMainWindow *parent, const char *name) 
    146146
    147147    for(int m_index = -1; m_index <= 24; m_index++)
    148148    {
    149         m_starthour->insertItem(QTime::QTime((m_index + 24) % 24, 0)
    150                                              .toString(hr_format));
     149        m_starthour->insertItem(QTime((m_index + 24) % 24, 0)
     150                                      .toString(hr_format));
    151151        if (thisTime.hour() == m_index)
    152152            m_starthour->setCurrentItem(m_starthour->count() - 1);
    153153    }
    ManualSchedule::ManualSchedule(MythMainWindow *parent, const char *name) 
    157157
    158158    for(int m_index = -5; m_index <= 60; m_index += 5)
    159159    {
    160         m_startminute->insertItem(QTime::QTime(0, (m_index + 60) % 60)
    161                                                .toString(":mm"));
     160        m_startminute->insertItem(QTime(0, (m_index + 60) % 60)
     161                                       .toString(":mm"));
    162162        if (m_index == thisTime.minute())
    163163            m_startminute->setCurrentItem(m_startminute->count() - 1);
    164164    }