Changeset 74915 in vbox
- Timestamp:
- Oct 18, 2018 12:24:32 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 125916
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r74878 r74915 1769 1769 1770 1770 /* Which VM we are loading: */ 1771 LogRelFlow(("UIChooserModel: Loading VM with ID={%s}...\n", machine.GetId().toString().toUtf8().constData()));1771 LogRelFlow(("UIChooserModel: Loading VM with ID={%s}...\n", toOldStyleUuid(machine.GetId()).toUtf8().constData())); 1772 1772 /* Is that machine accessible? */ 1773 1773 if (machine.GetAccessible()) … … 1793 1793 } 1794 1794 /* Update group definitions: */ 1795 m_groups[ machine.GetId().toString()] = groupList;1795 m_groups[toOldStyleUuid(machine.GetId())] = groupList; 1796 1796 } 1797 1797 /* Inaccessible machine: */ … … 1799 1799 { 1800 1800 /* VM is accessible: */ 1801 LogRelFlow(("UIChooserModel: VM {%s} is inaccessible.\n", machine.GetId().toString().toUtf8().constData()));1801 LogRelFlow(("UIChooserModel: VM {%s} is inaccessible.\n", toOldStyleUuid(machine.GetId()).toUtf8().constData())); 1802 1802 /* Create machine-item with main-root group-item as parent: */ 1803 1803 createMachineItem(machine, mainRoot()); … … 1911 1911 /* Which position should be current item placed by definitions? */ 1912 1912 QString strDefinitionName = pItem->type() == UIChooserItemType_Group ? pItem->name() : 1913 pItem->type() == UIChooserItemType_Machine ? pItem->toMachineItem()->id().toString() :1913 pItem->type() == UIChooserItemType_Machine ? toOldStyleUuid(pItem->toMachineItem()->id()) : 1914 1914 QString(); 1915 1915 AssertMsg(!strDefinitionName.isEmpty(), ("Wrong definition name!")); … … 1978 1978 { 1979 1979 /* Create machine-item: */ 1980 new UIChooserItemMachine(pParentItem, machine, getDesiredPosition(pParentItem, UIChooserItemType_Machine, machine.GetId().toString()));1980 new UIChooserItemMachine(pParentItem, machine, getDesiredPosition(pParentItem, UIChooserItemType_Machine, toOldStyleUuid(machine.GetId()))); 1981 1981 } 1982 1982 … … 2160 2160 if (UIChooserItemMachine *pMachineItem = pItem->toMachineItem()) 2161 2161 if (pMachineItem->accessible()) 2162 definitions[ pMachineItem->id().toString()] << pParentGroup->fullName();2162 definitions[toOldStyleUuid(pMachineItem->id())] << pParentGroup->fullName(); 2163 2163 /* Iterate over all the group-items: */ 2164 2164 foreach (UIChooserItem *pItem, pParentGroup->items(UIChooserItemType_Group)) … … 2180 2180 /* Iterate over all the machine-items: */ 2181 2181 foreach (UIChooserItem *pItem, pParentItem->items(UIChooserItemType_Machine)) 2182 orders[strExtraDataKey] << QString("m=%1").arg( pItem->toMachineItem()->id().toString());2182 orders[strExtraDataKey] << QString("m=%1").arg(toOldStyleUuid(pItem->toMachineItem()->id())); 2183 2183 } 2184 2184 … … 2195 2195 if (UIThreadGroupOrderSave::instance()) 2196 2196 UIThreadGroupOrderSave::cleanup(); 2197 } 2198 2199 /* static */ 2200 QString UIChooserModel::toOldStyleUuid(const QUuid &uId) 2201 { 2202 return uId.toString().remove(QRegExp("[{}]")); 2197 2203 } 2198 2204 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h
r74878 r74915 456 456 /** Makes sure group orders saving is finished. */ 457 457 void makeSureGroupOrdersSaveIsFinished(); 458 459 /** Returns QString representation for passed @a uId, wiping out {} symbols. 460 * @note Required for backward compatibility after QString=>QUuid change. */ 461 static QString toOldStyleUuid(const QUuid &uId); 458 462 /** @} */ 459 463
Note:
See TracChangeset
for help on using the changeset viewer.