forked from qt-creator/qt-creator
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:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user