mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
9d12ad2308
commit
2e26051bd6
1 changed files with 16 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue