Ticket #6536: mythweather_fix.patch

File mythweather_fix.patch, 4.7 KB (added by Marc Alban <marcalban@…>, 16 years ago)

patch to fix seg fault in MythWeather

  • mythplugins/mythweather/mythweather/weather.cpp

     
    304304{
    305305    m_srcMan->stopTimers();
    306306    m_nextpage_Timer->stop();
    307     m_srcMan->clearSources();
    308     m_srcMan->findScripts();
    309307
    310308    MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
    311309
  • mythplugins/mythweather/mythweather/weatherSetup.cpp

     
    908908    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    909909
    910910    MythUIBusyDialog *busyPopup = new MythUIBusyDialog(busymessage, popupStack,
    911                                                        "mythweatherbusydialog");
     911                                                       "mythweatherbusydialog", true);
    912912
    913913    if (busyPopup->Create())
    914914        popupStack->AddScreen(busyPopup, false);
  • mythplugins/mythweather/mythweather/sourceManager.cpp

     
    8787    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    8888
    8989    MythUIBusyDialog *busyPopup = new MythUIBusyDialog(busymessage, popupStack,
    90                                                        "mythweatherbusydialog");
     90                                                       "mythweatherbusydialog", true);
    9191
    9292    if (busyPopup->Create())
    9393        popupStack->AddScreen(busyPopup, false);
  • mythtv/libs/libmythui/mythprogressdialog.h

     
    3232    Q_OBJECT
    3333  public:
    3434    MythUIBusyDialog(const QString &message,
    35                   MythScreenStack *parent, const char *name);
     35                  MythScreenStack *parent, const char *name, bool modal=false);
    3636
    3737    bool Create(void);
    3838    bool keyPressEvent(QKeyEvent *event);
    3939
    4040  protected:
     41    bool m_modal;
    4142    QString m_message;
    4243
    4344    MythUIText *m_messageText;
     
    4849    Q_OBJECT
    4950  public:
    5051    MythUIProgressDialog(const QString &message,
    51                   MythScreenStack *parent, const char *name);
     52                  MythScreenStack *parent, const char *name, bool modal=false);
    5253
    5354    bool Create(void);
    5455    bool keyPressEvent(QKeyEvent *event);
     
    6061  protected:
    6162    void UpdateProgress(void);
    6263
     64    bool m_modal;
    6365    QString m_message;
    6466    uint m_total;
    6567    uint m_count;
  • mythtv/libs/libmythui/mythprogressdialog.cpp

     
    33#include "mythverbose.h"
    44
    55MythUIBusyDialog::MythUIBusyDialog(const QString &message,
    6                              MythScreenStack *parent, const char *name)
    7          : MythScreenType(parent, name, false)
     6                             MythScreenStack *parent, const char *name, bool modal)
     7         : MythScreenType(parent, name, false), m_modal(modal)
    88{
    99    if (!message.isEmpty())
    1010        m_message = message;
     
    2828
    2929bool MythUIBusyDialog::keyPressEvent(QKeyEvent *event)
    3030{
    31     // We want to handle any keypresses, including Escape in the base
    32     // class
    33     return false;
     31    // We want to catch all keypresses here if the busy dialog is modal.
     32    return m_modal;
    3433}
    3534
    3635MythUIBusyDialog  *ShowBusyPopup(const QString &message)
     
    6968//---------------------------------------------------------
    7069
    7170MythUIProgressDialog::MythUIProgressDialog(const QString &message,
    72                              MythScreenStack *parent, const char *name)
    73          : MythScreenType(parent, name, false)
     71                             MythScreenStack *parent, const char *name, bool modal)
     72         : MythScreenType(parent, name, false), m_modal(modal)
    7473{
    7574    m_count = m_total = 0;
    7675    m_message = message;
     
    9493
    9594bool MythUIProgressDialog::keyPressEvent(QKeyEvent *event)
    9695{
    97     // We want to handle any keypresses, including Escape in the base
    98     // class
    99     return false;
     96    // We want to catch all keypresses here if the progress dialog is modal.
     97    return m_modal;
    10098}
    10199
    102100void MythUIProgressDialog::customEvent(QEvent *event)