summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/progressmanager/futureprogress.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-02-02 09:10:54 +0200
committerOrgad Shaneh <orgads@gmail.com>2016-02-03 07:54:02 +0000
commit5646480f27007789429c7e813423c7f142810cc3 (patch)
tree29452400aa66e2dc8b17f4ef643128aff25ba8ce /src/plugins/coreplugin/progressmanager/futureprogress.cpp
parent7a9cc3499e81185ec24ce383cefc0f6e43f00ce4 (diff)
downloadqt-creator-5646480f27007789429c7e813423c7f142810cc3.tar.gz
Core: Use Qt5-style connects
The heavy lifting was done by clazy. Change-Id: I2dde14919d917816d02117338205f8f861d8af0a Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/coreplugin/progressmanager/futureprogress.cpp')
-rw-r--r--src/plugins/coreplugin/progressmanager/futureprogress.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.cpp b/src/plugins/coreplugin/progressmanager/futureprogress.cpp
index 9c499a34a4..e06451eac6 100644
--- a/src/plugins/coreplugin/progressmanager/futureprogress.cpp
+++ b/src/plugins/coreplugin/progressmanager/futureprogress.cpp
@@ -54,12 +54,10 @@ class FutureProgressPrivate : public QObject
{
Q_OBJECT
-public slots:
- void fadeAway();
-
public:
explicit FutureProgressPrivate(FutureProgress *q);
+ void fadeAway();
void tryToFadeAway();
QFutureWatcher<void> m_watcher;
@@ -135,14 +133,16 @@ FutureProgress::FutureProgress(QWidget *parent) :
d->m_widgetLayout->setContentsMargins(7, 0, 7, 2);
d->m_widgetLayout->setSpacing(0);
- connect(&d->m_watcher, SIGNAL(started()), this, SLOT(setStarted()));
- connect(&d->m_watcher, SIGNAL(finished()), this, SLOT(setFinished()));
- connect(&d->m_watcher, SIGNAL(canceled()), this, SIGNAL(canceled()));
- connect(&d->m_watcher, SIGNAL(progressRangeChanged(int,int)), this, SLOT(setProgressRange(int,int)));
- connect(&d->m_watcher, SIGNAL(progressValueChanged(int)), this, SLOT(setProgressValue(int)));
- connect(&d->m_watcher, SIGNAL(progressTextChanged(QString)),
- this, SLOT(setProgressText(QString)));
- connect(d->m_progress, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(&d->m_watcher, &QFutureWatcherBase::started, this, &FutureProgress::setStarted);
+ connect(&d->m_watcher, &QFutureWatcherBase::finished, this, &FutureProgress::setFinished);
+ connect(&d->m_watcher, &QFutureWatcherBase::canceled, this, &FutureProgress::canceled);
+ connect(&d->m_watcher, &QFutureWatcherBase::progressRangeChanged,
+ this, &FutureProgress::setProgressRange);
+ connect(&d->m_watcher, &QFutureWatcherBase::progressValueChanged,
+ this, &FutureProgress::setProgressValue);
+ connect(&d->m_watcher, &QFutureWatcherBase::progressTextChanged,
+ this, &FutureProgress::setProgressText);
+ connect(d->m_progress, &Internal::ProgressBar::clicked, this, &FutureProgress::cancel);
setMinimumWidth(100);
setMaximumWidth(300);
}
@@ -212,7 +212,7 @@ bool FutureProgress::eventFilter(QObject *, QEvent *e)
if (d->m_keep != KeepOnFinish && d->m_waitingForUserInteraction
&& (e->type() == QEvent::MouseMove || e->type() == QEvent::KeyPress)) {
qApp->removeEventFilter(this);
- QTimer::singleShot(notificationTimeout, d, SLOT(fadeAway()));
+ QTimer::singleShot(notificationTimeout, d, &FutureProgressPrivate::fadeAway);
}
return false;
}
@@ -245,7 +245,7 @@ void FutureProgressPrivate::tryToFadeAway()
qApp->installEventFilter(m_q);
m_fadeStarting = true;
} else if (m_keep == FutureProgress::HideOnFinish) {
- QTimer::singleShot(shortNotificationTimeout, this, SLOT(fadeAway()));
+ QTimer::singleShot(shortNotificationTimeout, this, &FutureProgressPrivate::fadeAway);
m_fadeStarting = true;
}
}
@@ -386,7 +386,7 @@ void FutureProgressPrivate::fadeAway()
animation->setEndValue(0.0);
group->addAnimation(animation);
- connect(group, SIGNAL(finished()), m_q, SIGNAL(removeMe()));
+ connect(group, &QAbstractAnimation::finished, m_q, &FutureProgress::removeMe);
group->start(QAbstractAnimation::DeleteWhenStopped);
emit m_q->fadeStarted();
}