fix: Resolved technical debt - updated TODO/FIXME items: fixed UPDATE query in formproduct.cpp, corrected toDouble() in itemnumberdelegate.cpp, added ElementType enumeration, implemented composition deletion in formelementlist.cpp, updated README

This commit is contained in:
Javi
2026-05-27 12:22:25 +02:00
parent f3096faee6
commit 649ddff5fe
8 changed files with 131 additions and 19 deletions
+9 -5
View File
@@ -5,6 +5,8 @@
#include "treeitem.h"
#include "mapplication.h"
#include "../src/elementtype.h"
#include "widgetcomboboxpopuptable.h"
#include "itemnumberdelegate.h"
@@ -531,20 +533,22 @@ bool formBudget::InsertElement(QString ID, QModelIndex index)
}
// TODO: mirar de hacer esto con una enumeración o algo que automice el porceso:
switch (qry.value(qry.record().indexOf("TYPE1")).toInt())
switch (static_cast<ElementType>(qry.value(qry.record().indexOf("TYPE1")).toInt()))
{
case 0:
case ElementType::Composed:
setLineType("CO", index); // type
break;
case 1:
case ElementType::Material:
setLineType("MT", index); // type
break;
case 2:
case ElementType::ManPower:
setLineType("MO", index); // type
break;
case 3:
case ElementType::Machinery:
setLineType("MQ", index); // type
break;
default:
break;
}
}
else