QTfrontend/CocoaInitializer.mm
author smxx
Mon, 12 Apr 2010 20:58:32 +0000
changeset 3337 75e7455c69ed
parent 2400 2422ea85d100
child 3697 d5b30d6373fc
permissions -rw-r--r--
Engine: * Moved "enum member to string" functions to uMisc * Print gear types in debug log instead of ordinals

/*
 * 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;
}