From a82a0be8836c4143493ca22f872a22954f78aa73 Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Thu, 4 Aug 2016 22:19:16 +0200 Subject: [PATCH] Fixed API change. --- shop/shopform.cpp | 4 ++-- shop/shopform.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shop/shopform.cpp b/shop/shopform.cpp index fd3a9eb..d62030e 100644 --- a/shop/shopform.cpp +++ b/shop/shopform.cpp @@ -150,7 +150,7 @@ void ShopForm::on_loadButton_clicked() form->show(); } -void ShopForm::onCountChanged(int oldCount) +void ShopForm::onCountChanged(int oldCount/* = 0*/) { VoucherItem *item = qobject_cast(sender()); if (item != NULL && item->count() == 0) @@ -268,7 +268,7 @@ void ShopForm::addItem(QSharedPointer item, int count) srv.addShopItem(m_voucher, item, count); this->m_itemsModel->addRow(m_voucher->items()[m_voucher->items().count() - 1]); connect(m_voucher->items()[m_voucher->items().count() - 1].data(), SIGNAL(countChanged(int)), this, SLOT(onCountChanged(int))); - onCountChanged(0); + onCountChanged(); } void ShopForm::on_receiptCombo_currentIndexChanged(int) diff --git a/shop/shopform.h b/shop/shopform.h index 301823b..1542b59 100644 --- a/shop/shopform.h +++ b/shop/shopform.h @@ -32,7 +32,7 @@ private slots: void on_loadButton_clicked(); - void onCountChanged(int oldCount); + void onCountChanged(int oldCount = 0); void on_receiptCombo_currentIndexChanged(int index);