Changeset 54937 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 25, 2015 12:24:45 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r54794 r54937 2460 2460 const char *errMsg = NULL; 2461 2461 2462 /* first, try as is (only set bit 31 bit for warnings)*/2462 /* First, try as is (only set bit 31 bit for warnings): */ 2463 2463 if (SUCCEEDED_WARNING(rc)) 2464 2464 msg = RTErrCOMGet(rc | 0x80000000); … … 2469 2469 errMsg = msg->pszDefine; 2470 2470 2471 #if defined (Q_WS_WIN) 2472 2471 #ifdef Q_WS_WIN 2473 2472 PCRTWINERRMSG winMsg = NULL; 2474 2473 2475 /* if not found, try again using RTErrWinGet with masked off top 16bit*/2474 /* If not found, try again using RTErrWinGet with masked off top 16bit: */ 2476 2475 if (msg == NULL) 2477 2476 { … … 2481 2480 errMsg = winMsg->pszDefine; 2482 2481 } 2483 2484 #endif 2482 #endif /* Q_WS_WIN */ 2483 2484 if (errMsg != NULL && *errMsg != '\0') 2485 str.sprintf("%s", errMsg); 2486 2487 return str; 2488 } 2489 2490 /* static */ 2491 QString UIMessageCenter::formatRCFull(HRESULT rc) 2492 { 2493 QString str; 2494 2495 PCRTCOMERRMSG msg = NULL; 2496 const char *errMsg = NULL; 2497 2498 /* First, try as is (only set bit 31 bit for warnings): */ 2499 if (SUCCEEDED_WARNING(rc)) 2500 msg = RTErrCOMGet(rc | 0x80000000); 2501 else 2502 msg = RTErrCOMGet(rc); 2503 2504 if (msg != NULL) 2505 errMsg = msg->pszDefine; 2506 2507 #ifdef Q_WS_WIN 2508 PCRTWINERRMSG winMsg = NULL; 2509 2510 /* If not found, try again using RTErrWinGet with masked off top 16bit: */ 2511 if (msg == NULL) 2512 { 2513 winMsg = RTErrWinGet(rc & 0xFFFF); 2514 2515 if (winMsg != NULL) 2516 errMsg = winMsg->pszDefine; 2517 } 2518 #endif /* Q_WS_WIN */ 2485 2519 2486 2520 if (errMsg != NULL && *errMsg != '\0') … … 2508 2542 "<tr><td>%1</td><td><tt>%2</tt></td></tr></table>") 2509 2543 .arg(tr("Result Code: ", "error info")) 2510 .arg(formatRC (progress.GetResultCode()))2544 .arg(formatRCFull(progress.GetResultCode())) 2511 2545 .prepend("<!--EOM-->") /* move to details */; 2512 2546 } … … 2729 2763 formatted += QString("<tr><td>%1</td><td><tt>%2</tt></td></tr>") 2730 2764 .arg(tr("Result Code: ", "error info")) 2731 .arg(formatRC (info.resultCode()));2765 .arg(formatRCFull(info.resultCode())); 2732 2766 } 2733 2767 … … 2760 2794 formatted += QString("<tr><td>%1</td><td><tt>%2</tt></td></tr>") 2761 2795 .arg(tr("Callee RC: ", "error info")) 2762 .arg(formatRC (wrapperRC));2796 .arg(formatRCFull(wrapperRC)); 2763 2797 } 2764 2798 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r54794 r54937 360 360 /* API: Static helpers: */ 361 361 static QString formatRC(HRESULT rc); 362 static QString formatRCFull(HRESULT rc); 362 363 static QString formatErrorInfo(const CProgress &progress); 363 364 static QString formatErrorInfo(const COMErrorInfo &info, HRESULT wrapperRC = S_OK);
Note:
See TracChangeset
for help on using the changeset viewer.