trying to quit threads on quit

This commit is contained in:
Gres 2014-04-04 19:03:53 +04:00
parent 5c187eadf2
commit 8ecf988eec

View File

@ -42,6 +42,7 @@ Manager::Manager(QObject *parent) :
QThread* recognizerThread = new QThread (this);
recognizer->moveToThread (recognizerThread);
recognizerThread->start ();
connect (qApp, SIGNAL (aboutToQuit ()), recognizerThread, SLOT (quit ()));
// Translator
@ -55,6 +56,7 @@ Manager::Manager(QObject *parent) :
QThread* translatorThread = new QThread (this);
translator->moveToThread (translatorThread);
translatorThread->start ();
connect (qApp, SIGNAL (aboutToQuit ()), translatorThread, SLOT (quit ()));
connect (translator, SIGNAL (translated (ProcessingItem)),
SLOT (showResult (ProcessingItem)));