| 70 | } |
| 71 | |
| 72 | void ProgressItem::cancel() |
| 73 | { |
| 74 | if ( mCanceled || !mCanBeCanceled ) { |
| 75 | return; |
| 76 | } |
| 77 | |
| 78 | qCDebug(SHELL) << label(); |
| 79 | mCanceled = true; |
| 80 | // Cancel all children. |
| 81 | const QList<ProgressItem*> kids = mChildren.keys(); |
| 82 | for (ProgressItem* kid : kids) { |
| 83 | if ( kid->canBeCanceled() ) { |
| 84 | kid->cancel(); |
| 85 | } |
| 86 | } |
| 87 | setStatus( i18nc("@info", "Aborting..." ) ); |
| 88 | emit progressItemCanceled( this ); |
| 89 | } |
| 90 | |
| 91 | void ProgressItem::setProgress( unsigned int v ) |
| 92 | { |
no test coverage detected