| 52 | } |
| 53 | |
| 54 | void ProgressItem::removeChild( ProgressItem *kiddo ) |
| 55 | { |
| 56 | if ( mChildren.isEmpty() ) { |
| 57 | mWaitingForKids = false; |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | if ( mChildren.remove( kiddo ) == 0 ) { |
| 62 | // do nothing if the specified item is not in the map |
| 63 | return; |
| 64 | } |
| 65 | |
| 66 | // in case we were waiting for the last kid to go away, now is the time |
| 67 | if ( mChildren.count() == 0 && mWaitingForKids ) { |
| 68 | emit progressItemCompleted( this ); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | void ProgressItem::cancel() |
| 73 | { |
no test coverage detected