QML UI: simplify git tracking output

And don't waste quite as much time on updating the UI.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-04-05 21:20:33 -07:00
parent 1634c62b9a
commit afb5bb8b06

View file

@ -54,11 +54,11 @@ extern "C" int gitProgressCB(int percent, const char *text)
return 0;
self->loadDiveProgress(percent);
QString logText = QString::number(elapsed / 1000.0, 'f', 1) + " / " + QString::number((elapsed - lastTime) / 1000.0, 'f', 3) +
QString(" : git progress %1 (%2)").arg(percent).arg(text);
QString(" : git %1 (%2)").arg(percent).arg(text);
self->appendTextToLog(logText);
qDebug() << logText;
if (elapsed - lastTime > 500)
qApp->processEvents();
qApp->flush();
lastTime = elapsed;
}
// return 0 so that we don't end the download