Index: /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 26728)
+++ /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 26729)
@@ -41,7 +41,5 @@
 # Build new VirtualBox FE/Qt4 GUI runtime core.
 # Currently its not used, you can build it for developing purposes.
-ifneq ($(KBUILD_TARGET),darwin)
 #VBOX_WITH_NEW_RUNTIME_CORE := 1
-endif
 
 #
@@ -167,6 +165,4 @@
 VirtualBox_DEFS.win       = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
 VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
-## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?
-VirtualBox_DEFS.darwin.x86 += VBOX_WITH_HACKED_QT
 ifdef VBOX_WITH_ICHAT_THEATER
  VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
@@ -264,6 +260,5 @@
 endif
 
-# r=bird: what is -lz doing here? it belongs in LIBS.
-VirtualBox_LDFLAGS.darwin = -lz \
+VirtualBox_LDFLAGS.darwin = \
 	-framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \
 	$(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
@@ -780,5 +775,4 @@
 		'-DVBOX_GUI_USE_QIMAGE' \
 		'-DVBOX_WITHOUT_QHTTP' \
-		'-DVBOX_WITH_HACKED_QT' \
 		'-o' $@ $<
 endif
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp	(revision 26728)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp	(revision 26729)
@@ -92,8 +92,7 @@
 # ifdef QT_MAC_USE_COCOA
 #  include "darwin/VBoxCocoaApplication.h"
-# elif defined(VBOX_WITH_HACKED_QT)
-#  include "QIApplication.h"
-# endif
-# include <Carbon/Carbon.h>
+# else /* QT_MAC_USE_COCOA */
+#  include <Carbon/Carbon.h>
+# endif /* !QT_MAC_USE_COCOA */
 # include <VBox/err.h>
 #endif /* defined (Q_WS_MAC) */
@@ -161,5 +160,5 @@
 }
 
-# elif !defined (VBOX_WITH_HACKED_QT)
+# else /* QT_MAC_USE_COCOA */
 /**
  *  Event handler callback for Mac OS X.
@@ -194,5 +193,5 @@
      * possible to use the left command key to invoke them when the keyboard
      * is captured. We discard the events these if the keyboard is captured
-     * as a half measure to prevent unexpected behaviour. However, we don't
+     * as a half measure to prevent unexpected behavior. However, we don't
      * get any key down/up events, so these combinations are dead to the guest...
      */
@@ -204,36 +203,5 @@
     return ::CallNextEventHandler (inHandlerCallRef, inEvent);
 }
-
-# else /* VBOX_WITH_HACKED_QT */
-/**
- *  Event handler callback for Mac OS X.
- */
-/* static */
-bool VBoxConsoleView::macEventFilter (EventRef inEvent, void *inUserData)
-{
-    VBoxConsoleView *view = static_cast<VBoxConsoleView *> (inUserData);
-    UInt32 eventClass = ::GetEventClass (inEvent);
-    UInt32 eventKind = ::GetEventKind (inEvent);
-
-    /* For debugging events */
-    /*
-    if (!(eventClass == 'cute'))
-        ::darwinDebugPrintEvent ("view: ", inEvent);
-    */
-
-    /* Not sure but this seems an triggered event if the spotlight searchbar is
-     * displayed. So flag that the host key isn't pressed alone. */
-    if (eventClass == 'cgs ' && eventKind == 0x15 &&
-        view->mIsHostkeyPressed)
-        view->mIsHostkeyAlone = false;
-
-    if (eventClass == kEventClassKeyboard)
-    {
-        if (view->darwinKeyboardEvent (NULL, inEvent))
-            return true;
-    }
-    return false;
-}
-# endif /* VBOX_WITH_HACKED_QT */
+# endif /* !QT_MAC_USE_COCOA */
 
 #endif /* Q_WS_MAC */
@@ -737,5 +705,5 @@
 #endif
 #if defined(Q_WS_MAC)
-# if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)
+# ifndef QT_MAC_USE_COCOA
     , mDarwinEventHandlerRef (NULL)
 # endif
@@ -759,7 +727,5 @@
     mDockIconPreview = new VBoxDockIconPreview (mMainWnd, vboxGlobal().vmGuestOSTypeIcon (osTypeId));
 
-# ifdef QT_MAC_USE_COCOA
-    /** @todo Carbon -> Cocoa */
-# else /* !QT_MAC_USE_COCOA */
+# ifndef QT_MAC_USE_COCOA
     /* Install the event handler which will proceed external window handling */
     EventHandlerUPP eventHandler = ::NewEventHandlerUPP (::darwinOverlayWindowHandler);
@@ -2499,5 +2465,5 @@
                                             VBoxConsoleView::darwinEventHandlerProc, this);
 
-# elif !defined (VBOX_WITH_HACKED_QT)
+# else /* QT_MAC_USE_COCOA */
         EventTypeSpec eventTypes[6];
         eventTypes[0].eventClass = kEventClassKeyboard;
@@ -2522,8 +2488,5 @@
                                           this, &mDarwinEventHandlerRef);
         ::DisposeEventHandlerUPP (eventHandler);
-
-# else  /* VBOX_WITH_HACKED_QT */
-        ((QIApplication *)qApp)->setEventFilter (VBoxConsoleView::macEventFilter, this);
-# endif /* VBOX_WITH_HACKED_QT */
+# endif /* !QT_MAC_USE_COCOA */
 
         ::DarwinGrabKeyboard (false);
@@ -2535,5 +2498,5 @@
         ::VBoxCocoaApplication_unsetCallback (UINT32_MAX, /** @todo fix mask */
                                               VBoxConsoleView::darwinEventHandlerProc, this);
-# elif !defined(VBOX_WITH_HACKED_QT)
+# else /* !QT_MAC_USE_COCOA */
         if (mDarwinEventHandlerRef)
         {
@@ -2541,7 +2504,5 @@
             mDarwinEventHandlerRef = NULL;
         }
-# else  /* VBOX_WITH_HACKED_QT */
-        ((QIApplication *)qApp)->setEventFilter (NULL, NULL);
-# endif /* VBOX_WITH_HACKED_QT */
+# endif /* !QT_MAC_USE_COCOA */
     }
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.h	(revision 26728)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.h	(revision 26729)
@@ -327,8 +327,8 @@
 
 #if defined(Q_WS_MAC)
-# if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)
+# ifndef QT_MAC_USE_COCOA
     /** Event handler reference. NULL if the handler isn't installed. */
     EventHandlerRef mDarwinEventHandlerRef;
-# endif
+# endif /* !QT_MAC_USE_COCOA */
     /** The current modifier key mask. Used to figure out which modifier
      *  key was pressed when we get a kEventRawKeyModifiersChanged event. */
@@ -346,13 +346,11 @@
                                                   WPARAM wParam, LPARAM lParam);
 #elif defined (Q_WS_MAC)
-# if defined (QT_MAC_USE_COCOA)
+# ifdef QT_MAC_USE_COCOA
     static bool darwinEventHandlerProc (const void *pvCocoaEvent, const
                                         void *pvCarbonEvent, void *pvUser);
-# elif !defined (VBOX_WITH_HACKED_QT)
+# else /* QT_MAC_USE_COCOA */
     static pascal OSStatus darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef,
                                                    EventRef inEvent, void *inUserData);
-# else  /* VBOX_WITH_HACKED_QT */
-    static bool macEventFilter (EventRef inEvent, void *inUserData);
-# endif /* VBOX_WITH_HACKED_QT */
+# endif /* !QT_MAC_USE_COCOA */
 #endif
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.h	(revision 26728)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.h	(revision 26729)
@@ -451,2 +451,3 @@
 
 #endif // __VBoxConsoleWnd_h__
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp	(revision 26728)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp	(revision 26729)
@@ -1,2 +1,3 @@
+/* $Id$ */
 /** @file
  *
Index: unk/src/VBox/Frontends/VirtualBox/src/extensions/QIApplication.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIApplication.h	(revision 26728)
+++ 	(revision )
@@ -1,85 +1,0 @@
-/** @file
- *
- * VBox frontends: Qt GUI ("VirtualBox"):
- * VirtualBox Qt extensions: QIApplication class declaration
- */
-
-/*
- * Copyright (C) 2006-2007 Sun Microsystems, Inc.
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
- * Clara, CA 95054 USA or visit http://www.sun.com if you need
- * additional information or have any questions.
- */
-
-#ifndef __QIApplication_h__
-#define __QIApplication_h__
-
-/* Qt includes */
-#include <QApplication>
-
-typedef bool (*QIFilterCallback)(EventRef inEvent, void *inUserArg);
-
-
-/** Sligtly modified QApplication class.
- *
- *  The sole purpose of this class (ATM) is to hook the macEventFilter
- *  in order to intercept Command-Q, Command-H and similar menu hot-keys
- *  before the HI Manager translate them into (menu) command events and
- *  start blinking menus in the menu bar.
- *
- * @remark
- *  A special hack in qeventloop_mac.cpp is required for this
- *  to work. Overloading QEventLoop::processEvents isn't feasable
- *  unfortunately, thus the horrible hacks. Qt 4 does seem to provide
- *  an interface similar to the one we create here.
- *
- *  Btw. is QI* the right right way to do this? Or should it perhapse
- *  be called VBoxQApplication or something?
- */
-class QIApplication : public QApplication
-{
-public:
-    QIApplication (int &argc, char **argv)
-        : QApplication (argc, argv)
-#ifdef Q_WS_MAC
-        , m_callback (NULL)
-        , m_callbackUserArg (NULL)
-#endif
-    {
-    }
-
-#ifdef Q_WS_MAC
-    bool macEventFilter (EventHandlerCallRef, EventRef inEvent)
-    {
-        if (    m_callback
-            &&  m_callback (inEvent, m_callbackUserArg))
-            return true;
-        return false;
-    }
-
-    void setEventFilter (QIFilterCallback callback, void *inUserArg)
-    {
-        m_callback = callback;
-        m_callbackUserArg = inUserArg;
-    }
-
-protected:
-    QIFilterCallback m_callback;
-    void *m_callbackUserArg;
-
-public:
-#endif
-};
-
-
-#endif // __QIApplication_h__
-
Index: /trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/main.cpp	(revision 26728)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/main.cpp	(revision 26729)
@@ -33,9 +33,4 @@
 #include "VBoxConsoleWnd.h"
 #include "VBoxUtils.h"
-#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
-# include "QIApplication.h"
-#else
-# define QIApplication QApplication
-#endif
 #ifdef QT_MAC_USE_COCOA
 # include "darwin/VBoxCocoaApplication.h"
@@ -340,5 +335,5 @@
     int rc = 1; /* failure */
 
-    /* scope the QIApplication variable */
+    /* scope the QApplication variable */
     {
 #ifdef Q_WS_X11
@@ -377,7 +372,7 @@
                           : NULL;
         /* Now create the application object */
-        QIApplication a (pDisplay, argc, argv, (Qt::HANDLE) pVisual);
+        QApplication a (pDisplay, argc, argv, (Qt::HANDLE) pVisual);
 #else /* Q_WS_X11 */
-        QIApplication a (argc, argv);
+        QApplication a (argc, argv);
 #endif /* Q_WS_X11 */
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 26728)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 26729)
@@ -79,8 +79,7 @@
 # ifdef QT_MAC_USE_COCOA
 #  include "darwin/VBoxCocoaApplication.h"
-# elif defined(VBOX_WITH_HACKED_QT)
-#  include "QIApplication.h"
-# endif
-# include <Carbon/Carbon.h>
+# else /* QT_MAC_USE_COCOA */
+#  include <Carbon/Carbon.h>
+# endif /* !QT_MAC_USE_COCOA */
 # include <VBox/err.h>
 #endif /* defined (Q_WS_MAC) */
@@ -274,7 +273,7 @@
 #endif
 #if defined(Q_WS_MAC)
-# if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)
+# ifndef QT_MAC_USE_COCOA
     , mDarwinEventHandlerRef (NULL)
-# endif
+# endif /* !QT_MAC_USE_COCOA */
     , mDarwinKeyModifiers (0)
     , mKeyboardGrabbed (false)
@@ -1628,5 +1627,5 @@
                                             UIMachineView::darwinEventHandlerProc, this);
 
-# elif !defined (VBOX_WITH_HACKED_QT)
+# else /* QT_MAC_USE_COCOA */
         EventTypeSpec eventTypes[6];
         eventTypes[0].eventClass = kEventClassKeyboard;
@@ -1651,8 +1650,5 @@
                                          this, &mDarwinEventHandlerRef);
         ::DisposeEventHandlerUPP(eventHandler);
-
-# else  /* VBOX_WITH_HACKED_QT */
-        ((QIApplication *)qApp)->setEventFilter(UIMachineView::macEventFilter, this);
-# endif /* VBOX_WITH_HACKED_QT */
+# endif /* !QT_MAC_USE_COCOA */
 
         ::DarwinGrabKeyboard (false);
@@ -1664,5 +1660,5 @@
         ::VBoxCocoaApplication_unsetCallback(UINT32_MAX, /** @todo fix mask */
                                              UIMachineView::darwinEventHandlerProc, this);
-# elif !defined(VBOX_WITH_HACKED_QT)
+# else /* QT_MAC_USE_COCOA */
         if (mDarwinEventHandlerRef)
         {
@@ -1670,7 +1666,5 @@
             mDarwinEventHandlerRef = NULL;
         }
-# else  /* VBOX_WITH_HACKED_QT */
-        ((QIApplication *)qApp)->setEventFilter(NULL, NULL);
-# endif /* VBOX_WITH_HACKED_QT */
+# endif /* !QT_MAC_USE_COCOA */
     }
 }
@@ -1693,5 +1687,5 @@
 
 #if defined (Q_WS_MAC)
-# if defined (QT_MAC_USE_COCOA)
+# ifdef QT_MAC_USE_COCOA
 bool UIMachineView::darwinEventHandlerProc (const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser)
 {
@@ -1715,5 +1709,5 @@
 }
 
-# elif !defined (VBOX_WITH_HACKED_QT)
+# else /* QT_MAC_USE_COCOA */
 
 pascal OSStatus UIMachineView::darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData)
@@ -1747,27 +1741,5 @@
     return ::CallNextEventHandler(inHandlerCallRef, inEvent);
 }
-
-# else /* VBOX_WITH_HACKED_QT */
-
-bool UIMachineView::macEventFilter(EventRef inEvent, void *inUserData)
-{
-    UIMachineView *view = static_cast<UIMachineView *>(inUserData);
-    UInt32 eventClass = ::GetEventClass(inEvent);
-    UInt32 eventKind = ::GetEventKind(inEvent);
-
-    /* Not sure but this seems an triggered event if the spotlight searchbar is
-     * displayed. So flag that the host key isn't pressed alone. */
-    if (eventClass == 'cgs ' && eventKind == 0x15 &&
-        view->m_bIsHostkeyPressed)
-        view->m_bIsHostkeyAlone = false;
-
-    if (eventClass == kEventClassKeyboard)
-    {
-        if (view->darwinKeyboardEvent (NULL, inEvent))
-            return true;
-    }
-    return false;
-}
-# endif /* VBOX_WITH_HACKED_QT */
+# endif /* !QT_MAC_USE_COCOA */
 
 #endif /* Q_WS_MAC */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 26728)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 26729)
@@ -161,11 +161,9 @@
     static LRESULT CALLBACK lowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam);
 #elif defined (Q_WS_MAC)
-# if defined (QT_MAC_USE_COCOA)
+# ifdef QT_MAC_USE_COCOA
     static bool darwinEventHandlerProc(const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser);
-# elif !defined (VBOX_WITH_HACKED_QT)
+# else /* QT_MAC_USE_COCOA */
     static pascal OSStatus darwinEventHandlerProc(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData);
-# else  /* VBOX_WITH_HACKED_QT */
-    static bool macEventFilter(EventRef inEvent, void *inUserData);
-# endif /* VBOX_WITH_HACKED_QT */
+# endif /* !QT_MAC_USE_COCOA */
 #endif
 
@@ -262,8 +260,8 @@
 
 #if defined(Q_WS_MAC)
-# if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)
+# ifndef QT_MAC_USE_COCOA
     /** Event handler reference. NULL if the handler isn't installed. */
     EventHandlerRef mDarwinEventHandlerRef;
-# endif
+# endif /* !QT_MAC_USE_COCOA */
     /** The current modifier key mask. Used to figure out which modifier
      *  key was pressed when we get a kEventRawKeyModifiersChanged event. */
