diff options
-rw-r--r-- | src/corelib/tools/qpoint.h | 4 | ||||
-rw-r--r-- | src/gui/math3d/qquaternion.h | 2 | ||||
-rw-r--r-- | tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | 11 | ||||
-rw-r--r-- | tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h index 8fff462487..f2c562393a 100644 --- a/src/corelib/tools/qpoint.h +++ b/src/corelib/tools/qpoint.h @@ -129,7 +129,7 @@ private: } }; -Q_DECLARE_TYPEINFO(QPoint, Q_RELOCATABLE_TYPE); +Q_DECLARE_TYPEINFO(QPoint, Q_PRIMITIVE_TYPE); /***************************************************************************** QPoint stream functions @@ -326,7 +326,7 @@ private: } }; -Q_DECLARE_TYPEINFO(QPointF, Q_RELOCATABLE_TYPE); +Q_DECLARE_TYPEINFO(QPointF, Q_PRIMITIVE_TYPE); size_t qHash(QPointF, size_t seed = 0) = delete; diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h index 76fa237afd..4d04ac6ad9 100644 --- a/src/gui/math3d/qquaternion.h +++ b/src/gui/math3d/qquaternion.h @@ -169,7 +169,7 @@ private: float wp, xp, yp, zp; }; -Q_DECLARE_TYPEINFO(QQuaternion, Q_RELOCATABLE_TYPE); +Q_DECLARE_TYPEINFO(QQuaternion, Q_PRIMITIVE_TYPE); inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {} diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index 81a67f1b78..df9beabe73 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -1092,9 +1092,18 @@ void tst_QMetaType::flagsBinaryCompatibility6_0() QFETCH(quint32, id); QFETCH(quint32, flags); + const auto currentFlags = QMetaType::typeFlags(id); + auto expectedFlags = QMetaType::TypeFlags(flags); + if (!(currentFlags.testFlag(QMetaType::NeedsConstruction) && currentFlags.testFlag(QMetaType::NeedsDestruction))) { + if (expectedFlags.testFlag(QMetaType::NeedsConstruction) && expectedFlags.testFlag(QMetaType::NeedsDestruction)) { + // If type changed from RELOCATABLE to trivial, that's fine + expectedFlags.setFlag(QMetaType::NeedsConstruction, false); + expectedFlags.setFlag(QMetaType::NeedsDestruction, false); + } + } quint32 mask_5_0 = 0x1fb; // Only compare the values that were already defined in 5.0 - QCOMPARE(quint32(QMetaType::typeFlags(id)) & mask_5_0, flags & mask_5_0); + QCOMPARE(quint32(currentFlags) & mask_5_0, quint32(expectedFlags) & mask_5_0); } void tst_QMetaType::construct_data() diff --git a/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp b/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp index 1d17f98d82..e4863a8f5a 100644 --- a/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp +++ b/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp @@ -344,7 +344,7 @@ void tst_QDtlsCookie::verifyMultipleClients() clientsToAdd = clientsToWait = 100; - testLoop.enterLoop(handshakeTimeoutMS * clientsToWait); + testLoop.enterLoopMSecs(handshakeTimeoutMS * clientsToWait); QVERIFY(!testLoop.timeout()); QVERIFY(clientsToWait == 0); } |