QSSASyncProcess修复重复connect导致的触发问题。
parent
43cd74b18f
commit
c1890fb547
5
Qss.cpp
5
Qss.cpp
|
@ -1946,6 +1946,7 @@ void QssMaskWidget::paintEvent(QPaintEvent *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
QSSASyncProcess::QSSASyncProcess(QWidget *parent)
|
QSSASyncProcess::QSSASyncProcess(QWidget *parent)
|
||||||
|
:mFirst(true)
|
||||||
{
|
{
|
||||||
this->mParent = parent;
|
this->mParent = parent;
|
||||||
}
|
}
|
||||||
|
@ -1959,9 +1960,11 @@ QSSASyncProcess::~QSSASyncProcess()
|
||||||
int QSSASyncProcess::Start(void *p)
|
int QSSASyncProcess::Start(void *p)
|
||||||
{
|
{
|
||||||
this->moveToThread(&mThread);
|
this->moveToThread(&mThread);
|
||||||
|
if(mFirst){
|
||||||
connect(this, SIGNAL(StartRun(void *)), this, SLOT(Run(void *)));
|
connect(this, SIGNAL(StartRun(void *)), this, SLOT(Run(void *)));
|
||||||
connect(&mThread, &QThread::finished, this, &QObject::deleteLater);
|
connect(&mThread, &QThread::finished, this, &QObject::deleteLater);
|
||||||
|
mFirst = false;
|
||||||
|
}
|
||||||
mThread.start();
|
mThread.start();
|
||||||
#ifdef QT_NO_EMIT
|
#ifdef QT_NO_EMIT
|
||||||
StartRun(p);
|
StartRun(p);
|
||||||
|
|
Loading…
Reference in New Issue