Changeset 50716 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 6, 2014 2:49:13 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r50715 r50716 76 76 /** Removes UIMedium wrapped by <i>this</i> item. */ 77 77 virtual bool remove() = 0; 78 /** Copy UIMedium wrapped by <i>this</i> item. */ 79 virtual bool copy() = 0; 78 80 79 81 /** Refreshes item fully. */ … … 168 170 {} 169 171 170 pr ivate:172 protected: 171 173 172 174 /** Removes UIMedium wrapped by <i>this</i> item. */ … … 199 201 return true; 200 202 } 203 204 /** Copy UIMedium wrapped by <i>this</i> item. */ 205 bool copy() 206 { 207 /* Show Clone VD wizard: */ 208 UISafePointerWizard pWizard = new UIWizardCloneVD(treeWidget(), medium().medium()); 209 pWizard->prepare(); 210 pWizard->exec(); 211 212 /* Delete if still exists: */ 213 if (pWizard) 214 delete pWizard; 215 216 /* True by default: */ 217 return true; 218 } 219 220 private: 201 221 202 222 /** Proposes user to remove CMedium storage wrapped by <i>this</i> item. */ … … 259 279 {} 260 280 261 pr ivate:281 protected: 262 282 263 283 /** Removes UIMedium wrapped by <i>this</i> item. */ … … 285 305 /* True by default: */ 286 306 return true; 307 } 308 309 /** Copy UIMedium wrapped by <i>this</i> item. */ 310 bool copy() 311 { 312 AssertMsgFailedReturn(("That functionality in not supported!\n"), false); 287 313 } 288 314 }; … … 298 324 {} 299 325 300 pr ivate:326 protected: 301 327 302 328 /** Removes UIMedium wrapped by <i>this</i> item. */ … … 324 350 /* True by default: */ 325 351 return true; 352 } 353 354 /** Copy UIMedium wrapped by <i>this</i> item. */ 355 bool copy() 356 { 357 AssertMsgFailedReturn(("That functionality in not supported!\n"), false); 326 358 } 327 359 }; … … 492 524 void UIMediumManager::sltHandleMediumDeleted(const QString &strMediumID) 493 525 { 494 /* Delete UIMediumItem for corresponding 'strMediumID': */526 /* Make sure corresponding medium-item deleted: */ 495 527 deleteMediumItem(strMediumID); 496 528 } … … 537 569 return; 538 570 539 /* Update UIMediumItem for corresponding 'medium': */571 /* Update medium-item for corresponding medium: */ 540 572 updateMediumItem(medium); 541 573 … … 563 595 AssertReturnVoid(!pMediumItem->id().isNull()); 564 596 565 /* Show Clone VD wizard: */ 566 UISafePointerWizard pWizard = new UIWizardCloneVD(this, pMediumItem->medium().medium()); 567 pWizard->prepare(); 568 pWizard->exec(); 569 570 /* Delete if still exists: */ 571 if (pWizard) 572 delete pWizard; 597 /* Copy current medium-item: */ 598 pMediumItem->copy(); 573 599 } 574 600
Note:
See TracChangeset
for help on using the changeset viewer.