forked from qt-creator/qt-creator
Better name for enum value.
Change-Id: Ic89535081fca147727d12d77e1427d8240cde6d5 Reviewed-on: http://codereview.qt.nokia.com/713 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -103,7 +103,7 @@ struct FutureProgressPrivate {
|
||||
|
||||
FutureProgressPrivate::FutureProgressPrivate(FutureProgress *q) :
|
||||
m_progress(new Internal::ProgressBar), m_widget(0), m_widgetLayout(new QHBoxLayout),
|
||||
m_keep(FutureProgress::DontKeepOnFinish), m_waitingForUserInteraction(false),
|
||||
m_keep(FutureProgress::HideOnFinish), m_waitingForUserInteraction(false),
|
||||
m_faderWidget(new Internal::FadeWidgetHack(q)), m_q(q), m_isFading(false)
|
||||
{
|
||||
}
|
||||
@@ -259,13 +259,13 @@ void FutureProgressPrivate::tryToFadeAway()
|
||||
if (m_isFading)
|
||||
return;
|
||||
if (m_keep == FutureProgress::KeepOnFinishTillUserInteraction
|
||||
|| (m_keep == FutureProgress::DontKeepOnFinish && m_progress->hasError())) {
|
||||
|| (m_keep == FutureProgress::HideOnFinish && 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) {
|
||||
} else if (m_keep == FutureProgress::HideOnFinish) {
|
||||
QTimer::singleShot(shortNotificationTimeout, m_q, SLOT(fadeAway()));
|
||||
m_isFading = true;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class CORE_EXPORT FutureProgress : public QWidget
|
||||
|
||||
public:
|
||||
enum KeepOnFinishType {
|
||||
DontKeepOnFinish = 0,
|
||||
HideOnFinish = 0,
|
||||
KeepOnFinishTillUserInteraction = 1,
|
||||
KeepOnFinish = 2
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@ FutureProgress *ProgressView::addTask(const QFuture<void> &future,
|
||||
if (flags.testFlag(ProgressManager::KeepOnFinish)) {
|
||||
progress->setKeepOnFinish(FutureProgress::KeepOnFinishTillUserInteraction);
|
||||
} else {
|
||||
progress->setKeepOnFinish(FutureProgress::DontKeepOnFinish);
|
||||
progress->setKeepOnFinish(FutureProgress::HideOnFinish);
|
||||
}
|
||||
connect(progress, SIGNAL(removeMe()), this, SLOT(slotRemoveTask()));
|
||||
return progress;
|
||||
|
||||
@@ -513,7 +513,7 @@ void DebuggerEngine::startDebugger(DebuggerRunControl *runControl)
|
||||
Core::FutureProgress *fp = Core::ICore::instance()->progressManager()
|
||||
->addTask(d->m_progress.future(),
|
||||
tr("Launching"), _("Debugger.Launcher"));
|
||||
fp->setKeepOnFinish(Core::FutureProgress::DontKeepOnFinish);
|
||||
fp->setKeepOnFinish(Core::FutureProgress::HideOnFinish);
|
||||
d->m_progress.reportStarted();
|
||||
|
||||
d->m_runControl = runControl;
|
||||
|
||||
@@ -83,7 +83,7 @@ void ValgrindEngine::start()
|
||||
|
||||
Core::FutureProgress *fp = Core::ICore::instance()->progressManager()->addTask(m_progress->future(),
|
||||
progressTitle(), "valgrind");
|
||||
fp->setKeepOnFinish(Core::FutureProgress::DontKeepOnFinish);
|
||||
fp->setKeepOnFinish(Core::FutureProgress::HideOnFinish);
|
||||
m_progress->reportStarted();
|
||||
m_progressWatcher->setFuture(m_progress->future());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user