From 5035c4ce059221d3f9c709500dc6d05b5d5b2c08 Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Fri, 3 Jun 2016 12:52:54 +0200 Subject: [PATCH] Fixed MSVS2010 build. Compiler does not support virtual template methods. --- core/service.h | 4 ++-- shop/shopform.cpp | 8 ++++---- shop/shopservice.cpp | 4 ++-- shop/shopservice.h | 5 ++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/core/service.h b/core/service.h index 3d5e06c..e3267db 100644 --- a/core/service.h +++ b/core/service.h @@ -67,7 +67,7 @@ public: return ret; } - virtual void save(QSharedPointer entity) { + void save(QSharedPointer entity) { if (!checkPermission(PERM_ADD)) { return; } @@ -93,7 +93,7 @@ public: emit dataChanged(); } - virtual void update(QSharedPointer entity) { + void update(QSharedPointer entity) { if (!checkPermission(PERM_EDIT)) { return; } diff --git a/shop/shopform.cpp b/shop/shopform.cpp index cb7c69d..e2cc34a 100644 --- a/shop/shopform.cpp +++ b/shop/shopform.cpp @@ -122,11 +122,11 @@ void ShopForm::onCountChanged() if (m_voucher->status() == Voucher::NEW && m_voucher->id() == 0) { - srv.save(m_voucher); + srv.saveVoucher(m_voucher); } else { - srv.update(m_voucher); + srv.updateVoucher(m_voucher); } } @@ -147,7 +147,7 @@ void ShopForm::doTempSave(bool comboChanged) if (!m_voucher->items().isEmpty()) { m_voucher->setStatus(Voucher::TEMPORARY); - srv.update(m_voucher); + srv.updateVoucher(m_voucher); } if (comboChanged && ui->receiptCombo->currentIndex() > 0) @@ -176,7 +176,7 @@ void ShopForm::changeReceipt() srv.loadItems(m_voucher); connectItemSignals(); m_voucher->setStatus(Voucher::NEW); - srv.update(m_voucher); + srv.updateVoucher(m_voucher); m_itemsModel->setData(m_voucher->items()); ui->total->setText(m_voucher->totalPrice().toString()); diff --git a/shop/shopservice.cpp b/shop/shopservice.cpp index 126cd66..5bd7964 100644 --- a/shop/shopservice.cpp +++ b/shop/shopservice.cpp @@ -124,7 +124,7 @@ QDecDouble ShopService::vatRate(Enums::VatType vatType) return vatRate; } -void ShopService::save(QSharedPointer entity) +void ShopService::saveVoucher(QSharedPointer entity) { Transaction tr; odb::database *db = Context::instance().db(); @@ -139,7 +139,7 @@ void ShopService::save(QSharedPointer entity) tr.commit(); } -void ShopService::update(QSharedPointer entity) +void ShopService::updateVoucher(QSharedPointer entity) { Transaction tr; odb::database *db = Context::instance().db(); diff --git a/shop/shopservice.h b/shop/shopservice.h index 82d8941..5b70012 100644 --- a/shop/shopservice.h +++ b/shop/shopservice.h @@ -26,10 +26,9 @@ private: QSharedPointer m_gs; QDecDouble vatRate(Enums::VatType vatType); - // Service interface public: - virtual void save(QSharedPointer entity) override; - virtual void update(QSharedPointer entity) override; + void saveVoucher(QSharedPointer entity); + void updateVoucher(QSharedPointer entity); }; #endif // SHOPSERVICE_H