Don't keep canceled tasks forever.

They'll fade "after user interaction" now (since canceling will most
probably lead to mouse movement over the widget that already counts as
interaction, i.e. after pressing 'x' it will fade after a while).

Task-number: QTCREATORBUG-4456
Change-Id: Id095a6bbd5819b93ec8cb9f514b429ef5ab231e9
Reviewed-on: http://codereview.qt.nokia.com/712
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
con
2011-06-24 15:47:48 +02:00
committed by Eike Ziller
parent 5c9b8946ce
commit 19bdd72805

View File

@@ -258,13 +258,14 @@ void FutureProgressPrivate::tryToFadeAway()
{
if (m_isFading)
return;
if (m_keep == FutureProgress::KeepOnFinishTillUserInteraction) {
if (m_keep == FutureProgress::KeepOnFinishTillUserInteraction
|| (m_keep == FutureProgress::DontKeepOnFinish && m_progress->hasError())) {
m_waitingForUserInteraction = true;
//eventfilter is needed to get user interaction
//events to start QTimer::singleShot later
qApp->installEventFilter(m_q);
m_isFading = true;
} else if (m_keep == FutureProgress::DontKeepOnFinish && !m_progress->hasError()) {
} else if (m_keep == FutureProgress::DontKeepOnFinish) {
QTimer::singleShot(shortNotificationTimeout, m_q, SLOT(fadeAway()));
m_isFading = true;
}