summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/win32-icc/qmake.conf1
-rw-r--r--src/corelib/animation/qvariantanimation_p.h14
-rw-r--r--src/corelib/io/qloggingcategory.cpp16
-rw-r--r--src/corelib/tools/qvarlengtharray.h6
-rw-r--r--src/gui/kernel/qevent.cpp4
-rw-r--r--src/testlib/3rdparty/qt_attribution.json3
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp25
-rw-r--r--tests/auto/corelib/tools/qdatetime/BLACKLIST2
-rw-r--r--tests/auto/corelib/tools/qlocale/BLACKLIST2
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp4
10 files changed, 55 insertions, 22 deletions
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index 3cb0d58824..2447c712b1 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -12,6 +12,7 @@ include(../common/msvc-desktop.conf)
# modifications to msvc-desktop.conf
QMAKE_COMPILER += intel_icl
+DEFINES += _ENABLE_EXTENDED_ALIGNED_STORAGE
QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h
index 37318a5339..9f0f2e3030 100644
--- a/src/corelib/animation/qvariantanimation_p.h
+++ b/src/corelib/animation/qvariantanimation_p.h
@@ -58,6 +58,8 @@
#include "private/qabstractanimation_p.h"
+#include <type_traits>
+
#ifndef QT_NO_ANIMATION
QT_BEGIN_NAMESPACE
@@ -104,7 +106,17 @@ public:
};
//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);
}
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index d8402c4eb6..aa84f56368 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -471,8 +471,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments are not processed if debug output for the category is not
enabled, so do not rely on any side effects.
- \note Using the macro is thread-safe.
-
\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
not enabled, so do not rely on any side effects.
- \note Using the macro is thread-safe.
-
\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
enabled, so do not rely on any side effects.
- \note Using the macro is thread-safe.
-
\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
not enabled, so do not rely on any side effects.
- \note Using the macro is thread-safe.
-
\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
enabled, so do not rely on any side effects.
- \note Using the macro is thread-safe.
-
\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
not enabled, so do not rely on any side effects.
- \note Using the macro is thread-safe.
-
\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
enabled, so do not rely on any side effects.
- \note Using the macro is thread-safe.
-
\sa qCritical()
*/
@@ -634,8 +620,6 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\note Arguments might not be processed if critical output for the category
is not enabled, so do not rely on any side effects.
- \note Using the macro is thread-safe.
-
\sa qCritical()
*/
/*!
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index a6bd7847a5..b74b1fd123 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -490,7 +490,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthA
}
} else {
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));
}
s += 1;
@@ -518,7 +518,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthA
} else {
T *b = ptr + offset;
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)
new (--i) T(copy);
}
@@ -544,7 +544,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthA
i->~T();
}
} 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;
return ptr + f;
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index d7727d97b8..4207697c01 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -2750,7 +2750,7 @@ Qt::MouseButtons QTabletEvent::buttons() const
\header
\li Event Type
\li Description
- \li Touch equence
+ \li Touch sequence
\row
\li Qt::ZoomNativeGesture
\li Magnification delta in percent.
@@ -4119,7 +4119,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
const QNativeGestureEvent *ne = static_cast<const QNativeGestureEvent *>(e);
dbg << "QNativeGestureEvent(";
QtDebugUtils::formatQEnum(dbg, ne->gestureType());
- dbg << "localPos=";
+ dbg << ", localPos=";
QtDebugUtils::formatQPoint(dbg, ne->localPos());
dbg << ", value=" << ne->value() << ')';
}
diff --git a/src/testlib/3rdparty/qt_attribution.json b/src/testlib/3rdparty/qt_attribution.json
index 47625634e5..18522b6cd8 100644
--- a/src/testlib/3rdparty/qt_attribution.json
+++ b/src/testlib/3rdparty/qt_attribution.json
@@ -8,6 +8,7 @@
"Description": "An instrumentation framework for building dynamic analysis tools.",
"Homepage": "http://valgrind.org/",
+ "Version": "3.3.0",
"License": "BSD 4-clause \"Original\" or \"Old\" License",
"LicenseId": "BSD-4-Clause",
"LicenseFile": "VALGRIND_LICENSE.txt",
@@ -36,6 +37,8 @@ Copyright (c) 2003, 2006 Massachusetts Institute of Technology"
"Files": "linux_perf_event_p.h",
"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",
"LicenseId": "GPL-2.0 WITH Linux-syscall-note",
"LicenseFile": "LINUX_LICENSE.txt",
diff --git a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
index 00962afa72..ac20fb35ec 100644
--- a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
+++ b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
@@ -43,6 +43,7 @@ private slots:
void keyValueAt();
void keyValues();
void duration();
+ void interpolation();
};
class TestableQVariantAnimation : public QVariantAnimation
@@ -129,6 +130,30 @@ void tst_QVariantAnimation::duration()
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)
#include "tst_qvariantanimation.moc"
diff --git a/tests/auto/corelib/tools/qdatetime/BLACKLIST b/tests/auto/corelib/tools/qdatetime/BLACKLIST
new file mode 100644
index 0000000000..3a42ee066b
--- /dev/null
+++ b/tests/auto/corelib/tools/qdatetime/BLACKLIST
@@ -0,0 +1,2 @@
+[timeZoneAbbreviation]
+osx
diff --git a/tests/auto/corelib/tools/qlocale/BLACKLIST b/tests/auto/corelib/tools/qlocale/BLACKLIST
new file mode 100644
index 0000000000..3eac7c10ed
--- /dev/null
+++ b/tests/auto/corelib/tools/qlocale/BLACKLIST
@@ -0,0 +1,2 @@
+[formatTimeZone]
+osx
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 4131c44c84..b7cb8a1bdc 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -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), 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();
QVERIFY(system.toCurrencyString(1, QLatin1String("FOO")).contains(QLatin1String("FOO")));
}