Commit c160abc6 by gujin.wang

修复窗口崩溃的bug

parent 676de7e5
...@@ -196,6 +196,16 @@ void FMPHomePrivate::onMenuBtnClicked(QString btnName) ...@@ -196,6 +196,16 @@ void FMPHomePrivate::onMenuBtnClicked(QString btnName)
} }
return ; return ;
}else if(btnName == "check"){ }else if(btnName == "check"){
FMPRedeemInterface* svcRedeem = FMP::GetService<FMPRedeemInterface>();
if(svcRedeem)
{
svcRedeem->StartService();
svcRedeem->ShowRedeemDetail();
}
else
{
FMP_DEBUG() << "coupon service not available";
}
return; return;
}else if(btnName == "tool") { }else if(btnName == "tool") {
//svc = FMP::GetService<FMPSettingsInterface>(); //svc = FMP::GetService<FMPSettingsInterface>();
......
...@@ -8,6 +8,7 @@ StoreInfo::StoreInfo(QWidget *parent) : ...@@ -8,6 +8,7 @@ StoreInfo::StoreInfo(QWidget *parent) :
ui(new Ui::StoreInfo) ui(new Ui::StoreInfo)
{ {
ui->setupUi(this); ui->setupUi(this);
setAttribute(Qt::WA_QuitOnClose, false);
setWindowFlags(windowFlags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); setWindowFlags(windowFlags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
connect(ui->closeBtn, SIGNAL(clicked(bool)), this, SLOT(close())); connect(ui->closeBtn, SIGNAL(clicked(bool)), this, SLOT(close()));
connect(ui->cancelBtn, SIGNAL(clicked(bool)), this, SLOT(close())); connect(ui->cancelBtn, SIGNAL(clicked(bool)), this, SLOT(close()));
...@@ -17,6 +18,9 @@ StoreInfo::StoreInfo(QWidget *parent) : ...@@ -17,6 +18,9 @@ StoreInfo::StoreInfo(QWidget *parent) :
QSettings s(QApplication::applicationDirPath()+"/FreemudPOS.ini", QSettings::IniFormat); QSettings s(QApplication::applicationDirPath()+"/FreemudPOS.ini", QSettings::IniFormat);
ui->storeLabel->setText(s.value("Home/StoreId").toString()); ui->storeLabel->setText(s.value("Home/StoreId").toString());
ui->posLabel->setText(s.value("Home/PosId").toString()); ui->posLabel->setText(s.value("Home/PosId").toString());
QSettings ver(QApplication::applicationDirPath()+"/../update.ini", QSettings::IniFormat);
ui->companyLabel->setText(QString::fromLocal8Bit("由非码提供技术支持 ") + "V" + ver.value("SoftInfo/version").toString());
} }
StoreInfo::~StoreInfo() StoreInfo::~StoreInfo()
......
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