Changeset 78969 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 4, 2019 2:59:37 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131095
- 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 69 69 , m_cOperations(m_comProgress.GetOperationCount()) 70 70 , m_uCurrentOperation(m_comProgress.GetOperation() + 1) 71 , m_uCurrentOperationWeight(m_comProgress.GetOperationWeight()) 71 72 , m_fCancelEnabled(false) 72 73 , m_fEnded(false) … … 316 317 { 317 318 /* 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); 319 327 m_pProgressBar->setValue(0); 320 328 … … 458 466 { 459 467 m_uCurrentOperation = uNewOp; 468 m_uCurrentOperationWeight = m_comProgress.GetOperationWeight(); 460 469 m_pLabelDescription->setText(QString(m_spcszOpDescTpl) 461 470 .arg(m_comProgress.GetOperationDescription()) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h
r76581 r78969 155 155 /** Holds the number of current operation. */ 156 156 ulong m_uCurrentOperation; 157 /** Holds the weight of current operation. */ 158 ulong m_uCurrentOperationWeight; 157 159 /** Holds whether progress cancel is enabled. */ 158 160 bool m_fCancelEnabled;
Note:
See TracChangeset
for help on using the changeset viewer.