QTfrontend/CocoaInitializer.mm
changeset 2261 57e99c908e7c
child 2400 2422ea85d100
equal deleted inserted replaced
2260:31756e21c436 2261:57e99c908e7c
       
     1 /*
       
     2  * Copyright (C) 2008 Remko Troncon
       
     3  */
       
     4 
       
     5 #include "CocoaInitializer.h"
       
     6 
       
     7 #include <AppKit/AppKit.h>
       
     8 #include <Cocoa/Cocoa.h>
       
     9 #include <QtDebug>
       
    10 
       
    11 class CocoaInitializer::Private 
       
    12 {
       
    13 	public:
       
    14 		NSAutoreleasePool* autoReleasePool_;
       
    15 };
       
    16 
       
    17 CocoaInitializer::CocoaInitializer()
       
    18 {
       
    19 	d = new CocoaInitializer::Private();
       
    20 	NSApplicationLoad();
       
    21 	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
       
    22 }
       
    23 
       
    24 CocoaInitializer::~CocoaInitializer()
       
    25 {
       
    26 	[d->autoReleasePool_ release];
       
    27 	delete d;
       
    28 }