Cleaned up property fetching
This commit is contained in:
parent
4b99a0bf33
commit
b8bd4a678a
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 6.0.2, 2022-04-05T08:22:13. -->
|
<!-- Written by QtCreator 6.0.2, 2022-04-08T00:30:41. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
@ -396,11 +396,12 @@ optional<Pin> ComdelGenerator::loadPin(PinNode node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int getIntProperty(DisplayItemNode &node, std::string property) {
|
int getIntProperty(DisplayItemNode &node, std::string property) {
|
||||||
for(auto prop: node.values) {
|
for(auto& prop: node.values) {
|
||||||
if(prop.key.value == property) {
|
if(prop.key.value == property) {
|
||||||
return prop.value.asInt();
|
return prop.value.asInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
throw std::exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Display> ComdelGenerator::loadDisplay(DisplayNode node)
|
std::optional<Display> ComdelGenerator::loadDisplay(DisplayNode node)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user