QtCore: mark more types as primitive/movable
These types are held in QVarLengthArrays, so benefit from being trivially relocatable. They are also part of the private API, so there's no BC issues with potential uses of these types in QList. Change-Id: I8adc0c801885f8fffa05eb1f173d7e4bb085ba7b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
4579d966af
commit
0909a94af2
@ -122,6 +122,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
Other measurements have shown a slightly bigger binary size than a compact text
|
Other measurements have shown a slightly bigger binary size than a compact text
|
||||||
representation where all possible whitespace was stripped out.
|
representation where all possible whitespace was stripped out.
|
||||||
*/
|
*/
|
||||||
|
#define Q_DECLARE_JSONPRIVATE_TYPEINFO(Class, Flags) } Q_DECLARE_TYPEINFO(QJsonPrivate::Class, Flags); namespace QJsonPrivate {
|
||||||
namespace QJsonPrivate {
|
namespace QJsonPrivate {
|
||||||
|
|
||||||
class Array;
|
class Array;
|
||||||
@ -619,6 +620,7 @@ public:
|
|||||||
static uint valueToStore(const QJsonValue &v, uint offset);
|
static uint valueToStore(const QJsonValue &v, uint offset);
|
||||||
static void copyData(const QJsonValue &v, char *dest, bool compressed);
|
static void copyData(const QJsonValue &v, char *dest, bool compressed);
|
||||||
};
|
};
|
||||||
|
Q_DECLARE_JSONPRIVATE_TYPEINFO(Value, Q_PRIMITIVE_TYPE)
|
||||||
|
|
||||||
inline Value Array::at(int i) const
|
inline Value Array::at(int i) const
|
||||||
{
|
{
|
||||||
|
@ -159,6 +159,7 @@ private:
|
|||||||
int _type;
|
int _type;
|
||||||
QByteArray _name;
|
QByteArray _name;
|
||||||
};
|
};
|
||||||
|
Q_DECLARE_TYPEINFO(QArgumentType, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
typedef QVarLengthArray<QArgumentType, 10> QArgumentTypeArray;
|
typedef QVarLengthArray<QArgumentType, 10> QArgumentTypeArray;
|
||||||
|
|
||||||
|
@ -348,6 +348,7 @@ Q_CORE_EXPORT HB_Face qHBLoadFace(HB_Face face);
|
|||||||
|
|
||||||
Q_DECLARE_TYPEINFO(HB_GlyphAttributes, Q_PRIMITIVE_TYPE);
|
Q_DECLARE_TYPEINFO(HB_GlyphAttributes, Q_PRIMITIVE_TYPE);
|
||||||
Q_DECLARE_TYPEINFO(HB_FixedPoint, Q_PRIMITIVE_TYPE);
|
Q_DECLARE_TYPEINFO(HB_FixedPoint, Q_PRIMITIVE_TYPE);
|
||||||
|
Q_DECLARE_TYPEINFO(HB_ScriptItem, Q_PRIMITIVE_TYPE);
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
@ -77,6 +77,10 @@ struct ScriptItem
|
|||||||
int script;
|
int script;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace QUnicodeTools
|
||||||
|
Q_DECLARE_TYPEINFO(QUnicodeTools::ScriptItem, Q_PRIMITIVE_TYPE);
|
||||||
|
namespace QUnicodeTools {
|
||||||
|
|
||||||
enum CharAttributeOption {
|
enum CharAttributeOption {
|
||||||
GraphemeBreaks = 0x01,
|
GraphemeBreaks = 0x01,
|
||||||
WordBreaks = 0x02,
|
WordBreaks = 0x02,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user