Maemo: Use deployment progress bar even when there's nothing to deploy.

Otherwise, an outdated canceled progress bar will confuse users.

Reviewed-by: kh1
This commit is contained in:
ck
2010-04-12 12:15:08 +02:00
parent 157ff4889e
commit 23ef4f9c04

View File

@@ -96,6 +96,9 @@ void AbstractMaemoRunControl::startDeployment(bool forDebugging)
void AbstractMaemoRunControl::deploy() void AbstractMaemoRunControl::deploy()
{ {
Core::ICore::instance()->progressManager()
->addTask(m_progress.future(), tr("Deploying"),
QLatin1String("Maemo.Deploy"));
if (!deployables.isEmpty()) { if (!deployables.isEmpty()) {
QList<SshDeploySpec> deploySpecs; QList<SshDeploySpec> deploySpecs;
QStringList files; QStringList files;
@@ -113,15 +116,13 @@ void AbstractMaemoRunControl::deploy()
this, SLOT(deployProcessFinished())); this, SLOT(deployProcessFinished()));
connect(sshDeployer.data(), SIGNAL(fileCopied(QString)), connect(sshDeployer.data(), SIGNAL(fileCopied(QString)),
this, SLOT(handleFileCopied())); this, SLOT(handleFileCopied()));
Core::ICore::instance()->progressManager()
->addTask(m_progress.future(), tr("Deploying"),
QLatin1String("Maemo.Deploy"));
m_progress.setProgressRange(0, deployables.count()); m_progress.setProgressRange(0, deployables.count());
m_progress.setProgressValue(0); m_progress.setProgressValue(0);
m_progress.reportStarted(); m_progress.reportStarted();
emit started(); emit started();
sshDeployer->start(); sshDeployer->start();
} else { } else {
m_progress.reportFinished();
handleDeploymentFinished(true); handleDeploymentFinished(true);
} }
} }