- Timestamp:
- Feb 20, 2023 12:35:52 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155947
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlDialog.cpp
r98103 r98647 37 37 #include "UIGuestProcessControlDialog.h" 38 38 #include "UICommon.h" 39 #include "UIMachine.h" 40 #include "UISession.h" 39 41 #ifdef VBOX_WS_MAC 40 42 # include "VBoxUtils-darwin.h" … … 46 48 *********************************************************************************************************************************/ 47 49 48 UIGuestProcessControlDialogFactory::UIGuestProcessControlDialogFactory(UIActionPool *pActionPool /* = 0 */, 49 const CGuest &comGuest /* = CGuest() */, 50 const QString &strMachineName /* = QString() */) 51 : m_pActionPool(pActionPool) 52 , m_comGuest(comGuest) 53 , m_strMachineName(strMachineName) 50 UIGuestProcessControlDialogFactory::UIGuestProcessControlDialogFactory(UIMachine *pMachine /* = 0 */) 51 : m_pMachine(pMachine) 54 52 { 55 53 } … … 57 55 void UIGuestProcessControlDialogFactory::create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) 58 56 { 59 pDialog = new UIGuestProcessControlDialog(pCenterWidget, m_pActionPool, m_comGuest, m_strMachineName); 57 AssertPtrReturnVoid(m_pMachine); 58 pDialog = new UIGuestProcessControlDialog(pCenterWidget, m_pMachine); 60 59 } 61 60 … … 65 64 *********************************************************************************************************************************/ 66 65 67 UIGuestProcessControlDialog::UIGuestProcessControlDialog(QWidget *pCenterWidget, 68 UIActionPool *pActionPool, 69 const CGuest &comGuest, 70 const QString &strMachineName /* = QString() */) 66 UIGuestProcessControlDialog::UIGuestProcessControlDialog(QWidget *pCenterWidget, UIMachine *pMachine) 71 67 : QIWithRetranslateUI<QIManagerDialog>(pCenterWidget) 72 , m_pActionPool(pActionPool) 73 , m_comGuest(comGuest) 74 , m_strMachineName(strMachineName) 68 , m_pMachine(pMachine) 69 , m_pActionPool(m_pMachine->actionPool()) 70 , m_comGuest(m_pMachine->uisession()->guest()) 71 , m_strMachineName(m_pMachine->machineName()) 75 72 { 76 73 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlDialog.h
r98103 r98647 45 45 /* Forward declarations: */ 46 46 class UIActionPool; 47 class UIMachine; 47 48 class UIGuestProcessControlDialog; 48 49 class CGuest; … … 53 54 public: 54 55 55 UIGuestProcessControlDialogFactory(UIActionPool *pActionPool = 0, const CGuest &comGuest = CGuest(), const QString &strMachineName = QString()); 56 /** Constructs dialog factory. 57 * @param pMachine Brings the machine UI reference to be used by the created dialog. */ 58 UIGuestProcessControlDialogFactory(UIMachine *pMachine = 0); 56 59 57 60 protected: … … 61 64 virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) RT_OVERRIDE; 62 65 63 UIActionPool *m_pActionPool; 64 CGuest m_comGuest; 65 QString m_strMachineName; 66 /** Holds the machine UI reference. */ 67 UIMachine *m_pMachine; 66 68 }; 67 69 … … 75 77 76 78 /** Constructs Guest Control dialog. 77 * @param pCenterWidget Passes the widget reference to center according to. 78 * @param pActionPool Passes the action-pool reference. 79 * @param comGuest Passes the com-guest reference. */ 80 UIGuestProcessControlDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, const CGuest &comGuest, const QString &strMachineName = QString()); 79 * @param pMachine Brings the machine UI reference to be used by the created dialog. */ 80 UIGuestProcessControlDialog(QWidget *pCenterWidget, UIMachine *pMachine); 81 81 82 82 protected: … … 115 115 private: 116 116 117 UIMachine *m_pMachine; 117 118 UIActionPool *m_pActionPool; 118 CGuest m_comGuest;119 QString m_strMachineName;119 CGuest m_comGuest; 120 QString m_strMachineName; 120 121 }; 121 122 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98642 r98647 2467 2467 2468 2468 QIManagerDialog *pProcessControlDialog; 2469 UIGuestProcessControlDialogFactory dialogFactory( actionPool(), console().GetGuest(), machine().GetName());2469 UIGuestProcessControlDialogFactory dialogFactory(uimachine()); 2470 2470 dialogFactory.prepare(pProcessControlDialog, activeMachineWindow()); 2471 2471 if (pProcessControlDialog)
Note:
See TracChangeset
for help on using the changeset viewer.