silence unnecessary warning

This commit is contained in:
Jordan Lee 2013-01-30 00:23:32 +00:00
parent 20fe66bccf
commit 90619423ff
1 changed files with 5 additions and 9 deletions

View File

@ -463,26 +463,22 @@ FileTreeModel :: index (int row, int column, const QModelIndex& parent) const
{ {
QModelIndex i; QModelIndex i;
if (!hasIndex (row, column, parent)) if (hasIndex (row, column, parent))
{
qWarning ("I don't have this index");
}
else
{ {
FileTreeItem * parentItem; FileTreeItem * parentItem;
if(!parent.isValid()) if (!parent.isValid ())
parentItem = myRootItem; parentItem = myRootItem;
else else
parentItem = itemFromIndex (parent); parentItem = itemFromIndex (parent);
FileTreeItem * childItem = parentItem->child(row); FileTreeItem * childItem = parentItem->child (row);
if (childItem) if (childItem)
i = createIndex(row, column, childItem); i = createIndex (row, column, childItem);
} }
return i; return i;
} }
QModelIndex QModelIndex