From 2388874e824fb0ecc17098fe3a9226e194e5411b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 17 Jun 2014 11:26:45 +0200 Subject: [PATCH] Delete question if download as cancelled --- qutebrowser/app.py | 1 - qutebrowser/browser/downloads.py | 1 + qutebrowser/utils/debug.py | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 3f15c3af9..a3566affc 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -19,7 +19,6 @@ import os import sys -import types import faulthandler import configparser from bdb import BdbQuit diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 7435c9259..321e2aef6 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -372,6 +372,7 @@ class DownloadManager(QObject): q.cancelled.connect(q.deleteLater) self.questions.append(q) download.cancelled.connect(q.abort) + download.cancelled.connect(q.deleteLater) message.instance().question.emit(q, False) @pyqtSlot(DownloadItem) diff --git a/qutebrowser/utils/debug.py b/qutebrowser/utils/debug.py index 7154ff1dc..2081e80ef 100644 --- a/qutebrowser/utils/debug.py +++ b/qutebrowser/utils/debug.py @@ -18,6 +18,7 @@ """Utilities used for debugging.""" import sys +import types from functools import wraps from PyQt5.QtCore import (pyqtRemoveInputHook, QEvent, QCoreApplication,