QTfrontend/CocoaInitializer.mm
changeset 2261 57e99c908e7c
child 2400 2422ea85d100
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/CocoaInitializer.mm	Tue Jul 14 20:02:07 2009 +0000
@@ -0,0 +1,28 @@
+/*
+ * 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();
+	NSApplicationLoad();
+	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
+}
+
+CocoaInitializer::~CocoaInitializer()
+{
+	[d->autoReleasePool_ release];
+	delete d;
+}