Changeset 51178 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 30, 2014 2:43:00 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/extradata
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r51177 r51178 575 575 } 576 576 577 QString UIExtraDataManager::extraDataString(const QString &strKey, const QString &strID /* = QString() */) const577 bool UIExtraDataManager::isFeatureRestricted(const QString &strKey, const QString &strID /* = QString() */) const 578 578 { 579 579 /* Hot-load machine extra-data map if necessary: */ … … 584 584 ExtraDataMap &data = m_data[strID]; 585 585 586 /* 'false' if value was not set: */ 587 if (!data.contains(strKey)) 588 return false; 589 590 /* Check corresponding value: */ 591 const QString &strValue = data[strKey]; 592 return strValue.compare("false", Qt::CaseInsensitive) == 0 593 || strValue.compare("no", Qt::CaseInsensitive) == 0 594 || strValue.compare("off", Qt::CaseInsensitive) == 0 595 || strValue == "0"; 596 } 597 598 QString UIExtraDataManager::extraDataString(const QString &strKey, const QString &strID /* = QString() */) const 599 { 600 /* Hot-load machine extra-data map if necessary: */ 601 if (!strID.isNull() && !m_data.contains(strID)) 602 hotloadMachineExtraDataMap(strID); 603 604 /* Access corresponding map: */ 605 ExtraDataMap &data = m_data[strID]; 606 586 607 /* QString() if value was not set: */ 587 608 if (!data.contains(strKey)) -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r51177 r51178 170 170 * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */ 171 171 bool isFeatureAllowed(const QString &strKey, const QString &strID = QString()) const; 172 /** Determines whether feature corresponding to passed @a strKey is restricted. 173 * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */ 174 bool isFeatureRestricted(const QString &strKey, const QString &strID = QString()) const; 172 175 173 176 /** Returns extra-data value corresponding to passed @a strKey as QString.
Note:
See TracChangeset
for help on using the changeset viewer.