VirtualBox

Ignore:
Timestamp:
Mar 2, 2022 9:04:24 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: qt6: Just disable VBOX_DARWIN_USE_NATIVE_CONTROLS for arm64 for now, as qt6 doesn't have QMacCocoaViewContainer and the workaround requires some code restructuring (TODO for later). There is no MacExtras module in qt6, so disable that in the Makefile. bugref:9898

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
3 edited

Legend:

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

    r94064 r94067  
    115115VirtualBox_DEFS.darwin    += VBOX_WITH_TRANSLUCENT_SEAMLESS # VBOX_WITH_MASKED_SEAMLESS
    116116VirtualBox_DEFS.win       += VBOX_WITH_MASKED_SEAMLESS # VBOX_WITH_TRANSLUCENT_SEAMLESS
    117 VirtualBox_DEFS.darwin    += VBOX_DARWIN_USE_NATIVE_CONTROLS
     117ifn1of ($(KBUILD_TARGET_ARCH), arm64) # qt6: The UICocoaSpecialControls needs restructuring because QMacCocoaViewContainer is gone. Too lazy for now.
     118 VirtualBox_DEFS.darwin   += VBOX_DARWIN_USE_NATIVE_CONTROLS
     119endif
    118120VirtualBox_DEFS.win       += UNICODE QT_DLL
    119121VirtualBox_DEFS           += \
     
    175177VirtualBoxVM_DEFS.darwin    += VBOX_WITH_TRANSLUCENT_SEAMLESS # VBOX_WITH_MASKED_SEAMLESS
    176178VirtualBoxVM_DEFS.win       += VBOX_WITH_MASKED_SEAMLESS # VBOX_WITH_TRANSLUCENT_SEAMLESS
    177 VirtualBoxVM_DEFS.darwin    += \
    178         VBOX_DARWIN_USE_NATIVE_CONTROLS \
    179         $(if $(VBOX_WITH_VMNET),VBOX_WITH_VMNET)
     179ifdef VBOX_WITH_VMNET
     180 VirtualBoxVM_DEFS.darwin   += VBOX_WITH_VMNET
     181endif
     182ifn1of ($(KBUILD_TARGET_ARCH), arm64) # qt6: The UICocoaSpecialControls needs restructuring because QMacCocoaViewContainer is gone. Too lazy for now.
     183 VirtualBoxVM_DEFS.darwin   += VBOX_DARWIN_USE_NATIVE_CONTROLS
     184endif
    180185VirtualBoxVM_DEFS.win       += UNICODE QT_DLL
    181186VirtualBoxVM_DEFS           += \
     
    230235UICommon_DEFS.win     = VBOX_WS_WIN
    231236UICommon_DEFS.debug   = VBOX_CHECK_STATE # QT_FATAL_ASSERT
    232 UICommon_DEFS.darwin  += \
    233         VBOX_DARWIN_USE_NATIVE_CONTROLS \
    234         $(if $(VBOX_WITH_VMNET),VBOX_WITH_VMNET)
     237ifdef VBOX_WITH_VMNET
     238 UICommon_DEFS.darwin += VBOX_WITH_VMNET
     239endif
     240ifn1of ($(KBUILD_TARGET_ARCH), arm64) # qt6: The UICocoaSpecialControls needs restructuring because QMacCocoaViewContainer is gone. Too lazy for now.
     241 UICommon_DEFS.darwin += VBOX_DARWIN_USE_NATIVE_CONTROLS
     242endif
    235243#UICommon_DEFS.win     += UNICODE QT_DLL
    236244UICommon_DEFS         += \
     
    15831591 VirtualBox_QT_MODULES.solaris += X11Extras
    15841592 VirtualBox_QT_MODULES.freebsd += X11Extras
    1585 endif
    1586 VirtualBox_QT_MODULES.darwin  += MacExtras
     1593 VirtualBox_QT_MODULES.darwin  += MacExtras
     1594endif
    15871595VirtualBox_QT_MODULES.win     += WinExtras
    15881596ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
     
    16041612 VirtualBoxVM_QT_MODULES.solaris += X11Extras
    16051613 VirtualBoxVM_QT_MODULES.freebsd += X11Extras
    1606 endif
    1607 VirtualBoxVM_QT_MODULES.darwin  += MacExtras
     1614 VirtualBoxVM_QT_MODULES.darwin  += MacExtras
     1615endif
    16081616VirtualBoxVM_QT_MODULES.win     += WinExtras
    16091617ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
     
    16361644UICommon_QT_MODULES.freebsd  += DBus
    16371645UICommon_QT_MODULES.freebsd  += Xml
    1638 UICommon_QT_MODULES.darwin   += MacExtras
     1646ifndef VBOX_WITH_QT6
     1647 UICommon_QT_MODULES.darwin  += MacExtras
     1648endif
    16391649UICommon_QT_MODULES.win      += WinExtras
    16401650
     
    19611971 tstDarwinKeyboard_SOURCES = \
    19621972        src/platform/darwin/tstDarwinKeyboard.cpp \
    1963         src/platform/darwin/DarwinKeyboard.cpp
    1964  tstDarwinKeyboard_SOURCES.amd64 = \
     1973        src/platform/darwin/DarwinKeyboard.cpp \
    19651974        src/platform/darwin/CocoaEventHelper.mm
    19661975 tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h

    r93115 r94067  
    2121# pragma once
    2222#endif
     23#ifdef VBOX_DARWIN_USE_NATIVE_CONTROLS
    2324
    2425/* Qt includes: */
    25 #include <QMacCocoaViewContainer>
    2626#include <QWidget>
     27#ifndef VBOX_IS_QT6_OR_LATER
     28# include <QMacCocoaViewContainer>
     29#endif
    2730
    2831/* GUI includes: */
     
    3538/** QMacCocoaViewContainer extension,
    3639  * used as cocoa button container. */
    37 class SHARED_LIBRARY_STUFF UICocoaButton : public QMacCocoaViewContainer
     40class SHARED_LIBRARY_STUFF UICocoaButton
     41#ifdef VBOX_IS_QT6_OR_LATER
     42    : public QWidget
     43#else
     44    : public QMacCocoaViewContainer
     45#endif
    3846{
    3947    Q_OBJECT
     
    7785};
    7886
     87#endif /* VBOX_DARWIN_USE_NATIVE_CONTROLS */
    7988#endif /* !FEQT_INCLUDED_SRC_platform_darwin_UICocoaSpecialControls_h */
    8089
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm

    r93115 r94067  
    1515 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1616 */
     17
     18#ifdef VBOX_DARWIN_USE_NATIVE_CONTROLS
    1719
    1820/* Qt includes: */
     
    164166}
    165167
     168#endif /* VBOX_DARWIN_USE_NATIVE_CONTROLS */
     169
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