code cleanup

This commit is contained in:
Martin Brodbeck 2018-07-26 07:56:32 +02:00
parent 69dd1afba5
commit f697487d6b

View file

@ -51,14 +51,9 @@ QModelIndex SaleModel::parent(const QModelIndex& index) const
if (sale == rootItem.get())
return QModelIndex();
else {
/* auto iter =
std::find_if(marketplace_->getSales().begin(), marketplace_->getSales().end(),
[&sale](const auto& s) { return s.get() == sale; });
auto pos = std::distance(marketplace_->getSales().begin(), iter); */
return createIndex(-1, 0, rootItem.get());
}
} else {
// article = static_cast<Article*>(index.internalPointer());
article = dynamic_cast<Article*>(ent);
if (!article) {
@ -90,7 +85,6 @@ QVariant SaleModel::data(const QModelIndex& index, int role) const
case 1:
myFont.setFamily("monospace");
return myFont;
return myFont;
default:
return myFont;
}