Commit 794b72a6 by NitefullWind

1. 修改可以多次启动的bug。 2. 启动后发出Toast通知。

parent a36edc05
#include "fmp_vip_p.h"
#include <fmp_settings_i.h>
#include <fmp_home_i.h>
#include <QCoreApplication>
#include <QDateTime>
#include <ctkPluginContext.h>
......@@ -18,15 +19,21 @@ FMPVipPrivate::FMPVipPrivate(FMPVip *vip):
int FMPVipPrivate::StartVip()
{
Q_Q(FMPVip);
FMP_INFO() << "Vip start";
FMPHomeInterface *home = q->GetService<FMPHomeInterface>(q->_ctx);
if(q->_inited) {
home->notification(QString::fromLocal8Bit("[非码会员]已在运行!"));
} else {
_settings = q->GetService<FMPSettingsInterface>(q->_ctx);
FMPVipSettings::instance()->init(_settings);
emit startVip();
q->_inited = true;
home->notification(QString::fromLocal8Bit("[非码会员]启动成功!"));
FMP_INFO() << "Vip start";
}
return FMP_SUCCESS;
}
......
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