Remove unused static functions from QtQml found by Clang 3.4
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 3 Jan 2014 22:47:10 +0000 (20:47 -0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 3 Jan 2014 23:42:45 +0000 (00:42 +0100)
qqmlcomponent.cpp:112:23: error: unused function 'buildTypeNameForDebug' [-Werror,-Wunused-function]

Change-Id: I5cc82b20fee8e3f0b61ad59b831723359c8dcda4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/qqmlcomponent.cpp

index 4a71c1a..21bcd35 100644 (file)
@@ -103,34 +103,6 @@ public:
 };
 V8_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension);
 
-/*
-    Try to do what's necessary for a reasonable display of the type
-    name, but no more (just enough for the client to do more extensive cleanup).
-
-    Should only be called when debugging is enabled.
-*/
-static inline QString buildTypeNameForDebug(const QMetaObject *metaObject)
-{
-    static const QString qmlMarker(QLatin1String("_QML"));
-    static const QChar underscore(QLatin1Char('_'));
-    static const QChar asterisk(QLatin1Char('*'));
-    QQmlType *type = QQmlMetaType::qmlType(metaObject);
-    QString typeName = type ? type->qmlTypeName() : QString::fromUtf8(metaObject->className());
-    if (!type) {
-        //### optimize further?
-        int marker = typeName.indexOf(qmlMarker);
-        if (marker != -1 && marker < typeName.count() - 1) {
-            if (typeName[marker + 1] == underscore) {
-                const QString className = typeName.left(marker) + asterisk;
-                type = QQmlMetaType::qmlType(QMetaType::type(className.toUtf8()));
-                if (type)
-                    typeName = type->qmlTypeName();
-            }
-        }
-    }
-    return typeName;
-}
-
 /*!
     \class QQmlComponent
     \since 5.0