Commit ecf48086 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Checkout wizard: Hangs on Windows when VCS binary is missing.



due to StartFailed being emitted from start(). Set state correctly,
improve error reporting.
Reviewed-by: default avatarcon <qtc-commiter@nokia.com>
parent 50961cb9
......@@ -94,9 +94,16 @@ void ProcessCheckoutJob::slotOutput()
emit output(s);
}
void ProcessCheckoutJob::slotError(QProcess::ProcessError /* error */)
void ProcessCheckoutJob::slotError(QProcess::ProcessError error)
{
emit failed(d->process.errorString());
switch (error) {
case QProcess::FailedToStart:
emit failed(tr("Unable to start %1: %2").arg(d->binary, d->process.errorString()));
break;
default:
emit failed(d->process.errorString());
break;
}
}
void ProcessCheckoutJob::slotFinished (int exitCode, QProcess::ExitStatus exitStatus)
......
......@@ -63,10 +63,11 @@ void CheckoutProgressWizardPage::start(const QSharedPointer<AbstractCheckoutJob>
connect(job.data(), SIGNAL(succeeded()), this, SLOT(slotSucceeded()));
QApplication::setOverrideCursor(Qt::WaitCursor);
ui->logPlainTextEdit->clear();
setSubTitle(tr("Checkout started..."));
job->start();
setSubTitle(tr("Checkout started..."));
m_state = Running;
// Note: Process jobs can emit failed() right from
// the start() method on Windows.
job->start();
}
void CheckoutProgressWizardPage::slotFailed(const QString &why)
......
......@@ -70,9 +70,9 @@ void CheckoutWizardDialog::slotTerminated(bool success)
void CheckoutWizardDialog::start(const QSharedPointer<AbstractCheckoutJob> &job)
{
m_progressPage->start(job);
// No "back" available while running.
button(QWizard::BackButton)->setEnabled(false);
m_progressPage->start(job);
}
void CheckoutWizardDialog::reject()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment