Commit a60a3b43 authored by Thomas Hartmann's avatar Thomas Hartmann Committed by hjk
Browse files

QmlDesigner.Rewriter: changing Q_ASSERTS to QTC_ASSERTS



These ASSERTS have no fatal consequences (data losss, guaranteed crash).
Therefore we can use QTC_ASSERT instead.

Change-Id: Ia155f23d06f41432ba7504459816f000d4fe8f11
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 5d15076e
......@@ -49,6 +49,8 @@
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <qmljs/qmljsqrcparser.h>
#include <utils/qtcassert.h>
#include <QSet>
#include <QDir>
......@@ -1388,13 +1390,13 @@ void ModelValidator::variantValuesDiffer(VariantProperty &modelProperty, const Q
Q_UNUSED(qmlVariantValue)
Q_UNUSED(dynamicTypeName)
Q_ASSERT(modelProperty.isDynamic() == !dynamicTypeName.isEmpty());
QTC_ASSERT(modelProperty.isDynamic() == !dynamicTypeName.isEmpty(), return);
if (modelProperty.isDynamic()) {
Q_ASSERT(modelProperty.dynamicTypeName() == dynamicTypeName);
QTC_ASSERT(modelProperty.dynamicTypeName() == dynamicTypeName, return);
}
Q_ASSERT(equals(modelProperty.value(), qmlVariantValue));
Q_ASSERT(0);
QTC_ASSERT(equals(modelProperty.value(), qmlVariantValue), return);
QTC_ASSERT(0, return);
}
void ModelValidator::shouldBeVariantProperty(AbstractProperty &modelProperty, const QVariant &/*qmlVariantValue*/, const TypeName &/*dynamicTypeName*/)
......@@ -1447,10 +1449,10 @@ void ModelValidator::typeDiffers(bool /*isRootNode*/,
Q_UNUSED(minorVersion)
Q_UNUSED(majorVersion)
Q_ASSERT(modelNode.type() == typeName);
Q_ASSERT(modelNode.majorVersion() == majorVersion);
Q_ASSERT(modelNode.minorVersion() == minorVersion);
Q_ASSERT(0);
QTC_ASSERT(modelNode.type() == typeName, return);
QTC_ASSERT(modelNode.majorVersion() == majorVersion, return);
QTC_ASSERT(modelNode.minorVersion() == minorVersion, return);
QTC_ASSERT(0, return);
}
void ModelValidator::propertyAbsentFromQml(AbstractProperty &modelProperty)
......@@ -1466,8 +1468,8 @@ void ModelValidator::idsDiffer(ModelNode &modelNode, const QString &qmlId)
Q_UNUSED(modelNode)
Q_UNUSED(qmlId)
Q_ASSERT(modelNode.id() == qmlId);
Q_ASSERT(0);
QTC_ASSERT(modelNode.id() == qmlId, return);
QTC_ASSERT(0, return);
}
void ModelAmender::modelMissesImport(const QmlDesigner::Import &import)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment