mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Forward QThread's finished signal in GenericThread
This commit is contained in:
parent
346c28f9e2
commit
562d9ac2de
1 changed files with 3 additions and 3 deletions
|
@ -38,9 +38,10 @@ void GenericThread::initialize(bool isThreaded, QThread::Priority priority) {
|
|||
_thread->setObjectName(objectName());
|
||||
|
||||
// when the worker thread is started, call our engine's run..
|
||||
connect(_thread, SIGNAL(started()), this, SLOT(threadRoutine()));
|
||||
connect(_thread, &QThread::started, this, &GenericThread::threadRoutine);
|
||||
connect(_thread, &QThread::finished, this, &GenericThread::finished);
|
||||
|
||||
this->moveToThread(_thread);
|
||||
moveToThread(_thread);
|
||||
|
||||
// Starts an event loop, and emits _thread->started()
|
||||
_thread->start();
|
||||
|
@ -82,5 +83,4 @@ void GenericThread::threadRoutine() {
|
|||
if (_isThreaded && _thread) {
|
||||
_thread->quit();
|
||||
}
|
||||
emit finished();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue