QTfrontend/CocoaInitializer.mm
author koda
Fri, 02 Oct 2009 16:49:31 +0000
changeset 2400 2422ea85d100
parent 2261 57e99c908e7c
child 3697 d5b30d6373fc
permissions -rw-r--r--
added a utility that warns the user to install hedgewars when it's run from the diskimage

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