VirtualBox

Changeset 71429 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 21, 2018 1:16:51 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9049: Tiny cleanup for UIDesktopWidgetWatchdog.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

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

    r71102 r71429  
    55
    66/*
    7  * Copyright (C) 2015-2017 Oracle Corporation
     7 * Copyright (C) 2015-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    224224
    225225/* static */
    226 UIDesktopWidgetWatchdog *UIDesktopWidgetWatchdog::m_spInstance = 0;
     226UIDesktopWidgetWatchdog *UIDesktopWidgetWatchdog::s_pInstance = 0;
    227227
    228228/* static */
     
    230230{
    231231    /* Make sure instance isn't created: */
    232     AssertReturnVoid(!m_spInstance);
     232    AssertReturnVoid(!s_pInstance);
    233233
    234234    /* Create/prepare instance: */
    235235    new UIDesktopWidgetWatchdog;
    236     AssertReturnVoid(m_spInstance);
    237     m_spInstance->prepare();
     236    AssertReturnVoid(s_pInstance);
     237    s_pInstance->prepare();
    238238}
    239239
     
    242242{
    243243    /* Make sure instance is created: */
    244     AssertReturnVoid(m_spInstance);
     244    AssertReturnVoid(s_pInstance);
    245245
    246246    /* Cleanup/destroy instance: */
    247     m_spInstance->cleanup();
    248     delete m_spInstance;
    249     AssertReturnVoid(!m_spInstance);
     247    s_pInstance->cleanup();
     248    delete s_pInstance;
     249    AssertReturnVoid(!s_pInstance);
    250250}
    251251
     
    253253{
    254254    /* Initialize instance: */
    255     m_spInstance = this;
     255    s_pInstance = this;
    256256}
    257257
     
    259259{
    260260    /* Deinitialize instance: */
    261     m_spInstance = 0;
     261    s_pInstance = 0;
    262262}
    263263
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h

    r70934 r71429  
    55
    66/*
    7  * Copyright (C) 2015-2017 Oracle Corporation
     7 * Copyright (C) 2015-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2424# include <QVector>
    2525# include <QRect>
    26 #endif /* VBOX_WS_X11 */
     26#endif
    2727
    2828/* Forward declarations: */
    2929class QScreen;
    3030
    31 /** Singleton QObject extension used as
    32   * a desktop-widget watchdog aware
    33   * of the host-screen geometry changes. */
     31/** Singleton QObject extension used as desktop-widget
     32  * watchdog aware of the host-screen geometry changes. */
    3433class UIDesktopWidgetWatchdog : public QObject
    3534{
     
    5554    /** Notifies about work-area recalculated for the host-screen with @a iHostScreenIndex. */
    5655    void sigHostScreenWorkAreaRecalculated(int iHostScreenIndex);
    57 #endif /* VBOX_WS_X11 */
     56#endif
    5857
    5958public:
    6059
    6160    /** Returns the static instance of the desktop-widget watchdog. */
    62     static UIDesktopWidgetWatchdog *instance() { return m_spInstance; }
     61    static UIDesktopWidgetWatchdog *instance() { return s_pInstance; }
    6362
    6463    /** Creates the static instance of the desktop-widget watchdog. */
     
    121120    /** Stupid moc does not warn if it cannot find headers! */
    122121    void QT_VERSION_NOT_DEFINED
    123 #else
     122#else /* QT_VERSION != 0 */
    124123    /** Handles @a pHostScreen adding. */
    125124    void sltHostScreenAdded(QScreen *pHostScreen);
     
    130129    /** Handles host-screen work-area resize to passed @a availableGeometry. */
    131130    void sltHandleHostScreenWorkAreaResized(const QRect &availableGeometry);
    132 #endif
     131#endif /* QT_VERSION != 0 */
    133132
    134133#ifdef VBOX_WS_X11
    135134    /** Handles @a availableGeometry calculation result for the host-screen with @a iHostScreenIndex. */
    136135    void sltHandleHostScreenAvailableGeometryCalculated(int iHostScreenIndex, QRect availableGeometry);
    137 #endif /* VBOX_WS_X11 */
     136#endif
    138137
    139138private:
     
    145144
    146145    /** Holds the static instance of the desktop-widget watchdog. */
    147     static UIDesktopWidgetWatchdog *m_spInstance;
     146    static UIDesktopWidgetWatchdog *s_pInstance;
    148147
    149148#ifdef VBOX_WS_X11
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