QTfrontend/CocoaInitializer.mm
author nemo
Sun, 10 Oct 2010 20:16:17 -0400
changeset 3951 c9a63db3e603
parent 3697 d5b30d6373fc
child 5095 15dd764b728c
permissions -rw-r--r--
Correct another bug in slot switching, adjust width of theme list, really truly fix reset of weps (I hope) should also fix infinite teleport bug in place hogs mode. Slow update of health to 5s for inf attack mode.
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
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 2400
diff changeset
    11
class CocoaInitializer::Private
2261
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();
2400
2422ea85d100 added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents: 2261
diff changeset
    20
        c = new CocoaInitializer::Private();
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    21
	NSApplicationLoad();
2400
2422ea85d100 added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents: 2261
diff changeset
    22
        c->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    23
	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    24
}
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    25
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    26
CocoaInitializer::~CocoaInitializer()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    27
{
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    28
	[d->autoReleasePool_ release];
2400
2422ea85d100 added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents: 2261
diff changeset
    29
        [c->autoReleasePool_ release];
2422ea85d100 added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents: 2261
diff changeset
    30
	delete c;
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    31
	delete d;
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    32
}