VirtualBox

Changeset 35870 in vbox


Ignore:
Timestamp:
Feb 7, 2011 1:18:02 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: remove the QCocoaWindowDelegate dependency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm

    r35865 r35870  
    472472}
    473473
    474 /* Make an empty interface declaration of QCocoaWindowDelegate to shut up the
    475    compiler. */
    476 @interface QCocoaWindowDelegate: NSObject {}
    477 @end
    478 
    479474/* Our resize proxy singleton. This class has two major tasks. First it is used
    480475   to proxy the windowWillResize selector of the Qt delegate. As this is class
     
    484479{
    485480    NSMutableArray *m_pArray;
     481    bool m_fInit;
    486482}
    487483+(UIResizeProxy*)sharedResizeProxy;
     
    502498-(id)init
    503499{
    504     if ((self = [super init]))
     500    self = [super init];
     501
     502    m_fInit = false;
     503
     504    return self;
     505}
     506- (void)addWindow:(NSWindow*)pWindow
     507{
     508    if (!m_fInit)
    505509    {
    506510        /* Create an array which contains the registered windows. */
     
    509513           original method with our own one and reroute the original one to
    510514           another name. */
    511         Class oriClass = [QCocoaWindowDelegate class];
     515        Class oriClass = [[pWindow delegate] class];
    512516        Class myClass = [UIResizeProxy class];
    513517        SEL oriSel = @selector(windowWillResize:toSize:);
     
    521525        /* Add a new method to our class with the old implementation. */
    522526        class_addMethod(oriClass, qtSel, old, method_getTypeEncoding(m3));
    523     }
    524     return self;
    525 }
    526 - (void)addWindow:(NSWindow*)pWindow
    527 {
     527        m_fInit = true;
     528    }
    528529    [m_pArray addObject:pWindow];
    529530}
Note: See TracChangeset for help on using the changeset viewer.

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