Commit b6bc3ced by NitefullWind

1. 使用accept()或reject()代替close(). 2. 初始化积分相关变量.

parent dd7fdb79
......@@ -61,7 +61,7 @@ void FMTask::stopTask()
preTask->stopTask();
}
if(_window != nullptr) {
_window->close();
_window->accept();
_window = nullptr;
}
......@@ -93,7 +93,7 @@ void FMTask::showWindow()
if(_window != nullptr) {
_window->initWnd(this->session());
int ret = _window->exec();
if(ret == -1) {
if(ret != 1) {
setError(FM_API_WINDOWCLOSE);
}
}
......
......@@ -55,5 +55,5 @@
//void TaskFund::onFund()
//{
// sendToServer();
// _window->close();
// _window->accept();
//}
......@@ -56,7 +56,7 @@ void TaskLogin::onLogin()
bool isOk = sendToServer();
if(!isOk) {
if(_window != nullptr) {
_window->close();
_window->accept();
}
return;
}
......@@ -83,7 +83,7 @@ void TaskLogin::onLogin()
session()->addData(PosProps.Amount, getServerJsonValue(PosProps.Amount).toInt());
session()->addData(PosProps.Score, getServerJsonValue(PosProps.Score).toInt());
_window->close();
_window->accept();
}
if(_window!=nullptr) {
_window->resetWnd();
......
......@@ -162,5 +162,5 @@ void TaskPay::packagePOSRsp()
void TaskPay::onPay()
{
sendToServer();
_window->close();
_window->accept();
}
......@@ -88,5 +88,5 @@ void FMMsgWnd::LoginSuccess(const QString &account, const QString &name, const Q
void FMMsgWnd::on_btn_confirm_clicked()
{
this->close();
this->accept();
}
......@@ -53,7 +53,7 @@ private:
OrderInfo()
{
_amountStr = _needPayStr = "";
_amount = _score = _needPay = _maxWillPay = _payAmountScore = _payAmountCoupon = 0;
_amount = _score = _payScore = _needPay = _maxWillPay = _payAmountScore = _payAmountCoupon = 0;
}
OrderInfo(QString amountStr, int score, QString needPayStr)
{
......@@ -64,7 +64,7 @@ private:
_needPay = _needPayStr.toInt() / 100.0;
_score = score;
_maxWillPay = _payAmountScore = _payAmountCoupon = 0;
_payScore = _maxWillPay = _payAmountScore = _payAmountCoupon = 0;
setMaxWillPay();
}
......
......@@ -26,7 +26,7 @@ FMVipWnd::~FMVipWnd()
void FMVipWnd::on_close_btn_clicked()
{
this->done(-1);
this->reject();
}
bool FMVipWnd::close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment