QmlDesigner.Rewriter: Improve warnings

Change-Id: I18598953e59a8fe1c7847b4d16bf863aec578636
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Thomas Hartmann
2015-07-08 14:39:58 +02:00
committed by Thomas Hartmann
parent 823f7ff8b9
commit 0f382b7ef2

View File

@@ -456,7 +456,7 @@ public:
if (parentObject) if (parentObject)
*parentObject = objectValue; *parentObject = objectValue;
if (!value) { if (!value) {
qWarning() << "Skipping invalid property name" << propertyName; qWarning() << Q_FUNC_INFO << "Skipping invalid property name" << propertyName;
return false; return false;
} }
@@ -537,7 +537,7 @@ public:
const ObjectValue *containingObject = 0; const ObjectValue *containingObject = 0;
QString name; QString name;
if (!lookupProperty(propertyPrefix, propertyId, &property, &containingObject, &name)) { if (!lookupProperty(propertyPrefix, propertyId, &property, &containingObject, &name)) {
qWarning() << "Unknown property" << propertyPrefix + QLatin1Char('.') + toString(propertyId) qWarning() << Q_FUNC_INFO << "Unknown property" << propertyPrefix + QLatin1Char('.') + toString(propertyId)
<< "on line" << propertyId->identifierToken.startLine << "on line" << propertyId->identifierToken.startLine
<< "column" << propertyId->identifierToken.startColumn; << "column" << propertyId->identifierToken.startColumn;
return hasQuotes ? QVariant(cleanedValue) : cleverConvert(cleanedValue); return hasQuotes ? QVariant(cleanedValue) : cleverConvert(cleanedValue);
@@ -1305,7 +1305,7 @@ QmlDesigner::PropertyName TextToModelMerger::syncScriptBinding(ModelNode &modelN
syncExpressionProperty(modelProperty, astValue, TypeName(), differenceHandler); // TODO: parse type syncExpressionProperty(modelProperty, astValue, TypeName(), differenceHandler); // TODO: parse type
return astPropertyName.toUtf8(); return astPropertyName.toUtf8();
} else { } else {
qWarning() << "Skipping invalid expression property" << astPropertyName qWarning() << Q_FUNC_INFO << "Skipping invalid expression property" << astPropertyName
<< "for node type" << modelNode.type(); << "for node type" << modelNode.type();
return PropertyName(); return PropertyName();
} }