mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 19:45:31 +01:00
Move watcher->deleteLater();
at the end of the BlockingSearchFinished()
function to ensure the watcher
object is still available when emitting the signals.
This commit is contained in:
parent
28fb6e5fcb
commit
059aa7f832
@ -89,11 +89,12 @@ void BlockingSearchProvider::SearchAsync(int id, const QString& query) {
|
|||||||
void BlockingSearchProvider::BlockingSearchFinished() {
|
void BlockingSearchProvider::BlockingSearchFinished() {
|
||||||
BoundFutureWatcher<ResultList, int>* watcher =
|
BoundFutureWatcher<ResultList, int>* watcher =
|
||||||
static_cast<BoundFutureWatcher<ResultList, int>*>(sender());
|
static_cast<BoundFutureWatcher<ResultList, int>*>(sender());
|
||||||
watcher->deleteLater();
|
|
||||||
|
|
||||||
const int id = watcher->data();
|
const int id = watcher->data();
|
||||||
emit ResultsAvailable(id, watcher->result());
|
emit ResultsAvailable(id, watcher->result());
|
||||||
emit SearchFinished(id);
|
emit SearchFinished(id);
|
||||||
|
|
||||||
|
watcher->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage SearchProvider::ScaleAndPad(const QImage& image) {
|
QImage SearchProvider::ScaleAndPad(const QImage& image) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user