VirtualBox

Changeset 26729 in vbox


Ignore:
Timestamp:
Feb 24, 2010 10:46:58 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: cleanup

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r26691 r26729  
    4141# Build new VirtualBox FE/Qt4 GUI runtime core.
    4242# Currently its not used, you can build it for developing purposes.
    43 ifneq ($(KBUILD_TARGET),darwin)
    4443#VBOX_WITH_NEW_RUNTIME_CORE := 1
    45 endif
    4644
    4745#
     
    167165VirtualBox_DEFS.win       = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
    168166VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
    169 ## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?
    170 VirtualBox_DEFS.darwin.x86 += VBOX_WITH_HACKED_QT
    171167ifdef VBOX_WITH_ICHAT_THEATER
    172168 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
     
    264260endif
    265261
    266 # r=bird: what is -lz doing here? it belongs in LIBS.
    267 VirtualBox_LDFLAGS.darwin = -lz \
     262VirtualBox_LDFLAGS.darwin = \
    268263        -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \
    269264        $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
     
    780775                '-DVBOX_GUI_USE_QIMAGE' \
    781776                '-DVBOX_WITHOUT_QHTTP' \
    782                 '-DVBOX_WITH_HACKED_QT' \
    783777                '-o' $@ $<
    784778endif
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r26720 r26729  
    9292# ifdef QT_MAC_USE_COCOA
    9393#  include "darwin/VBoxCocoaApplication.h"
    94 # elif defined(VBOX_WITH_HACKED_QT)
    95 #  include "QIApplication.h"
    96 # endif
    97 # include <Carbon/Carbon.h>
     94# else /* QT_MAC_USE_COCOA */
     95#  include <Carbon/Carbon.h>
     96# endif /* !QT_MAC_USE_COCOA */
    9897# include <VBox/err.h>
    9998#endif /* defined (Q_WS_MAC) */
     
    161160}
    162161
    163 # elif !defined (VBOX_WITH_HACKED_QT)
     162# else /* QT_MAC_USE_COCOA */
    164163/**
    165164 *  Event handler callback for Mac OS X.
     
    194193     * possible to use the left command key to invoke them when the keyboard
    195194     * is captured. We discard the events these if the keyboard is captured
    196      * as a half measure to prevent unexpected behaviour. However, we don't
     195     * as a half measure to prevent unexpected behavior. However, we don't
    197196     * get any key down/up events, so these combinations are dead to the guest...
    198197     */
     
    204203    return ::CallNextEventHandler (inHandlerCallRef, inEvent);
    205204}
    206 
    207 # else /* VBOX_WITH_HACKED_QT */
    208 /**
    209  *  Event handler callback for Mac OS X.
    210  */
    211 /* static */
    212 bool VBoxConsoleView::macEventFilter (EventRef inEvent, void *inUserData)
    213 {
    214     VBoxConsoleView *view = static_cast<VBoxConsoleView *> (inUserData);
    215     UInt32 eventClass = ::GetEventClass (inEvent);
    216     UInt32 eventKind = ::GetEventKind (inEvent);
    217 
    218     /* For debugging events */
    219     /*
    220     if (!(eventClass == 'cute'))
    221         ::darwinDebugPrintEvent ("view: ", inEvent);
    222     */
    223 
    224     /* Not sure but this seems an triggered event if the spotlight searchbar is
    225      * displayed. So flag that the host key isn't pressed alone. */
    226     if (eventClass == 'cgs ' && eventKind == 0x15 &&
    227         view->mIsHostkeyPressed)
    228         view->mIsHostkeyAlone = false;
    229 
    230     if (eventClass == kEventClassKeyboard)
    231     {
    232         if (view->darwinKeyboardEvent (NULL, inEvent))
    233             return true;
    234     }
    235     return false;
    236 }
    237 # endif /* VBOX_WITH_HACKED_QT */
     205# endif /* !QT_MAC_USE_COCOA */
    238206
    239207#endif /* Q_WS_MAC */
     
    737705#endif
    738706#if defined(Q_WS_MAC)
    739 # if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)
     707# ifndef QT_MAC_USE_COCOA
    740708    , mDarwinEventHandlerRef (NULL)
    741709# endif
     
    759727    mDockIconPreview = new VBoxDockIconPreview (mMainWnd, vboxGlobal().vmGuestOSTypeIcon (osTypeId));
    760728
    761 # ifdef QT_MAC_USE_COCOA
    762     /** @todo Carbon -> Cocoa */
    763 # else /* !QT_MAC_USE_COCOA */
     729# ifndef QT_MAC_USE_COCOA
    764730    /* Install the event handler which will proceed external window handling */
    765731    EventHandlerUPP eventHandler = ::NewEventHandlerUPP (::darwinOverlayWindowHandler);
     
    24992465                                            VBoxConsoleView::darwinEventHandlerProc, this);
    25002466
    2501 # elif !defined (VBOX_WITH_HACKED_QT)
     2467# else /* QT_MAC_USE_COCOA */
    25022468        EventTypeSpec eventTypes[6];
    25032469        eventTypes[0].eventClass = kEventClassKeyboard;
     
    25222488                                          this, &mDarwinEventHandlerRef);
    25232489        ::DisposeEventHandlerUPP (eventHandler);
    2524 
    2525 # else  /* VBOX_WITH_HACKED_QT */
    2526         ((QIApplication *)qApp)->setEventFilter (VBoxConsoleView::macEventFilter, this);
    2527 # endif /* VBOX_WITH_HACKED_QT */
     2490# endif /* !QT_MAC_USE_COCOA */
    25282491
    25292492        ::DarwinGrabKeyboard (false);
     
    25352498        ::VBoxCocoaApplication_unsetCallback (UINT32_MAX, /** @todo fix mask */
    25362499                                              VBoxConsoleView::darwinEventHandlerProc, this);
    2537 # elif !defined(VBOX_WITH_HACKED_QT)
     2500# else /* !QT_MAC_USE_COCOA */
    25382501        if (mDarwinEventHandlerRef)
    25392502        {
     
    25412504            mDarwinEventHandlerRef = NULL;
    25422505        }
    2543 # else  /* VBOX_WITH_HACKED_QT */
    2544         ((QIApplication *)qApp)->setEventFilter (NULL, NULL);
    2545 # endif /* VBOX_WITH_HACKED_QT */
     2506# endif /* !QT_MAC_USE_COCOA */
    25462507    }
    25472508}
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.h

    r26213 r26729  
    327327
    328328#if defined(Q_WS_MAC)
    329 # if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)
     329# ifndef QT_MAC_USE_COCOA
    330330    /** Event handler reference. NULL if the handler isn't installed. */
    331331    EventHandlerRef mDarwinEventHandlerRef;
    332 # endif
     332# endif /* !QT_MAC_USE_COCOA */
    333333    /** The current modifier key mask. Used to figure out which modifier
    334334     *  key was pressed when we get a kEventRawKeyModifiersChanged event. */
     
    346346                                                  WPARAM wParam, LPARAM lParam);
    347347#elif defined (Q_WS_MAC)
    348 # if defined (QT_MAC_USE_COCOA)
     348# ifdef QT_MAC_USE_COCOA
    349349    static bool darwinEventHandlerProc (const void *pvCocoaEvent, const
    350350                                        void *pvCarbonEvent, void *pvUser);
    351 # elif !defined (VBOX_WITH_HACKED_QT)
     351# else /* QT_MAC_USE_COCOA */
    352352    static pascal OSStatus darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef,
    353353                                                   EventRef inEvent, void *inUserData);
    354 # else  /* VBOX_WITH_HACKED_QT */
    355     static bool macEventFilter (EventRef inEvent, void *inUserData);
    356 # endif /* VBOX_WITH_HACKED_QT */
     354# endif /* !QT_MAC_USE_COCOA */
    357355#endif
    358356
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.h

    r26581 r26729  
    451451
    452452#endif // __VBoxConsoleWnd_h__
     453
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp

    r26719 r26729  
     1/* $Id$ */
    12/** @file
    23 *
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r26719 r26729  
    3333#include "VBoxConsoleWnd.h"
    3434#include "VBoxUtils.h"
    35 #if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
    36 # include "QIApplication.h"
    37 #else
    38 # define QIApplication QApplication
    39 #endif
    4035#ifdef QT_MAC_USE_COCOA
    4136# include "darwin/VBoxCocoaApplication.h"
     
    340335    int rc = 1; /* failure */
    341336
    342     /* scope the QIApplication variable */
     337    /* scope the QApplication variable */
    343338    {
    344339#ifdef Q_WS_X11
     
    377372                          : NULL;
    378373        /* Now create the application object */
    379         QIApplication a (pDisplay, argc, argv, (Qt::HANDLE) pVisual);
     374        QApplication a (pDisplay, argc, argv, (Qt::HANDLE) pVisual);
    380375#else /* Q_WS_X11 */
    381         QIApplication a (argc, argv);
     376        QApplication a (argc, argv);
    382377#endif /* Q_WS_X11 */
    383378
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r26719 r26729  
    7979# ifdef QT_MAC_USE_COCOA
    8080#  include "darwin/VBoxCocoaApplication.h"
    81 # elif defined(VBOX_WITH_HACKED_QT)
    82 #  include "QIApplication.h"
    83 # endif
    84 # include <Carbon/Carbon.h>
     81# else /* QT_MAC_USE_COCOA */
     82#  include <Carbon/Carbon.h>
     83# endif /* !QT_MAC_USE_COCOA */
    8584# include <VBox/err.h>
    8685#endif /* defined (Q_WS_MAC) */
     
    274273#endif
    275274#if defined(Q_WS_MAC)
    276 # if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)
     275# ifndef QT_MAC_USE_COCOA
    277276    , mDarwinEventHandlerRef (NULL)
    278 # endif
     277# endif /* !QT_MAC_USE_COCOA */
    279278    , mDarwinKeyModifiers (0)
    280279    , mKeyboardGrabbed (false)
     
    16281627                                            UIMachineView::darwinEventHandlerProc, this);
    16291628
    1630 # elif !defined (VBOX_WITH_HACKED_QT)
     1629# else /* QT_MAC_USE_COCOA */
    16311630        EventTypeSpec eventTypes[6];
    16321631        eventTypes[0].eventClass = kEventClassKeyboard;
     
    16511650                                         this, &mDarwinEventHandlerRef);
    16521651        ::DisposeEventHandlerUPP(eventHandler);
    1653 
    1654 # else  /* VBOX_WITH_HACKED_QT */
    1655         ((QIApplication *)qApp)->setEventFilter(UIMachineView::macEventFilter, this);
    1656 # endif /* VBOX_WITH_HACKED_QT */
     1652# endif /* !QT_MAC_USE_COCOA */
    16571653
    16581654        ::DarwinGrabKeyboard (false);
     
    16641660        ::VBoxCocoaApplication_unsetCallback(UINT32_MAX, /** @todo fix mask */
    16651661                                             UIMachineView::darwinEventHandlerProc, this);
    1666 # elif !defined(VBOX_WITH_HACKED_QT)
     1662# else /* QT_MAC_USE_COCOA */
    16671663        if (mDarwinEventHandlerRef)
    16681664        {
     
    16701666            mDarwinEventHandlerRef = NULL;
    16711667        }
    1672 # else  /* VBOX_WITH_HACKED_QT */
    1673         ((QIApplication *)qApp)->setEventFilter(NULL, NULL);
    1674 # endif /* VBOX_WITH_HACKED_QT */
     1668# endif /* !QT_MAC_USE_COCOA */
    16751669    }
    16761670}
     
    16931687
    16941688#if defined (Q_WS_MAC)
    1695 # if defined (QT_MAC_USE_COCOA)
     1689# ifdef QT_MAC_USE_COCOA
    16961690bool UIMachineView::darwinEventHandlerProc (const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser)
    16971691{
     
    17151709}
    17161710
    1717 # elif !defined (VBOX_WITH_HACKED_QT)
     1711# else /* QT_MAC_USE_COCOA */
    17181712
    17191713pascal OSStatus UIMachineView::darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData)
     
    17471741    return ::CallNextEventHandler(inHandlerCallRef, inEvent);
    17481742}
    1749 
    1750 # else /* VBOX_WITH_HACKED_QT */
    1751 
    1752 bool UIMachineView::macEventFilter(EventRef inEvent, void *inUserData)
    1753 {
    1754     UIMachineView *view = static_cast<UIMachineView *>(inUserData);
    1755     UInt32 eventClass = ::GetEventClass(inEvent);
    1756     UInt32 eventKind = ::GetEventKind(inEvent);
    1757 
    1758     /* Not sure but this seems an triggered event if the spotlight searchbar is
    1759      * displayed. So flag that the host key isn't pressed alone. */
    1760     if (eventClass == 'cgs ' && eventKind == 0x15 &&
    1761         view->m_bIsHostkeyPressed)
    1762         view->m_bIsHostkeyAlone = false;
    1763 
    1764     if (eventClass == kEventClassKeyboard)
    1765     {
    1766         if (view->darwinKeyboardEvent (NULL, inEvent))
    1767             return true;
    1768     }
    1769     return false;
    1770 }
    1771 # endif /* VBOX_WITH_HACKED_QT */
     1743# endif /* !QT_MAC_USE_COCOA */
    17721744
    17731745#endif /* Q_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r26709 r26729  
    161161    static LRESULT CALLBACK lowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam);
    162162#elif defined (Q_WS_MAC)
    163 # if defined (QT_MAC_USE_COCOA)
     163# ifdef QT_MAC_USE_COCOA
    164164    static bool darwinEventHandlerProc(const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser);
    165 # elif !defined (VBOX_WITH_HACKED_QT)
     165# else /* QT_MAC_USE_COCOA */
    166166    static pascal OSStatus darwinEventHandlerProc(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData);
    167 # else  /* VBOX_WITH_HACKED_QT */
    168     static bool macEventFilter(EventRef inEvent, void *inUserData);
    169 # endif /* VBOX_WITH_HACKED_QT */
     167# endif /* !QT_MAC_USE_COCOA */
    170168#endif
    171169
     
    262260
    263261#if defined(Q_WS_MAC)
    264 # if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)
     262# ifndef QT_MAC_USE_COCOA
    265263    /** Event handler reference. NULL if the handler isn't installed. */
    266264    EventHandlerRef mDarwinEventHandlerRef;
    267 # endif
     265# endif /* !QT_MAC_USE_COCOA */
    268266    /** The current modifier key mask. Used to figure out which modifier
    269267     *  key was pressed when we get a kEventRawKeyModifiersChanged event. */
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