Commit 9d5f50fd by Carwyn

Merge remote-tracking branch 'origin/fmp_home'

parents 6f354728 181e0c38
......@@ -16,4 +16,11 @@ Level=1
[Syncer]
Server=http://www.baidu.com
Timer=10
\ No newline at end of file
Timer=10
[Home]
Server=http://115.159.226.87:20001/api/user/login
StoreId=fm99999
PartnerId=1371
;动画开关,0:关闭 1:开启
Animation=1
\ No newline at end of file
#include "fmp_epay_p.h"
#include "fmp_pe_handlers.h"
class ctkPluginContext;
FMPePay::FMPePay(ctkPluginContext *context)
: FMPePayInterface(context),
_inited(false),
d_ptr(new FMPePayPrivate)
{
FMPStartEventHandler *ste_handler = new FMPStartEventHandler(_ctx, this);
}
int FMPePay::StopService()
......
......@@ -9,13 +9,15 @@ TEMPLATE = lib
SOURCES += \
fmp_epay.cpp \
fmp_epay_p.cpp \
fmp_epay_plugin.cpp
fmp_epay_plugin.cpp \
fmp_pe_handlers.cpp
HEADERS +=\
fmp_epay.h \
fmp_epay_i.h \
fmp_epay_p.h \
fmp_epay_plugin_p.h
fmp_epay_plugin_p.h \
fmp_pe_handlers.h
unix {
target.path = /usr/lib
......
......@@ -5,12 +5,12 @@
#include <ctkPluginContext.h>
#include <ctkServiceReference.h>
#include <QDebug>
#include "fmp_pe_handlers.h"
int FMPePayPrivate::StartService()
{
qDebug() << "======== ePay init ===========";
Q_Q(FMPePay);
q->_inited = true;
return FMP_SUCCESS;
}
......
#include <fmp_logger_i.h>
#include "fmp_pe_handlers.h"
#include "fmp_epay.h"
FMPStartEventHandler::FMPStartEventHandler(ctkPluginContext *ctx, FMPePay *epay)
: FMPePayEventHandler(FMP_TOPICS_SERVICES FMPE_SERVICE_ACK_START "/"
+ QString::number(ctx->getPlugin()->getPluginId()), epay),
_ctx(ctx)
{
FMPProps props;
props[ctkEventConstants::EVENT_TOPIC] = _topic;
_ctx->registerService<ctkEventHandler>(this, props);
}
void FMPStartEventHandler::handleEvent(const ctkEvent &event)
{
qDebug() << "=======-------";
if (_epay) {
if (event.getProperty(FMP_PROPKEY_AGREED).toBool()) {
// _epay->UpgradeOldPlugins(event.getProperty(FMP_PROPKEY_PID_LIST).toList());
_epay->Pay();
}
else {
FMP_WARN_CTX(_ctx) << "Refused start request" << event.getTopic();
}
}
else {
FMP_DEBUG_CTX(_ctx) << "No handler instance for event" << event.getTopic();
}
}
#ifndef FMP_MANAGER_EVENT_HANDLERS_H
#define FMP_MANAGER_EVENT_HANDLERS_H
#include <QObject>
#include <service/event/ctkEventConstants.h>
#include <service/event/ctkEventHandler.h>
class FMPePay;
class FMPePayEventHandler : public ctkEventHandler
{
public:
explicit FMPePayEventHandler(const QString &topic, FMPePay *epay) : _epay(epay), _topic(topic) {}
protected:
FMPePay* _epay;
const QString _topic;
};
/**
* 升级事件处理类
* @brief The FMPUpgradeEventHandler class
*/
class FMPStartEventHandler : public QObject, public FMPePayEventHandler
{
Q_OBJECT
Q_INTERFACES(ctkEventHandler)
public:
explicit FMPStartEventHandler(ctkPluginContext *ctx, FMPePay *epay);
void handleEvent(const ctkEvent &event);
private:
ctkPluginContext* _ctx;
};
#endif // FMP_MANAGER_EVENT_HANDLERS_H
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 7
#define VER_BUILD 10
//! Convert version numbers to string
#define _STR(S) #S
......
......@@ -20,12 +20,12 @@ FMNetwork::~FMNetwork()
delete _req;
}
bool FMNetwork::post(const QString *url, const QByteArray *reqData, QByteArray *rspData)
bool FMNetwork::post(const QString &url, const QByteArray *reqData, QByteArray *rspData)
{
qDebug() << "Post Url: " << *url;
qDebug() << "Post Url: " << url;
qDebug() << "Post Data: " << *reqData;
_req->setUrl(*url);
_req->setUrl(url);
// 设置请求头
_req->setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
......@@ -47,7 +47,7 @@ bool FMNetwork::post(const QString *url, const QByteArray *reqData, QByteArray *
timer.stop();
if (reply->error() == QNetworkReply::NoError) {
*rspData = reply->readAll();
qDebug() << tr("Recv data: %1") << *rspData;
qDebug() << tr("Recv data: ") << QString::fromUtf8(*rspData);
} else {
_errorString = reply->errorString();
qDebug() << tr("Network error: %1").arg(_errorString);
......
......@@ -20,7 +20,7 @@ public:
* @param rspData 返回数据
* @return 是否有错误
*/
bool post(const QString *url, const QByteArray *reqData, QByteArray *rspData);
bool post(const QString &url, const QByteArray *reqData, QByteArray *rspData);
QString errorString() const { return _errorString;}
private:
......
#include <fmp_logger_i.h>
#include "fmp_he_handlers.h"
#include "fmp_home.h"
FMPStartEventHandler::FMPStartEventHandler(ctkPluginContext *ctx, FMPHome *home)
: FMPHomeEventHandler(FMP_TOPICS_SERVICES FMPE_SERVICE_REQ_START "/*" , home),
_ctx(ctx)
{
FMPProps props;
props[ctkEventConstants::EVENT_TOPIC] = _topic;
_ctx->registerService<ctkEventHandler>(this, props);
}
void FMPStartEventHandler::handleEvent(const ctkEvent &event)
{
qDebug() << "===========";
if (_home) {
QString ack_topic = event.getTopic();
//! com/fmp/services/REQ_START/id
ack_topic.replace(FMPE_SERVICE_REQ_START, FMPE_SERVICE_ACK_START);
FMPProps props;
props[FMP_PROPKEY_AGREED] = _home->isLogined();
_home->PostEvent(ack_topic, props);
}
else {
FMP_DEBUG_CTX(_ctx) << "No handler instance for event" << event.getTopic();
}
}
#ifndef FMP_MANAGER_EVENT_HANDLERS_H
#define FMP_MANAGER_EVENT_HANDLERS_H
#include <QObject>
#include <service/event/ctkEventConstants.h>
#include <service/event/ctkEventHandler.h>
class FMPHome;
class FMPHomeEventHandler : public ctkEventHandler
{
public:
explicit FMPHomeEventHandler(const QString &topic, FMPHome *home) : _home(home), _topic(topic) {}
protected:
FMPHome* _home;
const QString _topic;
};
class FMPStartEventHandler : public QObject, public FMPHomeEventHandler
{
Q_OBJECT
Q_INTERFACES(ctkEventHandler)
public:
explicit FMPStartEventHandler(ctkPluginContext *ctx, FMPHome *home);
void handleEvent(const ctkEvent &event);
private:
ctkPluginContext* _ctx;
};
#endif // FMP_MANAGER_EVENT_HANDLERS_H
......@@ -27,3 +27,27 @@ int FMPHome::StopService()
Q_D(FMPHome);
return d->Uninit();
}
void FMPHome::StartPlugins(const QVariantList &pids)
{
Q_D(FMPHome);
d->StartPlugins(pids);
}
int FMPHome::login()
{
Q_D(FMPHome);
return d->login();
}
bool FMPHome::isLogined()
{
Q_D(FMPHome);
return d->_isLogined;
}
QString FMPHome::userName()
{
Q_D(FMPHome);
return d->_userName;
}
......@@ -7,6 +7,7 @@
class ctkPluginContext;
class FMPHomePrivate;
class FMPStartEventHandler;
class FMPHome : public QObject, public FMPHomeInterface
{
......@@ -21,12 +22,17 @@ public:
int StartService();
int StopService();
public:
int Login() {return 0;}
void StartPlugins(const QVariantList &pids);
int login();
bool isLogined();
QString userName();
private:
FMPHomePrivate *d_ptr;
bool _inited;
friend class FMPStartEventHandler;
};
#endif // FMP_HOME_H
......@@ -20,7 +20,8 @@ SOURCES +=\
fmp_wnd.cpp \
fmp_login.cpp \
fmp_num_pad.cpp \
fmnetwork.cpp
fmnetwork.cpp \
fmp_he_handlers.cpp
HEADERS += fmp_home.h \
fmp_home_plugin_p.h \
......@@ -31,7 +32,8 @@ HEADERS += fmp_home.h \
fmp_login.h \
menubutton.h \
fmp_num_pad.h \
fmnetwork.h
fmnetwork.h \
fmp_he_handlers.h
FORMS += \
fmp_home_navwindow.ui \
......
......@@ -7,7 +7,9 @@ class FMPHomeInterface : public FMPluginInterface
{
public:
explicit FMPHomeInterface(ctkPluginContext *ctx) : FMPluginInterface(ctx) {}
virtual int Login() = 0;
virtual int login() = 0;
virtual bool isLogined() = 0;
virtual QString userName() = 0;
};
Q_DECLARE_INTERFACE(FMPHomeInterface, "com.fmp.home")
......
......@@ -5,13 +5,15 @@
#include <QDesktopWidget>
#include <QParallelAnimationGroup>
#include <QPropertyAnimation>
#include <fmp_settings_i.h>
NavWindow::NavWindow(QWidget *parent) :
NavWindow::NavWindow(FMPSettingsInterface *&settings, QWidget *parent) :
QDialog(parent),
ui(new Ui::NavWindow),
_btn_group(new QButtonGroup(this)),
_animationShow(new QParallelAnimationGroup(this)),
PI(3.1415926)
PI(3.1415926),
_settings(settings)
{
ui->setupUi(this);
ui->navMainBtn->setMovedItem(this);
......@@ -21,6 +23,7 @@ NavWindow::NavWindow(QWidget *parent) :
MenuUiProp.distance = 100;
MenuUiProp.beginAngle = -(PI*0.45);
MenuUiProp.endAngle = (PI*0.45);
isUseAnimation = _settings->GetBool(FMP_INIKEY_HOMEANIMATION);
setNavStatus(Default);
......@@ -29,6 +32,11 @@ NavWindow::NavWindow(QWidget *parent) :
connect(_btn_group, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(onMenuBtnClicked(QAbstractButton*)));
initMenu();
connect(this, SIGNAL(statusChanged(NavStatus)), this, SLOT(onStatusChanged(NavStatus)));
connect(_animationShow, &QParallelAnimationGroup::finished, this, [=](){
ui->navMainBtn->lower();
});
}
NavWindow::~NavWindow()
......@@ -41,22 +49,7 @@ NavWindow::~NavWindow()
void NavWindow::setNavStatus(const NavStatus status)
{
this->_status = status;
switch (status) {
case Default:
spreadMenus(false);
ui->navMainBtn->setStyleSheet("#navMainBtn{ border-image: url(:fm-icon_01)}");
break;
case Spread:
spreadMenus(true);
ui->navMainBtn->setStyleSheet("#navMainBtn{ border-image: url(:fm-icon_02)}");
break;
case Message:
ui->navMainBtn->setStyleSheet("#navMainBtn{ border-image: url(:xiaoxi)}");
break;
default:
ui->navMainBtn->setStyleSheet("#navMainBtn{ border-image: url(:fm-icon_01)}");
break;
}
emit statusChanged(status);
}
void NavWindow::on_navMainBtn_clicked()
......@@ -68,11 +61,14 @@ void NavWindow::on_navMainBtn_clicked()
void NavWindow::spreadMenus(const bool isSpread)
{
if(isSpread) {
//! Start animation.
if(isSpread && isUseAnimation) {
ui->navMainBtn->raise();
_animationShow->start();
}
//! Set the menu btns are visible.
foreach (QAbstractButton *b , _btn_group->buttons()) {
QPushButton *btn = qobject_cast<QPushButton*>(b);
auto btn = qobject_cast<QPushButton*>(b);
btn->setVisible(isSpread);
}
}
......@@ -109,7 +105,6 @@ void NavWindow::initMenu()
animation->setEndValue(btn->geometry());
_animationShow->addAnimation(animation);
}
ui->navMainBtn->raise();
}
void NavWindow::onMenuBtnClicked(QAbstractButton *btn)
......@@ -117,3 +112,23 @@ void NavWindow::onMenuBtnClicked(QAbstractButton *btn)
QString btnName = btn->objectName();
emit menuBtnClicked(btnName);
}
void NavWindow::onStatusChanged(NavStatus status)
{
switch (status) {
case Default:
spreadMenus(false);
ui->navMainBtn->setStyleSheet("#navMainBtn{ border-image: url(:fm-icon_01)}");
break;
case Spread:
spreadMenus(true);
ui->navMainBtn->setStyleSheet("#navMainBtn{ border-image: url(:fm-icon_02)}");
break;
case Message:
ui->navMainBtn->setStyleSheet("#navMainBtn{ border-image: url(:xiaoxi)}");
break;
default:
ui->navMainBtn->setStyleSheet("#navMainBtn{ border-image: url(:fm-icon_01)}");
break;
}
}
......@@ -12,6 +12,7 @@ class NavWindow;
class QButtonGroup;
class QAbstractButton;
class QParallelAnimationGroup;
class FMPSettingsInterface;
class NavWindow : public QDialog
{
......@@ -30,7 +31,7 @@ public:
Message
};
explicit NavWindow(QWidget *parent = 0);
explicit NavWindow(FMPSettingsInterface* &settings, QWidget *parent = 0);
~NavWindow();
public slots:
......@@ -50,10 +51,12 @@ public slots:
signals:
void menuBtnClicked(QString btnName);
void statusChanged(NavStatus status);
private slots:
void on_navMainBtn_clicked();
void onMenuBtnClicked(QAbstractButton*);
void onStatusChanged(NavStatus status);
private:
Ui::NavWindow *ui;
......@@ -74,6 +77,9 @@ private:
double endAngle;
};
MenuUiProps MenuUiProp;
bool isUseAnimation;
FMPSettingsInterface *_settings;
};
#endif // NAVWINDOW_H
......@@ -4,11 +4,16 @@
#include <ctkPluginContext.h>
#include <ctkServiceReference.h>
#include <QDebug>
#include <fmp_epay_i.h>
#include <fmp_settings_i.h>
#include "fmp_login.h"
#include "fmp_he_handlers.h"
FMPHomePrivate::FMPHomePrivate(FMPHome *q)
: q_ptr(q),
_navWindow(new NavWindow)
_isLogined(false),
_userName(""),
_errorMsg("")
{
}
......@@ -19,17 +24,18 @@ FMPHomePrivate::~FMPHomePrivate()
int FMPHomePrivate::Init()
{
loginWnd = new FMPLogin;
int ret = loginWnd->exec();
delete loginWnd;
loginWnd = nullptr;
if(ret == FMP_FAILURE) {
Q_Q(FMPHome);
_settings = q->GetService<FMPSettingsInterface>(q->_ctx);
_navWindow = new NavWindow(_settings);
FMPStartEventHandler* handler = new FMPStartEventHandler(q->_ctx, q);
if(login() != FMP_SUCCESS) {
return FMP_FAILURE;
}
_navWindow->show();
connect(_navWindow, SIGNAL(menuBtnClicked(QString)), this, SLOT(onMenuBtnClicked(QString)));
Q_Q(FMPHome);
q->_inited = true;
return FMP_SUCCESS;
}
......@@ -49,13 +55,36 @@ int FMPHomePrivate::Uninit()
return FMP_SUCCESS;
}
void FMPHomePrivate::StartPlugins(const QVariantList &pids)
{
qDebug() << pids;
}
int FMPHomePrivate::login()
{
FMPLogin loginWnd(_settings->GetString(FMP_INIKEY_LOGINSERVER),
_settings->GetString(FMP_INIKEY_LOGINSTOREID),
_settings->GetString(FMP_INIKEY_LOGINPARTNERID));
loginWnd.exec();
if(loginWnd.isLogined()) {
_isLogined = true;
_userName = loginWnd.userName();
return FMP_SUCCESS;
} else {
_isLogined = false;
return FMP_FAILURE;
}
}
void FMPHomePrivate::onMenuBtnClicked(QString btnName)
{
qDebug() << "====" << __FUNCTION__ << btnName;
Q_Q(FMPHome);
FMP_DEBUG_CTX(q->_ctx) << "Menu clicked: " << btnName;
if(btnName == "huiyuanshezhi")
{
FMP_DEBUG_CTX(q->_ctx) << "Menu clicked";
if(btnName == "payment") {
FMPePayInterface *e = q->GetService<FMPePayInterface>(q->_ctx);
e->StartService();
} else if(btnName == "tool") {
qDebug() << "tool menu";
}
}
......@@ -5,6 +5,7 @@
class NavWindow;
class FMPLogin;
class FMPSettingsInterface;
class FMPHomePrivate : public QObject
{
......@@ -16,15 +17,22 @@ public:
int Init();
int Uninit();
void StartPlugins(const QVariantList &pids);
int login();
public slots:
void onMenuBtnClicked(QString btnName);
public:
FMPHome *q_ptr;
bool _isLogined;
QString _userName;
QString _errorMsg;
private:
NavWindow *_navWindow;
FMPLogin *loginWnd;
FMPSettingsInterface *_settings;
};
#endif // FMP_HOME_P_H
......@@ -2,14 +2,22 @@
#include "ui_fmp_login.h"
#include <QMessageBox>
#include <QDesktopWidget>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonParseError>
#include "fmp_num_pad.h"
#include "fmnetwork.h"
#include <QDebug>
FMPLogin::FMPLogin(QDialog *parent) :
FMPLogin::FMPLogin(QString url, QString storeId, QString partnerId, QDialog *parent) :
FMPWnd(parent),
ui(new Ui::FMPLogin),
_numPad(new FMNumPad)
_numPad(new FMNumPad),
_userName(""),
_errorMsg(""),
_url(url),
_storeId(storeId),
_partnerId(partnerId)
{
ui->setupUi(this);
connect(_numPad, SIGNAL(digit_confirm()), this, SLOT(on_login_btn_clicked()));
......@@ -28,16 +36,45 @@ FMPLogin::~FMPLogin()
void FMPLogin::on_login_btn_clicked()
{
_numPad->close();
QString url = "http://115.159.142.32:30001/api/user/login";
QByteArray reqData = "{\"StoreId\": \"123\",\"PartnerId\": \"123\",\"UserId\": \"123\",\"Pwd\": \"123\",\"ClassNo\": \"123\",\"DeviceId\": \"\"}";
this->setEnabled(false);
if(login(ui->user_edit->text(), ui->pwd_edit->text())) {
this->close();
} else {
QMessageBox::critical(this, "Login Failed", _errorMsg);
this->setEnabled(true);
ui->pwd_edit->clear();
ui->pwd_edit->setFocus();
}
}
bool FMPLogin::login(QString userName, QString password)
{
_userName = "";
QByteArray reqData = tr("{\"StoreId\": \"%1\",\"PartnerId\": \"%2\",\"UserId\": \"%3\",\"Pwd\": \"%4\"}")
.arg(_storeId)
.arg(_partnerId)
.arg(userName)
.arg(password).toLatin1();
QByteArray rspData;
FMNetwork net;
if(net.post(&url, &reqData, &rspData)) {
QMessageBox::information(this, "Login", QString(rspData));
} else {
QMessageBox::critical(this, "Login", net.errorString());
if(net.post(_url, &reqData, &rspData)) {
// 解析返回的数据
QJsonParseError error;
QJsonDocument json = QJsonDocument::fromJson(rspData, &error);
if(error.error == QJsonParseError::NoError) {
QJsonObject job = json.object();
if(job["Code"] == 1000) {
_userName = job["Data"].toObject()["UserId"].toString();
} else{
_errorMsg = job["Msg"].toString();
}
} else {
_errorMsg = error.errorString();
}
}
this->close();
return isLogined();
}
void FMPLogin::on_key_btn_clicked()
......
......@@ -14,9 +14,20 @@ class FMPLogin : public FMPWnd
Q_OBJECT
public:
explicit FMPLogin(QDialog *parent = 0);
explicit FMPLogin(QString url, QString storeId, QString partnerId, QDialog *parent = 0);
~FMPLogin();
/**
* @brief login
* @param userName
* @param password
* @return
*/
bool login(QString userName, QString password);
bool isLogined() {return _userName != "";}
QString userName() {return _userName;}
QString errorMsg() {return _errorMsg;}
private slots:
void on_login_btn_clicked();
......@@ -28,6 +39,12 @@ private:
Ui::FMPLogin *ui;
FMNumPad* _numPad;
QString _userName;
QString _errorMsg;
const QString _url;
const QString _storeId;
const QString _partnerId;
};
#endif // FMP_LOGIN_H
......@@ -355,7 +355,11 @@ QLineEdit {
</layout>
</widget>
<tabstops>
<tabstop>user_edit</tabstop>
<tabstop>pwd_edit</tabstop>
<tabstop>login_btn</tabstop>
<tabstop>key_btn</tabstop>
<tabstop>key_btn_2</tabstop>
<tabstop>close_btn</tabstop>
</tabstops>
<resources/>
......
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 7
#define VER_BUILD 10
//! Convert version numbers to string
#define _STR(S) #S
......
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 7
#define VER_BUILD 10
//! Convert version numbers to string
#define _STR(S) #S
......
......@@ -11,7 +11,6 @@
#include <fmp_logger_i.h>
#include <fmp_settings_i.h>
#include <fmp_syncer_i.h>
#include <fmp_home_i.h>
FMPluginManager::FMPluginManager() :
_ctx(nullptr),
......@@ -201,7 +200,7 @@ void FMPluginManager::OnPluginsChanged(const QString &path)
if (!expired_plugins.isEmpty()) {
FMPProps props;
props[FMP_PROPKEY_PID_LIST] = expired_plugins;
PostEvent(QString(FMP_TOPICS_SERVICES) + "/" + FMPE_SERVICE_REQ_UPDATE, props);
PostEvent(QString(FMP_TOPICS_SERVICES) + FMPE_SERVICE_REQ_UPDATE, props);
}
}
......
......@@ -3,7 +3,7 @@
#include "fmp_manager.h"
FMPUpgradeEventHandler::FMPUpgradeEventHandler(ctkPluginContext *ctx, FMPluginManager *pm)
: FMPManagerEventHandler(FMP_TOPICS_SERVICES "/" FMPE_SERVICE_REQ_UPDATE, pm),
: FMPManagerEventHandler(FMP_TOPICS_SERVICES FMPE_SERVICE_REQ_UPDATE, pm),
_ctx(ctx)
{
FMPProps props;
......
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 7
#define VER_BUILD 10
//! Convert version numbers to string
#define _STR(S) #S
......
......@@ -20,5 +20,9 @@
#define FMP_INIKEY_LOGSIZE "Log/Size"
#define FMP_INIKEY_LOGLEVEL "Log/Level"
#define FMP_INIKEY_LOGINSERVER "Home/Server"
#define FMP_INIKEY_LOGINSTOREID "Home/StoreId"
#define FMP_INIKEY_LOGINPARTNERID "Home/PartnerId"
#define FMP_INIKEY_HOMEANIMATION "Home/Animation"
#endif // FMP_SETTINGS_DEF_H
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 7
#define VER_BUILD 10
//! Convert version numbers to string
#define _STR(S) #S
......
......@@ -8,13 +8,11 @@ QT -= gui
TEMPLATE = lib
SOURCES += \
fmupdater.cpp \
fmp_syncer.cpp \
fmp_syncer_p.cpp \
fmp_syncer_plugin.cpp
HEADERS += \
fmupdater.h \
fmp_syncer.h \
fmp_syncer_i.h \
fmp_syncer_p.h \
......
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 7
#define VER_BUILD 10
//! Convert version numbers to string
#define _STR(S) #S
......
......@@ -21,7 +21,8 @@ public:
int StartService()
{
QString topic = FMP_TOPICS_SERVICES;
topic += QString::number(_ctx->getPlugin()->getPluginId()) + "/" + FMPE_SERVICE_REQ_START;
topic += FMPE_SERVICE_REQ_START;
topic += "/" + QString::number(_ctx->getPlugin()->getPluginId());
return PostEvent(topic);
}
......
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