Commit 15323c46 authored by Jonathan Thomas's avatar Jonathan Thomas
Browse files

Don't listen to reviewFetched signals during a cache reload. We'll crash if we try to

handle them.

BUG:283728
FIXED-IN:1.2.3
parent 5a675f27
......@@ -115,6 +115,7 @@ void ApplicationBackend::reload()
m_appList.clear();
qDeleteAll(m_queue);
m_queue.clear();
m_reviewsBackend->stopPendingJobs();
m_backend->reloadCache();
m_reviewsBackend->clearReviewCache();
......
......@@ -133,6 +133,19 @@ Rating *ReviewsBackend::ratingForApplication(Application *app) const
return 0;
}
void ReviewsBackend::stopPendingJobs()
{
QHash<KJob *, Application *>::const_iterator iter = m_jobHash.constBegin();
while (iter != m_jobHash.constEnd()) {
KJob *getJob = iter.key();
disconnect(getJob, SIGNAL(result(KJob *)),
this, SLOT(changelogFetched(KJob *)));
iter++;
}
m_jobHash.clear();
}
void ReviewsBackend::fetchReviews(Application *app)
{
// Check our cache before fetching from the 'net
......
......@@ -47,6 +47,7 @@ public:
void setAptBackend(QApt::Backend *aptBackend);
void fetchReviews(Application *app);
void clearReviewCache();
void stopPendingJobs();
private:
QApt::Backend *m_aptBackend;
......
Supports Markdown
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