mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use the same format for output to stderr and AppLog
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f7564c2b77
commit
9283332b95
2 changed files with 6 additions and 4 deletions
|
@ -45,8 +45,10 @@ extern "C" int gitProgressCB(int percent, const char *text)
|
|||
if (self) {
|
||||
qint64 elapsed = timer.elapsed();
|
||||
self->loadDiveProgress(percent);
|
||||
self->appendTextToLog(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 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);
|
||||
self->appendTextToLog(logText);
|
||||
qDebug() << logText;
|
||||
qApp->processEvents();
|
||||
qApp->flush();
|
||||
lastTime = elapsed;
|
||||
|
@ -96,6 +98,8 @@ void QMLManager::applicationStateChanged(Qt::ApplicationState state)
|
|||
stateText.prepend(QString::number(timer.elapsed() / 1000.0,'f', 3) + ": AppState changed to ");
|
||||
stateText.append(" with ");
|
||||
stateText.append((alreadySaving ? QLatin1Literal("") : QLatin1Literal("no ")) + QLatin1Literal("save ongoing"));
|
||||
stateText.append(" and ");
|
||||
stateText.append((unsaved_changes() ? QLatin1Literal("") : QLatin1Literal("no ")) + QLatin1Literal("unsaved changes"));
|
||||
appendTextToLog(stateText);
|
||||
qDebug() << stateText;
|
||||
|
||||
|
|
|
@ -63,8 +63,6 @@ int git_storage_update_progress(int percent, const char *text)
|
|||
int ret = 0;
|
||||
if (update_progress_cb)
|
||||
ret = (*update_progress_cb)(percent, text);
|
||||
if (verbose)
|
||||
fprintf(stderr, "git storage progress %d%% (%s)\n", percent, text);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue