GUI: modernize connect in ThreadHandler
This commit is contained in:
parent
037fc6e3a4
commit
efbe7b76ee
|
@ -120,10 +120,10 @@ void ThreadHandler::setThreadCount(const int count)
|
||||||
//Create new threads
|
//Create new threads
|
||||||
for (int i = mThreads.size(); i < count; i++) {
|
for (int i = mThreads.size(); i < count; i++) {
|
||||||
mThreads << new CheckThread(mResults);
|
mThreads << new CheckThread(mResults);
|
||||||
connect(mThreads.last(), SIGNAL(done()),
|
connect(mThreads.last(), &CheckThread::done,
|
||||||
this, SLOT(threadDone()));
|
this, &ThreadHandler::threadDone);
|
||||||
connect(mThreads.last(), SIGNAL(fileChecked(const QString &)),
|
connect(mThreads.last(), &CheckThread::fileChecked,
|
||||||
&mResults, SLOT(fileChecked(const QString &)));
|
&mResults, &ThreadResult::fileChecked);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -133,11 +133,10 @@ void ThreadHandler::removeThreads()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < mThreads.size(); i++) {
|
for (int i = 0; i < mThreads.size(); i++) {
|
||||||
mThreads[i]->terminate();
|
mThreads[i]->terminate();
|
||||||
disconnect(mThreads.last(), SIGNAL(done()),
|
disconnect(mThreads[i], &CheckThread::done,
|
||||||
this, SLOT(threadDone()));
|
this, &ThreadHandler::threadDone);
|
||||||
disconnect(mThreads.last(), SIGNAL(fileChecked(const QString &)),
|
disconnect(mThreads[i], &CheckThread::fileChecked,
|
||||||
&mResults, SLOT(fileChecked(const QString &)));
|
&mResults, &ThreadResult::fileChecked);
|
||||||
|
|
||||||
delete mThreads[i];
|
delete mThreads[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue