Add some checks to models
authorManuel Nickschas <sputnick@quassel-irc.org>
Fri, 25 Dec 2009 13:41:46 +0000 (14:41 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 25 Dec 2009 13:41:46 +0000 (14:41 +0100)
commit42406861fbe570ed1fb45e9da39ff9a0de73c284
tree0ece27ac80a81687eee5cb8606c3ed2dda768c32
parentd5071b9120307cf45f2db1870cb2a54f50d08a45
Add some checks to models

We should make sure that index() always returns an invalid model index for invalid
parameters (aka, out of bounds). This has been found with Qt's ModelTest.

I don't *think* this has any impact in Quassel, as we should never call index() with invalid
parameters anyway, but who knows. Maybe some of our crashes are related to this...
Better safe than sorry! :)
src/client/messagemodel.h
src/client/networkmodel.cpp
src/client/treemodel.cpp