Skip to content
Snippets Groups Projects

Merge of all branches of Fabian PK (related to skills)

Merged Fabian Tërnava requested to merge test/merge-branch-skills-to-master into master
3 files
+ 51
16
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -64,7 +64,6 @@ namespace armarx
AronTreeWidgetConverterVisitor::handleErrors(AronTreeWidgetConverterVisitor childV,
bool ownFault)
{
// TODO debug this. Make target back to debugabble
isDirectError |= ownFault;
hasTransitiveError |= childV.isDirectError || childV.hasTransitiveError;
@@ -117,7 +116,7 @@ namespace armarx
AronTreeWidgetConverterVisitor v(el, x);
aron::type::visit(v, i->getAcceptedType());
auto key = it->text(0).toStdString();
// TODO: handle key errors more elegantly / separately
// TODO: handle key errors more elegantly / separately, fine for now
handleErrors(v, createdAronDict->hasElement(key));
if (v.createdAron && v.isConversionSuccessful() && !createdAronDict->hasElement(key))
{
@@ -169,20 +168,21 @@ namespace armarx
void
AronTreeWidgetConverterVisitor::visitAronVariant(const aron::type::TuplePtr& i)
{
// CAUTION; UNTESTED
auto createdAronTuple = std::make_shared<aron::data::List>(i->getPath());
createdAron = createdAronTuple;
auto* currElem = parentItem->child(index);
for (int j = 0; j < (int)i->childrenSize(); ++j)
auto createdAronList = std::make_shared<aron::data::List>(i->getPath());
createdAron = createdAronList;
QTreeWidgetItem* el = parentItem->child(index);
for (int x = 0; x < el->childCount(); ++x)
{
AronTreeWidgetConverterVisitor convVisitor(currElem, j);
aron::type::visit(convVisitor, i);
handleErrors(convVisitor);
auto* it = el->child(x);
AronTreeWidgetConverterVisitor v(it, x);
aron::type::visit(v, i->getAcceptedType(x));
handleErrors(v);
if (convVisitor.createdAron && convVisitor.isConversionSuccessful())
if (v.createdAron)
{
createdAronTuple->addElement(convVisitor.createdAron);
createdAronList->addElement(v.createdAron);
}
}
}
Loading