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:51:14 +0000 (14:51 +0100)
commiteb74ba38ec7a8d88fc27c3f8d277859e1a89ae7e
tree16673642a9a3d09923991c58cb24ca21750930d2
parent5d2b5335c7e74077d445f5b462e3f4633c5e4efe
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