Changeset 101097 in vbox
- Timestamp:
- Sep 12, 2023 11:20:03 PM (20 months ago)
- svn:sync-xref-src-repo-rev:
- 159066
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/VBoxDbgStatsQt.cpp
r101095 r101097 659 659 * (18 446 744 073 709 551 615) 660 660 */ 661 static char *formatNumberSigned(char *psz, int64_t i64 )661 static char *formatNumberSigned(char *psz, int64_t i64, bool fPositivePlus = false) 662 662 { 663 663 static const char s_szDigits[] = "0123456789"; … … 680 680 if (fNegative) 681 681 *--psz = '-'; 682 else if (fPositivePlus) 683 *--psz = '+'; 682 684 return psz; 683 685 } … … 1950 1952 if (iChild >= pNode->cChildren) 1951 1953 break; 1952 QModelIndex const TopLeft = createIndex(iChild, 2, pNode->papChildren[iChild]); 1953 pNode->papChildren[iChild]->enmState = kDbgGuiStatsNodeState_kVisible; 1954 PDBGGUISTATSNODE pChild = pNode->papChildren[iChild]; 1955 QModelIndex const TopLeft = createIndex(iChild, 2, pChild); 1956 pChild->enmState = kDbgGuiStatsNodeState_kVisible; 1954 1957 1955 1958 /* Any subsequent nodes that also needs refreshing? */ 1956 while ( iChild + 1 < pNode->cChildren 1957 && pNode->papChildren[iChild + 1]->enmState == kDbgGuiStatsNodeState_kRefresh) 1958 iChild++; 1959 int const iRightCol = pChild->enmType != STAMTYPE_PROFILE && pChild->enmType != STAMTYPE_PROFILE_ADV ? 4 : 7; 1960 if (iRightCol == 4) 1961 while ( iChild + 1 < pNode->cChildren 1962 && (pChild = pNode->papChildren[iChild + 1])->enmState == kDbgGuiStatsNodeState_kRefresh 1963 && pChild->enmType != STAMTYPE_PROFILE 1964 && pChild->enmType != STAMTYPE_PROFILE_ADV) 1965 iChild++; 1966 else 1967 while ( iChild + 1 < pNode->cChildren 1968 && (pChild = pNode->papChildren[iChild + 1])->enmState == kDbgGuiStatsNodeState_kRefresh 1969 && ( pChild->enmType == STAMTYPE_PROFILE 1970 || pChild->enmType == STAMTYPE_PROFILE_ADV)) 1971 iChild++; 1959 1972 1960 1973 /* emit the refresh signal */ 1961 QModelIndex const BottomRight = createIndex(iChild, DBGGUI_STATS_COLUMNS - 2, pNode->papChildren[iChild]);1974 QModelIndex const BottomRight = createIndex(iChild, iRightCol, pNode->papChildren[iChild]); 1962 1975 emit dataChanged(TopLeft, BottomRight); 1963 1976 iChild++; … … 2194 2207 case 1: return tr("Unit"); 2195 2208 case 2: return tr("Value/Times"); 2196 case 3: return tr(" Min");2197 case 4: return tr(" Average");2198 case 5: return tr(" Max");2199 case 6: return tr(" Total");2200 case 7: return tr(" dInt");2209 case 3: return tr("dInt"); 2210 case 4: return tr("Min"); 2211 case 5: return tr("Average"); 2212 case 6: return tr("Max"); 2213 case 7: return tr("Total"); 2201 2214 case 8: return tr("Description"); 2202 2215 default: … … 2417 2430 case STAMTYPE_BOOL: 2418 2431 case STAMTYPE_BOOL_RESET: 2419 return formatNumberSigned(sz, pNode->i64Delta); 2432 if (pNode->i64Delta) 2433 return formatNumberSigned(sz, pNode->i64Delta, true /*fPositivePlus*/); 2434 return "0"; 2420 2435 default: 2421 2436 return ""; … … 2445 2460 return strValueTimes(pNode); 2446 2461 case 3: 2462 return strDeltaValue(pNode); 2463 case 4: 2447 2464 return strMinValue(pNode); 2448 case 4:2465 case 5: 2449 2466 return strAvgValue(pNode); 2450 case 5:2467 case 6: 2451 2468 return strMaxValue(pNode); 2452 case 6:2469 case 7: 2453 2470 return strTotalValue(pNode); 2454 case 7:2455 return strDeltaValue(pNode);2456 2471 case 8: 2457 2472 return pNode->pDescStr ? QString(*pNode->pDescStr) : QString("");
Note:
See TracChangeset
for help on using the changeset viewer.