提交 4ec4c9d4 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

为同一线程的connect使用默认连接

上级 c3b50c3f
...@@ -21,25 +21,23 @@ taskNode::taskNode(QObject *parent) ...@@ -21,25 +21,23 @@ taskNode::taskNode(QObject *parent)
,m_nBatchTime(taskCell::default_batchtime) ,m_nBatchTime(taskCell::default_batchtime)
{ {
connect(m_process,&QProcess::started,this, connect(m_process,&QProcess::started,this,
&taskNode::sig_pro_started,Qt::QueuedConnection); &taskNode::sig_pro_started/*,Qt::QueuedConnection*/);
connect(m_process,&QProcess::started,this, connect(m_process,&QProcess::started,this,
&taskNode::slot_started,Qt::QueuedConnection); &taskNode::slot_started/*,Qt::QueuedConnection*/);
connect(m_process, connect(m_process,
static_cast<void(QProcess::*)(int, QProcess::ExitStatus)> static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>
(&QProcess::finished), (&QProcess::finished),
this,&taskNode::sig_pro_stopped,Qt::QueuedConnection); this,&taskNode::sig_pro_stopped/*,Qt::QueuedConnection*/);
connect(m_process, connect(m_process,
static_cast<void(QProcess::*)(int, QProcess::ExitStatus)> static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>
(&QProcess::finished), (&QProcess::finished),
this,&taskNode::slot_stopped,Qt::QueuedConnection); this,&taskNode::slot_stopped/*,Qt::QueuedConnection*/);
connect(m_process,&QProcess::readyReadStandardOutput,this, connect(m_process,&QProcess::readyReadStandardOutput,this,
&taskNode::slot_readyReadStandardOutput,Qt::QueuedConnection); &taskNode::slot_readyReadStandardOutput/*,Qt::QueuedConnection*/);
connect(m_process,&QProcess::readyReadStandardError,this, connect(m_process,&QProcess::readyReadStandardError,this,
&taskNode::slot_readyReadStandardError,Qt::QueuedConnection); &taskNode::slot_readyReadStandardError/*,Qt::QueuedConnection*/);
connect(m_process,&QProcess::bytesWritten,this, connect(m_process,&QProcess::bytesWritten,this,
&taskNode::slot_sended); &taskNode::slot_sended);
connect(this,&taskNode::private_sig_nextcab,this,
&taskNode::slot_readyReadStandardOutput,Qt::QueuedConnection);
connect(this,&taskNode::sig_new_package,this,&taskNode::slot_write,Qt::QueuedConnection); connect(this,&taskNode::sig_new_package,this,&taskNode::slot_write,Qt::QueuedConnection);
m_nBp_TimerID = startTimer(200); m_nBp_TimerID = startTimer(200);
} }
......
...@@ -41,8 +41,6 @@ signals: ...@@ -41,8 +41,6 @@ signals:
void sig_new_package(); void sig_new_package();
void sig_new_errmsg(QByteArrayList); void sig_new_errmsg(QByteArrayList);
void sig_iostat(qint64 pid,quint64 pr,quint64 ps,quint64 br, quint64 bs); void sig_iostat(qint64 pid,quint64 pr,quint64 ps,quint64 br, quint64 bs);
void private_sig_nextcab();
void private_sig_nextwrite();
public slots: public slots:
void setDebug(bool bdbg){m_bDebug = bdbg;} void setDebug(bool bdbg){m_bDebug = bdbg;}
bool cmd_start(QObject * node,QString cmd, QStringList paras); bool cmd_start(QObject * node,QString cmd, QStringList paras);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册