Changeset 86345 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Sep 30, 2020 12:37:06 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 140634
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r86344 r86345 808 808 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 809 809 QWidget *pWizardParent = windowManager().realParentWindow(this); 810 UISafePointerWizardNewCloudVM pWizard = new UIWizardNewCloudVM(pWizardParent );810 UISafePointerWizardNewCloudVM pWizard = new UIWizardNewCloudVM(pWizardParent, m_pWidget->fullGroupName()); 811 811 windowManager().registerNewParent(pWizard, pWizardParent); 812 812 pWizard->prepare(); … … 844 844 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 845 845 QWidget *pWizardParent = windowManager().realParentWindow(this); 846 UISafePointerWizardAddCloudVM pWizard = new UIWizardAddCloudVM(pWizardParent );846 UISafePointerWizardAddCloudVM pWizard = new UIWizardAddCloudVM(pWizardParent, m_pWidget->fullGroupName()); 847 847 windowManager().registerNewParent(pWizard, pWizardParent); 848 848 pWizard->prepare(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVM.cpp
r84417 r86345 28 28 29 29 UIWizardAddCloudVM::UIWizardAddCloudVM(QWidget *pParent, 30 const CCloudClient &comClient /* = CCloudClient() */,30 const QString &strFullGroupName /* = QString() */, 31 31 WizardMode enmMode /* = WizardMode_Auto */) 32 32 : UIWizard(pParent, WizardType_AddCloudVM, enmMode) 33 , m_ comClient(comClient)33 , m_strFullGroupName(strFullGroupName) 34 34 { 35 35 #ifndef VBOX_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVM.h
r83858 r86345 50 50 51 51 /** Constructs Add Cloud VM wizard passing @a pParent & @a enmMode to the base-class. 52 * @param comClient Brings the Cloud Client object wrapper to work with. */52 * @param strFullGroupName Brings full group name (/provider/profile) to add VM to. */ 53 53 UIWizardAddCloudVM(QWidget *pParent, 54 const CCloudClient &comClient = CCloudClient(),54 const QString &strFullGroupName = QString(), 55 55 WizardMode enmMode = WizardMode_Auto); 56 56 57 57 /** Prepares all. */ 58 58 virtual void prepare() /* override */; 59 60 /** Returns full group name. */ 61 QString fullGroupName() const { return m_strFullGroupName; } 59 62 60 63 /** Defines Cloud @a comClient object wrapper. */ … … 73 76 private: 74 77 78 /** Holds the full group name (/provider/profile) to add VM to. */ 79 QString m_strFullGroupName; 80 75 81 /** Holds the Cloud Client object wrapper. */ 76 82 CCloudClient m_comClient; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.cpp
r86343 r86345 116 116 if (m_pAccountComboBox->currentIndex() != -1) 117 117 strOldData = m_pAccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString(); 118 else 119 { 120 /* Try to fetch "old" account name from wizard full group name: */ 121 UIWizardAddCloudVM *pWizard = qobject_cast<UIWizardAddCloudVM*>(wizardImp()); 122 AssertPtrReturnVoid(pWizard); 123 const QString strFullGroupName = pWizard->fullGroupName(); 124 const QString strProfileName = strFullGroupName.section('/', 2, 2); 125 if (!strProfileName.isEmpty()) 126 strOldData = strProfileName; 127 } 118 128 119 129 /* Clear combo initially: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
r82968 r86345 331 331 CVirtualSystemDescription comDescription = field("vsd").value<CVirtualSystemDescription>(); 332 332 /* Create and run wizard as modal dialog, but prevent final step: */ 333 pNewCloudVMWizard = new UIWizardNewCloudVM(this, comClient, comDescription, mode());333 pNewCloudVMWizard = new UIWizardNewCloudVM(this, QString() /** @todo pass proper full group name! */, comClient, comDescription, mode()); 334 334 pNewCloudVMWizard->setFinalStepPrevented(true); 335 335 pNewCloudVMWizard->prepare(); … … 392 392 /* Create and run short wizard mode as modal dialog: */ 393 393 QWidget *pWizardParent = windowManager().realParentWindow(this); 394 pNewCloudVMWizard = new UIWizardNewCloudVM(pWizardParent, comClient, comDescription, mode());394 pNewCloudVMWizard = new UIWizardNewCloudVM(pWizardParent, QString() /** @todo pass proper full group name! */, comClient, comDescription, mode()); 395 395 windowManager().registerNewParent(pNewCloudVMWizard, pWizardParent); 396 396 pNewCloudVMWizard->prepare(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVM.cpp
r84288 r86345 33 33 34 34 UIWizardNewCloudVM::UIWizardNewCloudVM(QWidget *pParent, 35 const QString &strFullGroupName /* = QString() */, 35 36 const CCloudClient &comClient /* = CCloudClient() */, 36 37 const CVirtualSystemDescription &comDescription /* = CVirtualSystemDescription() */, 37 38 WizardMode enmMode /* = WizardMode_Auto */) 38 39 : UIWizard(pParent, WizardType_NewCloudVM, enmMode) 40 , m_strFullGroupName(strFullGroupName) 39 41 , m_comClient(comClient) 40 42 , m_comVSD(comDescription) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVM.h
r82968 r86345 52 52 53 53 /** Constructs New Cloud VM wizard passing @a pParent to the base-class. 54 * @param comClient Brings the Cloud Client object to work with. 55 * @param comDescription Brings the Virtual System Description object to use. */ 54 * @param strFullGroupName Brings full group name (/provider/profile) to create VM in. 55 * @param comClient Brings the Cloud Client object to work with. 56 * @param comDescription Brings the Virtual System Description object to use. */ 56 57 UIWizardNewCloudVM(QWidget *pParent, 58 const QString &strFullGroupName = QString(), 57 59 const CCloudClient &comClient = CCloudClient(), 58 60 const CVirtualSystemDescription &comDescription = CVirtualSystemDescription(), … … 64 66 /** Sets whether the final step is @a fPrevented. */ 65 67 void setFinalStepPrevented(bool fPrevented) { m_fFinalStepPrevented = fPrevented; } 68 69 /** Returns full group name. */ 70 QString fullGroupName() const { return m_strFullGroupName; } 66 71 67 72 /** Defines Cloud @a comClient object. */ … … 102 107 private: 103 108 109 /** Holds the full group name (/provider/profile) to add VM to. */ 110 QString m_strFullGroupName; 104 111 /** Holds the Cloud Client object reference. */ 105 112 CCloudClient m_comClient; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.cpp
r86343 r86345 117 117 if (m_pAccountComboBox->currentIndex() != -1) 118 118 strOldData = m_pAccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString(); 119 else 120 { 121 /* Try to fetch "old" account name from wizard full group name: */ 122 UIWizardNewCloudVM *pWizard = qobject_cast<UIWizardNewCloudVM*>(wizardImp()); 123 AssertPtrReturnVoid(pWizard); 124 const QString strFullGroupName = pWizard->fullGroupName(); 125 const QString strProfileName = strFullGroupName.section('/', 2, 2); 126 if (!strProfileName.isEmpty()) 127 strOldData = strProfileName; 128 } 119 129 120 130 /* Clear combo initially: */
Note:
See TracChangeset
for help on using the changeset viewer.