mark some helper functions as static and variables as const

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2020-04-09 07:26:35 +00:00
parent 6dd7238a82
commit a05e01b205
3 changed files with 7 additions and 7 deletions

View file

@ -51,7 +51,7 @@
QT_BEGIN_NAMESPACE
// must be kept in sync with the moc
static int qmetaobjectrevision = 6;
static const int qmetaobjectrevision = 6;
class QDBusMetaObjectGenerator
{

View file

@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
*/
// copied from moc's generator.cpp
uint qvariant_nameToType(const char* name)
static uint qvariant_nameToType(const char* name)
{
if (!name)
return 0;
@ -83,7 +83,7 @@ uint qvariant_nameToType(const char* name)
/*
Returns true if the type is a QVariant types.
*/
bool isVariantType(const char* type)
static bool isVariantType(const char* type)
{
return qvariant_nameToType(type) != 0;
}
@ -94,8 +94,8 @@ inline const QMetaObjectPrivate *priv(const uint* data)
// must be kept in sync with the moc
// Number of fields in the QMetaObjectPrivate.
const static int qmetaobjectindex = 14;
const static int qmetaobjectrevision = 6;
static const int qmetaobjectindex = 14;
static const int qmetaobjectrevision = 6;
class QMetaMethodBuilderPrivate
{

View file

@ -40,7 +40,7 @@
QT_BEGIN_NAMESPACE
uint qvariant_nameToType(const char* name)
static uint qvariant_nameToType(const char* name)
{
if (!name)
return 0;
@ -55,7 +55,7 @@ uint qvariant_nameToType(const char* name)
/*
Returns true if the type is a QVariant types.
*/
bool isVariantType(const char* type)
static bool isVariantType(const char* type)
{
return qvariant_nameToType(type) != 0;
}