BaseExport* creator = new BaseExport(NULL);
MyThread* mthread = new MyThread(NULL);
creator->moveToThread(mthread);
connect(creator,
SIGNAL(new_status
(QString)),
this,
SLOT(status_received
(QString)),Qt
::QueuedConnection);
connect(creator,SIGNAL(finished()),ui->progressBar,SLOT(hide()),Qt::QueuedConnection);
connect(creator,SIGNAL(finished()),creator,SLOT(deleteLater()),Qt::QueuedConnection);
connect(creator,
SIGNAL(error
(QString)),
this,
SLOT(error_received
(QString)),Qt
::QueuedConnection);
connect(creator,SIGNAL(more_than_one_result(QList<QList<SetField *> *> *)),this,SLOT(more_than_one_result_slot(QList<QList<MatchingSetField*>*>*)),Qt::QueuedConnection);
connect(this,SIGNAL(decided(QList<SetField*>*)),creator,SLOT(decided_slot(QList<SetField*>*)),Qt::QueuedConnection);
creator->connect(mthread,SIGNAL(started()),SLOT(create()));
connect(creator,SIGNAL(finished()),mthread,SLOT(quit()));
connect(mthread,SIGNAL(finished()),mthread,SLOT(deleteLater()));
mthread->start();
BaseExport* creator = new BaseExport(NULL);
MyThread* mthread = new MyThread(NULL);
creator->moveToThread(mthread);
connect(creator,SIGNAL(new_status(QString)),this,SLOT(status_received(QString)),Qt::QueuedConnection);
connect(creator,SIGNAL(finished()),ui->progressBar,SLOT(hide()),Qt::QueuedConnection);
connect(creator,SIGNAL(finished()),creator,SLOT(deleteLater()),Qt::QueuedConnection);
connect(creator,SIGNAL(error(QString)),this,SLOT(error_received(QString)),Qt::QueuedConnection);
connect(creator,SIGNAL(more_than_one_result(QList<QList<SetField *> *> *)),this,SLOT(more_than_one_result_slot(QList<QList<MatchingSetField*>*>*)),Qt::QueuedConnection);
connect(this,SIGNAL(decided(QList<SetField*>*)),creator,SLOT(decided_slot(QList<SetField*>*)),Qt::QueuedConnection);
creator->connect(mthread,SIGNAL(started()),SLOT(create()));
connect(creator,SIGNAL(finished()),mthread,SLOT(quit()));
connect(mthread,SIGNAL(finished()),mthread,SLOT(deleteLater()));
mthread->start();
To copy to clipboard, switch view to plain text mode
Bookmarks