summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qdatetimeparser.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-09-27 11:08:55 +0200
committerLiang Qi <liang.qi@qt.io>2018-09-27 11:08:55 +0200
commitd0fcaa7eaaae85ddbf0a78efa59b341380c101a4 (patch)
tree9b3422ae33ef9dfcda0af228c56c3d2eeed7b0c3 /src/corelib/tools/qdatetimeparser.cpp
parentf6ce2d42b3cbe049ebcf1a2349a5cd4dde2c6d24 (diff)
parent5e64957ee4162ecf4456306a530a68761c2b127f (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: src/corelib/global/qconfig-bootstrapped.h src/widgets/util/qcompleter.cpp Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
Diffstat (limited to 'src/corelib/tools/qdatetimeparser.cpp')
-rw-r--r--src/corelib/tools/qdatetimeparser.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp
index d03518e70d..18c44c3a17 100644
--- a/src/corelib/tools/qdatetimeparser.cpp
+++ b/src/corelib/tools/qdatetimeparser.cpp
@@ -77,7 +77,7 @@ QDateTimeParser::~QDateTimeParser()
int QDateTimeParser::getDigit(const QDateTime &t, int index) const
{
if (index < 0 || index >= sectionNodes.size()) {
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
qWarning("QDateTimeParser::getDigit() Internal error (%s %d)",
qPrintable(t.toString()), index);
#else
@@ -103,7 +103,7 @@ int QDateTimeParser::getDigit(const QDateTime &t, int index) const
default: break;
}
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
qWarning("QDateTimeParser::getDigit() Internal error 2 (%s %d)",
qPrintable(t.toString()), index);
#else
@@ -127,7 +127,7 @@ int QDateTimeParser::getDigit(const QDateTime &t, int index) const
bool QDateTimeParser::setDigit(QDateTime &v, int index, int newVal) const
{
if (index < 0 || index >= sectionNodes.size()) {
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
qWarning("QDateTimeParser::setDigit() Internal error (%s %d %d)",
qPrintable(v.toString()), index, newVal);
#else
@@ -612,7 +612,7 @@ int QDateTimeParser::sectionSize(int sectionIndex) const
int QDateTimeParser::sectionMaxSize(Section s, int count) const
{
-#ifndef QT_NO_TEXTDATE
+#if QT_CONFIG(textdate)
int mcount = 12;
#endif
@@ -636,14 +636,14 @@ int QDateTimeParser::sectionMaxSize(Section s, int count) const
case DaySection: return 2;
case DayOfWeekSectionShort:
case DayOfWeekSectionLong:
-#ifdef QT_NO_TEXTDATE
+#if !QT_CONFIG(textdate)
return 2;
#else
mcount = 7;
Q_FALLTHROUGH();
#endif
case MonthSection:
-#ifdef QT_NO_TEXTDATE
+#if !QT_CONFIG(textdate)
return 2;
#else
if (count <= 2)
@@ -725,7 +725,7 @@ QString QDateTimeParser::sectionText(int sectionIndex) const
}
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
QDateTimeParser::ParsedSection
QDateTimeParser::parseSection(const QDateTime &currentValue, int sectionIndex,
@@ -1727,7 +1727,7 @@ QDateTimeParser::AmPmFinder QDateTimeParser::findAmPm(QString &str, int sectionI
return PossibleBoth;
return (!broken[amindex] ? PossibleAM : PossiblePM);
}
-#endif // QT_NO_DATESTRING
+#endif // datestring
/*!
\internal
@@ -1958,7 +1958,7 @@ QString QDateTimeParser::stateName(State s) const
}
}
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
bool QDateTimeParser::fromString(const QString &t, QDate *date, QTime *time) const
{
QDateTime val(QDate(1900, 1, 1), QDATETIMEEDIT_TIME_MIN);
@@ -1983,7 +1983,7 @@ bool QDateTimeParser::fromString(const QString &t, QDate *date, QTime *time) con
}
return true;
}
-#endif // QT_NO_DATESTRING
+#endif // datestring
QDateTime QDateTimeParser::getMinimum() const
{