VirtualBox

Changeset 83317 in vbox


Ignore:
Timestamp:
Mar 18, 2020 12:55:34 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136501
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: Possibility to search item by id.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserDefs.h

    r82968 r83317  
    4545    UIChooserItemSearchFlag_Global    = RT_BIT(1),
    4646    UIChooserItemSearchFlag_Group     = RT_BIT(2),
    47     UIChooserItemSearchFlag_ExactName = RT_BIT(3)
     47    UIChooserItemSearchFlag_ExactId   = RT_BIT(3),
     48    UIChooserItemSearchFlag_ExactName = RT_BIT(4)
    4849};
    4950
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp

    r82968 r83317  
    207207UIChooserItem *UIChooserItemGlobal::searchForItem(const QString &, int iItemSearchFlags)
    208208{
    209     /* Ignoring if we are not searching for the global-item? */
     209    /* Ignore if we are not searching for the global-item: */
    210210    if (!(iItemSearchFlags & UIChooserItemSearchFlag_Global))
    211211        return 0;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp

    r82968 r83317  
    483483    if (iItemSearchFlags & UIChooserItemSearchFlag_Group)
    484484    {
     485        /* Are we searching by the exact ID? */
     486        if (iItemSearchFlags & UIChooserItemSearchFlag_ExactId)
     487        {
     488            // Groups doesn't have IDs, but we should prevent
     489            // search procedure from going to 'else' path..
     490        }
    485491        /* Are we searching by the exact name? */
    486         if (iItemSearchFlags & UIChooserItemSearchFlag_ExactName)
     492        else if (iItemSearchFlags & UIChooserItemSearchFlag_ExactName)
    487493        {
    488494            /* Exact name matches? */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp

    r82968 r83317  
    241241UIChooserItem* UIChooserItemMachine::searchForItem(const QString &strSearchTag, int iItemSearchFlags)
    242242{
    243     /* Ignoring if we are not searching for the machine-item? */
     243    /* Ignore if we are not searching for the machine-item: */
    244244    if (!(iItemSearchFlags & UIChooserItemSearchFlag_Machine))
    245245        return 0;
    246246
     247    /* Are we searching by the exact ID? */
     248    if (iItemSearchFlags & UIChooserItemSearchFlag_ExactId)
     249    {
     250        /* Exact ID doesn't match? */
     251        if (id() != QUuid(strSearchTag))
     252            return 0;
     253    }
    247254    /* Are we searching by the exact name? */
    248     if (iItemSearchFlags & UIChooserItemSearchFlag_ExactName)
     255    else if (iItemSearchFlags & UIChooserItemSearchFlag_ExactName)
    249256    {
    250257        /* Exact name doesn't match? */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette