Merge 5.11 into 5.11.2

Change-Id: I672bc167de3801c944315d92120c5e03da69e9c7
This commit is contained in:
Frederik Gladhorn 2018-08-27 15:49:03 +02:00
commit 900ce73b6f
10 changed files with 55 additions and 22 deletions

View File

@ -12,6 +12,7 @@ include(../common/msvc-desktop.conf)
# modifications to msvc-desktop.conf # modifications to msvc-desktop.conf
QMAKE_COMPILER += intel_icl QMAKE_COMPILER += intel_icl
DEFINES += _ENABLE_EXTENDED_ALIGNED_STORAGE
QMAKE_CFLAGS_OPTIMIZE_FULL = -O3 QMAKE_CFLAGS_OPTIMIZE_FULL = -O3

View File

@ -58,6 +58,8 @@
#include "private/qabstractanimation_p.h" #include "private/qabstractanimation_p.h"
#include <type_traits>
#ifndef QT_NO_ANIMATION #ifndef QT_NO_ANIMATION
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -104,7 +106,17 @@ public:
}; };
//this should make the interpolation faster //this should make the interpolation faster
template<typename T> inline T _q_interpolate(const T &f, const T &t, qreal progress) template<typename T>
typename std::enable_if<std::is_unsigned<T>::value, T>::type
_q_interpolate(const T &f, const T &t, qreal progress)
{
return T(f + t * progress - f * progress);
}
// the below will apply also to all non-arithmetic types
template<typename T>
typename std::enable_if<!std::is_unsigned<T>::value, T>::type
_q_interpolate(const T &f, const T &t, qreal progress)
{ {
return T(f + (t - f) * progress); return T(f + (t - f) * progress);
} }

View File

@ -471,8 +471,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments are not processed if debug output for the category is not \note Arguments are not processed if debug output for the category is not
enabled, so do not rely on any side effects. enabled, so do not rely on any side effects.
\note Using the macro is thread-safe.
\sa qDebug() \sa qDebug()
*/ */
@ -493,8 +491,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments might not be processed if debug output for the category is \note Arguments might not be processed if debug output for the category is
not enabled, so do not rely on any side effects. not enabled, so do not rely on any side effects.
\note Using the macro is thread-safe.
\sa qDebug() \sa qDebug()
*/ */
@ -518,8 +514,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments are not processed if debug output for the category is not \note Arguments are not processed if debug output for the category is not
enabled, so do not rely on any side effects. enabled, so do not rely on any side effects.
\note Using the macro is thread-safe.
\sa qInfo() \sa qInfo()
*/ */
@ -540,8 +534,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments might not be processed if debug output for the category is \note Arguments might not be processed if debug output for the category is
not enabled, so do not rely on any side effects. not enabled, so do not rely on any side effects.
\note Using the macro is thread-safe.
\sa qInfo() \sa qInfo()
*/ */
@ -565,8 +557,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments are not processed if warning output for the category is not \note Arguments are not processed if warning output for the category is not
enabled, so do not rely on any side effects. enabled, so do not rely on any side effects.
\note Using the macro is thread-safe.
\sa qWarning() \sa qWarning()
*/ */
@ -587,8 +577,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments might not be processed if warning output for the category is \note Arguments might not be processed if warning output for the category is
not enabled, so do not rely on any side effects. not enabled, so do not rely on any side effects.
\note Using the macro is thread-safe.
\sa qWarning() \sa qWarning()
*/ */
@ -612,8 +600,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments are not processed if critical output for the category is not \note Arguments are not processed if critical output for the category is not
enabled, so do not rely on any side effects. enabled, so do not rely on any side effects.
\note Using the macro is thread-safe.
\sa qCritical() \sa qCritical()
*/ */
@ -634,8 +620,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments might not be processed if critical output for the category \note Arguments might not be processed if critical output for the category
is not enabled, so do not rely on any side effects. is not enabled, so do not rely on any side effects.
\note Using the macro is thread-safe.
\sa qCritical() \sa qCritical()
*/ */
/*! /*!

View File

@ -490,7 +490,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthA
} }
} else { } else {
T *b = ptr + offset; T *b = ptr + offset;
memmove(b + 1, b, (s - offset) * sizeof(T)); memmove(static_cast<void *>(b + 1), static_cast<const void *>(b), (s - offset) * sizeof(T));
new (b) T(std::move(t)); new (b) T(std::move(t));
} }
s += 1; s += 1;
@ -518,7 +518,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthA
} else { } else {
T *b = ptr + offset; T *b = ptr + offset;
T *i = b + n; T *i = b + n;
memmove(i, b, (s - offset - n) * sizeof(T)); memmove(static_cast<void *>(i), static_cast<const void *>(b), (s - offset - n) * sizeof(T));
while (i != b) while (i != b)
new (--i) T(copy); new (--i) T(copy);
} }
@ -544,7 +544,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthA
i->~T(); i->~T();
} }
} else { } else {
memmove(ptr + f, ptr + l, (s - l) * sizeof(T)); memmove(static_cast<void *>(ptr + f), static_cast<const void *>(ptr + l), (s - l) * sizeof(T));
} }
s -= n; s -= n;
return ptr + f; return ptr + f;

View File

@ -2750,7 +2750,7 @@ Qt::MouseButtons QTabletEvent::buttons() const
\header \header
\li Event Type \li Event Type
\li Description \li Description
\li Touch equence \li Touch sequence
\row \row
\li Qt::ZoomNativeGesture \li Qt::ZoomNativeGesture
\li Magnification delta in percent. \li Magnification delta in percent.
@ -4119,7 +4119,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
const QNativeGestureEvent *ne = static_cast<const QNativeGestureEvent *>(e); const QNativeGestureEvent *ne = static_cast<const QNativeGestureEvent *>(e);
dbg << "QNativeGestureEvent("; dbg << "QNativeGestureEvent(";
QtDebugUtils::formatQEnum(dbg, ne->gestureType()); QtDebugUtils::formatQEnum(dbg, ne->gestureType());
dbg << "localPos="; dbg << ", localPos=";
QtDebugUtils::formatQPoint(dbg, ne->localPos()); QtDebugUtils::formatQPoint(dbg, ne->localPos());
dbg << ", value=" << ne->value() << ')'; dbg << ", value=" << ne->value() << ')';
} }

View File

@ -8,6 +8,7 @@
"Description": "An instrumentation framework for building dynamic analysis tools.", "Description": "An instrumentation framework for building dynamic analysis tools.",
"Homepage": "http://valgrind.org/", "Homepage": "http://valgrind.org/",
"Version": "3.3.0",
"License": "BSD 4-clause \"Original\" or \"Old\" License", "License": "BSD 4-clause \"Original\" or \"Old\" License",
"LicenseId": "BSD-4-Clause", "LicenseId": "BSD-4-Clause",
"LicenseFile": "VALGRIND_LICENSE.txt", "LicenseFile": "VALGRIND_LICENSE.txt",
@ -36,6 +37,8 @@ Copyright (c) 2003, 2006 Massachusetts Institute of Technology"
"Files": "linux_perf_event_p.h", "Files": "linux_perf_event_p.h",
"Description": "Allows access to the Linux kernel's performance events.", "Description": "Allows access to the Linux kernel's performance events.",
"Homepage": "https://www.kernel.org",
"Version": "3.7",
"License": "GNU General Public License v2.0 only with Linux Syscall Note", "License": "GNU General Public License v2.0 only with Linux Syscall Note",
"LicenseId": "GPL-2.0 WITH Linux-syscall-note", "LicenseId": "GPL-2.0 WITH Linux-syscall-note",
"LicenseFile": "LINUX_LICENSE.txt", "LicenseFile": "LINUX_LICENSE.txt",

View File

@ -43,6 +43,7 @@ private slots:
void keyValueAt(); void keyValueAt();
void keyValues(); void keyValues();
void duration(); void duration();
void interpolation();
}; };
class TestableQVariantAnimation : public QVariantAnimation class TestableQVariantAnimation : public QVariantAnimation
@ -129,6 +130,30 @@ void tst_QVariantAnimation::duration()
QCOMPARE(anim.duration(), 500); QCOMPARE(anim.duration(), 500);
} }
void tst_QVariantAnimation::interpolation()
{
QVariantAnimation unsignedAnim;
unsignedAnim.setStartValue(100u);
unsignedAnim.setEndValue(0u);
unsignedAnim.setDuration(100);
unsignedAnim.setCurrentTime(50);
QCOMPARE(unsignedAnim.currentValue().toUInt(), 50u);
QVariantAnimation signedAnim;
signedAnim.setStartValue(100);
signedAnim.setEndValue(0);
signedAnim.setDuration(100);
signedAnim.setCurrentTime(50);
QCOMPARE(signedAnim.currentValue().toInt(), 50);
QVariantAnimation pointAnim;
pointAnim.setStartValue(QPoint(100, 100));
pointAnim.setEndValue(QPoint(0, 0));
pointAnim.setDuration(100);
pointAnim.setCurrentTime(50);
QCOMPARE(pointAnim.currentValue().toPoint(), QPoint(50, 50));
}
QTEST_MAIN(tst_QVariantAnimation) QTEST_MAIN(tst_QVariantAnimation)
#include "tst_qvariantanimation.moc" #include "tst_qvariantanimation.moc"

View File

@ -0,0 +1,2 @@
[timeZoneAbbreviation]
osx

View File

@ -0,0 +1,2 @@
[formatTimeZone]
osx

View File

@ -2385,6 +2385,10 @@ void tst_QLocale::currency()
QCOMPARE(de_DE.toCurrencyString(double(-1234.56)), QString::fromUtf8("-1.234,56\xc2\xa0\xe2\x82\xac")); QCOMPARE(de_DE.toCurrencyString(double(-1234.56)), QString::fromUtf8("-1.234,56\xc2\xa0\xe2\x82\xac"));
QCOMPARE(de_DE.toCurrencyString(double(-1234.56), QLatin1String("BAZ")), QString::fromUtf8("-1.234,56\xc2\xa0" "BAZ")); QCOMPARE(de_DE.toCurrencyString(double(-1234.56), QLatin1String("BAZ")), QString::fromUtf8("-1.234,56\xc2\xa0" "BAZ"));
const QLocale es_CR(QLocale::Spanish, QLocale::CostaRica);
QCOMPARE(es_CR.toCurrencyString(double(1565.25)),
QString::fromUtf8("\xE2\x82\xA1" "1\xC2\xA0" "565,25"));
const QLocale system = QLocale::system(); const QLocale system = QLocale::system();
QVERIFY(system.toCurrencyString(1, QLatin1String("FOO")).contains(QLatin1String("FOO"))); QVERIFY(system.toCurrencyString(1, QLatin1String("FOO")).contains(QLatin1String("FOO")));
} }