QTfrontend/CocoaInitializer.mm
author unc0rr
Sun, 16 Aug 2009 14:40:43 +0000
changeset 2316 349b80b30575
parent 2261 57e99c908e7c
child 2400 2422ea85d100
permissions -rw-r--r--
Update russian translation
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
}