QML UI: more hacking around with git progress reporting

I gave up on the magic numbers and instead report simply linear progress.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-04-05 22:54:54 -07:00
parent 3555cadb77
commit 922c945f5a
6 changed files with 66 additions and 71 deletions

View file

@ -51,17 +51,18 @@ bool CheckCloudConnection::checkServer()
mgr->deleteLater();
if (verbose > 1)
qWarning() << "Cloud storage: successfully checked connection to cloud server";
git_storage_update_progress(last_git_storage_update_val + 1, "successfully checked cloud connection");
git_storage_update_progress(false, "successfully checked cloud connection");
return true;
}
} else if (seconds < 5) {
git_storage_update_progress(last_git_storage_update_val + 1, "waited 1 sec for cloud connection");
QString text = QString("waited %1 sec for cloud connetion").arg(seconds);
git_storage_update_progress(false, qPrintable(text));
} else {
disconnect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
reply->abort();
}
}
git_storage_update_progress(last_git_storage_update_val + 1, "cloud connection failed");
git_storage_update_progress(false, "cloud connection failed");
if (verbose)
qDebug() << "connection test to cloud server failed" <<
reply->error() << reply->errorString() <<