Merge "QPoint(F): declare as PRIMITIVE, not RELOCATABLE"
This commit is contained in:
commit
bcedeb6d3d
@ -129,7 +129,7 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_TYPEINFO(QPoint, Q_RELOCATABLE_TYPE);
|
Q_DECLARE_TYPEINFO(QPoint, Q_PRIMITIVE_TYPE);
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
QPoint stream functions
|
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;
|
size_t qHash(QPointF, size_t seed = 0) = delete;
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ private:
|
|||||||
float wp, xp, yp, zp;
|
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) {}
|
inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {}
|
||||||
|
|
||||||
|
@ -1092,9 +1092,18 @@ void tst_QMetaType::flagsBinaryCompatibility6_0()
|
|||||||
QFETCH(quint32, id);
|
QFETCH(quint32, id);
|
||||||
QFETCH(quint32, flags);
|
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
|
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()
|
void tst_QMetaType::construct_data()
|
||||||
|
Loading…
Reference in New Issue
Block a user