summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qfloat16.cpp13
-rw-r--r--src/corelib/global/qfloat16.h4
-rw-r--r--src/corelib/tools/qsharedpointer.cpp21
-rw-r--r--src/corelib/tools/qt_attribution.json2
4 files changed, 31 insertions, 9 deletions
diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp
index fd608efe55..87ff796368 100644
--- a/src/corelib/global/qfloat16.cpp
+++ b/src/corelib/global/qfloat16.cpp
@@ -65,6 +65,19 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \macro QT_NO_FLOAT16_OPERATORS
+ \relates <QFloat16>
+ \since 5.12.4
+
+ Defining this macro disables the arithmetic operators for qfloat16.
+
+ This is only necessary on Visual Studio 2017 (and earlier) when including
+ \c {<QFloat16>} and \c{<bitset>} in the same translation unit, which would
+ otherwise cause a compilation error due to a toolchain bug (see
+ [QTBUG-72073]).
+*/
+
+/*!
Returns true if the \c qfloat16 \a {f} is equivalent to infinity.
\relates <QFloat16>
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
index 42cb1357f1..fc006db3f2 100644
--- a/src/corelib/global/qfloat16.h
+++ b/src/corelib/global/qfloat16.h
@@ -81,7 +81,9 @@ private:
Q_CORE_EXPORT static const quint32 shifttable[];
friend bool qIsNull(qfloat16 f) Q_DECL_NOTHROW;
+#if !defined(QT_NO_FLOAT16_OPERATORS)
friend qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW;
+#endif
};
Q_DECLARE_TYPEINFO(qfloat16, Q_PRIMITIVE_TYPE);
@@ -163,6 +165,7 @@ inline qfloat16::operator float() const Q_DECL_NOTHROW
}
#endif
+#if !defined(QT_NO_FLOAT16_OPERATORS)
inline qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW
{
qfloat16 f;
@@ -244,6 +247,7 @@ QF16_MAKE_BOOL_OP_INT(!=)
#undef QF16_MAKE_BOOL_OP_INT
QT_WARNING_POP
+#endif // QT_NO_FLOAT16_OPERATORS
/*!
\internal
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index 8c0f8379fb..39a71a4393 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -65,14 +65,19 @@
\section1 Thread-Safety
- QSharedPointer and QWeakPointer are thread-safe and operate
- atomically on the pointer value. Different threads can also access
- the QSharedPointer or QWeakPointer pointing to the same object at
- the same time without need for locking mechanisms.
-
- It should be noted that, while the pointer value can be accessed
- in this manner, QSharedPointer and QWeakPointer provide no
- guarantee about the object being pointed to. Thread-safety and
+ QSharedPointer and QWeakPointer are reentrant classes. This means that, in
+ general, a given QSharedPointer or QWeakPointer object \b{cannot} be
+ accessed by multiple threads at the same time without synchronization.
+
+ Different QSharedPointer and QWeakPointer objects can safely be accessed
+ by multiple threads at the same time. This includes the case where they
+ hold pointers to the same object; the reference counting mechanism
+ is atomic, and no manual synchronization is required.
+
+ It should be noted that, while the pointer value can be accessed in this
+ manner (that is, by multiple threads at the same time, without
+ synchronization), QSharedPointer and QWeakPointer provide no guarantee
+ about the object being pointed to. The specific thread-safety and
reentrancy rules for that object still apply.
\section1 Other Pointer Classes
diff --git a/src/corelib/tools/qt_attribution.json b/src/corelib/tools/qt_attribution.json
index a842d9467b..912da3f22c 100644
--- a/src/corelib/tools/qt_attribution.json
+++ b/src/corelib/tools/qt_attribution.json
@@ -29,7 +29,7 @@
world's languages, with the largest and most extensive standard repository of locale data
available.",
"Homepage": "http://cldr.unicode.org/",
- "Version": "v34",
+ "Version": "v35.1",
"License": "// as specified in https://spdx.org/licenses/Unicode-DFS-2016.html",
"License": "Unicode License Agreement - Data Files and Software (2016)",
"LicenseId": "Unicode-DFS-2016",