src/objecttypes/errorline.cpp

Mon, 23 Sep 2019 14:06:36 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Mon, 23 Sep 2019 14:06:36 +0300
changeset 4
68988ebc2a68
parent 3
55a55a9ec2c2
child 6
73e448b2943d
permissions
-rw-r--r--

added regular expressions for the parser

#include "errorline.h"

modelobjects::ErrorLine::ErrorLine(QStringView text) :
	text{text.toString()}
{
}

QVariant modelobjects::ErrorLine::getProperty(Property property) const
{
	switch (property)
	{
	case Property::Text:
		return text;
	default:
		return BaseObject::getProperty(property);
	}
}

auto modelobjects::ErrorLine::setProperty(
	Property property,
	const QVariant& value)
	-> SetPropertyResult
{
	switch (property)
	{
	case Property::Text:
		text = value.toString();
		return SetPropertyResult::Success;
	default:
		return BaseObject::setProperty(property, value);
	}
}

mercurial