Valgrind: Remove unneeded separate FutureWatcher

Change-Id: I21fde2125a4a5d653fe4209e3452dec59c783d24
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
hjk
2014-05-07 12:49:23 +02:00
parent c8fc52bad6
commit 5bc9461d83
2 changed files with 2 additions and 7 deletions

View File

@@ -60,7 +60,6 @@ ValgrindRunControl::ValgrindRunControl(const AnalyzerStartParameters &sp,
: AnalyzerRunControl(sp, runConfiguration), : AnalyzerRunControl(sp, runConfiguration),
m_settings(0), m_settings(0),
m_progress(new QFutureInterface<void>()), m_progress(new QFutureInterface<void>()),
m_progressWatcher(new QFutureWatcher<void>()),
m_isStopping(false) m_isStopping(false)
{ {
if (runConfiguration) if (runConfiguration)
@@ -70,10 +69,6 @@ ValgrindRunControl::ValgrindRunControl(const AnalyzerStartParameters &sp,
if (!m_settings) if (!m_settings)
m_settings = ValgrindPlugin::globalSettings(); m_settings = ValgrindPlugin::globalSettings();
connect(m_progressWatcher, SIGNAL(canceled()),
this, SLOT(handleProgressCanceled()));
connect(m_progressWatcher, SIGNAL(finished()),
this, SLOT(handleProgressFinished()));
} }
ValgrindRunControl::~ValgrindRunControl() ValgrindRunControl::~ValgrindRunControl()
@@ -88,9 +83,10 @@ bool ValgrindRunControl::startEngine()
FutureProgress *fp = ProgressManager::addTask(m_progress->future(), FutureProgress *fp = ProgressManager::addTask(m_progress->future(),
progressTitle(), "valgrind"); progressTitle(), "valgrind");
fp->setKeepOnFinish(FutureProgress::HideOnFinish); fp->setKeepOnFinish(FutureProgress::HideOnFinish);
connect(fp, SIGNAL(canceled()), this, SLOT(handleProgressCanceled()));
connect(fp, SIGNAL(finished()), this, SLOT(handleProgressFinished()));
m_progress->setProgressRange(0, progressMaximum); m_progress->setProgressRange(0, progressMaximum);
m_progress->reportStarted(); m_progress->reportStarted();
m_progressWatcher->setFuture(m_progress->future());
m_progress->setProgressValue(progressMaximum / 10); m_progress->setProgressValue(progressMaximum / 10);
const AnalyzerStartParameters &sp = startParameters(); const AnalyzerStartParameters &sp = startParameters();

View File

@@ -63,7 +63,6 @@ protected:
ValgrindBaseSettings *m_settings; ValgrindBaseSettings *m_settings;
QFutureInterface<void> *m_progress; QFutureInterface<void> *m_progress;
QFutureWatcher<void> *m_progressWatcher;
private slots: private slots:
void handleProgressCanceled(); void handleProgressCanceled();