QTfrontend/CocoaInitializer.mm
author smxx
Wed, 17 Mar 2010 22:56:23 +0000
changeset 3013 dfc1f16aeb53
parent 2400 2422ea85d100
child 3697 d5b30d6373fc
permissions -rw-r--r--
General: * Updated Spanish translation by Palewolf Maps: * Updated Knockball to use less strings and placeholders

/*
 * Copyright (C) 2008 Remko Troncon
 */

#include "CocoaInitializer.h"

#include <AppKit/AppKit.h>
#include <Cocoa/Cocoa.h>
#include <QtDebug>

class CocoaInitializer::Private 
{
	public:
		NSAutoreleasePool* autoReleasePool_;
};

CocoaInitializer::CocoaInitializer()
{
	d = new CocoaInitializer::Private();
        c = new CocoaInitializer::Private();
	NSApplicationLoad();
        c->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
}

CocoaInitializer::~CocoaInitializer()
{
	[d->autoReleasePool_ release];
        [c->autoReleasePool_ release];
	delete c;
	delete d;
}