diff options
-rw-r--r-- | interchange/ord.hxx | 2 | ||||
-rw-r--r-- | ord.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/interchange/ord.hxx b/interchange/ord.hxx index 83fcce9..7728085 100644 --- a/interchange/ord.hxx +++ b/interchange/ord.hxx @@ -36,7 +36,7 @@ namespace QInterchange { Q_PROPERTY(double totalCost READ totalCost NOTIFY totalCostChanged) public: - explicit Ord(struct interchange_ord_order order, + explicit Ord(struct interchange_ord_order *order, QObject* parent = nullptr); ~Ord() {} int rowCount(QModelIndex const& parent = QModelIndex()) const Q_DECL_OVERRIDE; @@ -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 |