Changeset 2780

Show
Ignore:
Timestamp:
09/16/08 13:13:03 (18 months ago)
Author:
kris
Message:

Fixed several bugs in the SystemUpdater? which caused crashes to occur when closing windows, or when doing updates and not having brought up the status dialog

Location:
pcbsd
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • pcbsd/branches/7.0/SystemUpdater/SystemUpdater.cpp

    r2131 r2780  
    1414#include <Q3ListViewItemIterator> 
    1515#include <Q3CheckListItem> 
    16  
     16#include <QtGui> 
    1717 
    1818void systemUpdater::programInit() 
     
    5050 
    5151 
    52 void systemUpdater::closeEvent( QCloseEvent * e ) 
     52void systemUpdater::closeEvent( QCloseEvent *event ) 
    5353{ 
    5454    // Reimplementation to grab window manager close call 
     55    event->ignore(); 
    5556    slotClose(); 
    5657} 
  • pcbsd/branches/7.0/SystemUpdater/SystemUpdater.h

    r2131 r2780  
    2525    QStringList getListOfCheckedPBIItems(); 
    2626 
     27protected: 
     28    void closeEvent( QCloseEvent *event ); 
     29 
    2730public slots: 
    2831    void programInit(); 
    2932    void slotClose(); 
    30     void closeEvent( QCloseEvent * e ); 
    3133    void slotUserClickedCheckSysUpdates(); 
    3234    void setTextAvailSysUpdates( QString &text ); 
  • pcbsd/branches/7.0/SystemUpdater/UpdaterTray.cpp

    r2600 r2780  
    11221122 
    11231123           QMessageBox::critical( this->contextMenu(), tr("Online Update"), tr("An error occured while downloading. Please check your connection or try again later."), QMessageBox::Ok ); 
    1124            UpdaterStatusDialog->hide(); 
     1124           if ( UpdaterStatusDialog->isShown() ) 
     1125           { 
     1126             UpdaterStatusDialog->hide(); 
     1127           } 
    11251128 
    11261129           programstatus = CHECK_FAILED; 
     
    11941197      { 
    11951198        // The updates are finished! 
     1199        // Bring back up the progress window, since it needs to processevents 
     1200        UpdaterStatusDialog->show(); 
    11961201 
    11971202        if ( requiresSysReboot == 1)  
     
    11991204           QMessageBox::information( this->contextMenu(), tr("Online Update"), tr("Updates successfully installed! Your system will need to reboot to finish."), QMessageBox::Ok); 
    12001205        } else { 
    1201            QMessageBox::information( this->contextMenu(), tr("Online Update"), tr("Updates successfully installed!"), QMessageBox::Ok ); 
    1202         } 
    1203  
    1204            UpdaterStatusDialog->hide(); 
     1206           QMessageBox::information( 0, tr("Online Update"), tr("Updates successfully installed!"), QMessageBox::Ok ); 
     1207        } 
     1208 
     1209           if ( UpdaterStatusDialog->isShown() ) 
     1210           { 
     1211             UpdaterStatusDialog->hide(); 
     1212           } 
    12051213           programstatus = CHECK_FAILED; 
    12061214           // Check for updates again now 
     
    19131921        // The updates are finished! 
    19141922 
     1923          // Bring back up the progress window, since it needs to processevents 
     1924          UpdaterStatusDialog->show(); 
     1925 
    19151926 
    19161927           QMessageBox::information( this->contextMenu(), tr("Online Update"), tr("PBI Upgrades finished!"), QMessageBox::Ok ); 
    1917            UpdaterStatusDialog->hide(); 
     1928           if ( UpdaterStatusDialog->isShown() ) 
     1929           { 
     1930             UpdaterStatusDialog->hide(); 
     1931           } 
    19181932           // Check for updates again now 
    19191933           programstatus = SYSTEM_UP2DATE; 
  • pcbsd/branches/7.0/SystemUpdater/updaterDialog.cpp

    r2600 r2780  
    1414#include <Q3ListView> 
    1515#include <Q3ListViewItemIterator> 
     16#include <QtGui> 
    1617 
    1718void updaterStatus::programInit() 
     
    3031 
    3132 
    32 void updaterStatus::closeEvent( QCloseEvent * e ) 
     33void updaterStatus::closeEvent( QCloseEvent *event ) 
    3334{ 
     35    event->ignore(); 
    3436    slotPushClose(); 
    3537} 
  • pcbsd/branches/7.0/SystemUpdater/updaterDialog.h

    r2600 r2780  
    3636    void slotJobUpdateSpeed(KJob*, unsigned long speed); 
    3737 
     38protected: 
     39    void closeEvent( QCloseEvent *event ); 
    3840 
    3941private slots: 
    4042    void slotPushClose(); 
    41     void closeEvent( QCloseEvent * e ); 
    4243 
    4344private: 
  • pcbsd/trunk/SystemUpdater/SystemUpdater.cpp

    r2131 r2780  
    1414#include <Q3ListViewItemIterator> 
    1515#include <Q3CheckListItem> 
    16  
     16#include <QtGui> 
    1717 
    1818void systemUpdater::programInit() 
     
    5050 
    5151 
    52 void systemUpdater::closeEvent( QCloseEvent * e ) 
     52void systemUpdater::closeEvent( QCloseEvent *event ) 
    5353{ 
    5454    // Reimplementation to grab window manager close call 
     55    event->ignore(); 
    5556    slotClose(); 
    5657} 
  • pcbsd/trunk/SystemUpdater/SystemUpdater.h

    r2131 r2780  
    2525    QStringList getListOfCheckedPBIItems(); 
    2626 
     27protected: 
     28    void closeEvent( QCloseEvent *event ); 
     29 
    2730public slots: 
    2831    void programInit(); 
    2932    void slotClose(); 
    30     void closeEvent( QCloseEvent * e ); 
    3133    void slotUserClickedCheckSysUpdates(); 
    3234    void setTextAvailSysUpdates( QString &text ); 
  • pcbsd/trunk/SystemUpdater/UpdaterTray.cpp

    r2600 r2780  
    11221122 
    11231123           QMessageBox::critical( this->contextMenu(), tr("Online Update"), tr("An error occured while downloading. Please check your connection or try again later."), QMessageBox::Ok ); 
    1124            UpdaterStatusDialog->hide(); 
     1124           if ( UpdaterStatusDialog->isShown() ) 
     1125           { 
     1126             UpdaterStatusDialog->hide(); 
     1127           } 
    11251128 
    11261129           programstatus = CHECK_FAILED; 
     
    11941197      { 
    11951198        // The updates are finished! 
     1199        // Bring back up the progress window, since it needs to processevents 
     1200        UpdaterStatusDialog->show(); 
    11961201 
    11971202        if ( requiresSysReboot == 1)  
     
    11991204           QMessageBox::information( this->contextMenu(), tr("Online Update"), tr("Updates successfully installed! Your system will need to reboot to finish."), QMessageBox::Ok); 
    12001205        } else { 
    1201            QMessageBox::information( this->contextMenu(), tr("Online Update"), tr("Updates successfully installed!"), QMessageBox::Ok ); 
    1202         } 
    1203  
    1204            UpdaterStatusDialog->hide(); 
     1206           QMessageBox::information( 0, tr("Online Update"), tr("Updates successfully installed!"), QMessageBox::Ok ); 
     1207        } 
     1208 
     1209           if ( UpdaterStatusDialog->isShown() ) 
     1210           { 
     1211             UpdaterStatusDialog->hide(); 
     1212           } 
    12051213           programstatus = CHECK_FAILED; 
    12061214           // Check for updates again now 
     
    19131921        // The updates are finished! 
    19141922 
     1923          // Bring back up the progress window, since it needs to processevents 
     1924          UpdaterStatusDialog->show(); 
     1925 
    19151926 
    19161927           QMessageBox::information( this->contextMenu(), tr("Online Update"), tr("PBI Upgrades finished!"), QMessageBox::Ok ); 
    1917            UpdaterStatusDialog->hide(); 
     1928           if ( UpdaterStatusDialog->isShown() ) 
     1929           { 
     1930             UpdaterStatusDialog->hide(); 
     1931           } 
    19181932           // Check for updates again now 
    19191933           programstatus = SYSTEM_UP2DATE; 
  • pcbsd/trunk/SystemUpdater/updaterDialog.cpp

    r2600 r2780  
    1414#include <Q3ListView> 
    1515#include <Q3ListViewItemIterator> 
     16#include <QtGui> 
    1617 
    1718void updaterStatus::programInit() 
     
    3031 
    3132 
    32 void updaterStatus::closeEvent( QCloseEvent * e ) 
     33void updaterStatus::closeEvent( QCloseEvent *event ) 
    3334{ 
     35    event->ignore(); 
    3436    slotPushClose(); 
    3537} 
  • pcbsd/trunk/SystemUpdater/updaterDialog.h

    r2600 r2780  
    3636    void slotJobUpdateSpeed(KJob*, unsigned long speed); 
    3737 
     38protected: 
     39    void closeEvent( QCloseEvent *event ); 
    3840 
    3941private slots: 
    4042    void slotPushClose(); 
    41     void closeEvent( QCloseEvent * e ); 
    4243 
    4344private: