diff options
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index f58a755..7e9ebb9 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -220,7 +220,7 @@ static QSize qt_mac_desktopSize() static NSDrawer *qt_mac_drawer_for(const QWidget *widget) { NSView *widgetView = reinterpret_cast<NSView *>(widget->window()->effectiveWinId()); - NSArray *windows = [NSApp windows]; + NSArray *windows = [[NSApplication sharedApplication] windows]; for (NSWindow *window in windows) { NSArray *drawers = [window drawers]; for (NSDrawer *drawer in drawers) { @@ -254,7 +254,7 @@ static void qt_mac_destructWindow(OSWindowRef window) { #ifdef QT_MAC_USE_COCOA if ([window isVisible] && [window isSheet]){ - [NSApp endSheet:window]; + [[NSApplication sharedApplication] endSheet:window]; [window orderOut:window]; } @@ -2439,7 +2439,7 @@ void QWidgetPrivate::recreateMacWindow() } if ([oldWindow isVisible]){ if ([oldWindow isSheet]) - [NSApp endSheet:oldWindow]; + [[NSApplication sharedApplication] endSheet:oldWindow]; [oldWindow orderOut:oldWindow]; show_sys(); } @@ -3554,7 +3554,7 @@ void QWidgetPrivate::show_sys() } #ifdef QT_MAC_USE_COCOA - if ([NSApp isActive] && !qt_button_down && !QWidget::mouseGrabber()){ + if ([[NSApplication sharedApplication] isActive] && !qt_button_down && !QWidget::mouseGrabber()){ // Update enter/leave immidiatly, don't wait for a move event. But only // if no grab exists (even if the grab points to this widget, it seems, ref X11) QPoint qlocal, qglobal; @@ -3605,7 +3605,7 @@ void QWidgetPrivate::hide_sys() else HideSheetWindow(window); #else - [NSApp endSheet:window]; + [[NSApplication sharedApplication] endSheet:window]; [window orderOut:window]; #endif } else if(qt_mac_is_macdrawer(q)) { @@ -3716,7 +3716,7 @@ void QWidgetPrivate::hide_sys() } #ifdef QT_MAC_USE_COCOA - if ([NSApp isActive] && !qt_button_down && !QWidget::mouseGrabber()){ + if ([[NSApplication sharedApplication] isActive] && !qt_button_down && !QWidget::mouseGrabber()){ // Update enter/leave immidiatly, don't wait for a move event. But only // if no grab exists (even if the grab points to this widget, it seems, ref X11) QPoint qlocal, qglobal; |