[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 194483] Crash on build command for a project that was closed,
From:       "Olivier.jg" <olivier.jg () gmail ! com>
Date:       2009-11-27 4:09:07
Message-ID: 20091127040907.17BE228672 () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=194483





--- Comment #51 from Olivier.jg <olivier jg gmail com>  2009-11-27 05:09:01 ---
> I just committed this and was about to file a bugreport with Qt, but I actually
> can't reproduce what you're saying. Its correct that the model doesn't emit a
> selectionChanged signal, but thats quite normal. The model doesn't have a
> selection, instead the treeview is the one that should emit the selection.

A good point, I was mistaken about a couple things. But actually it's not the
treeview but the selectionModel that should emit the selectionChanged event.

The good news is that the QItemSelectionModel actually does emit the
selectionChanged event when it's Model emits rowsAboutToBeRemoved(), which I
didn't realize before.
However, what is in use is not a QStandardItemModel but a ProjectProxyModel
(inheriting from QAbstractProxyModel).
The problem is that the ProjectProxyModel to which the ProxySelectionModel is
bound doesn't emit rowsAboutToBeRemoved(). The sourceModel() of the
ProjectProxyModel does, but the ProjectProxyModel itself doesn't, which makes
sense, but does end up causing this bug.

There are two workarounds off the top of my head:
1. The patch I already provided is a simple enough workaround
2. The ProxySelectionModel could connect to the rowsAboutToBeRemoved of the
sourceModel() of it's QAbstractProxyModel, and then emit selectionChanged
accordingly. (effectively identical to the patch I provided)

All that to say, I would still consider this a Qt bug, because Any
selectionModel that uses a QAbstractProxyModel derivative won't get a
rowsAboutToBeRemoved signal, and will so be as broken as we are seeing.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic