VirtualBox

Changeset 32334 in vbox


Ignore:
Timestamp:
Sep 9, 2010 9:33:10 AM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4: Check if a disk is shared on delete confirmation.

File:
1 edited

Legend:

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

    r32296 r32334  
    10861086        const QVector<CMediumAttachment> &mediums = machine.GetMediumAttachments();
    10871087        for (int i=0; i < mediums.size(); ++i)
    1088             if (mediums.at(i).GetType() == KDeviceType_HardDisk)
    1089                 ++cDisks;
     1088        {
     1089            const CMediumAttachment &m = mediums.at(i);
     1090            /* Check if the medium is a harddisk */
     1091            if (m.GetType() == KDeviceType_HardDisk)
     1092            {
     1093                /* Check if the disk isn't shared. If the disk is shared, it
     1094                 * will be *never* deleted. */
     1095                QVector <QString> ids = m.GetMedium().GetMachineIds();
     1096                if (ids.size() == 1)
     1097                    ++cDisks;
     1098            }
     1099        }
    10901100        const QString strDeleteBtn = tr("Delete", "machine");
    10911101        const QString strDeleteAllBtn = tr("Delete All", "machine");
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