Return a qsizetype from QMetaType::sizeOf()/alignOf()

Object sizes in Qt 6 should use qsizetype.

Change-Id: I76ceb5faf361d7f6be88d88c772358ad6d701d54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Lars Knoll 2020-07-26 12:33:26 +02:00
parent 1697fbdf05
commit 92a31781bb
2 changed files with 4 additions and 4 deletions

View File

@ -505,7 +505,7 @@ int QMetaType::id() const
\sa QMetaType::construct(), QMetaType::sizeOf(), QMetaType::alignOf()
*/
int QMetaType::sizeOf() const
qsizetype QMetaType::sizeOf() const
{
if (d_ptr)
return d_ptr->size;
@ -526,7 +526,7 @@ int QMetaType::sizeOf() const
\sa QMetaType::construct(), QMetaType::sizeOf()
*/
int QMetaType::alignOf() const
qsizetype QMetaType::alignOf() const
{
if (d_ptr)
return d_ptr->alignment;

View File

@ -404,8 +404,8 @@ public:
bool isValid() const;
bool isRegistered() const;
int id() const;
int sizeOf() const;
int alignOf() const;
qsizetype sizeOf() const;
qsizetype alignOf() const;
TypeFlags flags() const;
const QMetaObject *metaObject() const;
const char *name() const;