Changeset 2908

Show
Ignore:
Timestamp:
10/15/08 12:51:29 (17 months ago)
Author:
kris
Message:

Updated a few more potential crashes in the System Updater tool, and make it a KUniqueApplication to prevent multiple copies from crashing into one another.

Location:
pcbsd
Files:
4 modified

Legend:

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

    r2790 r2908  
    898898  // Hide the system updater tool 
    899899  SystemUpdaterDialog->hide(); 
     900  UpdaterStatusDialog->show(); 
    900901 
    901902  // Clear out the reboot status flag 
     
    941942 if ( rebootFlag == 1 ) 
    942943 { 
     944     // Show the updater status dialog, so user can see any errors 
     945    UpdaterStatusDialog->show(); 
     946 
    943947    QMessageBox::warning( this->contextMenu(), tr("Online Update"), tr("One or more updates will require a reboot. You will be prompted to restart after the update is finished."), QMessageBox::Ok ); 
    944948    requiresSysReboot = 1; 
     
    12641268     
    12651269            if ( ! extractProc->start() ) { 
     1270                // Show the updater status dialog, so user can see any errors 
     1271                UpdaterStatusDialog->show(); 
     1272 
    12661273                QMessageBox::critical( this->contextMenu(), tr("Online Update"), tr("An error occured while extracting. Please try again later."), QMessageBox::Ok ); 
     1274                if ( UpdaterStatusDialog->isShown() ) 
     1275                { 
     1276                   UpdaterStatusDialog->hide(); 
     1277                } 
    12671278                exit(15);        
    12681279            }  
     
    16881699  // Hide the system updater tool 
    16891700  SystemUpdaterDialog->hide(); 
     1701  UpdaterStatusDialog->show(); 
    16901702 
    16911703 
     
    17501762       if ( attemptedRedownload == 3) 
    17511763       { 
     1764           // Show the updater status dialog, so user can see any errors 
     1765           UpdaterStatusDialog->show(); 
     1766           
    17521767          QMessageBox::critical( this->contextMenu(), tr("Online Update"), PBIProgName[currentWorkingPBI] + ": " + tr("An error occured while downloading. Please try again later."), QMessageBox::Ok ); 
    17531768 
  • pcbsd/branches/7.0/SystemUpdater/main.cpp

    r2131 r2908  
    22#include <qtranslator.h> 
    33#include <qtextcodec.h> 
    4 #include <kapplication.h> 
     4#include <kuniqueapplication.h> 
    55#include <kaboutdata.h> 
    66#include <kcmdlineargs.h> 
     
    2323    aboutData.addAuthor(ki18n("Kris Moore"), ki18n("Current maintainer"), "kris@pcbsd.org"); 
    2424 
    25     KCmdLineArgs::init(argc, argv, &aboutData); 
     25   KCmdLineArgs::init(argc, argv, &aboutData); 
    2626 
    2727   KCmdLineOptions options; 
     
    3030   KCmdLineArgs::addCmdLineOptions( options ); 
    3131 
    32    KApplication a; 
     32   KUniqueApplication a; 
    3333 
    3434   UpdaterTray tray; 
  • pcbsd/trunk/SystemUpdater/UpdaterTray.cpp

    r2790 r2908  
    898898  // Hide the system updater tool 
    899899  SystemUpdaterDialog->hide(); 
     900  UpdaterStatusDialog->show(); 
    900901 
    901902  // Clear out the reboot status flag 
     
    941942 if ( rebootFlag == 1 ) 
    942943 { 
     944     // Show the updater status dialog, so user can see any errors 
     945    UpdaterStatusDialog->show(); 
     946 
    943947    QMessageBox::warning( this->contextMenu(), tr("Online Update"), tr("One or more updates will require a reboot. You will be prompted to restart after the update is finished."), QMessageBox::Ok ); 
    944948    requiresSysReboot = 1; 
     
    12641268     
    12651269            if ( ! extractProc->start() ) { 
     1270                // Show the updater status dialog, so user can see any errors 
     1271                UpdaterStatusDialog->show(); 
     1272 
    12661273                QMessageBox::critical( this->contextMenu(), tr("Online Update"), tr("An error occured while extracting. Please try again later."), QMessageBox::Ok ); 
     1274                if ( UpdaterStatusDialog->isShown() ) 
     1275                { 
     1276                   UpdaterStatusDialog->hide(); 
     1277                } 
    12671278                exit(15);        
    12681279            }  
     
    16881699  // Hide the system updater tool 
    16891700  SystemUpdaterDialog->hide(); 
     1701  UpdaterStatusDialog->show(); 
    16901702 
    16911703 
     
    17501762       if ( attemptedRedownload == 3) 
    17511763       { 
     1764           // Show the updater status dialog, so user can see any errors 
     1765           UpdaterStatusDialog->show(); 
     1766           
    17521767          QMessageBox::critical( this->contextMenu(), tr("Online Update"), PBIProgName[currentWorkingPBI] + ": " + tr("An error occured while downloading. Please try again later."), QMessageBox::Ok ); 
    17531768 
  • pcbsd/trunk/SystemUpdater/main.cpp

    r2131 r2908  
    22#include <qtranslator.h> 
    33#include <qtextcodec.h> 
    4 #include <kapplication.h> 
     4#include <kuniqueapplication.h> 
    55#include <kaboutdata.h> 
    66#include <kcmdlineargs.h> 
     
    2323    aboutData.addAuthor(ki18n("Kris Moore"), ki18n("Current maintainer"), "kris@pcbsd.org"); 
    2424 
    25     KCmdLineArgs::init(argc, argv, &aboutData); 
     25   KCmdLineArgs::init(argc, argv, &aboutData); 
    2626 
    2727   KCmdLineOptions options; 
     
    3030   KCmdLineArgs::addCmdLineOptions( options ); 
    3131 
    32    KApplication a; 
     32   KUniqueApplication a; 
    3333 
    3434   UpdaterTray tray;