Commit e7c71abe by ss.dai

单店测试修改

parent ef4b7163
......@@ -27,6 +27,7 @@ void FmPlugin::SetRemoteInfo(const QString &ip, int port)
bool FmPlugin::DoOrderEntry(const OrderObject *orderObject, QString &error, bool bVerify)
{
return true;
QTcpSocket socket;
// 连接
socket.connectToHost(m_host, m_port);
......
......@@ -25,7 +25,7 @@ FloatForm::FloatForm(QWidget *parent) :
m_raiseTimer.setInterval(2000);
connect(&m_raiseTimer, &QTimer::timeout, this, &FloatForm::raise);
connect(&m_mouseTimer, &QTimer::timeout, this, &FloatForm::restart);
//connect(&m_mouseTimer, &QTimer::timeout, this, &FloatForm::restart);
_Init();
}
......@@ -53,7 +53,11 @@ void FloatForm::mousePressEvent(QMouseEvent *event)
m_bMousePress = true;
m_lastMousePos = event->globalPos();
m_absMove = QPoint(0,0);
m_mouseTimer.start(5000);
//m_mouseTimer.start(5000);
}
if(event->button()==Qt::RightButton)
{
emit restart();
}
}
......
......@@ -15,6 +15,9 @@ using namespace QsLogging;
QString g_appDir;
QThread sInfoThread;
QThread workThread;
void InitLogger()
{
QString logDir = QString("%1/log").arg(g_appDir);
......@@ -69,7 +72,6 @@ int main(int argc, char *argv[])
QLOG_INFO() << QString("-------- fmTakeaway[%1] Start --------").arg(APP_VERSION);
// 将控制器移到工作线程
QThread workThread;
FlowControl::GetInstance().moveToThread(&workThread);
workThread.start();
......@@ -83,7 +85,6 @@ int main(int argc, char *argv[])
w.MyShow();
// 将门店信息获取控制器移到工作线程
QThread sInfoThread;
SInfoControl::GetInstance().SetListenPort(ConfigManger::GetInstance().GetTcpServerPort());
SInfoControl::GetInstance().moveToThread(&sInfoThread);
QObject::connect(&sInfoThread, &QThread::started, &SInfoControl::GetInstance(), &SInfoControl::run);
......
......@@ -8,6 +8,10 @@
#include <QList>
#include <QMap>
#include <QProcess>
#include <QThread>
extern QThread sInfoThread;
extern QThread workThread;
MainForm::MainForm(QWidget *parent) :
QWidget(parent),
......@@ -90,7 +94,7 @@ void MainForm::MyShow()
m_resultForm->hide();
connect(m_resultForm, &QListWidget::itemClicked, this, &MainForm::onSearchResultItemClicked);
on_mainBtnHide_clicked();
//on_mainBtnHide_clicked();
return;
}
......@@ -98,6 +102,7 @@ void MainForm::MyShow()
void MainForm::_Init()
{
this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
//this->showFullScreen();
// 显示托盘
m_tray.show();
......@@ -213,7 +218,9 @@ void MainForm::onShowSearchOrderResult(const QMap<QString,QString>& orderIdList)
void MainForm::onrestart()
{
qApp->quit();
sInfoThread.terminate();
workThread.terminate();
qApp->exit();
QProcess::startDetached(qApp->applicationFilePath(), QStringList());
}
......
......@@ -4,7 +4,7 @@
#include <QDebug>
#define APP_THEME "deaufult"
#define APP_VERSION "1.20160802.01" //TODO
#define APP_VERSION "1.20160923.01" //TODO
#define SERVER_PASSWORD "posoperator@freemud.cn"
......
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