diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-12-30 12:36:16 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-01 11:35:39 -0800 |
commit | 2e26051bd6f2d50189714cc34f38e387445e768c (patch) | |
tree | e69a33c7752b4c18282cf24253707840c42b10fd /mobile-widgets/qmlmanager.cpp | |
parent | 9d12ad23082b9d3bd0e6f87c803cd262864ab2e0 (diff) | |
download | subsurface-2e26051bd6f2d50189714cc34f38e387445e768c.tar.gz |
mobile/UI: provide more structured debug output for dive edit
Instead of always showing info about the location, allow all data to be
captured in a more structured format - but only when the app is in
verbose mode.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 857525a34..5986566cc 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -961,7 +961,6 @@ bool QMLManager::checkLocation(DiveSiteChange &res, struct dive *d, QString loca struct dive_site *ds = get_dive_site_for_dive(d); bool changed = false; QString oldLocation = get_dive_location(d); - qDebug() << "checkLocation" << location << "gps" << gps << "dive had" << oldLocation << "gps" << formatDiveGPS(d); if (oldLocation != location) { ds = get_dive_site_by_name(qPrintable(location), &dive_site_table); if (!ds && !location.isEmpty()) { @@ -1069,6 +1068,22 @@ void QMLManager::commitChanges(QString diveId, QString number, QString date, QSt appendTextToLog("cannot commit changes: no dive"); return; } + if (verbose) { + qDebug().noquote() << QStringLiteral("diveId :'%1'\n").arg(diveId) << + QStringLiteral("number :'%1'\n").arg(number) << + QStringLiteral("date :'%1'\n").arg(date) << + QStringLiteral("location:'%1'\n").arg(location) << + QStringLiteral("gps :'%1'\n").arg(gps) << + QStringLiteral("duration:'%1'\n").arg(duration) << + QStringLiteral("depth :'%1'\n").arg(depth) << + QStringLiteral("airtemp :'%1'\n").arg(airtemp) << + QStringLiteral("watertmp:'%1'\n").arg(watertemp) << + QStringLiteral("suit :'%1'\n").arg(suit) << + QStringLiteral("buddy :'%1'\n").arg(buddy) << + QStringLiteral("diveMstr:'%1'\n").arg(diveMaster) << + QStringLiteral("weight :'%1'\n").arg(weight) << + QStringLiteral("state :'%1'\n").arg(state); + } Command::OwningDivePtr d_ptr(alloc_dive()); // Automatically delete dive if we exit early! dive *d = d_ptr.get(); |