VirtualBox

Changeset 29199 in vbox for trunk/src


Ignore:
Timestamp:
May 7, 2010 12:04:23 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: 4893: VM Settings / Storage page should now not silently ignore failures when attaching a new image to a VM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsHD.cpp

    r29197 r29199  
    18521852            KDeviceType attDeviceType = mStorageModel->data (attIndex, StorageModel::R_AttDevice).value <KDeviceType>();
    18531853            QString attMediumId = mStorageModel->data (attIndex, StorageModel::R_AttMediumId).toString();
     1854            QString attMediumLocation = mStorageModel->data (attIndex, StorageModel::R_AttLocation).toString();
    18541855            mMachine.AttachDevice (ctrName, attStorageSlot.port, attStorageSlot.device, attDeviceType, attMediumId);
    1855             if (attDeviceType == KDeviceType_DVD)
    1856                 mMachine.PassthroughDevice (ctrName, attStorageSlot.port, attStorageSlot.device,
    1857                                             mStorageModel->data (attIndex, StorageModel::R_AttIsPassthrough).toBool());
    1858             maxUsedPort = attStorageSlot.port > maxUsedPort ? attStorageSlot.port : maxUsedPort;
     1856            if (mMachine.isOk())
     1857            {
     1858                if (attDeviceType == KDeviceType_DVD)
     1859                    mMachine.PassthroughDevice (ctrName, attStorageSlot.port, attStorageSlot.device,
     1860                                                mStorageModel->data (attIndex, StorageModel::R_AttIsPassthrough).toBool());
     1861                maxUsedPort = attStorageSlot.port > maxUsedPort ? attStorageSlot.port : maxUsedPort;
     1862            }
     1863            else
     1864                vboxProblem().cannotAttachDevice(this, mMachine, VBoxDefs::MediumType_HardDisk, attMediumLocation,
     1865                                                 attStorageSlot.bus, attStorageSlot.port, attStorageSlot.device);
    18591866        }
    18601867        if (ctrBusType == KStorageBus_SATA)
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