Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
char101 committed Dec 18, 2014
1 parent 75428a2 commit 0c46e45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/listmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,13 @@ QVariant ListModel::data(const QModelIndex& index, int role) const

bool ListModel::setData(const QModelIndex& index, const QVariant& value, int role)
{
qDebug() << QString("%0:%1 (%2)").arg(__FILE__).arg(__LINE__).arg(__FUNCTION__) << role;
if (!index.isValid())
return false;

ListItem* item = itemFromIndex(index);
if (!item)
return false;

if (index.column() == 0) {
switch (role) {
case Qt::CheckStateRole:
Expand Down

0 comments on commit 0c46e45

Please sign in to comment.