src/linetypes/errorline.cpp

changeset 86
4bec0525ef1b
parent 35
98906a94732f
child 132
488d0ba6070b
--- a/src/linetypes/errorline.cpp	Wed Mar 18 17:11:23 2020 +0200
+++ b/src/linetypes/errorline.cpp	Thu Mar 19 21:06:06 2020 +0200
@@ -20,22 +20,11 @@
 	}
 }
 
-auto ldraw::ErrorLine::setProperty(
-	Property property,
-	const QVariant& value)
-	-> SetPropertyResult
+void ldraw::ErrorLine::setProperty(SetPropertyResult* result, const PropertyKeyValue& pair)
 {
-	switch (property)
-	{
-	case Property::Text:
-		this->text = value.toString();
-		return SetPropertyResult::Success;
-	case Property::ErrorMessage:
-		this->message = value.toString();
-		return SetPropertyResult::Success;
-	default:
-		return Object::setProperty(property, value);
-	}
+	LDRAW_OBJECT_HANDLE_SET_PROPERTY(Text, {this->text = value;});
+	LDRAW_OBJECT_HANDLE_SET_PROPERTY(ErrorMessage, {this->message = value;});
+	BaseClass::setProperty(result, pair);
 }
 
 QString ldraw::ErrorLine::textRepresentation() const

mercurial