VirtualBox

Ignore:
Timestamp:
Jun 4, 2019 2:59:37 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131095
Message:

FE/Qt: bugref:9434: UIProgressDialog: Cache current operation weight among other progress parameters; Use agreement implemented in r131088 and r131090 to reflect infinite progress animation if the only operation weight is equal to 1.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp

    r76606 r78969  
    6969    , m_cOperations(m_comProgress.GetOperationCount())
    7070    , m_uCurrentOperation(m_comProgress.GetOperation() + 1)
     71    , m_uCurrentOperationWeight(m_comProgress.GetOperationWeight())
    7172    , m_fCancelEnabled(false)
    7273    , m_fEnded(false)
     
    316317                {
    317318                    /* Configure progress-bar: */
    318                     m_pProgressBar->setMaximum(100);
     319                    // WORKAROUND:
     320                    // Based on agreement implemented in r131088 and r131090,
     321                    // if progress has just one operation with weight equal to 1,
     322                    // we should make it "infinite" by setting maximum to minimum.
     323                    if (m_uCurrentOperation == 1 && m_uCurrentOperationWeight == 1)
     324                        m_pProgressBar->setMaximum(0);
     325                    else
     326                        m_pProgressBar->setMaximum(100);
    319327                    m_pProgressBar->setValue(0);
    320328
     
    458466        {
    459467            m_uCurrentOperation = uNewOp;
     468            m_uCurrentOperationWeight = m_comProgress.GetOperationWeight();
    460469            m_pLabelDescription->setText(QString(m_spcszOpDescTpl)
    461470                                       .arg(m_comProgress.GetOperationDescription())
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h

    r76581 r78969  
    155155    /** Holds the number of current operation. */
    156156    ulong        m_uCurrentOperation;
     157    /** Holds the weight of current operation. */
     158    ulong        m_uCurrentOperationWeight;
    157159    /** Holds whether progress cancel is enabled. */
    158160    bool         m_fCancelEnabled;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette