Changeset 15888 in vbox
- Timestamp:
- Jan 11, 2009 3:39:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r15766 r15888 3085 3085 property.mFlags = NILFLAG; 3086 3086 if (fFlags & TRANSIENT) 3087 rc = setError (VBOX_E_INVALID_OBJECT_STATE, tr ("Cannot set a transient property when the machine is not running")); 3087 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 3088 tr ("Cannot set a transient property when the " 3089 "machine is not running")); 3088 3090 if (SUCCEEDED (rc)) 3089 3091 { 3090 for (HWData::GuestPropertyList::iterator it = mHWData->mGuestProperties.begin(); 3091 (it != mHWData->mGuestProperties.end()) && !found; ++it) 3092 for (HWData::GuestPropertyList::iterator it = 3093 mHWData->mGuestProperties.begin(); 3094 it != mHWData->mGuestProperties.end(); ++ it) 3092 3095 if (it->mName == aName) 3093 3096 { 3094 3097 property = *it; 3095 3098 if (it->mFlags & (RDONLYHOST)) 3096 rc = setError (E_ACCESSDENIED, tr ("The property '%ls' cannot be changed by the host"), aName); 3099 rc = setError (E_ACCESSDENIED, 3100 tr ("The property '%ls' cannot be changed by the host"), 3101 aName); 3097 3102 else 3098 3103 { 3099 3104 mHWData.backup(); 3100 /* The backup() operation invalidates our iterator, so get a3101 *new one. */3105 /* The backup() operation invalidates our iterator, so 3106 * get a new one. */ 3102 3107 for (it = mHWData->mGuestProperties.begin(); 3103 it->mName != aName; ++ it)3108 it->mName != aName; ++ it) 3104 3109 ; 3105 3110 mHWData->mGuestProperties.erase (it); 3106 3111 } 3107 3112 found = true; 3108 break; /* don't do ++it before we leave the loop */3113 break; 3109 3114 } 3110 3115 }
Note:
See TracChangeset
for help on using the changeset viewer.