QTfrontend/CocoaInitializer.mm
author nemo
Tue, 21 Dec 2010 14:57:33 -0500
changeset 4589 98890a2d4cd7
parent 3697 d5b30d6373fc
child 5095 15dd764b728c
permissions -rw-r--r--
Switch default to the compost garbage ball (pending a proper mudball from a real artist), set Snowball for Snow theme only, change en.txt to Mudball

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