Changeset 37899 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 12, 2011 1:25:38 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72801
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UICloneVMWizard.cpp
r37849 r37899 69 69 } 70 70 71 bool UICloneVMWizard::createClone(const QString &strName, KCloneMode mode )71 bool UICloneVMWizard::createClone(const QString &strName, KCloneMode mode, bool fReinitMACs) 72 72 { 73 73 CVirtualBox vbox = vboxGlobal().virtualBox(); … … 82 82 } 83 83 84 /* NAT network adapters should keep there MAC address to prevent any 85 * reactivation. For the other modes they should be regenerated to prevent 86 * address conflicts in the network. */ 84 /* Add the keep all MACs option to the import settings when requested. */ 87 85 QVector<KCloneOptions> options; 88 options.append(KCloneOptions_KeepNATMACs); 86 if (!fReinitMACs) 87 options.append(KCloneOptions_KeepAllMACs); 89 88 90 89 /* Start cloning. */ … … 124 123 125 124 registerField("cloneName", this, "cloneName"); 125 registerField("reinitMACs", this, "reinitMACs"); 126 126 127 127 connect(m_pNameEditor, SIGNAL(textChanged(const QString &)), this, SLOT(sltNameEditorTextChanged(const QString &))); … … 136 136 { 137 137 m_pNameEditor->setText(strName); 138 } 139 140 bool UICloneVMWizardPage1::isReinitMACsChecked() const 141 { 142 return mReinitMACsCheckBox->isChecked(); 138 143 } 139 144 … … 172 177 startProcessing(); 173 178 /* Try to create the clone: */ 174 bool fResult = static_cast<UICloneVMWizard*>(wizard())->createClone(cloneName(), KCloneMode_MachineState );179 bool fResult = static_cast<UICloneVMWizard*>(wizard())->createClone(cloneName(), KCloneMode_MachineState, isReinitMACsChecked()); 175 180 /* Finish performing long-time operation: */ 176 181 endProcessing(); … … 234 239 /* Try to create the clone: */ 235 240 QString strName = field("cloneName").toString(); 236 bool fResult = static_cast<UICloneVMWizard*>(wizard())->createClone(strName, cloneMode()); 241 bool fReinitMACs = field("reinitMACs").toBool(); 242 bool fResult = static_cast<UICloneVMWizard*>(wizard())->createClone(strName, cloneMode(), fReinitMACs); 237 243 /* Finish performing long-time operation: */ 238 244 endProcessing(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UICloneVMWizard.h
r37468 r37899 38 38 UICloneVMWizard(QWidget *pParent, CMachine machine, bool fShowChildsOption = true); 39 39 40 bool createClone(const QString &strName, KCloneMode mode );40 bool createClone(const QString &strName, KCloneMode mode, bool fReinitMACs); 41 41 42 42 private: … … 71 71 Q_OBJECT; 72 72 Q_PROPERTY(QString cloneName READ cloneName WRITE setCloneName); 73 Q_PROPERTY(bool reinitMACs READ isReinitMACsChecked); 73 74 74 75 public: … … 79 80 QString cloneName() const; 80 81 void setCloneName(const QString &strName); 82 83 bool isReinitMACsChecked() const; 81 84 82 85 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UICloneVMWizardPage1.ui
r37468 r37899 55 55 </item> 56 56 <item> 57 <widget class="QCheckBox" name="mReinitMACsCheckBox"> 58 <property name="toolTip"> 59 <string>When checked a new unique MAC address will assigned to all configured network cards.</string> 60 </property> 61 <property name="text"> 62 <string>&Reinitialize the MAC address of all network cards</string> 63 </property> 64 </widget> 65 </item> 66 <item> 57 67 <spacer name="verticalSpacer"> 58 68 <property name="orientation">
Note:
See TracChangeset
for help on using the changeset viewer.