Commit b9bcae02 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Delay deletion of the AggregatedResultsStreams when there's no streams

We'll still need to be notified about its end
parent 611bd66b
......@@ -271,7 +271,7 @@ AggregatedResultsStream::AggregatedResultsStream(const QSet<ResultsStream*>& str
if (streams.isEmpty()) {
qWarning() << "no streams to aggregate!!";
QTimer::singleShot(0, this, &AggregatedResultsStream::clear);
for (auto stream: streams) {
......@@ -304,6 +304,11 @@ void AggregatedResultsStream::emitResults()
void AggregatedResultsStream::destruction(QObject* obj)
void AggregatedResultsStream::clear()
if (m_streams.isEmpty()) {
Q_EMIT finished();
......@@ -41,6 +41,7 @@ private:
void addResults(const QVector<AbstractResource*>& res);
void emitResults();
void destruction(QObject* obj);
void clear();
QSet<QObject*> m_streams;
QVector<AbstractResource*> m_results;
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