VirtualBox

Changeset 94064 in vbox for trunk/src


Ignore:
Timestamp:
Mar 2, 2022 3:49:12 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: qt6: Seems MOC doesn't grok #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) and similar, so define VBOX_IS_QT6_OR_LATER when using 6.0+ and test using #ifdef/#ifndef. bugref:9898

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

Legend:

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

    r94002 r94064  
    101101VirtualBox_SDKS.win       = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
    102102VirtualBox_DEFS           =
     103ifdef VBOX_WITH_QT6 # moc is too stupid to parse #if QT_VERSION > xxx, '#ifdef VBOX_IS_QT6_OR_LATER' works though (no spaces).
     104 VirtualBox_DEFS         += VBOX_IS_QT6_OR_LATER
     105endif
    103106VirtualBox_DEFS.debug     = VBOX_CHECK_STATE # QT_FATAL_ASSERT
    104107VirtualBox_DEFS.linux     = VBOX_WS_X11 QT_NO_DEPRECATED_WARNINGS
     
    157160VirtualBoxVM_DEPS           = $(UICommon_0_OUTDIR)/include/COMWrappers
    158161VirtualBoxVM_SDKS.win       = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
    159 VirtualBoxVM_DEFS           += VBOX_RUNTIME_UI
     162VirtualBoxVM_DEFS           = VBOX_RUNTIME_UI
     163ifdef VBOX_WITH_QT6 # moc is too stupid to parse #if QT_VERSION > xxx, '#ifdef VBOX_IS_QT6_OR_LATER' works though (no spaces).
     164 VirtualBoxVM_DEFS         += VBOX_IS_QT6_OR_LATER
     165endif
    160166VirtualBoxVM_DEFS.debug     = VBOX_CHECK_STATE # QT_FATAL_ASSERT
    161167VirtualBoxVM_DEFS.linux     = VBOX_WS_X11 QT_NO_DEPRECATED_WARNINGS
     
    214220UICommon_TEMPLATE = VBOXQTGUI
    215221UICommon_NAME = UICommon
    216 UICommon_DEFS         =
    217 UICommon_DEFS        += VBOX_GUI_LIBRARY
     222UICommon_DEFS         = VBOX_GUI_LIBRARY
     223ifdef VBOX_WITH_QT6 # moc is too stupid to parse #if QT_VERSION > xxx, '#ifdef VBOX_IS_QT6_OR_LATER' works though (no spaces).
     224 UICommon_DEFS       += VBOX_IS_QT6_OR_LATER
     225endif
    218226UICommon_DEFS.darwin  = VBOX_WS_MAC
    219227UICommon_DEFS.freebsd = VBOX_WS_X11
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/UIMonitorCommon.h

    r93984 r94064  
    2727    UIDebuggerMetricData()
    2828        : m_counter(0){}
    29 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     29#ifdef VBOX_IS_QT6_OR_LATER
    3030    UIDebuggerMetricData(const QStringView &strName, quint64 counter)
    3131#else
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.cpp

    r94042 r94064  
    398398            connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
    399399                    this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated));
    400 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textActivated was added in 5.14 actually */
     400#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: textActivated was added in 5.14 actually */
    401401            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::textActivated),
    402402                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textActivated));
     
    407407            connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    408408                    this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged));
    409 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
     409#ifndef VBOX_IS_QT6_OR_LATER
    410410            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
    411411                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::currentIndexChanged));
     
    413413            connect(m_pComboBox, &QComboBox::currentTextChanged, this, &QIComboBox::currentTextChanged);
    414414            connect(m_pComboBox, &QComboBox::editTextChanged, this, &QIComboBox::editTextChanged);
    415 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */
     415#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: textHighlighted was added in 5.14 actually */
    416416            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::textHighlighted),
    417417                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textHighlighted));
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.h

    r94042 r94064  
    4343    void activated(int iIndex);
    4444    /** Notifies listeners about user chooses an item with @a strText in the combo-box. */
    45 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */
     45#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: textHighlighted was added in 5.14 actually */
    4646    void textActivated(const QString &strText);
    4747#else
     
    5151    /** Notifies listeners about current item changed to item with @a iIndex. */
    5252    void currentIndexChanged(int iIndex);
    53 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
     53#ifndef VBOX_IS_QT6_OR_LATER
    5454    /** Notifies listeners about current item changed to item with @a strText. */
    5555    void currentIndexChanged(const QString &strText);
     
    6464    void highlighted(int iIndex);
    6565    /** Notifies listeners about user highlighted an item with @a strText in the popup list-view. */
    66 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */
     66#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: textHighlighted was added in 5.14 actually */
    6767    void textHighlighted(const QString &strText);
    6868#else
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp

    r94025 r94064  
    4747            AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
    4848            /* For touch-screen event we have something special: */
    49 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     49#ifdef VBOX_IS_QT6_OR_LATER
    5050            if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen)
    5151#else
     
    6868            AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
    6969            /* For touch-screen event we have something special: */
    70 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     70#ifdef VBOX_IS_QT6_OR_LATER
    7171            if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen)
    7272#else
     
    9595            AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
    9696            /* For touch-screen event we have something special: */
    97 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     97#ifdef VBOX_IS_QT6_OR_LATER
    9898            if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen)
    9999#else
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r93998 r94064  
    12881288
    12891289            /* Get the name of the current element: */
    1290 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     1290#ifdef VBOX_IS_QT6_OR_LATER
    12911291            const QStringView strElementName = stream.name();
    12921292#else
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r94019 r94064  
    222222{
    223223    /* Make sure QApplication cleanup us on exit: */
    224 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
     224#ifndef VBOX_IS_QT6_OR_LATER
    225225    qApp->setFallbackSessionManagementEnabled(false);
    226226#endif
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp

    r94026 r94064  
    1818/* Qt includes: */
    1919#include <QApplication>
    20 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
     20#ifndef VBOX_IS_QT6_OR_LATER
    2121# include <QDesktopWidget>
    2222#endif
     
    287287int UIDesktopWidgetWatchdog::overallDesktopWidth() const
    288288{
    289 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     289#ifdef VBOX_IS_QT6_OR_LATER
    290290    /** @todo bird: Not sure if this is entirely correct. */
    291291    return QGuiApplication::primaryScreen()->geometry().width();
     
    298298int UIDesktopWidgetWatchdog::overallDesktopHeight() const
    299299{
    300 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     300#ifdef VBOX_IS_QT6_OR_LATER
    301301    /** @todo bird: Not sure if this is entirely correct. */
    302302    return QGuiApplication::primaryScreen()->geometry().height();
     
    309309int UIDesktopWidgetWatchdog::screenCount() const
    310310{
    311 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     311#ifdef VBOX_IS_QT6_OR_LATER
    312312    return QGuiApplication::screens().size();
    313313#else
     
    317317}
    318318
    319 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     319#ifdef VBOX_IS_QT6_OR_LATER
    320320
    321321/** Helper for generating qt5 screen indexes as best as we can. */
     
    352352}
    353353
    354 #endif
     354#endif /* VBOX_IS_QT6_OR_LATER */
    355355
    356356int UIDesktopWidgetWatchdog::primaryScreen() const
    357357{
    358 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     358#ifdef VBOX_IS_QT6_OR_LATER
    359359    return screenToIndex(QGuiApplication::primaryScreen());
    360360#else
     
    366366int UIDesktopWidgetWatchdog::screenNumber(const QWidget *pWidget) const
    367367{
    368 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     368#ifdef VBOX_IS_QT6_OR_LATER
    369369    if (pWidget)
    370370        return screenToIndex(pWidget->screen());
     
    378378int UIDesktopWidgetWatchdog::screenNumber(const QPoint &point) const
    379379{
    380 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     380#ifdef VBOX_IS_QT6_OR_LATER
    381381    return screenToIndex(QGuiApplication::screenAt(point));
    382382#else
     
    388388const QRect UIDesktopWidgetWatchdog::screenGeometry(int iHostScreenIndex /* = -1 */) const
    389389{
    390 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     390#ifdef VBOX_IS_QT6_OR_LATER
    391391    return indexToScreen(iHostScreenIndex)->geometry();
    392392#else
     
    415415const QRect UIDesktopWidgetWatchdog::availableGeometry(int iHostScreenIndex /* = -1 */) const
    416416{
    417 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     417#ifdef VBOX_IS_QT6_OR_LATER
    418418    /** @todo needs X11 work, see 5.x version of code! */
    419419    return indexToScreen(iHostScreenIndex)->availableGeometry();
     
    446446const QRect UIDesktopWidgetWatchdog::availableGeometry(const QWidget *pWidget) const
    447447{
    448 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     448#ifdef VBOX_IS_QT6_OR_LATER
    449449    if (pWidget && pWidget->screen())
    450450        return pWidget->screen()->availableGeometry();
     
    458458const QRect UIDesktopWidgetWatchdog::availableGeometry(const QPoint &point) const
    459459{
    460 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     460#ifdef VBOX_IS_QT6_OR_LATER
    461461    QScreen *pScreen = QGuiApplication::screenAt(point);
    462462    if (pScreen)
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp

    r94042 r94064  
    291291    if (m_pHistoryComboBox)
    292292    {
    293 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     293#ifdef VBOX_IS_QT6_OR_LATER
    294294        disconnect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
    295295                   this, &UIFileManagerNavigationWidget::sltHandlePathChange);
     
    338338            connect(m_pHistoryComboBox, &UIFileManagerHistoryComboBox::sigHidePopup,
    339339                    this, &UIFileManagerNavigationWidget::sltHandleHidePopup);
    340 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     340#ifdef VBOX_IS_QT6_OR_LATER
    341341            connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
    342342                    this, &UIFileManagerNavigationWidget::sltHandlePathChange);
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp

    r94032 r94064  
    191191    void sigOpenLinkInNewTab(const QUrl &url, bool fBackground);
    192192    void sigAddBookmark(const QUrl &url, const QString &strTitle);
    193 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     193#ifdef VBOX_IS_QT6_OR_LATER
    194194    void sigLinkHighlighted(const QUrl &url);
    195195#else
     
    275275    /** list.first is tab title and list.second is tab's index. */
    276276    void sigTabsListChanged(const QStringList &titleList);
    277 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     277#ifdef VBOX_IS_QT6_OR_LATER
    278278    void sigLinkHighlighted(const QUrl &url);
    279279#else
     
    716716    connect(m_pContentViewer, &UIHelpViewer::sigAddBookmark,
    717717            this, &UIHelpBrowserTab::sltAddBookmarkAction);
    718 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     718#ifdef VBOX_IS_QT6_OR_LATER
    719719    connect(m_pContentViewer, static_cast<void(UIHelpViewer::*)(const QUrl&)>(&UIHelpViewer::highlighted),
    720720            this, &UIHelpBrowserTab::sigLinkHighlighted);
     
    19481948}
    19491949
    1950 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     1950#ifdef VBOX_IS_QT6_OR_LATER
    19511951void UIHelpBrowserWidget::sltLinkHighlighted(const QUrl &url)
    19521952{
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h

    r94032 r94064  
    110110    void sltFindPreviousInPage();
    111111    void sltHistoryChanged(bool fBackwardAvailable, bool fForwardAvailable);
    112 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     112#ifdef VBOX_IS_QT6_OR_LATER
    113113    void sltLinkHighlighted(const QUrl &url);
    114114#else
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp

    r94032 r94064  
    412412}
    413413
    414 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     414#ifdef VBOX_IS_QT6_OR_LATER
    415415void UIHelpViewer::doSetSource(const QUrl &url, QTextDocument::ResourceType type)
    416416#else
     
    419419{
    420420    clearOverlay();
    421 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     421#ifdef VBOX_IS_QT6_OR_LATER
    422422    QTextBrowser::doSetSource(url, type);
    423423#else
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.h

    r94032 r94064  
    7171    virtual QVariant loadResource(int type, const QUrl &name) RT_OVERRIDE;
    7272    void emitHistoryChangedSignal();
    73 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /* must override doSetSource in 6.0 */
     73#ifndef VBOX_IS_QT6_OR_LATER /* must override doSetSource in 6.0 */
    7474    virtual void setSource(const QUrl &url) RT_OVERRIDE;
    7575#endif
     
    102102    virtual bool eventFilter(QObject *pObject, QEvent *pEvent) RT_OVERRIDE;
    103103    virtual void keyPressEvent(QKeyEvent *pEvent) RT_OVERRIDE;
    104 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     104#ifdef VBOX_IS_QT6_OR_LATER
    105105    virtual void doSetSource(const QUrl &url, QTextDocument::ResourceType type = QTextDocument::UnknownResource) RT_OVERRIDE;
    106106#endif
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UICloudEntityKey.h

    r94046 r94064  
    5858};
    5959
    60 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     60#ifdef VBOX_IS_QT6_OR_LATER
    6161inline size_t qHash(const UICloudEntityKey &key, size_t uSeed)
    6262#else
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r94029 r94064  
    429429
    430430    /* If we have at least one of those items currently selected: */
    431 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     431#ifdef VBOX_IS_QT6_OR_LATER
    432432    {
    433433        QList<UIChooserItem *> selectedItemsList = selectedItems();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp

    r93996 r94064  
    1818/* Qt includes: */
    1919#include <qglobal.h>
    20 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     20#ifdef VBOX_IS_QT6_OR_LATER
    2121# include <QRegularExpression>
    2222#else
     
    231231        else
    232232        {
    233 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /* fromWildcard is 6.0+ */
     233#ifdef VBOX_IS_QT6_OR_LATER /* fromWildcard is 6.0+ */
    234234            QRegularExpression searchRegEx = QRegularExpression::fromWildcard(strSearchTerm, Qt::CaseInsensitive);
    235235#else
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/UIDesktopServices_x11.cpp

    r94036 r94064  
    3535        const QString strVBox = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "/" + VBOX_GUI_VMRUNNER_IMAGE);
    3636        QTextStream out(&link);
    37 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /* defaults to UTF-8 in qt6 */
     37#ifndef VBOX_IS_QT6_OR_LATER /* defaults to UTF-8 in qt6 */
    3838        out.setCodec("UTF-8");
    3939#endif
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp

    r94013 r94064  
    2424#include <QtXml/QDomElement>
    2525#include <QWidget>
    26 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     26#ifdef VBOX_IS_QT6_OR_LATER
    2727# include <QGuiApplication>
    2828#else
     
    658658Display *NativeWindowSubsystem::X11GetDisplay(void)
    659659{
    660 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     660#ifdef VBOX_IS_QT6_OR_LATER
    661661    Display *pDisplay = nullptr;
    662662    if (qApp)
     
    675675xcb_connection_t *NativeWindowSubsystem::X11GetConnection(void)
    676676{
    677 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     677#ifdef VBOX_IS_QT6_OR_LATER
    678678    if (qApp)
    679679    {
     
    690690uint32_t NativeWindowSubsystem::X11GetAppRootWindow(void)
    691691{
    692 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     692#ifdef VBOX_IS_QT6_OR_LATER
    693693    Window idWindow = 0;
    694694    Display *pDisplay = NativeWindowSubsystem::X11GetDisplay();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r94035 r94064  
    17431743        {
    17441744            /* Send prepared scan-codes to the guest: */
    1745 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     1745#ifdef VBOX_IS_QT6_OR_LATER
    17461746            QVector<LONG> scancodes;
    17471747            for (uint i = 0; i < uCodesCount; i++)
     
    17741774    Q_UNUSED(iHotKey);
    17751775    if (pHotKey && pHotKey[0] && !pHotKey[1])
    1776 # if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     1776# ifdef VBOX_IS_QT6_OR_LATER
    17771777        fWasProcessed = actionPool()->processHotKey(QKeySequence(QChar(pHotKey[0]).toUpper().unicode()));
    17781778# else
     
    18121812        {
    18131813            QChar qtSymbol = QString::fromLocal8Bit(&symbol, 1)[0];
    1814 # if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     1814# ifdef VBOX_IS_QT6_OR_LATER
    18151815            fWasProcessed = actionPool()->processHotKey(QKeySequence(qtSymbol.toUpper().unicode()));
    18161816# else
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r94034 r94064  
    103103
    104104    /** Redirects all the native events to parent. */
    105 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     105#ifdef VBOX_IS_QT6_OR_LATER
    106106    bool nativeEventFilter(const QByteArray &eventType, void *pMessage, qintptr * /* pResult */)
    107107#else
     
    806806        updateMousePointerPixmapScaling(pixmapShape, uXHot, uYHot);
    807807        /// @todo updateMousePointerPixmapScaling(pixmapMask, uXHot, uYHot);
    808 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: this is probably inefficient */
     808#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: this is probably inefficient */
    809809        m_cursor = QCursor(QBitmap(pixmapShape), QBitmap(pixmapMask), uXHot, uYHot);
    810810#else
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r94024 r94064  
    758758                     * guest mouse device at all: */
    759759                    int iDelta = 0;
    760 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     760#ifdef VBOX_IS_QT6_OR_LATER
    761761                    Qt::Orientation const enmOrientation = RT_ABS(pWheelEvent->pixelDelta().x())
    762762                                                         > RT_ABS(pWheelEvent->pixelDelta().y()) ? Qt::Horizontal : Qt::Vertical;
     
    774774                    }
    775775                    if (mouseEvent(pWheelEvent->type(), uScreenId,
    776 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo .... */
     776#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: ... */
    777777                                   pWheelEvent->position().toPoint(), pWheelEvent->globalPosition().toPoint(),
    778778#else
     
    788788#endif /* !VBOX_WS_MAC */
    789789                                   iDelta,
    790 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     790#ifdef VBOX_IS_QT6_OR_LATER
    791791                                   enmOrientation)
    792792#else
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp

    r94022 r94064  
    747747                fnt.setPointSize(11);
    748748                fnt.setBold(true);
    749 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     749#ifdef VBOX_IS_QT6_OR_LATER
    750750                fnt.setWeight(QFont::ExtraBold);
    751751#else
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHostComboEditor.cpp

    r94033 r94064  
    8383
    8484    /** Handles all native events. */
     85# ifdef VBOX_IS_QT6_OR_LATER
     86    virtual bool nativeEventFilter(const QByteArray &eventType, void *pMessage, qintptr *pResult) RT_OVERRIDE
     87# else
    8588    virtual bool nativeEventFilter(const QByteArray &eventType, void *pMessage, long *pResult) RT_OVERRIDE
     89# endif
    8690    {
    8791        /* Redirect event to parent: */
     
    620624}
    621625
    622 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     626#ifdef VBOX_IS_QT6_OR_LATER
    623627bool UIHostComboEditorPrivate::nativeEvent(const QByteArray &eventType, void *pMessage, qintptr *pResult)
    624628#else
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHostComboEditor.h

    r94033 r94064  
    191191
    192192    /** Handles native events. */
    193 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     193#ifdef VBOX_IS_QT6_OR_LATER
    194194    virtual bool nativeEvent(const QByteArray &eventType, void *pMessage, qintptr *pResult) RT_OVERRIDE;
    195195#else
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UITabBar.cpp

    r94000 r94064  
    114114    virtual void mouseMoveEvent(QMouseEvent *pEvent) RT_OVERRIDE;
    115115    /** Handles mouse-enter @a pEvent. */
    116 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     116#ifdef VBOX_IS_QT6_OR_LATER
    117117    virtual void enterEvent(QEnterEvent *pEvent) RT_OVERRIDE;
    118118#else
     
    579579}
    580580
    581 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     581#ifdef VBOX_IS_QT6_OR_LATER
    582582void UITabBarItem::enterEvent(QEnterEvent *pEvent)
    583583#else
     
    603603    if (!m_fHovered)
    604604    {
    605 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: Code duplication of enterEvent; split out in separate method (complete wast of time to cook up a QEnterEvent here). */
     605#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: Code duplication of enterEvent; split out in separate method (complete wast of time to cook up a QEnterEvent here). */
    606606# ifdef VBOX_WS_MAC
    607607        m_pLayoutStacked->setCurrentWidget(m_pButtonClose);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp

    r94052 r94064  
    626626
    627627    setMediumFormat(m_formatList[0].m_comFormat);
    628 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     628#ifdef VBOX_IS_QT6_OR_LATER
    629629    connect(m_pFormatButtonGroup, static_cast<void(QButtonGroup::*)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
    630630            this, &UIDiskFormatsGroupBox::sigMediumFormatChanged);
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