Revision 2dcfe64...

Go back to digest for 27th November 2011

Bug Fixes in KDE-PIM

Mario Bensi committed changes in [zanshin] /:

Fix regression on number of column display on Inbox and No Context

- We have reverted the change in columnCount introduced by the
modelReset handling and now we return the sourceModel columCount when
the parent is not valid. This change was here only to satisfy the test
but introduced a regression. Turns out it was a behavior mismatch
between QStandardItemModel and our own models regarding columnCount,
so to compensate that we introduce MockModel in this patch.

- MockModel return the correct number of column after clearData was
called. QStandardItemModel recreate the root node when clear
is called. The number of column on this root node is 0 by default. To
fix that we added clearData to clear the model, set the column number
and after that send the signal resetModel.

File Changes

Added 2 files
  • /testlib
  •   tests/mockmodel.cpp
  •   tests/mockmodel.h
Modified 4 files
  •   src/todoproxymodelbase.cpp
  •   tests/todocategoriesmodelspec.cpp
  •   tests/todotreemodelspec.cpp
  •   tests/testlib/CMakeLists.txt
6 files changed in total