From 34c9a73e322ddbf7cb64eb3d5ff0f55c6d0f0fd1 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 7 Jan 2015 23:40:48 +0100 Subject: [PATCH 1/2] Fix bug #399 (crashes on systems with pyqt < 5.3) Crash occurs in usertypes.py / Question class due to Python slots being called on deleted Qt objects. This causes either a TypeError or an AttributeError (probably depending on the state of the deleted Qt object?). Fixed by declaring slots in the Question object explicitly via decorator "@pyqtSlot()". Possible further TODOs: - Find out whether this is a problem for slots in other objects as well. - Create unittest for this bug (might me somewhat tricky, though). --- qutebrowser/utils/usertypes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/utils/usertypes.py b/qutebrowser/utils/usertypes.py index b018fb448..02a925cd3 100644 --- a/qutebrowser/utils/usertypes.py +++ b/qutebrowser/utils/usertypes.py @@ -27,7 +27,7 @@ import operator import collections.abc import enum as pyenum -from PyQt5.QtCore import pyqtSignal, QObject, QTimer +from PyQt5.QtCore import pyqtSignal, pyqtSlot, QObject, QTimer from qutebrowser.utils import log, qtutils, utils @@ -307,6 +307,7 @@ class Question(QObject): raise TypeError("Mode {} is no PromptMode member!".format(val)) self._mode = val + @pyqtSlot() def done(self): """Must be called when the queston was answered completely.""" self.answered.emit(self.answer) @@ -317,11 +318,13 @@ class Question(QObject): self.answered_no.emit() self.completed.emit() + @pyqtSlot() def cancel(self): """Cancel the question (resulting from user-input).""" self.cancelled.emit() self.completed.emit() + @pyqtSlot() def abort(self): """Abort the question.""" self.is_aborted = True From e767862beebe30ca7823a0debe151492577a5940 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 8 Jan 2015 23:10:38 +0100 Subject: [PATCH 2/2] Regenerate authors --- README.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/README.asciidoc b/README.asciidoc index b0107dbef..89a60fec3 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -141,6 +141,7 @@ Contributors, sorted by the number of commits in descending order: * Matthias Lisin * Helen Sherwood-Taylor * HalosGhost +* Andreas Fischer // QUTE_AUTHORS_END The following people have contributed graphics: