QTfrontend/CocoaInitializer.mm
author sheepluva
Thu, 27 Jan 2011 22:55:11 +0100
branch0.9.15
changeset 4771 6bb64d38003e
parent 3697 d5b30d6373fc
child 5095 15dd764b728c
permissions -rw-r--r--
how about we 60-sec-ban the _kicked user_ instead of the _admin that kicked that user_? :P

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