summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qdatetimeparser.cpp
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2020-04-23 17:11:40 +0300
committerAndrei Golubev <andrei.golubev@qt.io>2020-05-20 15:39:16 +0300
commiteb95a16253c9927bb0b09b70269f317ff726ed87 (patch)
tree0bb5664d66a34028e86ac655cd79f54781378ec2 /src/corelib/time/qdatetimeparser.cpp
parent370289bef68d8505b66cb27150a3f596e23c5ed3 (diff)
Make qtbase compile without QT_CONFIG(timezone)
Fixes: QTBUG-83795 Change-Id: I05eaaf57d87a9111d3609ebab81bc707f8af98f0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit b428e98052aa1b97a42f31ed52b1266d17e186ee) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/time/qdatetimeparser.cpp')
-rw-r--r--src/corelib/time/qdatetimeparser.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp
index bc3d9b992e..bf7f69ebaf 100644
--- a/src/corelib/time/qdatetimeparser.cpp
+++ b/src/corelib/time/qdatetimeparser.cpp
@@ -788,11 +788,9 @@ QDateTimeParser::parseSection(const QDateTime &currentValue, int sectionIndex,
text->replace(offset, used, sectiontext.constData(), used);
break; }
case TimeZoneSection:
-#if QT_CONFIG(timezone)
result = findTimeZone(sectionTextRef, currentValue,
absoluteMax(sectionIndex),
absoluteMin(sectionIndex));
-#endif
break;
case MonthSection:
case DayOfWeekSectionShort:
@@ -1692,7 +1690,12 @@ QDateTimeParser::findTimeZone(QStringRef str, const QDateTime &when,
if (index > 0 && maxVal >= offset && offset >= minVal)
return ParsedSection(Acceptable, offset, index);
-#endif // timezone
+#else // timezone
+ Q_UNUSED(str);
+ Q_UNUSED(when);
+ Q_UNUSED(maxVal);
+ Q_UNUSED(minVal);
+#endif
return ParsedSection();
}