mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
cleanup: remove unused variable
A QVariant was initialized but never used. While doing so, remove construct/assign pairs of a number of QStrings. Directly construct the QStrings with the desired values. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4a7ee872f3
commit
0d92ef2835
1 changed files with 5 additions and 7 deletions
|
@ -35,13 +35,11 @@ static void exportHTMLsettings(const QString &filename, struct htmlExportSetting
|
|||
} else if (prefs.unit_system == IMPERIAL) {
|
||||
out << "\"unit_system\":\"Imperial\"";
|
||||
} else {
|
||||
QVariant v;
|
||||
QString length, pressure, volume, temperature, weight;
|
||||
length = prefs.units.length == units::METERS ? "METER" : "FEET";
|
||||
pressure = prefs.units.pressure == units::BAR ? "BAR" : "PSI";
|
||||
volume = prefs.units.volume == units::LITER ? "LITER" : "CUFT";
|
||||
temperature = prefs.units.temperature == units::CELSIUS ? "CELSIUS" : "FAHRENHEIT";
|
||||
weight = prefs.units.weight == units::KG ? "KG" : "LBS";
|
||||
QString length = prefs.units.length == units::METERS ? "METER" : "FEET";
|
||||
QString pressure = prefs.units.pressure == units::BAR ? "BAR" : "PSI";
|
||||
QString volume = prefs.units.volume == units::LITER ? "LITER" : "CUFT";
|
||||
QString temperature = prefs.units.temperature == units::CELSIUS ? "CELSIUS" : "FAHRENHEIT";
|
||||
QString weight = prefs.units.weight == units::KG ? "KG" : "LBS";
|
||||
out << "\"unit_system\":\"Personalize\",";
|
||||
out << "\"units\":{\"depth\":\"" << length << "\",\"pressure\":\"" << pressure << "\",\"volume\":\"" << volume << "\",\"temperature\":\"" << temperature << "\",\"weight\":\"" << weight << "\"}";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue