aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-06-07 11:19:43 +0200
committerHolger Freyther <holger+qt@freyther.de>2015-06-08 07:15:03 +0000
commit73372182720fe0c0155045fb372ecd10c89c5731 (patch)
tree53a9d9dac056258efa7407346525750ec23668cd /src/qml/qml/qqmlengine.cpp
parent9f330241cbfc1c99b22cd0b625b6fe0dc8ef1b6c (diff)
Remove more unused code from the QQmlEnginePrivate
overloadError has always been false and the if (overloadError) was dead code. The code has been commented out for a long time and I started to extend the #ifdef. The QQmlError is only used inside the commented out code so I have removed the error param. This is fixing Coverity CID 10612. Change-Id: I48f36ede6ba615a34b15caefb0eea5d7e898f120 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 57dd780f3f..768c969373 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -2104,8 +2104,7 @@ QString QQmlEngine::offlineStoragePath() const
return d->offlineStoragePath;
}
-QQmlPropertyCache *QQmlEnginePrivate::createCache(QQmlType *type, int minorVersion,
- QQmlError &error)
+QQmlPropertyCache *QQmlEnginePrivate::createCache(QQmlType *type, int minorVersion)
{
QList<QQmlType *> types;
@@ -2167,10 +2166,10 @@ QQmlPropertyCache *QQmlEnginePrivate::createCache(QQmlType *type, int minorVersi
// Properties override:
// * other elements of the same name
+#if 0
bool overloadError = false;
QString overloadName;
-#if 0
for (QQmlPropertyCache::StringCache::ConstIterator iter = raw->stringCache.begin();
!overloadError && iter != raw->stringCache.end();
++iter) {
@@ -2187,7 +2186,6 @@ QQmlPropertyCache *QQmlEnginePrivate::createCache(QQmlType *type, int minorVersi
overloadError = true;
}
}
-#endif
if (overloadError) {
if (hasCopied) raw->release();
@@ -2195,6 +2193,7 @@ QQmlPropertyCache *QQmlEnginePrivate::createCache(QQmlType *type, int minorVersi
error.setDescription(QLatin1String("Type ") + type->qmlTypeName() + QLatin1Char(' ') + QString::number(type->majorVersion()) + QLatin1Char('.') + QString::number(minorVersion) + QLatin1String(" contains an illegal property \"") + overloadName + QLatin1String("\". This is an error in the type's implementation."));
return 0;
}
+#endif
if (!hasCopied) raw->addref();
typePropertyCache.insert(qMakePair(type, minorVersion), raw);