void QCoreTextFontDatabase::populateFontDatabase()
{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
QCFType<CTFontCollectionRef> collection = CTFontCollectionCreateFromAvailableFonts(0);
if (! collection)
return;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defaults stringArrayForKey: @"AppleLanguages"];
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
-
NSDictionary *fallbackDict = [NSDictionary dictionaryWithContentsOfFile: @"/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist"];
for (NSString *style in [fallbackDict allKeys]) {
****************************************************************************/
#include "qcocoabackingstore.h"
+#include "qcocoaautoreleasepool.h"
#include <QtCore/qdebug.h>
#include <QtGui/QPainter>
{
Q_UNUSED(widget);
Q_UNUSED(offset);
+ QCocoaAutoReleasePool pool;
QRect geo = region.boundingRect();
: mFontDb(new QCoreTextFontDatabase())
, mEventDispatcher(new QCocoaEventDispatcher())
{
+ QCocoaAutoReleasePool pool;
+
qApp->setAttribute(Qt::AA_DontUseNativeMenuBar, false);
NSApplication *cocoaApplication = [NSApplication sharedApplication];
void QCocoaWindow::setVisible(bool visible)
{
+ QCocoaAutoReleasePool pool;
if (visible) {
// The parent window might have moved while this window was hidden,
// update the window geometry if there is a parent.
void QCocoaWindow::setWindowTitle(const QString &title)
{
+ QCocoaAutoReleasePool pool;
+
CFStringRef windowTitle = QCFString::toCFStringRef(title);
[m_nsWindow setTitle: const_cast<NSString *>(reinterpret_cast<const NSString *>(windowTitle))];
CFRelease(windowTitle);
void QCocoaWindow::propagateSizeHints()
{
+ QCocoaAutoReleasePool pool;
+
[m_nsWindow setMinSize : qt_mac_toNSSize(window()->minimumSize())];
[m_nsWindow setMaxSize : qt_mac_toNSSize(window()->maximumSize())];