Changeset 18394 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 27, 2009 2:04:43 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 45190
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ProgressImpl.cpp
r18306 r18394 271 271 else 272 272 { 273 /* global percent = 274 * (100 / m_cOperations) * mOperation + 275 * ((100 / m_cOperations) / 100) * m_ulOperationPercent */ 276 // *aPercent = (100 * mOperation + m_ulOperationPercent) / m_cOperations; 277 278 *aPercent = (ULONG)( ( (double)m_ulOperationsCompletedWeight // weight of operations that have been completed 279 + ((double)m_ulOperationPercent * (double)m_ulCurrentOperationWeight / (double)100) // plus partial weight of the current operation 280 ) * (double)100 / (double)m_ulTotalOperationsWeight); 273 ULONG ulPercent = (ULONG)( ( (double)m_ulOperationsCompletedWeight // weight of operations that have been completed 274 + ((double)m_ulOperationPercent * (double)m_ulCurrentOperationWeight / (double)100) // plus partial weight of the current operation 275 ) * (double)100 / (double)m_ulTotalOperationsWeight 276 ); 277 // do not report 100% until we're really really done with everything as the Qt GUI dismisses progress dialogs in that case 278 if ( ulPercent == 100 279 && ( m_ulOperationPercent < 100 280 || (m_ulCurrentOperation < m_cOperations -1) 281 ) 282 ) 283 *aPercent = 99; 284 else 285 *aPercent = ulPercent; 281 286 } 282 287
Note:
See TracChangeset
for help on using the changeset viewer.