Commit ebcf8752 authored by David Edmundson's avatar David Edmundson

Autodelete smapsRunnable

The runnable has an early return on error conditions. This means
finished() might never be called.

Now we've removed the accessor and provide the return value in the
signal we can just set autoDelete.

BUG: 428048
parent 9b5161cb
......@@ -558,8 +558,6 @@ bool ProcessesLocal::updateProcessInfo( long pid, Process *process)
Q_EMIT processUpdated(pid, { { Process::VmPSS, pss } });
});
connect(runnable, &ReadProcSmapsRunnable::finished, runnable, &QObject::deleteLater);
QThreadPool::globalInstance()->start(runnable);
if(!d->readProcStat(dir, process)) success = false;
......
......@@ -14,7 +14,7 @@ ReadProcSmapsRunnable::ReadProcSmapsRunnable(const QString &dir)
: QObject()
, m_dir(dir)
{
setAutoDelete(false);
setAutoDelete(true);
}
void ReadProcSmapsRunnable::run()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment