Skip to content
Snippets Groups Projects
Commit 33df4533 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

treeview: better way to get QModelIndex

Refs #67102

Change-Id: I37361864b6c2996f86f7ff8bd18e3972415487f4
parent f5b90dae
No related branches found
No related tags found
No related merge requests found
......@@ -140,18 +140,7 @@
{
if ([[tableColumn identifier] isEqualToString:COLUMNID_CONVERSATIONS])
{
NSIndexPath* idx = ((NSTreeNode*)item).indexPath;
NSUInteger myArray[[idx length]];
[idx getIndexes:myArray];
NSLog(@"array:%@", idx);
QModelIndex qIdx;
if(idx.length == 2)
qIdx = CallModel::instance()->index(myArray[1], 0, CallModel::instance()->index(myArray[0], 0));
else
qIdx = CallModel::instance()->index(myArray[0], 0);
QModelIndex qIdx = [treeController toQIdx:((NSTreeNode*)item)];
if(qIdx.isValid())
cell.title = CallModel::instance()->data(qIdx, Qt::DisplayRole).toString().toNSString();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment