Add possible workaround for model invalidate().
This commit is contained in:
parent
a0bcfe1960
commit
1f6ae3e0ed
@ -314,10 +314,7 @@ class CompletionFilterModel(QSortFilterProxyModel):
|
||||
srcmodel.sort(sortcol)
|
||||
except NotImplementedError:
|
||||
self.sort(sortcol)
|
||||
# FIXME we should call self.invalidate() here so sorting actually works.
|
||||
# However, this seems to provoke a lot of weird problems, like
|
||||
# random race condition segfaults :(
|
||||
# self.invalidate()
|
||||
self.invalidate()
|
||||
|
||||
def filterAcceptsRow(self, row, parent):
|
||||
"""Custom filter implementation.
|
||||
|
@ -80,6 +80,12 @@ class CompletionView(QTreeView):
|
||||
self.setHeaderHidden(True)
|
||||
self.setIndentation(0)
|
||||
self.setItemsExpandable(False)
|
||||
# FIXME This is a workaround for weird race conditions with invalid
|
||||
# item indexes leading to segfaults in Qt.
|
||||
#
|
||||
# Some background: http://bugs.quassel-irc.org/issues/663
|
||||
# The proposed fix there was later reverted because it didn't help.
|
||||
self.setUniformRowHeights(True)
|
||||
self.hide()
|
||||
# FIXME set elidemode
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user