summaryrefslogtreecommitdiff
path: root/ord.cxx
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-06-14 20:20:10 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-06-14 20:20:10 +0800
commitca179a4b0ed27a240bd3144a01e3c7ec13f75389 (patch)
treea2e7c3835399e2b0fc85ed05adc452a14bafdbe4 /ord.cxx
parent3ff893e478ca7c9355b273fce943cc011b292010 (diff)
Ord is back constructed using pointers again
so we can use C fake OOP with it.
Diffstat (limited to 'ord.cxx')
-rw-r--r--ord.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/ord.cxx b/ord.cxx
index 6995ed1..12d2cdb 100644
--- a/ord.cxx
+++ b/ord.cxx
@@ -11,15 +11,15 @@ namespace QInterchange {
static char *fname, *lname, *address1, *address2, *city, *state, *zip,
*phone_day, *email;
- Ord::Ord(struct interchange_ord_order order, QObject* parent) :
+ Ord::Ord(struct interchange_ord_order *order, QObject *parent) :
QAbstractListModel{parent}
{
ord = this;
- for (size_t i = 0; i < order.nitems; i++)
- addItem(Item{order.items[i]});
- m_subtotal = order.subtotal;
- m_shipping = order.shipping;
- m_totalCost = order.total_cost;
+ for (size_t i = 0; i < order->nitems; i++)
+ addItem(Item{order->items[i]});
+ m_subtotal = order->subtotal;
+ m_shipping = order->shipping;
+ m_totalCost = order->total_cost;
}
int Ord::rowCount(QModelIndex const& parent) const