- Timestamp:
- May 19, 2020 6:23:26 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r84376 r84378 328 328 case NodeDef_MachinePrefix: return "m"; 329 329 /* Group nodes: */ 330 case NodeDef_GroupPrefix: return "g"; 330 case NodeDef_GroupPrefixLocal: return "g"; 331 case NodeDef_GroupPrefixProvider: return "p"; 332 case NodeDef_GroupPrefixProfile: return "a"; 331 333 case NodeDef_GroupOptionOpened: return "o"; 332 334 } … … 717 719 718 720 /* Prepare required group definition reg-exp: */ 719 const QString strNodePrefix = definitionOption(NodeDef_GroupPrefix); 721 const QString strNodePrefixLocal = definitionOption(NodeDef_GroupPrefixLocal); 722 const QString strNodePrefixProvider = definitionOption(NodeDef_GroupPrefixProvider); 723 const QString strNodePrefixProfile = definitionOption(NodeDef_GroupPrefixProfile); 720 724 const QString strNodeOptionOpened = definitionOption(NodeDef_GroupOptionOpened); 721 const QString strDefinitionTemplate = QString("%1(\\S)*=%2").arg(strNodePrefix, strName); 725 const QString strDefinitionTemplate = QString("[%1%2%3](\\S)*=%4").arg(strNodePrefixLocal, 726 strNodePrefixProvider, 727 strNodePrefixProfile, 728 strName); 722 729 const QRegExp definitionRegExp(strDefinitionTemplate); 723 730 /* For each the group definition: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h
r84376 r84378 72 72 NodeDef_GlobalValueDefault, 73 73 NodeDef_MachinePrefix, 74 NodeDef_GroupPrefix, 74 NodeDef_GroupPrefixLocal, 75 NodeDef_GroupPrefixProvider, 76 NodeDef_GroupPrefixProfile, 75 77 NodeDef_GroupOptionOpened, 76 78 }; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r84377 r84378 221 221 const QString strItemType = strDefinition.section('=', 0, 0); 222 222 const QString strItemDescriptor = strDefinition.section('=', 1, -1); 223 /* Its a group-item definition? */224 if (strItemType == definitionOption(NodeDef_GroupPrefix ))223 /* Its a local group-item definition? */ 224 if (strItemType == definitionOption(NodeDef_GroupPrefixLocal)) 225 225 { 226 226 /* Search for group-item with passed descriptor (name): */ 227 227 pItem = root()->searchForItem(strItemDescriptor, 228 228 UIChooserItemSearchFlag_LocalGroup | 229 UIChooserItemSearchFlag_ExactId); 230 } 231 /* Its a provider group-item definition? */ 232 else if (strItemType == definitionOption(NodeDef_GroupPrefixProvider)) 233 { 234 /* Search for group-item with passed descriptor (name): */ 235 pItem = root()->searchForItem(strItemDescriptor, 229 236 UIChooserItemSearchFlag_CloudProvider | 237 UIChooserItemSearchFlag_ExactId); 238 } 239 /* Its a profile group-item definition? */ 240 else if (strItemType == definitionOption(NodeDef_GroupPrefixProfile)) 241 { 242 /* Search for group-item with passed descriptor (name): */ 243 pItem = root()->searchForItem(strItemDescriptor, 230 244 UIChooserItemSearchFlag_CloudProfile | 231 245 UIChooserItemSearchFlag_ExactId); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGroup.cpp
r84376 r84378 108 108 QString UIChooserNodeGroup::definition(bool fFull /* = false */) const 109 109 { 110 const QString strNodePrefix = UIChooserAbstractModel::definitionOption(UIChooserAbstractModel::NodeDef_GroupPrefix); 110 QString strNodePrefix; 111 switch (groupType()) 112 { 113 case UIChooserNodeGroupType_Local: 114 strNodePrefix = UIChooserAbstractModel::definitionOption(UIChooserAbstractModel::NodeDef_GroupPrefixLocal); 115 break; 116 case UIChooserNodeGroupType_Provider: 117 strNodePrefix = UIChooserAbstractModel::definitionOption(UIChooserAbstractModel::NodeDef_GroupPrefixProvider); 118 break; 119 case UIChooserNodeGroupType_Profile: 120 strNodePrefix = UIChooserAbstractModel::definitionOption(UIChooserAbstractModel::NodeDef_GroupPrefixProfile); 121 break; 122 } 111 123 const QString strNodeOptionOpened = UIChooserAbstractModel::definitionOption(UIChooserAbstractModel::NodeDef_GroupOptionOpened); 112 124 return fFull
Note:
See TracChangeset
for help on using the changeset viewer.