|
|
@ -126,7 +126,7 @@ void ShopService::updateRelatedItem(VoucherItem* item, int countAdded)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool ShopService::processEet(VoucherPtr voucher, QString message)
|
|
|
|
bool ShopService::processEet(VoucherPtr voucher, QString &message)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (voucher->eetStatus() == Voucher::EET_NOT_ENTERING)
|
|
|
|
if (voucher->eetStatus() == Voucher::EET_NOT_ENTERING)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -153,8 +153,9 @@ bool ShopService::processEet(VoucherPtr voucher, QString message)
|
|
|
|
sender->setPlayground(settings->eetPlayground());
|
|
|
|
sender->setPlayground(settings->eetPlayground());
|
|
|
|
|
|
|
|
|
|
|
|
QEventLoop loop;
|
|
|
|
QEventLoop loop;
|
|
|
|
|
|
|
|
bool replyFinished = false;
|
|
|
|
|
|
|
|
|
|
|
|
connect(sender, &EetSender::sendFinished, [this, voucher, sender, &loop](){
|
|
|
|
connect(sender, &EetSender::sendFinished, [this, voucher, sender, &loop, &replyFinished](){
|
|
|
|
Transaction tx;
|
|
|
|
Transaction tx;
|
|
|
|
|
|
|
|
|
|
|
|
voucher->setEetBkp(sender->resut()->bkp());
|
|
|
|
voucher->setEetBkp(sender->resut()->bkp());
|
|
|
@ -176,10 +177,15 @@ bool ShopService::processEet(VoucherPtr voucher, QString message)
|
|
|
|
sender->deleteLater();
|
|
|
|
sender->deleteLater();
|
|
|
|
|
|
|
|
|
|
|
|
loop.quit();
|
|
|
|
loop.quit();
|
|
|
|
|
|
|
|
replyFinished = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
sender->sendRequest(&request);
|
|
|
|
sender->sendRequest(&request);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!replyFinished)
|
|
|
|
|
|
|
|
{
|
|
|
|
loop.exec();
|
|
|
|
loop.exec();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
auto addMessage = [&message](EetMessage *msg, const QString &label){
|
|
|
|
auto addMessage = [&message](EetMessage *msg, const QString &label){
|
|
|
|
if (message.isEmpty())
|
|
|
|
if (message.isEmpty())
|
|
|
@ -206,6 +212,11 @@ void ShopService::setEetOnline(bool online)
|
|
|
|
EetSender::m_online = online;
|
|
|
|
EetSender::m_online = online;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool ShopService::isEetOnline()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return EetSender::m_online;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ShopService::moveItems(QList<VoucherItemPtr> items, VoucherPtr source, VoucherPtr target)
|
|
|
|
void ShopService::moveItems(QList<VoucherItemPtr> items, VoucherPtr source, VoucherPtr target)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Transaction tx;
|
|
|
|
Transaction tx;
|
|
|
|