儲存庫 vbox 的更動 46351
- 時間撮記:
- 2013-5-31 下午08:25:22 (11 年 以前)
- 位置:
- trunk/src/VBox/Main
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r46348 r46351 1290 1290 // We must not throw away entries yet, otherwise settings are lost 1291 1291 // without a way to roll back. 1292 uint32_t newCount = Global::getMaxNetworkAdapters(aChipsetType);1293 uint32_t oldCount = mNetworkAdapters.size();1292 size_t newCount = Global::getMaxNetworkAdapters(aChipsetType); 1293 size_t oldCount = mNetworkAdapters.size(); 1294 1294 if (newCount > oldCount) 1295 1295 { … … 9979 9979 void Machine::copyMachineDataToSettings(settings::MachineConfigFile &config) 9980 9980 { 9981 Utf8Str aStr;9982 9983 9981 // deep copy extradata 9984 9982 config.mapExtraDataItems = mData->pMachineConfigFile->mapExtraDataItems; … … 9993 9991 COMGETTER(Icon)(ComSafeArrayAsOutParam(iconByte)); 9994 9992 ssize_t cbData = iconByte.size(); 9995 if (cbData == 0) 9996 throw setError(E_FAIL, 9997 tr("Icon Data length is zero. '%d'"), 9998 cbData); 9999 ssize_t cchOut = RTBase64EncodedLength(cbData); 10000 aStr.reserve(cchOut+1); 10001 HRESULT rc = RTBase64Encode(iconByte.raw(), cbData, 10002 aStr.mutableRaw(), aStr.capacity(), 10003 NULL); 10004 if (FAILED(rc)) 10005 throw setError(E_FAIL, 10006 tr("Failure to Encode Icon Data. '%s' (%d)"), 10007 aStr.mutableRaw(), 10008 rc); 10009 aStr.jolt(); 10010 config.machineUserData.ovIcon = aStr.c_str(); 9993 if (cbData > 0) 9994 { 9995 ssize_t cchOut = RTBase64EncodedLength(cbData); 9996 Utf8Str strIconData; 9997 strIconData.reserve(cchOut+1); 9998 int vrc = RTBase64Encode(iconByte.raw(), cbData, 9999 strIconData.mutableRaw(), strIconData.capacity(), 10000 NULL); 10001 if (RT_FAILURE(vrc)) 10002 throw setError(E_FAIL, tr("Failure to Encode Icon Data. '%s' (%Rrc)"), strIconData.mutableRaw(), vrc); 10003 strIconData.jolt(); 10004 config.machineUserData.ovIcon = strIconData; 10005 } 10006 else 10007 config.machineUserData.ovIcon.setNull(); 10011 10008 10012 10009 if ( mData->mMachineState == MachineState_Saved … … 10040 10037 /// @todo Live Migration: config.fTeleported = (mData->mMachineState == MachineState_Teleported); 10041 10038 10042 rc = saveHardware(config.hardwareMachine, &config.debugging, &config.autostart);10039 HRESULT rc = saveHardware(config.hardwareMachine, &config.debugging, &config.autostart); 10043 10040 if (FAILED(rc)) throw rc; 10044 10041 -
trunk/src/VBox/Main/xml/Settings.cpp
r46348 r46351 4849 4849 if (machineUserData.strDescription.length()) 4850 4850 elmMachine.createChild("Description")->addContent(machineUserData.strDescription); 4851 elmMachine.setAttribute("Icon", machineUserData.ovIcon); 4851 if (machineUserData.ovIcon.length()) 4852 elmMachine.setAttribute("Icon", machineUserData.ovIcon); 4852 4853 elmMachine.setAttribute("OSType", machineUserData.strOsType); 4853 4854 if ( strStateFile.length() … … 5051 5052 if ( !hardwareMachine.strDefaultFrontend.isEmpty() 5052 5053 || hardwareMachine.graphicsControllerType != GraphicsControllerType_VBoxVGA 5053 || hardwareMachine.enmLongMode != Hardware::LongMode_Legacy) 5054 || hardwareMachine.enmLongMode != Hardware::LongMode_Legacy 5055 || machineUserData.ovIcon.length() > 0) 5054 5056 m->sv = SettingsVersion_v1_14; 5055 5057 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器