| 28 | } |
| 29 | |
| 30 | void ProgressItem::setComplete() |
| 31 | { |
| 32 | // qCDebug(SHELL) << label(); |
| 33 | if ( mChildren.isEmpty() ) { |
| 34 | if ( mCompletedCalled ) |
| 35 | return; |
| 36 | if ( !mCanceled ) { |
| 37 | setProgress( 100 ); |
| 38 | } |
| 39 | mCompletedCalled = true; |
| 40 | if ( parent() ) { |
| 41 | parent()->removeChild( this ); |
| 42 | } |
| 43 | emit progressItemCompleted( this ); |
| 44 | } else { |
| 45 | mWaitingForKids = true; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | void ProgressItem::addChild( ProgressItem *kiddo ) |
| 50 | { |
no test coverage detected