- Timestamp:
- Jun 2, 2017 11:19:20 AM (7 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
-
include/ProgressImpl.h (modified) (1 diff)
-
src-all/ProgressImpl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ProgressImpl.h
r65103 r67230 140 140 bool i_notifyPointOfNoReturn(void); 141 141 bool i_setCancelCallback(void (*pfnCallback)(void *), void *pvUser); 142 143 static DECLCALLBACK(int) i_iprtProgressCallback(unsigned uPrecentage, void *pvUser); 142 144 143 145 protected: -
trunk/src/VBox/Main/src-all/ProgressImpl.cpp
r65103 r67230 535 535 m_pfnCancelCallback = pfnCallback; 536 536 return true; 537 } 538 539 /** 540 * @callback_method_impl{FNRTPROGRESS, } 541 */ 542 /*static*/ DECLCALLBACK(int) Progress::i_iprtProgressCallback(unsigned uPrecentage, void *pvUser) 543 { 544 Progress *pThis = (Progress *)pvUser; 545 546 /* 547 * Same as setCurrentOperationProgress, except we don't fail on mCompleted. 548 */ 549 AutoWriteLock alock(pThis COMMA_LOCKVAL_SRC_POS); 550 int vrc = VINF_SUCCESS; 551 if (!pThis->mCompleted) 552 { 553 pThis->i_checkForAutomaticTimeout(); 554 if (!pThis->mCanceled) 555 pThis->m_ulOperationPercent = RT_MIN(uPrecentage, 100); 556 else 557 { 558 Assert(pThis->mCancelable); 559 vrc = VERR_CANCELLED; 560 } 561 } 562 /* else ignored */ 563 return vrc; 537 564 } 538 565
Note:
See TracChangeset
for help on using the changeset viewer.

