Changeset 83468 in vbox
- Timestamp:
- Mar 27, 2020 1:28:05 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp
r83466 r83468 382 382 if (!index.isValid() || role != Qt::DisplayRole || index.row() >= rowCount()) 383 383 return QVariant(); 384 UIResourceMonitorItem* pItem = static_cast<UIResourceMonitorItem*>(index.internalPointer()); 384 385 385 386 switch (index.column()) … … 395 396 break; 396 397 case VMResouceMonitorColumn_RAMUsedAndTotal: 397 return QString("%1/%2").arg(uiCommon().formatSize(_1K * m_itemList[index.row()].m_uUsedRAM, iDecimalCount)). 398 arg(uiCommon().formatSize(_1K * m_itemList[index.row()].m_uTotalRAM, iDecimalCount)); 398 if (pItem && pItem->isWithGuestAdditions()) 399 return QString("%1/%2").arg(uiCommon().formatSize(_1K * m_itemList[index.row()].m_uUsedRAM, iDecimalCount)). 400 arg(uiCommon().formatSize(_1K * m_itemList[index.row()].m_uTotalRAM, iDecimalCount)); 401 else 402 return tr("N/A"); 399 403 break; 400 404 case VMResouceMonitorColumn_RAMUsedPercentage: 401 return QString("%1%").arg(QString::number(m_itemList[index.row()].m_fRAMUsagePercentage, 'f', 2)); 405 if (pItem && pItem->isWithGuestAdditions()) 406 return QString("%1%").arg(QString::number(m_itemList[index.row()].m_fRAMUsagePercentage, 'f', 2)); 407 else 408 return tr("N/A"); 402 409 break; 403 410 case VMResouceMonitorColumn_NetworkUpRate:
Note:
See TracChangeset
for help on using the changeset viewer.