fix segfault on qt4.6 by storing index in local var

This commit is contained in:
Damien Elmes 2010-01-08 23:35:51 +09:00
parent 4a4ec4ad19
commit aa731470ec

View file

@ -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), (select created from facts where
facts.id = cards.factId) from cards where id = :id""", facts.id = cards.factId) from cards where id = :id""",
id=self.cards[index.row()][0]) 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)"), self.emit(SIGNAL("dataChanged(QModelIndex,QModelIndex)"),
index, self.index(index.row(), 1)) index, end)
except: except:
# called after search changed # called after search changed
pass pass