Commit c498efb7 authored by David Faure's avatar David Faure

CollectionStatisticsDelegate: provide more debug info when it all goes wrong.

parent 7555b063
......@@ -30,6 +30,7 @@
#include <QStyleOptionViewItemV4>
#include <QAbstractItemView>
#include <QTreeView>
#include <QAbstractProxyModel>
#include "entitytreemodel.h"
#include "collectionstatistics.h"
......@@ -234,7 +235,7 @@ void CollectionStatisticsDelegate::paint(QPainter *painter,
Collection collection = firstColumn.data(EntityTreeModel::CollectionRole).value<Collection>();
if (!collection.isValid()) {
qCCritical(AKONADIWIDGETS_LOG) << "Invalid collection: " << collection;
qCCritical(AKONADIWIDGETS_LOG) << "Invalid collection at index" << firstColumn << firstColumn.data().toString() << "sibling of" << index << "rowCount=" << index.model()->rowCount(index.parent()) << "parent=" << index.parent().data().toString();
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment