From a449a3a7a325852b9c505815d4c966bfc36f4866 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Mon, 3 Sep 2007 09:46:15 +0000 Subject: [PATCH] make sure closing the application aborts the remaining HttpGet objects. Should fix the crash upon exit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14591 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/rbutilqt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 196e079696..b3bd36bd25 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -128,6 +128,7 @@ void RbUtilQt::downloadInfo() daily = new HttpGet(this); connect(daily, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); connect(daily, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool))); + connect(qApp, SIGNAL(lastWindowClosed()), daily, SLOT(abort())); daily->setProxy(proxy()); if(userSettings->value("defaults/offline").toBool()) daily->setCache(userSettings->value("defaults/cachepath", QDir::tempPath()).toString()); @@ -154,6 +155,7 @@ void RbUtilQt::downloadDone(bool error) bleeding = new HttpGet(this); connect(bleeding, SIGNAL(done(bool)), this, SLOT(downloadBleedingDone(bool))); connect(bleeding, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool))); + connect(qApp, SIGNAL(lastWindowClosed()), daily, SLOT(abort())); bleeding->setProxy(proxy()); if(userSettings->value("defaults/offline").toBool()) bleeding->setCache(userSettings->value("defaults/cachepath", QDir::tempPath()).toString());