Changeset 78542 in vbox for trunk/src/VBox
- Timestamp:
- May 16, 2019 11:00:44 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 130588
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r78539 r78542 1123 1123 "change to type which doesn't support optical devices.</p><p>If you proceed optical " 1124 1124 "devices will be removed.</p>")); 1125 } 1126 1127 bool UIMessageCenter::confirmStorageBusChangeWithExcessiveRemoval(QWidget *pParent /* = 0 */) const 1128 { 1129 return questionBinary(pParent, MessageType_Question, 1130 tr("<p>This controller has devices attached. You have requested storage bus change to " 1131 "type which supports smaller amount of attached devices.</p><p>If you proceed " 1132 "excessive devices will be removed.</p>")); 1125 1133 } 1126 1134 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r78539 r78542 320 320 int confirmRemovingOfLastDVDDevice(QWidget *pParent = 0) const; 321 321 bool confirmStorageBusChangeWithOpticalRemoval(QWidget *pParent = 0) const; 322 bool confirmStorageBusChangeWithExcessiveRemoval(QWidget *pParent = 0) const; 322 323 void cannotAttachDevice(const CMachine &machine, UIMediumDeviceType type, const QString &strLocation, const StorageSlot &storageSlot, QWidget *pParent = 0); 323 324 bool warnAboutIncorrectPort(QWidget *pParent = 0) const; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r78539 r78542 1715 1715 } 1716 1716 1717 /* Lets make sure there is enough of place for all the remaining attachments: */ 1718 const uint uMaxPortCount = 1719 (uint)vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(enmNewCtrBusType); 1720 const uint uMaxDevicePerPortCount = 1721 (uint)vboxGlobal().virtualBox().GetSystemProperties().GetMaxDevicesPerPortForStorageBus(enmNewCtrBusType); 1722 const QList<QUuid> ids = pItemController->attachmentIDs(); 1723 if (uMaxPortCount * uMaxDevicePerPortCount < (uint)ids.size()) 1724 { 1725 if (!msgCenter().confirmStorageBusChangeWithExcessiveRemoval()) 1726 return false; 1727 for (int i = uMaxPortCount * uMaxDevicePerPortCount; i < ids.size(); ++i) 1728 delAttachment(pItemController->id(), ids.at(i)); 1729 } 1730 1717 1731 pItemController->setCtrBusType(enmNewCtrBusType); 1718 1732 emit dataChanged(aIndex, aIndex);
Note:
See TracChangeset
for help on using the changeset viewer.