Changeset 71571 in vbox
- Timestamp:
- Mar 29, 2018 1:41:24 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector
- Files:
-
- 2 edited
-
UIVirtualBoxEventHandler.cpp (modified) (6 diffs)
-
UIVirtualBoxEventHandler.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.cpp
r69500 r71571 5 5 6 6 /* 7 * Copyright (C) 2010-201 7Oracle Corporation7 * Copyright (C) 2010-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 21 21 22 22 /* GUI includes: */ 23 # include "VBoxGlobal.h" 24 # include "UIExtraDataManager.h" 25 # include "UIMainEventListener.h" 23 26 # include "UIVirtualBoxEventHandler.h" 24 # include "UIMainEventListener.h"25 # include "UIExtraDataManager.h"26 # include "VBoxGlobal.h"27 27 28 28 /* COM includes: */ … … 243 243 244 244 /* static */ 245 UIVirtualBoxEventHandler *UIVirtualBoxEventHandler:: m_spInstance = 0;245 UIVirtualBoxEventHandler *UIVirtualBoxEventHandler::s_pInstance = 0; 246 246 247 247 /* static */ 248 UIVirtualBoxEventHandler *UIVirtualBoxEventHandler::instance()249 { 250 if (! m_spInstance)251 m_spInstance = new UIVirtualBoxEventHandler;252 return m_spInstance;248 UIVirtualBoxEventHandler *UIVirtualBoxEventHandler::instance() 249 { 250 if (!s_pInstance) 251 s_pInstance = new UIVirtualBoxEventHandler; 252 return s_pInstance; 253 253 } 254 254 … … 256 256 void UIVirtualBoxEventHandler::destroy() 257 257 { 258 if ( m_spInstance)258 if (s_pInstance) 259 259 { 260 delete m_spInstance;261 m_spInstance = 0;260 delete s_pInstance; 261 s_pInstance = 0; 262 262 } 263 263 } … … 272 272 void UIVirtualBoxEventHandler::prepare() 273 273 { 274 /* Prepare : */274 /* Prepare connections: */ 275 275 prepareConnections(); 276 276 } … … 308 308 } 309 309 310 310 311 #include "UIVirtualBoxEventHandler.moc" 311 312 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.h
r69500 r71571 5 5 6 6 /* 7 * Copyright (C) 2010-201 7Oracle Corporation7 * Copyright (C) 2010-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 /* Forward declarations: */ 28 28 class UIVirtualBoxEventHandlerProxy; 29 30 29 31 30 /** Singleton QObject extension … … 59 58 public: 60 59 61 /** Returns singleton instance created by the factory. */62 static UIVirtualBoxEventHandler *instance();63 /** Destroys singleton instance created by the factory. */60 /** Returns singleton instance. */ 61 static UIVirtualBoxEventHandler *instance(); 62 /** Destroys singleton instance. */ 64 63 static void destroy(); 65 64 … … 69 68 UIVirtualBoxEventHandler(); 70 69 71 /** @name Prepare cascade. 72 * @{ */ 73 /** Prepares all. */ 74 void prepare(); 75 /** Prepares connections. */ 76 void prepareConnections(); 77 /** @} */ 70 /** Prepares all. */ 71 void prepare(); 72 /** Prepares connections. */ 73 void prepareConnections(); 78 74 79 75 private: 80 76 81 /** Holds the singleton static VirtualBox event handlerinstance. */82 static UIVirtualBoxEventHandler * m_spInstance;77 /** Holds the singleton instance. */ 78 static UIVirtualBoxEventHandler *s_pInstance; 83 79 84 80 /** Holds the VirtualBox event proxy instance. */ … … 86 82 }; 87 83 88 /** Defines the globally known name for the VirtualBox event handler instance. */84 /** Singleton VirtualBox Event Handler 'official' name. */ 89 85 #define gVBoxEvents UIVirtualBoxEventHandler::instance() 90 86
Note:
See TracChangeset
for help on using the changeset viewer.

