From afb5bb8b06b079ffbccc970554733e63ee77b5b5 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 5 Apr 2016 21:20:33 -0700 Subject: [PATCH] QML UI: simplify git tracking output And don't waste quite as much time on updating the UI. Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 371e67498..fa8a782c6 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -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; - qApp->processEvents(); - qApp->flush(); + if (elapsed - lastTime > 500) + qApp->processEvents(); lastTime = elapsed; } // return 0 so that we don't end the download