summaryrefslogtreecommitdiffstats
path: root/src/corelib/time
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/time')
-rw-r--r--src/corelib/time/qdatetime.h2
-rw-r--r--src/corelib/time/qdatetimeparser.cpp9
2 files changed, 8 insertions, 3 deletions
diff --git a/src/corelib/time/qdatetime.h b/src/corelib/time/qdatetime.h
index 5a8e1aecd8..62642a5fd2 100644
--- a/src/corelib/time/qdatetime.h
+++ b/src/corelib/time/qdatetime.h
@@ -55,7 +55,9 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSDate);
QT_BEGIN_NAMESPACE
+#if QT_CONFIG(timezone)
class QTimeZone;
+#endif
class QDateTime;
class Q_CORE_EXPORT QDate // ### Qt 6: change to be used by value, not const &
diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp
index 860f975b4f..5bd2821827 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();
}