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:
+9
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user