Commit 7f56bdeb authored by Anthony Léonard's avatar Anthony Léonard

fix build on Xcode 9

A change in Cocoa framework between Xcode 8 and 9 made the
QNSTreeController not able to compile. This patch uses the correct way
to count child objects in arrangedObject.

Change-Id: I350671df4302a29d69c78a42f46102974e3639ab
parent 5dfbd6f2
......@@ -127,7 +127,7 @@
NSIndexPath* path = [self qIdxToNSIndexPath:qIdx];
//qDebug() << "insertNodeAt" << qIdx;
//NSLog(@"insertNodeAt index: %@", path);
if (path.length == 1 && [path indexAtPosition:0] <= [[self arrangedObjects] count])
if (path.length == 1 && [path indexAtPosition:0] <= [[[self arrangedObjects] childNodes] count])
[self insertObject:[[Node alloc] init] atArrangedObjectIndexPath:path];
else if (path.length > 1)
[self insertObject:[[Node alloc] init] atArrangedObjectIndexPath:path];
......
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