More consistent handling of feature timezone
Follow-up to commit ae6186c7e8cfdb9420b9119f5affbba7d069598d * require the feature in headers that should only be seen when it's enabled, * expose the auto-test to being run even when the feature is disabled (the parts of that depend on the feature have needed #if-ery) and * fix the Darwin-specific test's misguided #if-ery. Pick-to: 6.5 Task-number: QTBUG-108199 Change-Id: I398cf44c33ffdcb4bb04f54a9d8ccfef68741e4e Reviewed-by: Mate Barany <mate.barany@qt.io> (cherry picked from commit 98581c54fe729f8d30341ebbc0576ad5430df268)
This commit is contained in:
parent
e08da35502
commit
ed98ffb75c
@ -20,6 +20,7 @@
|
||||
#include "qbytearrayview.h"
|
||||
#include "qstring.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(timezone);
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*
|
||||
|
@ -38,6 +38,7 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSTimeZone);
|
||||
#include <QJniObject>
|
||||
#endif
|
||||
|
||||
QT_REQUIRE_CONFIG(timezone);
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_AUTOTEST_EXPORT QTimeZonePrivate : public QSharedData
|
||||
|
@ -6,6 +6,4 @@ add_subdirectory(qdate)
|
||||
add_subdirectory(qdatetime)
|
||||
add_subdirectory(qdatetimeparser)
|
||||
add_subdirectory(qtime)
|
||||
if(QT_FEATURE_timezone)
|
||||
add_subdirectory(qtimezone)
|
||||
endif()
|
||||
add_subdirectory(qtimezone)
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
void tst_QTimeZone_darwinTypes()
|
||||
{
|
||||
#if !defined(QT_NO_SYSTEMLOCALE)
|
||||
#if QT_CONFIG(timezone)
|
||||
// QTimeZone <-> CFTimeZone
|
||||
{
|
||||
QTimeZone qtTimeZone("America/Los_Angeles");
|
||||
@ -39,5 +39,5 @@ void tst_QTimeZone_darwinTypes()
|
||||
QVERIFY([qtTimeZone.toNSTimeZone() isEqual:nsTimeZone]);
|
||||
[autoreleasepool release];
|
||||
}
|
||||
#endif
|
||||
#endif // feature timezone
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user