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>
This commit is contained in:
Dirk Hohndel 2018-09-07 09:06:00 -07:00
parent db57a633d5
commit 2ecbea3d24
15 changed files with 157 additions and 149 deletions

View file

@ -45,51 +45,51 @@ void qPrefDivePlanner::loadSync(bool doSync)
disk_verbatim_plan(doSync);
}
HANDLE_PREFERENCE_INT(DivePlanner, "/ascratelast6m", ascratelast6m);
HANDLE_PREFERENCE_INT(DivePlanner, "ascratelast6m", ascratelast6m);
HANDLE_PREFERENCE_INT(DivePlanner, "/ascratestops", ascratestops);
HANDLE_PREFERENCE_INT(DivePlanner, "ascratestops", ascratestops);
HANDLE_PREFERENCE_INT(DivePlanner, "/ascrate50", ascrate50);
HANDLE_PREFERENCE_INT(DivePlanner, "ascrate50", ascrate50);
HANDLE_PREFERENCE_INT(DivePlanner, "/ascrate75", ascrate75);
HANDLE_PREFERENCE_INT(DivePlanner, "ascrate75", ascrate75);
HANDLE_PREFERENCE_STRUCT(DivePlanner, depth_t, "/bestmixend", bestmixend, mm);
HANDLE_PREFERENCE_STRUCT(DivePlanner, depth_t, "bestmixend", bestmixend, mm);
HANDLE_PREFERENCE_INT(DivePlanner, "/bottompo2", bottompo2);
HANDLE_PREFERENCE_INT(DivePlanner, "bottompo2", bottompo2);
HANDLE_PREFERENCE_INT(DivePlanner, "/bottomsac", bottomsac);
HANDLE_PREFERENCE_INT(DivePlanner, "bottomsac", bottomsac);
HANDLE_PREFERENCE_INT(DivePlanner, "/decopo2", decopo2);
HANDLE_PREFERENCE_INT(DivePlanner, "decopo2", decopo2);
HANDLE_PREFERENCE_INT(DivePlanner, "/decosac", decosac);
HANDLE_PREFERENCE_INT(DivePlanner, "decosac", decosac);
HANDLE_PREFERENCE_INT(DivePlanner, "/descrate", descrate);
HANDLE_PREFERENCE_INT(DivePlanner, "descrate", descrate);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/display_duration", display_duration);
HANDLE_PREFERENCE_BOOL(DivePlanner, "display_duration", display_duration);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/display_runtime", display_runtime);
HANDLE_PREFERENCE_BOOL(DivePlanner, "display_runtime", display_runtime);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/display_transitions", display_transitions);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/display_variations", display_variations);
HANDLE_PREFERENCE_BOOL(DivePlanner, "display_transitions", display_transitions);
HANDLE_PREFERENCE_BOOL(DivePlanner, "display_variations", display_variations);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/doo2breaks", doo2breaks);
HANDLE_PREFERENCE_BOOL(DivePlanner, "doo2breaks", doo2breaks);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/drop_stone_mode", drop_stone_mode);
HANDLE_PREFERENCE_BOOL(DivePlanner, "drop_stone_mode", drop_stone_mode);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/last_stop", last_stop);
HANDLE_PREFERENCE_BOOL(DivePlanner, "last_stop", last_stop);
HANDLE_PREFERENCE_INT(DivePlanner, "/min_switch_duration", min_switch_duration);
HANDLE_PREFERENCE_INT(DivePlanner, "min_switch_duration", min_switch_duration);
HANDLE_PREFERENCE_ENUM(DivePlanner, deco_mode, "/deco_mode", planner_deco_mode);
HANDLE_PREFERENCE_ENUM(DivePlanner, deco_mode, "deco_mode", planner_deco_mode);
HANDLE_PREFERENCE_INT(DivePlanner, "/problemsolvingtime", problemsolvingtime);
HANDLE_PREFERENCE_INT(DivePlanner, "problemsolvingtime", problemsolvingtime);
HANDLE_PREFERENCE_INT(DivePlanner, "/reserve_gas", reserve_gas);
HANDLE_PREFERENCE_INT(DivePlanner, "reserve_gas", reserve_gas);
HANDLE_PREFERENCE_INT(DivePlanner, "/sacfactor", sacfactor);
HANDLE_PREFERENCE_INT(DivePlanner, "sacfactor", sacfactor);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/safetystop", safetystop);
HANDLE_PREFERENCE_BOOL(DivePlanner, "safetystop", safetystop);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/switch_at_req_stop", switch_at_req_stop);
HANDLE_PREFERENCE_BOOL(DivePlanner, "switch_at_req_stop", switch_at_req_stop);
HANDLE_PREFERENCE_BOOL(DivePlanner, "/verbatim_plan", verbatim_plan);
HANDLE_PREFERENCE_BOOL(DivePlanner, "verbatim_plan", verbatim_plan);