VirtualBox

Changeset 51930 in vbox


Ignore:
Timestamp:
Jul 8, 2014 12:52:57 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 6660: Advanced extra-data management framework: Notifies listeners about extra-data 'changed' (including 'removed' case).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/extradata
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r51929 r51930  
    12591259    /* Re-cache value only if strMachineID known already: */
    12601260    if (m_data.contains(strMachineID))
    1261         m_data[strMachineID][strKey] = strValue;
     1261    {
     1262        if (!strValue.isEmpty())
     1263            m_data[strMachineID][strKey] = strValue;
     1264        else
     1265            m_data[strMachineID].remove(strKey);
     1266    }
    12621267
    12631268    /* Global extra-data 'change' event: */
     
    12961301#endif /* Q_WS_MAC */
    12971302    }
     1303
     1304    /* Notify listeners: */
     1305    emit sigExtraDataChange(strMachineID, strKey, strValue);
    12981306}
    12991307
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r51929 r51930  
    4747
    4848signals:
     49
     50    /** Notifies about extra-data change. */
     51    void sigExtraDataChange(QString strID, QString strKey, QString strValue);
    4952
    5053    /** Notifies about GUI language change. */
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