Changeset fe1640b


Ignore:
Timestamp:
11/17/13 15:44:44 (13 months ago)
Author:
yurkis <yurkis@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
97d37dfa
Parents:
7ad7f46
Message:

misc. changes

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

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-updatecenter/mainwindow.cpp

    r7c8b8a0 rfe1640b  
    7171    } 
    7272 
    73 #if 1 
     73#ifdef CONTROLLER_EMULATION_ENABLED 
    7474    mPkgController.setEmulateCheckFile("/home/yurkis/_pkgcheck.txt"); 
    7575    mPkgController.setEmulateUpdateFile("/home/yurkis/_pkgupd.txt"); 
     
    157157        else 
    158158        { 
    159             ui->pkgSpaceReqLabel_2->setText(tr("Upgrade will free %1").arg(pcbsd::Utils::bytesToHumanReadable(- upd.mDiskSpace))); 
     159            ui->pkgSpaceReqLabel_2->setText(tr("Upgrade will free %1").arg(pcbsd::Utils::bytesToHumanReadable(0 - upd.mDiskSpace))); 
    160160        } 
    161161 
  • src-qt4/pc-updatecenter/pkgcontroller.cpp

    r7c8b8a0 rfe1640b  
    210210    if (line.indexOf(DL_FETCH_START) == 0) 
    211211    { 
     212        misWasInstalation= false; 
    212213        //starting fetch 
    213214        mCurrentPkgNo++; 
     
    310311        QString msg = line_list[0] + QString(" ") + state + QString(" ") + pkg_name; 
    311312        progress.mMessage = msg; 
     313 
     314        misWasInstalation= true; 
     315    } 
     316    else 
     317    if (misDownloadComplete && misWasInstalation) 
     318    { 
     319        progress.mMessage = tr("Finaizing instalation..."); 
    312320    } 
    313321 
     
    315323 
    316324    reportProgress(progress); 
     325} 
     326 
     327void CPkgController::onUpdateProcessfinished(int exitCode) 
     328{ 
     329    if (!misWasInstalation || exitCode) 
     330    { 
     331        reportError(tr("Installation process was unxepected terminated")); 
     332    } 
     333    else 
     334        check(); 
     335} 
     336 
     337void CPkgController::onCancel() 
     338{ 
     339    process().terminate(); 
     340    process().waitForFinished(); 
     341    check(); 
    317342} 
    318343 
  • src-qt4/pc-updatecenter/pkgcontroller.h

    r453e63a rfe1640b  
    4444        unsigned int mInstallCount; 
    4545        unsigned int mReinstallCount; 
    46         long long  mDownloadSize; 
    47         long long  mDiskSpace; 
     46        signed long  mDownloadSize; 
     47        signed long  mDiskSpace; 
    4848        QVector<SPackageUpdate> mvPkgUpdates; 
    4949        _SUpdateDescription():mCommonPkgsCount(0), mUpgradeCount(0), mInstallCount(0), mReinstallCount(0), mDownloadSize(0), mDiskSpace(0){;}; 
     
    6060    virtual void onUpdateAll(); 
    6161    virtual void onReadUpdateLine(QString line); 
     62    virtual void onUpdateProcessfinished(int exitCode); 
     63    virtual void onCancel(); 
    6264 
    6365signals: 
     
    7072    SUpdate mUpdData; 
    7173    bool    misDownloadComplete; 
     74    bool    misWasInstalation; 
    7275    int     mCurrentPkgNo; 
    7376    int     misInFetch; 
  • src-qt4/pc-updatecenter/updatecontroller.h

    r7c8b8a0 rfe1640b  
    66#include <QProcess> 
    77 
    8 #define CONTROLLER_EMULATION_ENABLED 
     8//#define CONTROLLER_EMULATION_ENABLED 
    99 
    1010#define USES_CHECK_SHELL_COMMAND(command, arguments)\ 
Note: See TracChangeset for help on using the changeset viewer.