OSDN Git Service

mark some helper functions as static and variables as const
authorIvailo Monev <xakepa10@laimg.moc>
Thu, 9 Apr 2020 07:26:35 +0000 (07:26 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Thu, 9 Apr 2020 07:26:35 +0000 (07:26 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/dbus/qdbusmetaobject.cpp
src/declarative/qml/qmetaobjectbuilder.cpp
src/tools/moc/generator.cpp

index 00b332d..3c29d07 100644 (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
 {
index 7685fe8..f53cfdc 100644 (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
 {
index 00f013f..27c8dc1 100644 (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;
 }