Link to EetCpp is now configurable.
This commit is contained in:
+16
-2
@@ -9,7 +9,9 @@ QT += widgets sql
|
|||||||
TARGET = shop
|
TARGET = shop
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
|
|
||||||
DEFINES += SHOP_LIBRARY\
|
#CONFIG += eet
|
||||||
|
|
||||||
|
DEFINES += SHOP_LIBRARY
|
||||||
|
|
||||||
SOURCES += shop.cpp \
|
SOURCES += shop.cpp \
|
||||||
data/voucher.cpp \
|
data/voucher.cpp \
|
||||||
@@ -90,7 +92,19 @@ DEPENDPATH += $$PWD/../addressbook
|
|||||||
|
|
||||||
TRANSLATIONS = translations/shop_cs_CZ.ts
|
TRANSLATIONS = translations/shop_cs_CZ.ts
|
||||||
|
|
||||||
unix|win32: LIBS += -L$$PWD/../../build-EetCpp-Desktop-Debug/libEet -lEetCpp
|
win32 {
|
||||||
|
LIBS += -lwinspool
|
||||||
|
}
|
||||||
|
|
||||||
|
eet {
|
||||||
|
CONFIG(debug, debug|release) {
|
||||||
|
LIBS += -L$$PWD/../../EetCpp/bin/debug -lEetCpp
|
||||||
|
} else {
|
||||||
|
LIBS += -L$$PWD/../../EetCpp/bin/release -lEetCpp
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFINES += EET
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../EetCpp/libEet
|
INCLUDEPATH += $$PWD/../../EetCpp/libEet
|
||||||
DEPENDPATH += $$PWD/../../EetCpp/libEet
|
DEPENDPATH += $$PWD/../../EetCpp/libEet
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ void ShopService::updateRelatedItem(VoucherItem* item, int countAdded)
|
|||||||
|
|
||||||
bool ShopService::processEet(VoucherPtr voucher, QString &message)
|
bool ShopService::processEet(VoucherPtr voucher, QString &message)
|
||||||
{
|
{
|
||||||
|
#ifdef EET
|
||||||
if (voucher->eetStatus() == Voucher::EET_NOT_ENTERING)
|
if (voucher->eetStatus() == Voucher::EET_NOT_ENTERING)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@@ -205,16 +206,25 @@ bool ShopService::processEet(VoucherPtr voucher, QString &message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return voucher->eetStatus() == Voucher::EET_SENT;
|
return voucher->eetStatus() == Voucher::EET_SENT;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShopService::setEetOnline(bool online)
|
void ShopService::setEetOnline(bool online)
|
||||||
{
|
{
|
||||||
|
#ifdef EET
|
||||||
EetSender::m_online = online;
|
EetSender::m_online = online;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShopService::isEetOnline()
|
bool ShopService::isEetOnline()
|
||||||
{
|
{
|
||||||
|
#ifdef EET
|
||||||
return EetSender::m_online;
|
return EetSender::m_online;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShopService::isEetEnabled()
|
bool ShopService::isEetEnabled()
|
||||||
|
|||||||
Reference in New Issue
Block a user