Modeltest
From Trolltech Labs
| ModelTest | |||
| |||
| Platforms: | Mac/Win/Linux | ||
| Qt version: | 4.x | ||
| License: | GPL | ||
| Depends on: | None | ||
ModelTest blogs | |||
Subversion:
| |||
[edit] ModelTest
[edit]
ModelTest provides a way to check for common errors in implementations of QAbstractItemModel.
ModelTest continuously checks a model as it changes, helping to verify the state and catching many common errors the moment they show up.
[edit]
Some of the conditions caught include:
- Verifying X number of rows have been inserted in the correct place after the signal rowsAboutToBeInserted() says X rows will be inserted.
- The parent of the first index of the first row is a QModelIndex()
- Calling index() twice in a row with the same values will return the same QModelIndex
- If rowCount() says there are X number of rows, model test will verify that is true.
- Many possible off by one bugs
- hasChildren() returns true if rowCount() is greater then zero.
- and many more...
The code can be checked out with subversion:
svn checkout svn://labs.trolltech.com/svn/itemviews/modeltest modeltest
If you don't have svn, you can download a package instead.
[edit] Latest 5 ModelTest Blogs
(No posts for this category)
