From aa731470ec946e7c18852b6c22419d5a2968c0d1 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 8 Jan 2010 23:35:51 +0900 Subject: [PATCH] fix segfault on qt4.6 by storing index in local var --- ankiqt/ui/cardlist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ankiqt/ui/cardlist.py b/ankiqt/ui/cardlist.py index 17b14c300..eebf3ec50 100644 --- a/ankiqt/ui/cardlist.py +++ b/ankiqt/ui/cardlist.py @@ -185,8 +185,10 @@ interval, factor, noCount, priority, (select tags from facts where facts.id = cards.factId), (select created from facts where facts.id = cards.factId) from cards where id = :id""", id=self.cards[index.row()][0]) + # storing this in a local var first avoids a segfault + end = self.index(idx, 1) self.emit(SIGNAL("dataChanged(QModelIndex,QModelIndex)"), - index, self.index(index.row(), 1)) + index, end) except: # called after search changed pass