VirtualBox

Changeset 63175 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 8, 2016 2:53:39 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109793
Message:

FE/Qt: bugref:8422: Desktop-widget watchdog rework (part 14): Continue moving desktop related stuff to desktop-widget watchdog rails (s.a. r109666).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp

    r63173 r63175  
    166166int UIDesktopWidgetWatchdog::screenNumber(const QWidget *pWidget) const
    167167{
    168     /* Redirect call to QDesktopWidget: */
     168    /* Redirect call to desktop-widget: */
    169169    return QApplication::desktop()->screenNumber(pWidget);
    170170}
     
    172172int UIDesktopWidgetWatchdog::screenNumber(const QPoint &point) const
    173173{
    174     /* Redirect call to QDesktopWidget: */
     174    /* Redirect call to desktop-widget: */
    175175    return QApplication::desktop()->screenNumber(point);
    176176}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r63162 r63175  
    2424# include <QToolTip>
    2525# include <QTranslator>
    26 # include <QDesktopWidget>
    2726# if QT_VERSION >= 0x050000
    2827#  include <QStandardPaths>
     
    26002599    {
    26012600        w = w->window();
    2602         deskGeo = QApplication::desktop()->availableGeometry (w);
     2601        deskGeo = gpDesktop->availableGeometry (w);
    26032602        parentGeo = w->frameGeometry();
    26042603        /* On X11/Gnome, geo/frameGeo.x() and y() are always 0 for top level
     
    26112610    else
    26122611    {
    2613         deskGeo = QApplication::desktop()->availableGeometry();
     2612        deskGeo = gpDesktop->availableGeometry();
    26142613        parentGeo = deskGeo;
    26152614    }
     
    28792878quint64 VBoxGlobal::requiredVideoMemory(const QString &strGuestOSTypeId, int cMonitors /* = 1 */)
    28802879{
    2881     QDesktopWidget *pDW = QApplication::desktop();
    28822880    /* We create a list of the size of all available host monitors. This list
    28832881     * is sorted by value and by starting with the biggest one, we calculate
     
    28862884     * open the guest windows, this is the best assumption we can do, cause it
    28872885     * is the worst case. */
    2888     const int cHostScreens = pDW->screenCount();
     2886    const int cHostScreens = gpDesktop->screenCount();
    28892887    QVector<int> screenSize(qMax(cMonitors, cHostScreens), 0);
    28902888    for (int i = 0; i < cHostScreens; ++i)
    28912889    {
    2892         QRect r = pDW->screenGeometry(i);
     2890        QRect r = gpDesktop->screenGeometry(i);
    28932891        screenSize[i] = r.width() * r.height();
    28942892    }
  • trunk/src/VBox/Frontends/VirtualBox/src/precomp.h

    r62679 r63175  
    5454#include <QDateTime>
    5555#include <QDesktopServices>
    56 #include <QDesktopWidget>
     56//#include <QDesktopWidget> -  only used once
    5757#include <QDialog>
    5858#include <QDialogButtonBox>
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r63054 r63175  
    2121
    2222/* Qt includes: */
    23 # include <QDesktopWidget>
    2423# include <QMainWindow>
    2524# include <QPainter>
     
    804803{
    805804    /* Desktop resolution change (e.g. monitor hotplug): */
    806     connect(QApplication::desktop(), SIGNAL(resized(int)), this,
     805    connect(gpDesktop, SIGNAL(sigHostScreenResized(int)), this,
    807806            SLOT(sltDesktopResized()));
    808807    /* Scale-factor change: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r63054 r63175  
    2121
    2222/* Qt includes: */
    23 # include <QDesktopWidget>
    2423# include <QMouseEvent>
    2524# include <QTimer>
     
    882881            m_lastMousePos = globalPos;
    883882#else /* VBOX_WS_WIN */
    884         int iWe = QApplication::desktop()->width() - 1;
    885         int iHe = QApplication::desktop()->height() - 1;
     883        int iWe = gpDesktop->overallDesktopWidth() - 1;
     884        int iHe = gpDesktop->overallDesktopHeight() - 1;
    886885        QPoint p = globalPos;
    887886        if (globalPos.x() == 0)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r63054 r63175  
    2323# include <QApplication>
    2424# include <QBitmap>
    25 # include <QDesktopWidget>
    2625# include <QWidget>
    2726# ifdef VBOX_WS_MAC
     
    11261125#else /* !VBOX_WS_MAC */
    11271126    /* Install Qt display reconfiguration callbacks: */
    1128     connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)),
     1127    connect(gpDesktop, SIGNAL(sigHostScreenCountChanged(int)),
    11291128            this, SLOT(sltHandleHostScreenCountChange()));
    1130     connect(QApplication::desktop(), SIGNAL(resized(int)),
     1129    connect(gpDesktop, SIGNAL(sigHostScreenResized(int)),
    11311130            this, SLOT(sltHandleHostScreenGeometryChange()));
    1132     connect(QApplication::desktop(), SIGNAL(workAreaResized(int)),
     1131    connect(gpDesktop, SIGNAL(sigHostScreenWorkAreaResized(int)),
    11331132            this, SLOT(sltHandleHostScreenAvailableAreaChange()));
    11341133#endif /* !VBOX_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r63054 r63175  
    2929# if QT_VERSION >= 0x050000
    3030#  include <QStandardPaths>
    31 #  ifdef VBOX_WS_X11
    32 #   include <QDesktopWidget>
    33 #  endif /* VBOX_WS_X11 */
    3431# else /* QT_VERSION < 0x050000 */
    3532#  include <QDesktopServices>
     
    17261723#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
    17271724    /* Desktop event handlers: */
    1728     connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(sltHandleHostScreenAvailableAreaChange()));
     1725    connect(gpDesktop, SIGNAL(sigHostScreenWorkAreaResized(int)), this, SLOT(sltHandleHostScreenAvailableAreaChange()));
    17291726#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
    17301727
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r63054 r63175  
    3030# include <QStateMachine>
    3131# include <QPainter>
    32 # include <QDesktopWidget>
    3332# ifdef VBOX_WS_WIN
    3433#  include <QWindow>
     
    637636
    638637    /* Get corresponding host-screen: */
    639     const int iHostScreen = QApplication::desktop()->screenNumber(parentWidget());
     638    const int iHostScreen = gpDesktop->screenNumber(parentWidget());
    640639    Q_UNUSED(iHostScreen);
    641640    /* And corresponding working area: */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette