- 時間撮記:
- 2014-3-7 上午10:54:59 (11 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp
r50611 r50724 485 485 } 486 486 487 #if 0488 int DnDURIList::FromData(const void *pvData, size_t cbData,489 490 uint32_t fFlags)491 {492 AssertPtrReturn(pvData, VERR_INVALID_POINTER);493 AssertReturn(cbData, VERR_INVALID_PARAMETER);494 495 RTCList<RTCString> lstURI =496 RTCString(static_cast<const char*>(pvData), cbData - 1).split("\r\n");497 if (lstURI.isEmpty())498 return VINF_SUCCESS;499 500 int rc = VINF_SUCCESS;501 502 for (size_t i = 0; i < lstURI.size(); ++i)503 {504 const RTCString &strUri = lstURI.at(i);505 /* Query the path component of a file URI. If this hasn't a506 * file scheme, null is returned. */507 char *pszFilePath = RTUriFilePath(strUri.c_str(), URI_FILE_FORMAT_AUTO);508 if (pszFilePath)509 {510 rc = DnDPathSanitize(pszFilePath, strlen(pszFilePath));511 if (RT_SUCCESS(rc))512 {513 /** @todo Use RTPathJoin? */514 RTCString strFullPath;515 if (strBasePath.isNotEmpty())516 strFullPath = RTCString().printf("%s%c%s", strBasePath.c_str(),517 RTPATH_SLASH, pszFilePath);518 else519 strFullPath = pszFilePath;520 521 char *pszNewUri = RTUriFileCreate(strFullPath.c_str());522 if (pszNewUri)523 {524 m_lstRoot.append(pszNewUri);525 RTStrFree(pszNewUri);526 }527 }528 }529 else530 rc = VERR_INVALID_PARAMETER;531 532 if (RT_FAILURE(rc))533 break;534 }535 536 return rc;537 }538 #endif539 540 487 void DnDURIList::RemoveFirst(void) 541 488 { … … 606 553 { 607 554 strRet += RTCString(pszPathURI) + strSeparator; 555 #ifdef DEBUG_andy 556 LogFlowFunc(("URI: %s\n", strRet.c_str())); 557 #endif 608 558 RTStrFree(pszPathURI); 609 559 } … … 621 571 { 622 572 strRet += RTCString(pszPathURI) + strSeparator; 573 #ifdef DEBUG_andy 574 LogFlowFunc(("URI: %s\n", strRet.c_str())); 575 #endif 623 576 RTStrFree(pszPathURI); 624 577 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器