VirtualBox

Changeset 86692 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 23, 2020 3:07:39 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Cloud Profile Manager: Switch from provider ID to provider short name addressing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp

    r86690 r86692  
    5555enum
    5656{
    57     Data_ItemType   = Qt::UserRole + 1,
    58     Data_ProviderID = Qt::UserRole + 2,
    59     Data_Definition = Qt::UserRole + 3,
     57    Data_ItemType          = Qt::UserRole + 1,
     58    Data_ProviderShortName = Qt::UserRole + 2,
     59    Data_Definition        = Qt::UserRole + 3,
    6060};
    6161
     
    126126    /* Update item fields: */
    127127    setText(Column_Name, m_strName);
    128     setData(Column_Name, Data_ProviderID, m_uId);
     128    setData(Column_Name, Data_ProviderShortName, m_strShortName);
    129129    setData(Column_Name, Data_Definition, QVariant::fromValue(definition(m_strShortName)));
    130130    setCheckState(Column_ListVMs, m_fRestricted ? Qt::Unchecked : Qt::Checked);
     
    279279        /* Get provider item: */
    280280        UIItemCloudProvider *pProviderItem = qobject_cast<UIItemCloudProvider*>(pProfileItem->parentItem());
    281         /* Acquire provider ID: */
    282         const QUuid uId = pProviderItem->data(Column_Name, Data_ProviderID).toUuid();
     281        /* Acquire provider short name: */
     282        const QString strShortName = pProviderItem->data(Column_Name, Data_ProviderShortName).toString();
    283283
    284284        /* Look for corresponding provider: */
    285         CCloudProvider comCloudProvider = comCloudProviderManager.GetProviderById(uId);
     285        CCloudProvider comCloudProvider = comCloudProviderManager.GetProviderByShortName(strShortName);
    286286        /* Show error message if necessary: */
    287287        if (!comCloudProviderManager.isOk())
    288             msgCenter().cannotFindCloudProvider(comCloudProviderManager, uId, this);
     288            msgCenter().cannotAcquireCloudProviderManagerParameter(comCloudProviderManager, this);
    289289        else
    290290        {
     
    376376    else
    377377    {
    378         /* Acquire provider ID: */
    379         const QUuid uId = pProviderItem->data(Column_Name, Data_ProviderID).toUuid();
     378        /* Acquire provider short name: */
     379        const QString strShortName = pProviderItem->data(Column_Name, Data_ProviderShortName).toString();
    380380
    381381        /* Look for corresponding provider: */
    382         CCloudProvider comCloudProvider = comCloudProviderManager.GetProviderById(uId);
     382        CCloudProvider comCloudProvider = comCloudProviderManager.GetProviderByShortName(strShortName);
    383383        /* Show error message if necessary: */
    384384        if (!comCloudProviderManager.isOk())
    385             msgCenter().cannotFindCloudProvider(comCloudProviderManager, uId, this);
     385            msgCenter().cannotAcquireCloudProviderManagerParameter(comCloudProviderManager, this);
    386386        else
    387387        {
     
    427427    else
    428428    {
    429         /* Acquire provider ID: */
    430         const QUuid uId = pProviderItem->data(Column_Name, Data_ProviderID).toUuid();
     429        /* Acquire provider short name: */
     430        const QString strShortName = pProviderItem->data(Column_Name, Data_ProviderShortName).toString();
    431431
    432432        /* Look for corresponding provider: */
    433         CCloudProvider comCloudProvider = comCloudProviderManager.GetProviderById(uId);
     433        CCloudProvider comCloudProvider = comCloudProviderManager.GetProviderByShortName(strShortName);
    434434        /* Show error message if necessary: */
    435435        if (!comCloudProviderManager.isOk())
    436             msgCenter().cannotFindCloudProvider(comCloudProviderManager, uId, this);
     436            msgCenter().cannotAcquireCloudProviderManagerParameter(comCloudProviderManager, this);
    437437        else
    438438        {
     
    473473        /* Get provider item: */
    474474        UIItemCloudProvider *pProviderItem = qobject_cast<UIItemCloudProvider*>(pProfileItem->parentItem());
    475         /* Acquire provider ID: */
    476         const QUuid uId = pProviderItem->data(Column_Name, Data_ProviderID).toUuid();
     475        /* Acquire provider short name: */
     476        const QString strShortName = pProviderItem->data(Column_Name, Data_ProviderShortName).toString();
    477477
    478478        /* Look for corresponding provider: */
    479         CCloudProvider comCloudProvider = comCloudProviderManager.GetProviderById(uId);
     479        CCloudProvider comCloudProvider = comCloudProviderManager.GetProviderByShortName(strShortName);
    480480        /* Show error message if necessary: */
    481481        if (!comCloudProviderManager.isOk())
    482             msgCenter().cannotFindCloudProvider(comCloudProviderManager, uId, this);
     482            msgCenter().cannotAcquireCloudProviderManagerParameter(comCloudProviderManager, this);
    483483        else
    484484        {
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