VirtualBox

Changeset 85334 in vbox


Ignore:
Timestamp:
Jul 14, 2020 11:07:53 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139314
Message:

FE/Qt: CocoaEventHelper.mm - NSEvent::context is deprecated and said to always return nil starting with 10.12, so just take it's value as nil in the two places we use it here. bugref:9790

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.mm

    r85333 r85334  
    216216    NSWindow *pEventWindow = [pEvent window];
    217217    NSInteger iEventWindow = [pEvent windowNumber];
     218#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
     219    NSGraphicsContext *pEventGraphicsContext = nil; /* NSEvent::context is deprecated and said to always return nil. */
     220#else
    218221    NSGraphicsContext *pEventGraphicsContext = [pEvent context];
     222#endif
    219223
    220224    printf("%s%p: Type=%lu Modifiers=%08lx pWindow=%p #Wnd=%ld pGraphCtx=%p %s\n",
     
    340344                                           timestamp:[pEvent timestamp] // [NSDate timeIntervalSinceReferenceDate] ?
    341345                                        windowNumber:[pEvent windowNumber]
     346#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
     347                                             context:nil /* NSEvent::context is deprecated and said to always return nil. */
     348#else
    342349                                             context:[pEvent context]
     350#endif
    343351                                         eventNumber:[pEvent eventNumber]
    344352                                          clickCount:[pEvent clickCount]
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette