summaryrefslogtreecommitdiffstats
path: root/linhes/mythtv/negative_time_values.patch
diff options
context:
space:
mode:
Diffstat (limited to 'linhes/mythtv/negative_time_values.patch')
-rw-r--r--linhes/mythtv/negative_time_values.patch25
1 files changed, 0 insertions, 25 deletions
diff --git a/linhes/mythtv/negative_time_values.patch b/linhes/mythtv/negative_time_values.patch
deleted file mode 100644
index 7e15d19..0000000
--- a/linhes/mythtv/negative_time_values.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/mythtv/libs/libmythbase/mythdate.cpp b/mythtv/libs/libmythbase/mythdate.cpp
-index 8f3397241a6..21a307cb453 100644
---- a/mythtv/libs/libmythbase/mythdate.cpp
-+++ b/mythtv/libs/libmythbase/mythdate.cpp
-@@ -237,6 +237,9 @@ QString formatTime(std::chrono::milliseconds msecs, QString fmt)
- static const QRegularExpression sRe("s+");
- static const QRegularExpression zRe("z+");
-
-+ bool negativeTime = msecs < 0ms;
-+ msecs = std::chrono::milliseconds(std::abs(msecs.count()));
-+
- QRegularExpressionMatch match = hRe.match(fmt);
- if (match.hasMatch())
- {
-@@ -272,6 +275,10 @@ QString formatTime(std::chrono::milliseconds msecs, QString fmt)
- QString text = StringUtil::intToPaddedString(value, width);
- fmt.replace(match.capturedStart(), match.capturedLength(), text);
- }
-+
-+ if (negativeTime)
-+ fmt.prepend("-");
-+
- return fmt;
- }
-