QTfrontend/CocoaInitializer.mm
author koda
Thu, 02 Dec 2010 00:23:54 +0100
changeset 4444 92fc23595de8
parent 3697 d5b30d6373fc
child 5095 15dd764b728c
permissions -rw-r--r--
reduce icons to 32x32 but create a 64x64 image for preview, also useful for ios and retina displays (frontend should be updated)

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