From: Ivailo Monev Date: Thu, 9 Apr 2020 07:26:35 +0000 (+0000) Subject: mark some helper functions as static and variables as const X-Git-Tag: 4.12.0~3824 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a05e01b2055d866b13d9cf9b61729a7a42b97eb7;p=kde%2FKatie.git mark some helper functions as static and variables as const Signed-off-by: Ivailo Monev --- diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp index 00b332d85..3c29d0716 100644 --- a/src/dbus/qdbusmetaobject.cpp +++ b/src/dbus/qdbusmetaobject.cpp @@ -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 { diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp index 7685fe8bf..f53cfdca4 100644 --- a/src/declarative/qml/qmetaobjectbuilder.cpp +++ b/src/declarative/qml/qmetaobjectbuilder.cpp @@ -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 { diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 00f013fa1..27c8dc121 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -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; }