summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-11-16 08:10:15 +0100
committerLiang Qi <liang.qi@qt.io>2018-11-16 08:10:15 +0100
commit37d3bc9ad7731a131485a9be1ae5b5aac430f82e (patch)
tree2456b1d9bb5050bd5c871c62d0a2d362a1a003c7 /src/corelib/global
parent1983abddc06350541ac7a4bb4b2da14091e96311 (diff)
parent900b57ea90ebe60414a5188337bc85ee4faac220 (diff)
Merge remote-tracking branch 'origin/5.12.0' into 5.12
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobal.cpp2
-rw-r--r--src/corelib/global/qglobalstatic.qdoc10
-rw-r--r--src/corelib/global/qnamespace.qdoc6
-rw-r--r--src/corelib/global/qnumeric_p.h36
4 files changed, 48 insertions, 6 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 5c1665fa00..88d4877be5 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -3796,7 +3796,7 @@ bool qunsetenv(const char *varName)
dependent delayed translation in the given \a context with the given
\a comment.
The \a context is typically a class and also needs to be specified
- as a string literal. The string literal \a disambiguation should be
+ as a string literal. The string literal \a comment should be
a short semantic tag to tell apart otherwise identical strings.
The macro tells lupdate to collect the string, and expands to an
diff --git a/src/corelib/global/qglobalstatic.qdoc b/src/corelib/global/qglobalstatic.qdoc
index dbea04ecab..e7935d5a9b 100644
--- a/src/corelib/global/qglobalstatic.qdoc
+++ b/src/corelib/global/qglobalstatic.qdoc
@@ -435,6 +435,7 @@
*/
/*!
+ \keyword qglobalstatic-operator-type-ptr
\fn template <typename T, T *(&innerFunction)(), QBasicAtomicInt &guard> QGlobalStatic<T, innerFunction, guard>::operator Type*()
This function returns the address of the contents of this global static. If
@@ -476,10 +477,11 @@
by this function. If the contents have already been destroyed, this
function will return a null pointer.
- This function is equivalent to \l {operator Type *()}. It is provided for
- compatibility with the private Q_GLOBAL_STATIC implementation that existed
- in Qt 4.x and 5.0. New code should avoid using it and should instead treat
- the object as a smart pointer.
+ This function is equivalent to \l {qglobalstatic-operator-type-ptr}
+ {operator Type *()}. It is provided for compatibility with the private
+ Q_GLOBAL_STATIC implementation that existed in Qt 4.x and 5.0. New code
+ should avoid using it and should instead treat the object as a smart
+ pointer.
*/
/*!
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 42009e0b5e..652efb10bf 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -3187,8 +3187,12 @@
\value ScrollUpdate The scrolling distance has changed (default).
- \value ScrollEnd Scrolling has ended, but the scrolling distance
+ \value ScrollEnd Scrolling has ended, and the scrolling distance
did not change anymore.
+
+ \value ScrollMomentum The user no longer touches the input device,
+ but scrolling continues due to scroll momentum.
+ This value was introduced in Qt 5.12.
*/
/*!
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h
index 9c8514f5a3..e318c3759b 100644
--- a/src/corelib/global/qnumeric_p.h
+++ b/src/corelib/global/qnumeric_p.h
@@ -64,6 +64,10 @@
#include <float.h>
#endif
+# if defined(Q_OS_INTEGRITY) && defined(Q_PROCESSOR_ARM_64)
+#include <arm64_ghs.h>
+#endif
+
#if !defined(Q_CC_MSVC) && (defined(Q_OS_QNX) || defined(Q_CC_INTEL))
# include <math.h>
# ifdef isnan
@@ -323,6 +327,38 @@ mul_overflow(T v1, T v2, T *r)
return lr > std::numeric_limits<T>::max() || lr < std::numeric_limits<T>::min();
}
+# if defined(Q_OS_INTEGRITY) && defined(Q_PROCESSOR_ARM_64)
+template <> inline bool mul_overflow(quint64 v1, quint64 v2, quint64 *r)
+{
+ *r = v1 * v2;
+ return __MULUH64(v1, v2);
+}
+template <> inline bool mul_overflow(qint64 v1, qint64 v2, qint64 *r)
+{
+ qint64 high = __MULSH64(v1, v2);
+ if (high == 0) {
+ *r = v1 * v2;
+ return *r < 0;
+ }
+ if (high == -1) {
+ *r = v1 * v2;
+ return *r >= 0;
+ }
+ return true;
+}
+
+template <> inline bool mul_overflow(uint64_t v1, uint64_t v2, uint64_t *r)
+{
+ return mul_overflow<quint64>(v1,v2,reinterpret_cast<quint64*>(r));
+}
+
+template <> inline bool mul_overflow(int64_t v1, int64_t v2, int64_t *r)
+{
+ return mul_overflow<qint64>(v1,v2,reinterpret_cast<qint64*>(r));
+}
+
+#endif
+
# if defined(Q_CC_MSVC) && defined(Q_PROCESSOR_X86)
// We can use intrinsics for the unsigned operations with MSVC
template <> inline bool add_overflow(unsigned v1, unsigned v2, unsigned *r)