QTfrontend/CocoaInitializer.mm
author smaxx
Tue, 14 Sep 2010 22:13:59 +0200
changeset 3870 e3f778c95d1c
parent 3697 d5b30d6373fc
child 5095 15dd764b728c
permissions -rw-r--r--
Frontend: * Updated random map selection: Clicking on the map preview will now create a new random seed and pick another map of the current type selected (random map, random maze, mission or static map)

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