summaryrefslogtreecommitdiffstats
path: root/subsurface-core/qthelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'subsurface-core/qthelper.cpp')
-rw-r--r--subsurface-core/qthelper.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp
index 8afb7ed74..5c48573cc 100644
--- a/subsurface-core/qthelper.cpp
+++ b/subsurface-core/qthelper.cpp
@@ -794,9 +794,9 @@ int parseLengthToMm(const QString &text)
if (numOnly.isEmpty())
return 0;
double number = numOnly.toDouble();
- if (text.contains(QObject::tr("m"))) {
+ if (text.contains(QObject::tr("m"), Qt::CaseInsensitive)) {
mm = number * 1000;
- } else if (text.contains(QObject::tr("ft"))) {
+ } else if (text.contains(QObject::tr("ft"), Qt::CaseInsensitive)) {
mm = feet_to_mm(number);
} else {
switch (prefs.units.length) {
@@ -822,9 +822,9 @@ int parseTemperatureToMkelvin(const QString &text)
if (numOnly.isEmpty())
return 0;
double number = numOnly.toDouble();
- if (text.contains(QObject::tr("C"))) {
+ if (text.contains(QObject::tr("C"), Qt::CaseInsensitive)) {
mkelvin = C_to_mkelvin(number);
- } else if (text.contains(QObject::tr("F"))) {
+ } else if (text.contains(QObject::tr("F"), Qt::CaseInsensitive)) {
mkelvin = F_to_mkelvin(number);
} else {
switch (prefs.units.temperature) {
@@ -849,9 +849,9 @@ int parseWeightToGrams(const QString &text)
if (numOnly.isEmpty())
return 0;
double number = numOnly.toDouble();
- if (text.contains(QObject::tr("kg"))) {
+ if (text.contains(QObject::tr("kg"), Qt::CaseInsensitive)) {
grams = rint(number * 1000);
- } else if (text.contains(QObject::tr("lbs"))) {
+ } else if (text.contains(QObject::tr("lbs"), Qt::CaseInsensitive)) {
grams = lbs_to_grams(number);
} else {
switch (prefs.units.weight) {
@@ -876,9 +876,9 @@ int parsePressureToMbar(const QString &text)
if (numOnly.isEmpty())
return 0;
double number = numOnly.toDouble();
- if (text.contains(QObject::tr("bar"))) {
+ if (text.contains(QObject::tr("bar"), Qt::CaseInsensitive)) {
mbar = rint(number * 1000);
- } else if (text.contains(QObject::tr("psi"))) {
+ } else if (text.contains(QObject::tr("psi"), Qt::CaseInsensitive)) {
mbar = psi_to_mbar(number);
} else {
switch (prefs.units.pressure) {