Mac: fix crash when creating a new window
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>
Wed, 3 Aug 2011 13:08:38 +0000 (15:08 +0200)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>
Wed, 3 Aug 2011 13:26:05 +0000 (15:26 +0200)
Change-Id: I90f7bff954f3710f48d7416287bb5debafa94447
Reviewed-on: http://codereview.qt.nokia.com/2570
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
src/plugins/platforms/cocoa/qcocoawindow.mm

index 550c429..492a43a 100644 (file)
@@ -63,7 +63,6 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
 
     QNSWindowDelegate *delegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:this];
     [m_nsWindow setDelegate:delegate];
-
     [m_nsWindow setAcceptsMouseMovedEvents:YES];
 
     m_contentView = [[QNSView alloc] initWithQWindow:tlw];
@@ -317,9 +316,8 @@ NSWindow * QCocoaWindow::createWindow()
         window = panel;
         break;
     }
-
     default:
-        m_nsWindow  = [[NSWindow alloc] initWithContentRect:frame
+        window  = [[NSWindow alloc] initWithContentRect:frame
                                             styleMask:m_windowAttributes
                                             backing:NSBackingStoreBuffered
                                             defer:YES];