Changeset 92413 in vbox
- Timestamp:
- Nov 14, 2021 11:38:38 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 14 edited
-
globals/UICommon.cpp (modified) (2 diffs)
-
globals/UICommon.h (modified) (1 diff)
-
manager/UIVirtualBoxManager.cpp (modified) (2 diffs)
-
runtime/UIMachineLogic.cpp (modified) (1 diff)
-
settings/UISettingsDialogSpecific.cpp (modified) (2 diffs)
-
settings/UISettingsDialogSpecific.h (modified) (3 diffs)
-
settings/machine/UIMachineSettingsStorage.cpp (modified) (4 diffs)
-
settings/machine/UIMachineSettingsStorage.h (modified) (3 diffs)
-
wizards/newvm/UIWizardNewVM.cpp (modified) (4 diffs)
-
wizards/newvm/UIWizardNewVM.h (modified) (3 diffs)
-
wizards/newvm/UIWizardNewVMDiskPage.cpp (modified) (5 diffs)
-
wizards/newvm/UIWizardNewVMDiskPage.h (modified) (4 diffs)
-
wizards/newvm/UIWizardNewVMExpertPage.cpp (modified) (3 diffs)
-
wizards/newvm/UIWizardNewVMExpertPage.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r92397 r92413 1819 1819 int UICommon::openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType enmMediumType, const QUuid &uCurrentMediumId, 1820 1820 QUuid &uSelectedMediumUuid, const QString &strMachineFolder, const QString &strMachineName, 1821 const QString &strMachineGuestOSTypeId, bool fEnableCreate, const QUuid &uMachineID) 1822 { 1821 const QString &strMachineGuestOSTypeId, bool fEnableCreate, const QUuid &uMachineID, 1822 UIActionPool *pActionPool) 1823 { 1824 Q_UNUSED(pActionPool); 1823 1825 QUuid uMachineOrGlobalId = uMachineID == QUuid() ? gEDataManager->GlobalID : uMachineID; 1824 1826 … … 2093 2095 uCurrentID, uMediumID, 2094 2096 strMachineFolder, comConstMachine.GetName(), 2095 comConstMachine.GetOSTypeId(), true /*fEnableCreate */, comConstMachine.GetId()); 2097 comConstMachine.GetOSTypeId(), true /*fEnableCreate */, 2098 comConstMachine.GetId(), pActionPool); 2096 2099 if (iDialogReturn == UIMediumSelector::ReturnCode_LeftEmpty && 2097 2100 (target.mediumType == UIMediumDeviceType_DVD || target.mediumType == UIMediumDeviceType_Floppy)) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
r92397 r92413 417 417 * @param fEnableCreate Passes whether to show/enable create action in the medium selector dialog, 418 418 * @param uMachineID Passes the machine UUID, 419 * @param pActionPool Passes the action pool instance pointer, 419 420 * returns the return code of the UIMediumSelector::ReturnCode as int. In case of a medium selection 420 421 * UUID of the selected medium is stored in @param inOutUuid.*/ 421 int openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType enmMediumType, const QUuid &uCurrentMediumId, QUuid &uSelectedMediumUuid, 422 const QString &strMachineFolder, const QString &strMachineName, 423 const QString &strMachineGuestOSTypeId, bool fEnableCreate, const QUuid &uMachineID); 422 int openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType enmMediumType, const QUuid &uCurrentMediumId, 423 QUuid &uSelectedMediumUuid, const QString &strMachineFolder, const QString &strMachineName, 424 const QString &strMachineGuestOSTypeId, bool fEnableCreate, const QUuid &uMachineID, 425 UIActionPool *pActionPool); 424 426 425 427 /** Creates and shows a dialog (wizard) to create a medium of type @a enmMediumType. -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r92132 r92413 973 973 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 974 974 QWidget *pWizardParent = windowManager().realParentWindow(this); 975 UISafePointerWizardNewVM pWizard = new UIWizardNewVM(pWizardParent, m_pWidget->fullGroupName(), "gui-createvm"); 975 UISafePointerWizardNewVM pWizard = new UIWizardNewVM(pWizardParent, actionPool(), 976 m_pWidget->fullGroupName(), "gui-createvm"); 976 977 windowManager().registerNewParent(pWizard, pWizardParent); 977 978 … … 1099 1100 UISafePointerSettingsDialogMachine pDialog = new UISettingsDialogMachine(pDialogParent, 1100 1101 uID.isNull() ? pItem->id() : uID, 1101 strCategory, strControl );1102 strCategory, strControl, actionPool()); 1102 1103 windowManager().registerNewParent(pDialog, pDialogParent); 1103 1104 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r92397 r92413 2153 2153 QPointer<UISettingsDialogMachine> pDialog = new UISettingsDialogMachine(activeMachineWindow(), 2154 2154 machine().GetId(), 2155 strCategory, strControl );2155 strCategory, strControl, actionPool()); 2156 2156 /* Executing VM settings window. 2157 2157 * This blocking function calls for the internal event-loop to process all further events, -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r91713 r92413 320 320 321 321 UISettingsDialogMachine::UISettingsDialogMachine(QWidget *pParent, const QUuid &uMachineId, 322 const QString &strCategory, const QString &strControl )322 const QString &strCategory, const QString &strControl, UIActionPool *pActionPool) 323 323 : UISettingsDialog(pParent) 324 324 , m_uMachineId(uMachineId) 325 325 , m_strCategory(strCategory) 326 326 , m_strControl(strControl) 327 , m_pActionPool(pActionPool) 327 328 { 328 329 /* Prepare: */ … … 705 706 case MachineSettingsPageType_Storage: 706 707 { 707 pSettingsPage = new UIMachineSettingsStorage ;708 pSettingsPage = new UIMachineSettingsStorage(m_pActionPool); 708 709 addItem(":/hd_32px.png", ":/hd_24px.png", ":/hd_16px.png", 709 710 iPageIndex, "#storage", pSettingsPage); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
r91713 r92413 34 34 #include "CSession.h" 35 35 36 /* Forward declarations: */ 37 class UIActionPool; 36 38 37 39 /** UISettingsDialog extension encapsulating all the specific functionality of the Global Preferences. */ … … 92 94 * @param uMachineId Brings the machine ID. 93 95 * @param strCategory Brings the name of category to be opened. 94 * @param strControl Brings the name of control to be focused. */ 96 * @param strControl Brings the name of control to be focused. 97 * @param pActionPool Brings the action pool instance. */ 95 98 UISettingsDialogMachine(QWidget *pParent, const QUuid &uMachineId, 96 const QString &strCategory, const QString &strControl );99 const QString &strCategory, const QString &strControl, UIActionPool *pActionPool); 97 100 98 101 protected: … … 166 169 CConsole m_console; 167 170 171 UIActionPool *m_pActionPool; 168 172 }; 169 173 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r91414 r92413 2943 2943 const QString UIMachineSettingsStorage::s_strAttachmentMimeType = QString("application/virtualbox;value=StorageAttachmentID"); 2944 2944 2945 UIMachineSettingsStorage::UIMachineSettingsStorage( )2945 UIMachineSettingsStorage::UIMachineSettingsStorage(UIActionPool *pActionPool) 2946 2946 : m_pModelStorage(0) 2947 2947 , m_pMediumIdHolder(new UIMediumIDHolder(this)) … … 3000 3000 , m_pLabelEncryption(0) 3001 3001 , m_pFieldEncryption(0) 3002 , m_pActionPool(pActionPool) 3002 3003 { 3003 3004 /* Prepare: */ … … 4010 4011 strMachineFolder, m_strMachineName, 4011 4012 m_strMachineGuestOSTypeId, 4012 true /* enable create action: */, m_uMachineId );4013 true /* enable create action: */, m_uMachineId, m_pActionPool); 4013 4014 4014 4015 if (iResult == UIMediumSelector::ReturnCode_Rejected || … … 5223 5224 strMachineFolder, m_strMachineName, 5224 5225 m_strMachineGuestOSTypeId, 5225 true /* enable cr1eate action: */, m_uMachineId );5226 true /* enable cr1eate action: */, m_uMachineId, m_pActionPool); 5226 5227 5227 5228 /* Continue only if iResult is either UIMediumSelector::ReturnCode_Accepted or UIMediumSelector::ReturnCode_LeftEmpty: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r86233 r92413 42 42 class QITreeView; 43 43 class StorageModel; 44 class QIToolBar; 45 class UIActionPool; 44 46 class UIMediumIDHolder; 45 class QIToolBar;46 47 struct UIDataSettingsMachineStorage; 47 48 struct UIDataSettingsMachineStorageController; … … 69 70 70 71 /** Constructs Storage settings page. */ 71 UIMachineSettingsStorage( );72 UIMachineSettingsStorage(UIActionPool *pActionPool); 72 73 /** Destructs Storage settings page. */ 73 74 virtual ~UIMachineSettingsStorage() /* override */; … … 407 408 /** Holds the encryption field instance. */ 408 409 QILabel *m_pFieldEncryption; 410 /** Holds the action pool instance. */ 411 UIActionPool *m_pActionPool; 409 412 /** @} */ 410 413 }; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r92111 r92413 52 52 } 53 53 54 UIWizardNewVM::UIWizardNewVM(QWidget *pParent, const QString &strMachineGroup /* = QString() */, 54 UIWizardNewVM::UIWizardNewVM(QWidget *pParent, UIActionPool *pActionPool, 55 const QString &strMachineGroup /* = QString() */, 55 56 const QString &strHelpHashtag /* = QString() */) 56 57 : UINativeWizard(pParent, WizardType_NewVM, WizardMode_Auto, strHelpHashtag) … … 71 72 , m_enmDiskSource(SelectedDiskSource_New) 72 73 , m_fEmptyDiskRecommended(false) 74 , m_pActionPool(pActionPool) 73 75 { 74 76 #ifndef VBOX_WS_MAC … … 95 97 setUnattendedPageVisible(false); 96 98 addPage(new UIWizardNewVMHardwarePage); 97 addPage(new UIWizardNewVMDiskPage );99 addPage(new UIWizardNewVMDiskPage(m_pActionPool)); 98 100 addPage(new UIWizardNewVMSummaryPage); 99 101 break; … … 101 103 case WizardMode_Expert: 102 104 { 103 addPage(new UIWizardNewVMExpertPage );105 addPage(new UIWizardNewVMExpertPage(m_pActionPool)); 104 106 break; 105 107 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r92110 r92413 31 31 #include "CMediumFormat.h" 32 32 #include "CGuestOSType.h" 33 34 /* Forward declarations: */ 35 class UIActionPool; 33 36 34 37 enum SelectedDiskSource … … 71 74 public: 72 75 73 UIWizardNewVM(QWidget *pParent, const QString &strMachineGroup = QString(), const QString &strHelpHashtag = QString()); 76 UIWizardNewVM(QWidget *pParent, UIActionPool *pActionPool, 77 const QString &strMachineGroup = QString(), const QString &strHelpHashtag = QString()); 74 78 bool isUnattendedEnabled() const; 75 79 void setDefaultUnattendedInstallData(const UIUnattendedInstallData &unattendedInstallData); … … 241 245 bool m_fEmptyDiskRecommended; 242 246 QVector<KMediumVariant> m_mediumVariants; 247 UIActionPool *m_pActionPool; 243 248 /** @} */ 244 249 }; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp
r92111 r92413 42 42 QUuid UIWizardNewVMDiskCommon::getWithFileOpenDialog(const QString &strOSTypeID, 43 43 const QString &strMachineFolder, 44 QWidget *pCaller )44 QWidget *pCaller, UIActionPool *pActionPool) 45 45 { 46 46 QUuid uMediumId; … … 52 52 strOSTypeID, 53 53 false /* don't show/enable the create action: */, 54 QUuid() /* Machinie Id */ );54 QUuid() /* Machinie Id */, pActionPool); 55 55 if (returnCode != static_cast<int>(UIMediumSelector::ReturnCode_Accepted)) 56 56 return QUuid(); … … 58 58 } 59 59 60 UIWizardNewVMDiskPage::UIWizardNewVMDiskPage( )60 UIWizardNewVMDiskPage::UIWizardNewVMDiskPage(UIActionPool *pActionPool) 61 61 : m_pDiskSourceButtonGroup(0) 62 62 , m_pDiskEmpty(0) … … 75 75 , m_uMediumSizeMin(_4M) 76 76 , m_uMediumSizeMax(uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize()) 77 , m_pActionPool(pActionPool) 77 78 { 78 79 prepare(); … … 191 192 QUuid uMediumId = UIWizardNewVMDiskCommon::getWithFileOpenDialog(comOSType.GetId(), 192 193 pWizard->machineFolder(), 193 this );194 this, m_pActionPool); 194 195 if (!uMediumId.isNull()) 195 196 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.h
r91593 r92413 40 40 class QIRichTextLabel; 41 41 class QIToolButton; 42 class UIActionPool; 42 43 class UIMediaComboBox; 43 44 class UIMediumSizeEditor; … … 47 48 QUuid getWithFileOpenDialog(const QString &strOSTypeID, 48 49 const QString &strMachineFolder, 49 QWidget *pCaller );50 QWidget *pCaller, UIActionPool *pActionPool); 50 51 } 51 52 … … 57 58 public: 58 59 59 UIWizardNewVMDiskPage( );60 UIWizardNewVMDiskPage(UIActionPool *pActionPool); 60 61 61 62 protected: … … 110 111 qulonglong m_uMediumSizeMax; 111 112 /** @} */ 113 UIActionPool *m_pActionPool; 112 114 }; 113 115 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp
r92111 r92413 41 41 #include "CSystemProperties.h" 42 42 43 UIWizardNewVMExpertPage::UIWizardNewVMExpertPage( )43 UIWizardNewVMExpertPage::UIWizardNewVMExpertPage(UIActionPool *pActionPool) 44 44 : m_pToolBox(0) 45 45 , m_pDiskFormatVariantGroupBox(0) … … 62 62 , m_uMediumSizeMin(_4M) 63 63 , m_uMediumSizeMax(uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize()) 64 , m_pActionPool(pActionPool) 64 65 { 65 66 /* Create widgets: */ … … 130 131 QUuid uMediumId = UIWizardNewVMDiskCommon::getWithFileOpenDialog(comOSType.GetId(), 131 132 pWizard->machineFolder(), 132 this );133 this, m_pActionPool); 133 134 if (!uMediumId.isNull()) 134 135 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.h
r91277 r92413 35 35 class QRadioButton; 36 36 class QIToolButton; 37 class UIActionPool; 37 38 class UIAdditionalUnattendedOptions; 38 39 class UIDiskFormatsComboBox; … … 53 54 public: 54 55 55 UIWizardNewVMExpertPage( );56 UIWizardNewVMExpertPage(UIActionPool *pActionPool); 56 57 57 58 private slots: … … 148 149 qulonglong m_uMediumSizeMin; 149 150 qulonglong m_uMediumSizeMax; 151 UIActionPool *m_pActionPool; 150 152 /** @} */ 151 153 };
Note:
See TracChangeset
for help on using the changeset viewer.

