summaryrefslogtreecommitdiffstats
path: root/core/qthelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r--core/qthelper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index d6de2ebf9..943ad00b6 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -775,7 +775,7 @@ int parseDurationToSeconds(const QString &text)
hours = "0";
minutes = numOnly;
}
- secs = hours.toDouble() * 3600 + minutes.toDouble() * 60 + seconds.toDouble();
+ secs = lrint(hours.toDouble() * 3600 + minutes.toDouble() * 60 + seconds.toDouble());
return secs;
}
@@ -788,7 +788,7 @@ int parseLengthToMm(const QString &text)
return 0;
double number = numOnly.toDouble();
if (text.contains(QObject::tr("m"), Qt::CaseInsensitive)) {
- mm = number * 1000;
+ mm = lrint(number * 1000);
} else if (text.contains(QObject::tr("ft"), Qt::CaseInsensitive)) {
mm = feet_to_mm(number);
} else {
@@ -797,7 +797,7 @@ int parseLengthToMm(const QString &text)
mm = feet_to_mm(number);
break;
case units::METERS:
- mm = number * 1000;
+ mm = lrint(number * 1000);
break;
default:
mm = 0;