Changeset 46782 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
- Timestamp:
- Jun 25, 2013 2:58:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r46763 r46782 3619 3619 3620 3620 /* static */ 3621 bool VBoxGlobal::isApprovedByExtraData(C Machine &machine, const QString &strExtraDataKey)3621 bool VBoxGlobal::isApprovedByExtraData(CVirtualBox &vbox, const QString &strExtraDataKey) 3622 3622 { 3623 3623 /* Load corresponding extra-data value: */ 3624 QString strExtraDataValue( machine.GetExtraData(strExtraDataKey));3624 QString strExtraDataValue(vbox.GetExtraData(strExtraDataKey)); 3625 3625 3626 3626 /* 'false' if value was not set: */ … … 3633 3633 || strExtraDataValue.compare("on", Qt::CaseInsensitive) == 0 3634 3634 || strExtraDataValue == "1"; 3635 } 3636 3637 /* static */ 3638 bool VBoxGlobal::isApprovedByExtraData(CMachine &machine, const QString &strExtraDataKey) 3639 { 3640 /* Load corresponding extra-data value: */ 3641 QString strExtraDataValue(machine.GetExtraData(strExtraDataKey)); 3642 3643 /* 'false' if value was not set: */ 3644 if (strExtraDataValue.isEmpty()) 3645 return false; 3646 3647 /* Handle particular values: */ 3648 return strExtraDataValue.compare("true", Qt::CaseInsensitive) == 0 3649 || strExtraDataValue.compare("yes", Qt::CaseInsensitive) == 0 3650 || strExtraDataValue.compare("on", Qt::CaseInsensitive) == 0 3651 || strExtraDataValue == "1"; 3652 } 3653 3654 /* static */ 3655 bool VBoxGlobal::shouldWeAllowApplicationUpdate(CVirtualBox &vbox) 3656 { 3657 /* 'true' if disabling is not approved by the extra-data: */ 3658 return !isApprovedByExtraData(vbox, GUI_PreventApplicationUpdate); 3635 3659 } 3636 3660
Note:
See TracChangeset
for help on using the changeset viewer.