Changeset 35722 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 26, 2011 4:37:16 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69665
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtraDataEventHandler.cpp
r34527 r35722 252 252 // RTPrintf("Self add: %RTthrd\n", RTThreadSelf()); 253 253 const CVirtualBox &vbox = vboxGlobal().virtualBox(); 254 UIMainEventListenerImpl *pListener = new UIMainEventListenerImpl(this); 254 ComObjPtr<UIMainEventListenerImpl> pListener; 255 pListener.createObject(); 256 pListener->init(new UIMainEventListener(), this); 255 257 m_mainEventListener = CEventListener(pListener); 256 258 QVector<KVBoxEventType> events; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r34527 r35722 25 25 //#include <iprt/stream.h> 26 26 27 UIMainEventListener::UIMainEventListener(QObject * /* pParent */) 28 // : QObject(pParent) /* Todo: Not sure if pParent should delete this. Especially on Win there is ref counting implemented. */ 27 UIMainEventListener::UIMainEventListener() 29 28 : QObject() 30 29 { … … 42 41 } 43 42 43 HRESULT UIMainEventListener::init(QObject * /* pParent */) 44 { 45 return S_OK; 46 } 47 48 void UIMainEventListener::uninit() 49 { 50 } 44 51 45 52 /** … … 50 57 { 51 58 CEvent event(pEvent); 52 // RTPrintf("Event received: %d (%RTthrd)\n", event.GetType(), RTThreadSelf());59 // printf("Event received: %d\n", event.GetType()); 53 60 switch(event.GetType()) 54 61 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r34527 r35722 43 43 44 44 public: 45 UIMainEventListener(QObject *pParent); 45 UIMainEventListener(); 46 47 48 HRESULT init(QObject *pParent); 49 void uninit(); 46 50 47 51 STDMETHOD(HandleEvent)(VBoxEventType_T aType, IEvent *pEvent); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r35665 r35722 5249 5249 QApplication::removePostedEvents (this); 5250 5250 5251 #ifdef Q_WS_WIN5252 /* COM for the main thread is shutdown in main() */5253 #else5254 5251 COMBase::CleanupCOM(); 5255 #endif5256 5252 5257 5253 mValid = false; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp
r34527 r35722 59 59 60 60 // RTPrintf("Self add: %RTthrd\n", RTThreadSelf()); 61 UIMainEventListenerImpl *pListener = new UIMainEventListenerImpl(this); 61 ComObjPtr<UIMainEventListenerImpl> pListener; 62 pListener.createObject(); 63 pListener->init(new UIMainEventListener(), this); 62 64 m_mainEventListener = CEventListener(pListener); 63 65 QVector<KVBoxEventType> events; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.cpp
r34527 r35722 52 52 // RTPrintf("Self add: %RTthrd\n", RTThreadSelf()); 53 53 const CVirtualBox &vbox = vboxGlobal().virtualBox(); 54 UIMainEventListenerImpl *pListener = new UIMainEventListenerImpl(this); 54 ComObjPtr<UIMainEventListenerImpl> pListener; 55 pListener.createObject(); 56 pListener->init(new UIMainEventListener(), this); 55 57 m_mainEventListener = CEventListener(pListener); 56 58 QVector<KVBoxEventType> events;
Note:
See TracChangeset
for help on using the changeset viewer.