VirtualBox

Changeset 34791 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 7, 2010 3:01:15 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4: close IMedium on delete

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp

    r34736 r34791  
    10771077            if (deleteStorage)
    10781078            {
    1079                 bool success = false;
    1080 
    10811079                CProgress progress = hardDisk.DeleteStorage();
    10821080                if (hardDisk.isOk())
    10831081                {
    1084                     vboxProblem().showModalProgressDialog (progress, windowTitle(), ":/progress_delete_90px.png", this, true);
    1085                     if (progress.isOk() && progress.GetResultCode() == S_OK)
    1086                         success = true;
     1082                    vboxProblem().showModalProgressDialog(progress, windowTitle(), ":/progress_delete_90px.png", this, true);
     1083                    if (!(progress.isOk() && progress.GetResultCode() == S_OK))
     1084                    {
     1085                        vboxProblem().cannotDeleteHardDiskStorage(this, hardDisk, progress);
     1086                        return;
     1087                    }
    10871088                }
    1088 
    1089                 if (success)
    1090                     vboxGlobal().removeMedium (VBoxDefs::MediumType_HardDisk, id);
    1091                 else
    1092                     vboxProblem().cannotDeleteHardDiskStorage (this, hardDisk, progress);
    1093 
    1094                 /* We don't want to close the hard disk because it was
    1095                  * implicitly closed and removed from the list of known media
    1096                  * on storage deletion */
    1097                 return;
    10981089            }
    10991090
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette