QTfrontend/CocoaInitializer.mm
author unc0rr
Tue, 28 Jul 2009 12:44:20 +0000
changeset 2281 3217f0d8c420
parent 2261 57e99c908e7c
child 2400 2422ea85d100
permissions -rw-r--r--
Fix hedgehog stopping to slide when throwing rope (not tested)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     1
/*
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     2
 * Copyright (C) 2008 Remko Troncon
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     3
 */
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     4
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     5
#include "CocoaInitializer.h"
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     6
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     7
#include <AppKit/AppKit.h>
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     8
#include <Cocoa/Cocoa.h>
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     9
#include <QtDebug>
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    10
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    11
class CocoaInitializer::Private 
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    12
{
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    13
	public:
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    14
		NSAutoreleasePool* autoReleasePool_;
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    15
};
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    16
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    17
CocoaInitializer::CocoaInitializer()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    18
{
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    19
	d = new CocoaInitializer::Private();
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    20
	NSApplicationLoad();
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    21
	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    22
}
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    23
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    24
CocoaInitializer::~CocoaInitializer()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    25
{
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    26
	[d->autoReleasePool_ release];
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    27
	delete d;
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    28
}