Changeset 27761 in vbox for trunk/src/VBox/Main/MachineImpl.cpp
- Timestamp:
- Mar 26, 2010 9:48:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r27730 r27761 184 184 mSyntheticCpu = false; 185 185 mPropertyServiceActive = false; 186 mGuestPropertiesModified = false; 186 187 mHpetEnabled = false; 187 188 … … 7663 7664 HWData::GuestProperty property = *it; 7664 7665 7666 /* Remove transient guest properties at shutdown unless we 7667 * are saving state */ 7668 if ( ( mData->mMachineState == MachineState_PoweredOff 7669 || mData->mMachineState == MachineState_Aborted 7670 || mData->mMachineState == MachineState_Teleported) 7671 && property.mFlags & guestProp::TRANSIENT) 7672 continue; 7665 7673 settings::GuestProperty prop; 7666 7674 prop.strName = property.strName; … … 7675 7683 7676 7684 data.strNotificationPatterns = mHWData->mGuestPropertyNotificationPatterns; 7685 /* I presume this doesn't require a backup(). */ 7686 mHWData->mGuestPropertiesModified = false; 7677 7687 #endif /* VBOX_WITH_GUEST_PROPS defined */ 7678 7688 } … … 9963 9973 { 9964 9974 mHWData->mGuestProperties.erase(iter); 9975 mHWData->mGuestPropertiesModified = true; 9965 9976 break; 9966 9977 } … … 9969 9980 HWData::GuestProperty property = { aName, aValue, aTimestamp, fFlags }; 9970 9981 mHWData->mGuestProperties.push_back(property); 9982 mHWData->mGuestPropertiesModified = true; 9971 9983 } 9972 9984 … … 10793 10805 } 10794 10806 10807 if ( aMachineState == MachineState_PoweredOff 10808 || aMachineState == MachineState_Aborted 10809 || aMachineState == MachineState_Teleported) 10810 { 10811 /* Make sure any transient guest properties get removed from the 10812 * property store on shutdown. */ 10813 10814 HWData::GuestPropertyList::iterator it; 10815 BOOL fNeedsSaving = mHWData->mGuestPropertiesModified; 10816 if (!fNeedsSaving) 10817 for (it = mHWData->mGuestProperties.begin(); 10818 it != mHWData->mGuestProperties.end(); ++it) 10819 if (it->mFlags & guestProp::TRANSIENT) 10820 { 10821 fNeedsSaving = true; 10822 break; 10823 } 10824 if (fNeedsSaving) 10825 { 10826 mData->mCurrentStateModified = TRUE; 10827 stsFlags |= SaveSTS_CurStateModified; 10828 SaveSettings(); 10829 } 10830 } 10831 10795 10832 rc = saveStateSettings(stsFlags); 10796 10833
Note:
See TracChangeset
for help on using the changeset viewer.