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