ARC: Update layout framework (tests)

This commit is contained in:
Allan Odgaard
2012-09-23 13:06:21 +02:00
parent de3a1ee2f0
commit 7e53c15b67
2 changed files with 4 additions and 10 deletions

View File

@@ -2,3 +2,6 @@ SOURCES = src/*.cc
EXPORT = src/{layout,paragraph,ct}.h
LINK += text buffer selection bundles theme cf ns
TEST_SOURCES = tests/*.{cc,mm}
OBJCXX_FLAGS += -fobjc-arc
LN_FLAGS += -fobjc-arc-cxxlib=libc++

View File

@@ -139,12 +139,6 @@ private:
return self;
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
- (BOOL)acceptsFirstResponder
{
return YES;
@@ -399,12 +393,10 @@ private:
static NSScrollView* CreateTextView (NSRect aRect = NSMakeRect(0, 0, 600, 800))
{
NSAutoreleasePool* pool = [NSAutoreleasePool new];
NSScrollView* scrollView = [[NSScrollView alloc] initWithFrame:aRect];
NSSize textViewSize = [NSScrollView contentSizeForFrameSize:aRect.size hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder];
MyView* textView = [[[MyView alloc] initWithFrame:NSMakeRect(0, 0, textViewSize.width, textViewSize.height)] autorelease];
MyView* textView = [[MyView alloc] initWithFrame:NSMakeRect(0, 0, textViewSize.width, textViewSize.height)];
textView.autoresizingMask = NSViewWidthSizable;
scrollView.hasVerticalScroller = YES;
@@ -414,7 +406,6 @@ static NSScrollView* CreateTextView (NSRect aRect = NSMakeRect(0, 0, 600, 800))
scrollView.autoresizingMask = NSViewWidthSizable|NSViewHeightSizable;
scrollView.documentView = textView;
[pool drain];
return scrollView;
}