Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: src/corelib/tools/qtimezoneprivate.cpp Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
This commit is contained in:
commit
b4da5c6b93
2
src/3rdparty/zlib/qt_attribution.json
vendored
2
src/3rdparty/zlib/qt_attribution.json
vendored
@ -8,7 +8,7 @@
|
||||
"Homepage": "http://zlib.net/",
|
||||
"Version": "1.2.11",
|
||||
|
||||
"License": "ZLib license",
|
||||
"License": "zlib License",
|
||||
"LicenseId": "Zlib",
|
||||
"LicenseFile": "LICENSE",
|
||||
"Copyright": "(C) 1995-2017 Jean-loup Gailly and Mark Adler"
|
||||
|
@ -1341,12 +1341,33 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
|
||||
|
||||
const QDate date(year, month, day);
|
||||
const QTime time(hour, minute, second, msec);
|
||||
return StateNode(
|
||||
const QDateTime when =
|
||||
#if QT_CONFIG(timezone)
|
||||
tspec == Qt::TimeZone ? QDateTime(date, time, timeZone) :
|
||||
tspec == Qt::TimeZone ? QDateTime(date, time, timeZone) :
|
||||
#endif
|
||||
QDateTime(date, time, tspec, zoneOffset),
|
||||
state, padding, conflicts);
|
||||
QDateTime(date, time, tspec, zoneOffset);
|
||||
|
||||
// If hour wasn't specified, check the default we're using exists on the
|
||||
// given date (which might be a spring-forward, skipping an hour).
|
||||
if (parserType == QVariant::DateTime && !(isSet & HourSectionMask) && !when.isValid()) {
|
||||
qint64 msecs = when.toMSecsSinceEpoch();
|
||||
// Fortunately, that gets a useful answer ...
|
||||
const QDateTime replace =
|
||||
#if QT_CONFIG(timezone)
|
||||
tspec == Qt::TimeZone
|
||||
? QDateTime::fromMSecsSinceEpoch(msecs, timeZone) :
|
||||
#endif
|
||||
QDateTime::fromMSecsSinceEpoch(msecs, tspec, zoneOffset);
|
||||
const QTime tick = replace.time();
|
||||
if (replace.date() == date
|
||||
&& (!(isSet & MinuteSection) || tick.minute() == minute)
|
||||
&& (!(isSet & SecondSection) || tick.second() == second)
|
||||
&& (!(isSet & MSecSection) || tick.msec() == msec)) {
|
||||
return StateNode(replace, state, padding, conflicts);
|
||||
}
|
||||
}
|
||||
|
||||
return StateNode(when, state, padding, conflicts);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -440,7 +440,7 @@ QTimeZonePrivate::Data QTimeZonePrivate::dataForLocalTime(qint64 forLocalMSecs,
|
||||
utcEpochMSecs = forStd;
|
||||
} else {
|
||||
// Invalid forLocalMSecs: in spring-forward gap.
|
||||
const int dstStep = daylightTimeOffset(early < late ? imminent : recent);
|
||||
const int dstStep = daylightTimeOffset(early < late ? imminent : recent) * 1000;
|
||||
Q_ASSERT(dstStep); // There can't be a transition without it !
|
||||
utcEpochMSecs = (hint > 0) ? forStd - dstStep : forDst + dstStep;
|
||||
}
|
||||
|
@ -975,14 +975,12 @@
|
||||
\li
|
||||
\row \li \c meta
|
||||
\li Meta-information
|
||||
\li If a text encoding is specified using the \c{meta} tag,
|
||||
it is picked up by Qt::codecForHtml().
|
||||
Likewise, if an encoding is specified to
|
||||
QTextDocument::toHtml(), the encoding is stored using
|
||||
a \c meta tag, for example:
|
||||
|
||||
\snippet code/doc_src_richtext.qdoc 7
|
||||
|
||||
\li If a text encoding is specified using the \c{meta}
|
||||
tag, it is picked up by Qt::codecForHtml(). Likewise,
|
||||
if an encoding is specified to QTextDocument::toHtml(),
|
||||
the encoding is stored using a \c meta tag, for
|
||||
example:
|
||||
\c {<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />}
|
||||
\row \li \c li
|
||||
\li List item
|
||||
\li
|
||||
|
@ -642,6 +642,10 @@ QList<QSslCertificate> QSslConfiguration::caCertificates() const
|
||||
The CA certificate database is used by the socket during the
|
||||
handshake phase to validate the peer's certificate.
|
||||
|
||||
\note The default configuration uses the system CA certificate database. If
|
||||
that is not available (as is commonly the case on iOS), the default database
|
||||
is empty.
|
||||
|
||||
\sa caCertificates()
|
||||
*/
|
||||
void QSslConfiguration::setCaCertificates(const QList<QSslCertificate> &certificates)
|
||||
|
@ -63,7 +63,7 @@ void QFreeTypeFontDatabase::populateFontDatabase()
|
||||
|
||||
if (!dir.exists()) {
|
||||
qWarning("QFontDatabase: Cannot find font directory %s.\n"
|
||||
"Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.",
|
||||
"Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.",
|
||||
qPrintable(fontpath));
|
||||
return;
|
||||
}
|
||||
|
@ -963,7 +963,6 @@ static inline bool isInputMessage(UINT m)
|
||||
case WM_TOUCH:
|
||||
case WM_MOUSEHOVER:
|
||||
case WM_MOUSELEAVE:
|
||||
case WM_NCHITTEST:
|
||||
case WM_NCMOUSEHOVER:
|
||||
case WM_NCMOUSELEAVE:
|
||||
case WM_SIZING:
|
||||
|
@ -217,7 +217,7 @@ QAbstractItemModelTester::QAbstractItemModelTester(QAbstractItemModel *model, Fa
|
||||
|
||||
Q_D(QAbstractItemModelTester);
|
||||
|
||||
const auto &runAllTests = [d] { d->runAllTests(); };
|
||||
auto runAllTests = [d] { d->runAllTests(); };
|
||||
|
||||
connect(model, &QAbstractItemModel::columnsAboutToBeInserted,
|
||||
this, runAllTests);
|
||||
|
@ -643,7 +643,7 @@ void QStatusBar::hideOrShow()
|
||||
}
|
||||
#endif
|
||||
|
||||
repaint(d->messageRect());
|
||||
update(d->messageRect());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -2390,6 +2390,14 @@ void tst_QDateTime::fromStringStringFormat_data()
|
||||
QTest::newRow("data16") << QString("2005-06-28T07:57:30.001Z")
|
||||
<< QString("yyyy-MM-ddThh:mm:ss.zt")
|
||||
<< QDateTime(QDate(2005, 06, 28), QTime(07, 57, 30, 1), Qt::UTC);
|
||||
#if QT_CONFIG(timezone)
|
||||
QTimeZone southBrazil("America/Sao_Paulo");
|
||||
if (southBrazil.isValid()) {
|
||||
QTest::newRow("spring-forward-midnight")
|
||||
<< QString("2008-10-19 23:45.678 America/Sao_Paulo") << QString("yyyy-MM-dd mm:ss.zzz t")
|
||||
<< QDateTime(QDate(2008, 10, 19), QTime(1, 23, 45, 678), southBrazil);
|
||||
}
|
||||
#endif
|
||||
QTest::newRow("late") << QString("9999-12-31T23:59:59.999Z")
|
||||
<< QString("yyyy-MM-ddThh:mm:ss.zZ")
|
||||
<< QDateTime(QDate(9999, 12, 31), QTime(23, 59, 59, 999));
|
||||
|
Loading…
Reference in New Issue
Block a user