summaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefUnit.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-07 09:06:00 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-07 14:37:18 -0700
commit2ecbea3d24529b9776acb620c82af04a076b817f (patch)
tree0b0fc4eec864ff79db095d775341085cb1315895 /core/settings/qPrefUnit.cpp
parentdb57a633d587444a7196c8d4274b8f327e77ceba (diff)
downloadsubsurface-2ecbea3d24529b9776acb620c82af04a076b817f.tar.gz
qPref: use helper function to ensure key/name grouping
We had a couple of instances of names being incorrectly merged with their group, this should handle that better. It's a bit of a big hammer to use, but it seems to work (and it makes it easy to then git grep for cases that don't use the new helper function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/settings/qPrefUnit.cpp')
-rw-r--r--core/settings/qPrefUnit.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/settings/qPrefUnit.cpp b/core/settings/qPrefUnit.cpp
index c48421fd4..38f09ed44 100644
--- a/core/settings/qPrefUnit.cpp
+++ b/core/settings/qPrefUnit.cpp
@@ -29,17 +29,17 @@ void qPrefUnits::loadSync(bool doSync)
disk_weight(doSync);
}
-HANDLE_PREFERENCE_BOOL(Units, "/coordinates", coordinates_traditional);
+HANDLE_PREFERENCE_BOOL(Units, "coordinates", coordinates_traditional);
-HANDLE_PREFERENCE_ENUM_EXT(Units, units::DURATION, "/duration_units", duration_units, units.);
+HANDLE_PREFERENCE_ENUM_EXT(Units, units::DURATION, "duration_units", duration_units, units.);
-HANDLE_PREFERENCE_ENUM_EXT(Units, units::LENGTH, "/length", length, units.);
+HANDLE_PREFERENCE_ENUM_EXT(Units, units::LENGTH, "length", length, units.);
-HANDLE_PREFERENCE_ENUM_EXT(Units, units::PRESSURE, "/pressure", pressure, units.);
+HANDLE_PREFERENCE_ENUM_EXT(Units, units::PRESSURE, "pressure", pressure, units.);
-HANDLE_PREFERENCE_BOOL_EXT(Units, "/show_units_table", show_units_table, units.);
+HANDLE_PREFERENCE_BOOL_EXT(Units, "show_units_table", show_units_table, units.);
-HANDLE_PREFERENCE_ENUM_EXT(Units, units::TEMPERATURE, "/temperature", temperature, units.);
+HANDLE_PREFERENCE_ENUM_EXT(Units, units::TEMPERATURE, "temperature", temperature, units.);
QString qPrefUnits::unit_system()
{
@@ -66,10 +66,10 @@ void qPrefUnits::set_unit_system(const QString& value)
emit instance()->unit_system_changed(value);
}
}
-DISK_LOADSYNC_ENUM(Units, "/unit_system", unit_system_values, unit_system);
+DISK_LOADSYNC_ENUM(Units, "unit_system", unit_system_values, unit_system);
-HANDLE_PREFERENCE_ENUM_EXT(Units, units::TIME, "/vertical_speed_time", vertical_speed_time, units.);
+HANDLE_PREFERENCE_ENUM_EXT(Units, units::TIME, "vertical_speed_time", vertical_speed_time, units.);
-HANDLE_PREFERENCE_ENUM_EXT(Units, units::VOLUME, "/volume", volume, units.);
+HANDLE_PREFERENCE_ENUM_EXT(Units, units::VOLUME, "volume", volume, units.);
-HANDLE_PREFERENCE_ENUM_EXT(Units, units::WEIGHT, "/weight", weight, units.);
+HANDLE_PREFERENCE_ENUM_EXT(Units, units::WEIGHT, "weight", weight, units.);