From fbadd4262003667f32c4efa17ffc40708054d687 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Jan 2014 20:47:10 -0200 Subject: [PATCH] Remove unused static functions from QtQml found by Clang 3.4 qqmlcomponent.cpp:112:23: error: unused function 'buildTypeNameForDebug' [-Werror,-Wunused-function] Change-Id: I5cc82b20fee8e3f0b61ad59b831723359c8dcda4 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlcomponent.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 4a71c1a..21bcd35 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -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 -- 2.7.4