Changeset 24437 in vbox
- Timestamp:
- Nov 6, 2009 12:30:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r24400 r24437 2172 2172 foreach (const CMediumAttachment &attachment, attachments) 2173 2173 { 2174 if (attachment.GetType() == deviceType) 2174 CStorageController controller = attachment.GetController(); 2175 if ( !controller.isNull() 2176 && (attachment.GetType() == deviceType)) 2175 2177 { 2176 2178 /* Attachment menu item */ … … 2179 2181 { 2180 2182 attachmentMenu = new QMenu (menu); 2181 attachmentMenu->setTitle (QString ("%1 (%2)").arg ( attachment.GetController().GetName())2182 .arg (vboxGlobal().toString (StorageSlot ( attachment.GetController().GetBus(),2183 attachmentMenu->setTitle (QString ("%1 (%2)").arg (controller.GetName()) 2184 .arg (vboxGlobal().toString (StorageSlot (controller.GetBus(), 2183 2185 attachment.GetPort(), 2184 2186 attachment.GetDevice())))); 2185 switch ( attachment.GetController().GetBus())2187 switch (controller.GetBus()) 2186 2188 { 2187 2189 case KStorageBus_IDE: … … 2247 2249 mountMediumAction->setCheckable (true); 2248 2250 mountMediumAction->setChecked (!currentMedium.isNull() && medium.GetId() == currentId); 2249 mountMediumAction->setData (QVariant::fromValue (MountTarget ( attachment.GetController().GetName(),2251 mountMediumAction->setData (QVariant::fromValue (MountTarget (controller.GetName(), 2250 2252 attachment.GetPort(), 2251 2253 attachment.GetDevice(), … … 2262 2264 QAction *callVMMAction = new QAction (attachmentMenu); 2263 2265 callVMMAction->setIcon (QIcon (":/diskimage_16px.png")); 2264 callVMMAction->setData (QVariant::fromValue (MountTarget ( attachment.GetController().GetName(),2266 callVMMAction->setData (QVariant::fromValue (MountTarget (controller.GetName(), 2265 2267 attachment.GetPort(), 2266 2268 attachment.GetDevice(), … … 2276 2278 QAction *unmountMediumAction = new QAction (attachmentMenu); 2277 2279 unmountMediumAction->setEnabled (!currentMedium.isNull()); 2278 unmountMediumAction->setData (QVariant::fromValue (MountTarget ( attachment.GetController().GetName(),2280 unmountMediumAction->setData (QVariant::fromValue (MountTarget (controller.GetName(), 2279 2281 attachment.GetPort(), 2280 2282 attachment.GetDevice())));
Note:
See TracChangeset
for help on using the changeset viewer.

