summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-04 10:57:44 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-04 14:19:13 -0700
commit9283332b95d3e41f43f3300667ac7523f58ab14b (patch)
treeb390b9fb893deff40e8b415975c28ea6e1572a4c
parentf7564c2b776f93cb1c2af2da26a44ef2eaaec837 (diff)
downloadsubsurface-9283332b95d3e41f43f3300667ac7523f58ab14b.tar.gz
Use the same format for output to stderr and AppLog
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-mobile/qmlmanager.cpp8
-rw-r--r--subsurface-core/git-access.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index ab92d9410..6a38078a8 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -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;
diff --git a/subsurface-core/git-access.c b/subsurface-core/git-access.c
index 5bc720cd4..d10139d3d 100644
--- a/subsurface-core/git-access.c
+++ b/subsurface-core/git-access.c
@@ -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;
}