Version 0.17.8

-fixed bugs found by first scan with Coverity Scan
This commit is contained in:
Nikolaj Schlej 2014-04-18 14:18:11 +02:00
parent 706b0088e3
commit 1df4e4f9d8
3 changed files with 37 additions and 16 deletions

View file

@ -47,8 +47,6 @@ QVariant TreeModel::data(const QModelIndex &index, int role) const
return item->data(index.column());
else
return item->info();
return QVariant();
}
Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
@ -366,8 +364,10 @@ QModelIndex TreeModel::addItem(const UINT8 type, const UINT8 subtype, const UINT
emit layoutAboutToBeChanged();
parentItem->insertChildAfter(item, newItem);
}
else
else {
delete newItem;
return QModelIndex();
}
emit layoutChanged();