void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item )
{
    if ( item->parent() ) return; // we are only interested in top level items
    connectSingleItem(); // if going back to 1 item
    if ( ProgressManager::self()->isEmpty() )
    {
        // No item
        // Done. In 5s the progress-widget will close, then we can clean up the statusbar
        QTimer::singleShot( 5000, this, SLOT( slotClean() ) );
    }
    else if ( m_currentitem )
    {
        // Exactly one item
        delete m_busytimer;
        m_busytimer = 0;
        activateSingleItemMode();
    }
}
void StatusbarProgressWidget::slotProgressItemCompleted(ProgressItem* item)
{
    if (item && item->parent())
        return; // we are only interested in top level items

    connectSingleItem(); // if going back to 1 item

    if (ProgressManager::instance()->isEmpty())
    {
        // No item
        // Done. In 5s the progress-widget will close, then we can clean up the statusbar
        d->cleanTimer->start(5000);
    }
    else if (d->currentItem)
    {
        // Exactly one item
        delete d->busyTimer;
        d->busyTimer = 0;
        activateSingleItemMode();
    }
}
void StatusbarProgressWidget::slotShowItemDelayed()
{
    bool noItems = ProgressManager::self()->isEmpty();
    if ( m_currentitem )
    {
        activateSingleItemMode();
    }
    else if ( !noItems )
    {
        // N items
        m_progressbar->setMaximum( 0 );
        m_progressbar->setTextVisible( false );
        Q_ASSERT( m_busytimer );
        if ( m_busytimer )
            m_busytimer->start( 100 );
    }

    if ( !noItems && m_mode == None )
    {
        m_mode = Progress;
        setMode();
    }
}