aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-08-11 09:11:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-08-11 12:23:33 -0700
commit0eb14828b5214146d47079806a863ff3d729606c (patch)
tree1c69a9e3ed456bac433992f9c8722746e6d7ea32 /mobile-widgets/qmlmanager.cpp
parent6b92edc9ab3111cbd1e76938c16a56673cd3791f (diff)
downloadsubsurface-0eb14828b5214146d47079806a863ff3d729606c.tar.gz
Mobile: use a default weight name when adding weight system
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index fc8f12a20..605525d67 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -487,7 +487,7 @@ void QMLManager::saveCloudCredentials()
}
cloudCredentialsChanged |= !same_string(prefs.cloud_storage_password,
- qPrintable(QMLPrefs::instance()->cloudPassword()));
+ qPrintable(QMLPrefs::instance()->cloudPassword()));
if (QMLPrefs::instance()->credentialStatus() != qPrefCloudStorage::CS_NOCLOUD &&
!cloudCredentialsChanged) {
@@ -1045,8 +1045,8 @@ void QMLManager::commitChanges(QString diveId, QString date, QString location, Q
// not sure what we'd do if there was more than one weight system
// defined - for now just ignore that case
if (d->weightsystems.nr == 0) {
- weightsystem_t ws = { { parseWeightToGrams(weight) } , "" };
- add_cloned_weightsystem(&d->weightsystems, ws);
+ weightsystem_t ws = { { parseWeightToGrams(weight) } , strdup(qPrintable(tr("weight"))) };
+ add_to_weightsystem_table(&d->weightsystems, 0, ws); // takes ownership of the string
} else if (d->weightsystems.nr == 1) {
d->weightsystems.weightsystems[0].weight.grams = parseWeightToGrams(weight);
}