Changeset c21cafa


Ignore:
Timestamp:
01/09/14 20:05:24 (7 months ago)
Author:
yurkis <yurkis@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
4f9718b
Parents:
e8d79fa
Message:

Update center - current base system update description showing

Location:
src-qt4/pc-updatecenter
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-updatecenter/dialogs/updatehistorydialog.ui

    r08cf0aa rc21cafa  
    1212  </property> 
    1313  <property name="windowTitle"> 
    14    <string>Dialog</string> 
     14   <string>Base system updates history</string> 
    1515  </property> 
    1616  <layout class="QVBoxLayout" name="verticalLayout"> 
  • src-qt4/pc-updatecenter/syscontroller.cpp

    r08cf0aa rc21cafa  
    9494    QVector<CSysController::SFbsdUpdatesDescription> out; 
    9595 
    96     QStringList fetch_out = pcbsd::Utils::runShellCommand(QString(UPDATE_DESCRIPTIONS_FETCH_COMMAND) + " " + UPDATE_DESCRIPTIONS_URL); 
    97  
    9896    if (!mvFbsdUpdateDescriptions.size() || isForse) 
    9997    { 
     98        QStringList fetch_out = pcbsd::Utils::runShellCommand(QString(UPDATE_DESCRIPTIONS_FETCH_COMMAND) + " " + UPDATE_DESCRIPTIONS_URL); 
    10099        mvFbsdUpdateDescriptions.clear(); 
    101100        for (int i=0; i<fetch_out.size(); i++) 
     
    139138    mFilesToRemove.clear(); 
    140139    mFilesToUpdate.clear(); 
     140    mCurrentFbsdDescription = tr("Base system update"); 
     141    updateDescriptions(); 
    141142} 
    142143 
     
    237238        { 
    238239            SSystemUpdate entry; 
    239             entry.mName= tr("Base system update"); 
     240            entry.mName = mCurrentFbsdDescription; 
    240241            entry.mType= eFBSDUPDATE; 
    241242            entry.misRequiresReboot= misFBSDRebootRequired; 
     
    305306    { 
    306307        setCurrentState(eFULLY_UPDATED); 
    307     }*/ 
     308    }*/     
    308309    static SSystemUpdate upd; 
    309310    line= line.trimmed(); 
     
    369370void CSysController::parseCheckFREEBSDLine(QString line) 
    370371{ 
    371     //qDebug()<<line; 
    372  
    373372    typedef enum{ 
    374373        eUndefined, 
     
    393392    if (line.contains(FILES_MODIFYED_LOCALLY)) 
    394393    { 
    395         currCheckState= eFilesModifyedLocally; 
     394        currCheckState= eFilesModifyedLocally;         
    396395        return; 
    397396    } 
     
    399398    { 
    400399        currCheckState= eFilesToDelete; 
     400        mCurrentFbsdDescription= fbsdUpdateDescription(line); 
    401401        return; 
    402402    } 
    403403    else if (line.contains(FILES_TO_UPDATE)) 
    404     { 
     404    {         
    405405        currCheckState= eFilesToUpdate; 
     406        mCurrentFbsdDescription= fbsdUpdateDescription(line); 
     407 
    406408        return; 
    407409    } 
     
    526528    reportLogLine(line); 
    527529} 
     530 
     531/////////////////////////////////////////////////////////////////////////////// 
     532QString CSysController::fbsdUpdateDescription(QString line) 
     533{ 
     534    // Example line: "The following files will be updated as part of updating to 10.0-RELEASE-p3:" 
     535    line = line.trimmed(); 
     536    QString release = line.right(line.length() - line.lastIndexOf(" ")); 
     537    release = release.left(release.lastIndexOf("-")).trimmed(); 
     538    QString patch = line.right(line.length() - line.lastIndexOf("-")).replace("-p","").replace(':',""); 
     539    int patch_num = patch.toInt(); 
     540    QVector<SFbsdUpdatesDescription> descrs = updateDescriptions(release); 
     541 
     542    QString ret = tr("Base system update"); 
     543 
     544    for(int i=0; i<descrs.size(); i++) 
     545    { 
     546        if (descrs[i].mUpdateNo == patch_num) 
     547        { 
     548            ret = descrs[i].mDescription; 
     549            break; 
     550        } 
     551    } 
     552    return ret; 
     553} 
  • src-qt4/pc-updatecenter/syscontroller.h

    r08cf0aa rc21cafa  
    113113 
    114114    QVector<SFbsdUpdatesDescription> mvFbsdUpdateDescriptions; 
     115    QString mCurrentFbsdDescription; 
    115116 
    116117    void parseCheckPCBSDLine(QString line); 
     
    121122    void parseFreeBSDUpdateLine(QString line); 
    122123 
     124    QString fbsdUpdateDescription(QString line); 
     125 
    123126 
    124127}; 
  • src-qt4/pc-updatecenter/updatecontroller.cpp

    r43257ed rc21cafa  
    2626 
    2727#include <QDebug> 
     28#include <QCoreApplication> 
    2829#include <unistd.h> 
    2930 
     
    245246    Q_UNUSED(exitStatus) 
    246247 
     248    slotProcessRead(); 
     249 
    247250    switch (currentState()) 
    248251    { 
Note: See TracChangeset for help on using the changeset viewer.