VirtualBox

Changeset 84401 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 20, 2020 1:54:41 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: Reuse stuff implemented in r138071; That's missed part allowing to restore local, provider and profile groups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r84400 r84401  
    856856    {
    857857        case UIChooserNodeType_Group:
    858             strDefinitionTemplateShort = QString("^g(\\S)*=");
    859             strDefinitionTemplateFull = QString("^g(\\S)*=%1$").arg(strName);
     858        {
     859            const QString strNodePrefixLocal = definitionOption(NodeDef_GroupPrefixLocal);
     860            const QString strNodePrefixProvider = definitionOption(NodeDef_GroupPrefixProvider);
     861            const QString strNodePrefixProfile = definitionOption(NodeDef_GroupPrefixProfile);
     862            strDefinitionTemplateShort = QString("^[%1%2%3](\\S)*=").arg(strNodePrefixLocal, strNodePrefixProvider, strNodePrefixProfile);
     863            strDefinitionTemplateFull = QString("^[%1%2%3](\\S)*=%4$").arg(strNodePrefixLocal, strNodePrefixProvider, strNodePrefixProfile, strName);
    860864            break;
     865        }
    861866        case UIChooserNodeType_Machine:
    862             strDefinitionTemplateShort = QString("^m=");
    863             strDefinitionTemplateFull = QString("^m=%1$").arg(strName);
     867        {
     868            const QString strNodePrefix = definitionOption(NodeDef_MachinePrefix);
     869            strDefinitionTemplateShort = QString("^%1=").arg(strNodePrefix);
     870            strDefinitionTemplateFull = QString("^%1=%2$").arg(strNodePrefix, strName);
    864871            break;
    865         default: return -1;
     872        }
     873        default:
     874            return -1;
    866875    }
    867876    QRegExp definitionRegExpShort(strDefinitionTemplateShort);
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