Changeset 71429 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 21, 2018 1:16:51 PM (7 years ago)
- 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 5 5 6 6 /* 7 * Copyright (C) 2015-201 7Oracle Corporation7 * Copyright (C) 2015-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 224 224 225 225 /* static */ 226 UIDesktopWidgetWatchdog *UIDesktopWidgetWatchdog:: m_spInstance = 0;226 UIDesktopWidgetWatchdog *UIDesktopWidgetWatchdog::s_pInstance = 0; 227 227 228 228 /* static */ … … 230 230 { 231 231 /* Make sure instance isn't created: */ 232 AssertReturnVoid(! m_spInstance);232 AssertReturnVoid(!s_pInstance); 233 233 234 234 /* Create/prepare instance: */ 235 235 new UIDesktopWidgetWatchdog; 236 AssertReturnVoid( m_spInstance);237 m_spInstance->prepare();236 AssertReturnVoid(s_pInstance); 237 s_pInstance->prepare(); 238 238 } 239 239 … … 242 242 { 243 243 /* Make sure instance is created: */ 244 AssertReturnVoid( m_spInstance);244 AssertReturnVoid(s_pInstance); 245 245 246 246 /* 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); 250 250 } 251 251 … … 253 253 { 254 254 /* Initialize instance: */ 255 m_spInstance = this;255 s_pInstance = this; 256 256 } 257 257 … … 259 259 { 260 260 /* Deinitialize instance: */ 261 m_spInstance = 0;261 s_pInstance = 0; 262 262 } 263 263 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
r70934 r71429 5 5 6 6 /* 7 * Copyright (C) 2015-201 7Oracle Corporation7 * Copyright (C) 2015-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 24 24 # include <QVector> 25 25 # include <QRect> 26 #endif /* VBOX_WS_X11 */26 #endif 27 27 28 28 /* Forward declarations: */ 29 29 class QScreen; 30 30 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. */ 34 33 class UIDesktopWidgetWatchdog : public QObject 35 34 { … … 55 54 /** Notifies about work-area recalculated for the host-screen with @a iHostScreenIndex. */ 56 55 void sigHostScreenWorkAreaRecalculated(int iHostScreenIndex); 57 #endif /* VBOX_WS_X11 */56 #endif 58 57 59 58 public: 60 59 61 60 /** Returns the static instance of the desktop-widget watchdog. */ 62 static UIDesktopWidgetWatchdog *instance() { return m_spInstance; }61 static UIDesktopWidgetWatchdog *instance() { return s_pInstance; } 63 62 64 63 /** Creates the static instance of the desktop-widget watchdog. */ … … 121 120 /** Stupid moc does not warn if it cannot find headers! */ 122 121 void QT_VERSION_NOT_DEFINED 123 #else 122 #else /* QT_VERSION != 0 */ 124 123 /** Handles @a pHostScreen adding. */ 125 124 void sltHostScreenAdded(QScreen *pHostScreen); … … 130 129 /** Handles host-screen work-area resize to passed @a availableGeometry. */ 131 130 void sltHandleHostScreenWorkAreaResized(const QRect &availableGeometry); 132 #endif 131 #endif /* QT_VERSION != 0 */ 133 132 134 133 #ifdef VBOX_WS_X11 135 134 /** Handles @a availableGeometry calculation result for the host-screen with @a iHostScreenIndex. */ 136 135 void sltHandleHostScreenAvailableGeometryCalculated(int iHostScreenIndex, QRect availableGeometry); 137 #endif /* VBOX_WS_X11 */136 #endif 138 137 139 138 private: … … 145 144 146 145 /** Holds the static instance of the desktop-widget watchdog. */ 147 static UIDesktopWidgetWatchdog * m_spInstance;146 static UIDesktopWidgetWatchdog *s_pInstance; 148 147 149 148 #ifdef VBOX_WS_X11
Note:
See TracChangeset
for help on using the changeset viewer.