VirtualBox

Changeset 106354 in vbox


Ignore:
Timestamp:
Oct 16, 2024 11:40:22 AM (4 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10407. Check Qt version before using QWaylandApplication struct as it is introduced in Qt 6.5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp

    r106349 r106354  
    6565    if (pX11App)
    6666        return VBGHDISPLAYSERVERTYPE_X11;
     67#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
    6768    QNativeInterface::QWaylandApplication *pWaylandApp = qApp->nativeInterface<QNativeInterface::QWaylandApplication>();
    6869    if (pWaylandApp)
    6970        return VBGHDISPLAYSERVERTYPE_PURE_WAYLAND;
     71#else
     72    if (QGuiApplication::platformName().contains("wayland", Qt::CaseInsensitive))
     73        return VBGHDISPLAYSERVERTYPE_PURE_WAYLAND;
     74#endif
    7075    return VBGHDISPLAYSERVERTYPE_NONE;
    7176}
     
    9196bool NativeWindowSubsystem::WaylandIsCompositingManagerRunning()
    9297{
     98#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
    9399    QNativeInterface::QWaylandApplication *pWaylandApp = qApp->nativeInterface<QNativeInterface::QWaylandApplication>();
    94100    if (pWaylandApp)
     
    97103            return true;
    98104    }
     105#endif
    99106    return false;
    100107}
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