mirror of https://github.com/KDE/kasts.git
Notify when image finished downloading
This commit is contained in:
parent
5a8c5854be
commit
87ddc41f32
|
@ -82,6 +82,10 @@ Feed::Feed(int index)
|
||||||
setRefreshing(false);
|
setRefreshing(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
connect(&Fetcher::instance(), &Fetcher::imageDownloadFinished, this, [this](QString url) {
|
||||||
|
if(url == m_image)
|
||||||
|
Q_EMIT imageChanged(url);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Feed::~Feed()
|
Feed::~Feed()
|
||||||
|
|
|
@ -195,6 +195,7 @@ void Fetcher::download(QString url)
|
||||||
file.write(data);
|
file.write(data);
|
||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
|
Q_EMIT imageDownloadFinished(url);
|
||||||
delete reply;
|
delete reply;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,4 +57,5 @@ Q_SIGNALS:
|
||||||
void feedUpdated(QString url);
|
void feedUpdated(QString url);
|
||||||
void feedDetailsUpdated(QString url, QString name, QString image, QString link, QString description, QDateTime lastUpdated);
|
void feedDetailsUpdated(QString url, QString name, QString image, QString link, QString description, QDateTime lastUpdated);
|
||||||
void error(QString url, int errorId, QString errorString);
|
void error(QString url, int errorId, QString errorString);
|
||||||
|
void imageDownloadFinished(QString url);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue