VirtualBox

Changeset 87682 in vbox


Ignore:
Timestamp:
Feb 10, 2021 12:40:58 PM (4 years ago)
Author:
vboxsync
Message:

VBoxDbg: bugref:9532: Qt 5.15.2 migration: Replacing QDesktopWidget::availableGeometry with QScreen::availableGeometry since former is obsolete; Doing that selectively cause new API is available since Qt 5.10 only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/VBoxDbgGui.cpp

    r87679 r87682  
    2626
    2727#include "VBoxDbgGui.h"
    28 #include <QDesktopWidget>
     28#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
     29# include <QScreen>
     30#else
     31# include <QDesktopWidget>
     32#endif
    2933#include <QApplication>
    3034
     
    225229{
    226230    QRect Rct(0, 0, 1600, 1200);
     231#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
     232    QScreen *pScreen = QApplication::screenAt(QPoint(m_x, m_y));
     233    if (pScreen)
     234        Rct = pScreen->availableGeometry();
     235#else
    227236    QDesktopWidget *pDesktop = QApplication::desktop();
    228237    if (pDesktop)
    229238        Rct = pDesktop->availableGeometry(QPoint(m_x, m_y));
     239#endif
    230240    m_xDesktop = Rct.x();
    231241    m_yDesktop = Rct.y();
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