Commit 33df4533 authored by Alexandre Lision's avatar Alexandre Lision

treeview: better way to get QModelIndex

Refs #67102

Change-Id: I37361864b6c2996f86f7ff8bd18e3972415487f4
parent f5b90dae
......@@ -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();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment