Changeset 2942

Show
Ignore:
Timestamp:
10/29/08 13:42:41 (17 months ago)
Author:
kris
Message:

Little more code cleanup for the system updater enhancements. Seems to work much nicer now, proxy support has been tested
here as well, works also.

Location:
pcbsd
Files:
4 modified

Legend:

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

    r2941 r2942  
    17601760 
    17611761 
    1762 // Read the results to see if this PBI needs an Update 
    1763 void UpdaterTray::slotReadPBIStatusResults() 
    1764 { 
    1765      
    1766     QString line; 
    1767  
    1768  
    1769     while( checkPBIProc->canReadLineStdout() ) 
    1770     { 
    1771         line = checkPBIProc->readLineStdout(); 
    1772         if (line.find("NewVer:" ) ==  0 ) 
    1773         { 
    1774             PBIProgNewVer[currentWorkingPBI] = line.replace("NewVer: ", ""); 
    1775         } 
    1776         if ( line.find("FileURL1:") == 0) 
    1777         { 
    1778             PBIProgURL1[currentWorkingPBI] = line.replace("FileURL1: ", ""); 
    1779             // We have valid data! Set the flag that this PBI is in need of an update 
    1780             PBIProgUpdate[currentWorkingPBI] = 1; 
    1781             //QMessageBox::critical( 0, tr("Online Update"), "Found update to:" + PBIProgName[currentWorkingPBI], QMessageBox::Ok ); 
    1782         } 
    1783         // Check for our other file locations 
    1784         if ( line.find("FileURL2:") == 0) 
    1785         { 
    1786             PBIProgURL2[currentWorkingPBI] = line.replace("FileURL2: ", ""); 
    1787         } 
    1788         if ( line.find("FileURL3:") == 0) 
    1789         { 
    1790             PBIProgURL3[currentWorkingPBI] = line.replace("FileURL3: ", ""); 
    1791         } 
    1792         if ( line.find("MD5:") == 0) 
    1793         { 
    1794             PBIProgMD5[currentWorkingPBI] = line.replace("MD5: ", ""); 
    1795         } 
    1796  
    1797     } 
    1798  
    1799 } 
    1800  
    1801  
    1802  
    1803  
    18041762// The update checking is finished, now see if we have any PBIs which need an update 
    18051763void UpdaterTray::slotPopulatePBIList() 
     
    18071765  int i = 0, foundUpdates = 0; 
    18081766  QString text, tmp, newMsg, ProgDirName, iconPath; 
    1809  
    1810  
    1811  
    1812  
    18131767 
    18141768    while (! PBIProgName[i].isEmpty() ) 
  • pcbsd/branches/7.0/SystemUpdater/UpdaterTray.h

    r2941 r2942  
    4444   void slotStartPBIUpdateCheck(); 
    4545   void slotPBICheckUpdate(); 
    46    void slotReadPBIStatusResults(); 
    4746   void slotPopulatePBIList(); 
    4847   void slotStartPBIUpgrades(); 
  • pcbsd/trunk/SystemUpdater/UpdaterTray.cpp

    r2941 r2942  
    17601760 
    17611761 
    1762 // Read the results to see if this PBI needs an Update 
    1763 void UpdaterTray::slotReadPBIStatusResults() 
    1764 { 
    1765      
    1766     QString line; 
    1767  
    1768  
    1769     while( checkPBIProc->canReadLineStdout() ) 
    1770     { 
    1771         line = checkPBIProc->readLineStdout(); 
    1772         if (line.find("NewVer:" ) ==  0 ) 
    1773         { 
    1774             PBIProgNewVer[currentWorkingPBI] = line.replace("NewVer: ", ""); 
    1775         } 
    1776         if ( line.find("FileURL1:") == 0) 
    1777         { 
    1778             PBIProgURL1[currentWorkingPBI] = line.replace("FileURL1: ", ""); 
    1779             // We have valid data! Set the flag that this PBI is in need of an update 
    1780             PBIProgUpdate[currentWorkingPBI] = 1; 
    1781             //QMessageBox::critical( 0, tr("Online Update"), "Found update to:" + PBIProgName[currentWorkingPBI], QMessageBox::Ok ); 
    1782         } 
    1783         // Check for our other file locations 
    1784         if ( line.find("FileURL2:") == 0) 
    1785         { 
    1786             PBIProgURL2[currentWorkingPBI] = line.replace("FileURL2: ", ""); 
    1787         } 
    1788         if ( line.find("FileURL3:") == 0) 
    1789         { 
    1790             PBIProgURL3[currentWorkingPBI] = line.replace("FileURL3: ", ""); 
    1791         } 
    1792         if ( line.find("MD5:") == 0) 
    1793         { 
    1794             PBIProgMD5[currentWorkingPBI] = line.replace("MD5: ", ""); 
    1795         } 
    1796  
    1797     } 
    1798  
    1799 } 
    1800  
    1801  
    1802  
    1803  
    18041762// The update checking is finished, now see if we have any PBIs which need an update 
    18051763void UpdaterTray::slotPopulatePBIList() 
     
    18071765  int i = 0, foundUpdates = 0; 
    18081766  QString text, tmp, newMsg, ProgDirName, iconPath; 
    1809  
    1810  
    1811  
    1812  
    18131767 
    18141768    while (! PBIProgName[i].isEmpty() ) 
  • pcbsd/trunk/SystemUpdater/UpdaterTray.h

    r2941 r2942  
    4444   void slotStartPBIUpdateCheck(); 
    4545   void slotPBICheckUpdate(); 
    46    void slotReadPBIStatusResults(); 
    4746   void slotPopulatePBIList(); 
    4847   void slotStartPBIUpgrades();