Changeset 102773 in vbox
- Timestamp:
- Jan 5, 2024 12:56:26 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp
r102748 r102773 757 757 const QQueue<QString> *labels = m_pMetric->labels(); 758 758 int iDataIndex = qMin(labels->size() - 1, iTimeIndex - (m_iMaximumQueueSize - maxDataSize())); 759 strAxisText = UIVMActivityMonitorCloud::formatCloudTimeStamp(labels->at(iDataIndex)); 759 if (iDataIndex >= 0) 760 strAxisText = UIVMActivityMonitorCloud::formatCloudTimeStamp(labels->at(iDataIndex)); 760 761 } 761 762 else … … 1950 1951 resetDiskIOInfoLabel(); 1951 1952 resetRAMInfoLabel(); 1953 1954 if (m_comMachine.isOk()) 1955 { 1956 m_ReadListProgressTask = new UIProgressTaskReadCloudMachineMetricList(this, m_comMachine); 1957 if (m_ReadListProgressTask) 1958 connect(m_ReadListProgressTask, &UIProgressTaskReadCloudMachineMetricList::sigMetricListReceived, 1959 this, &UIVMActivityMonitorCloud::sltMetricNameListingComplete); 1960 } 1961 /* Start the timer: */ 1962 start(); 1952 1963 } 1953 1964 … … 1994 2005 if (!m_comMachine.isOk()) 1995 2006 return; 1996 1997 m_ReadListProgressTask = new UIProgressTaskReadCloudMachineMetricList(this, comMachine); 1998 if (m_ReadListProgressTask) 1999 { 2000 connect(m_ReadListProgressTask, &UIProgressTaskReadCloudMachineMetricList::sigMetricListReceived, 2001 this, &UIVMActivityMonitorCloud::sltMetricNameListingComplete); 2002 m_ReadListProgressTask->start(); 2003 } 2007 setEnabled(m_comMachine.GetState() == KCloudMachineState_Running); 2004 2008 } 2005 2009 … … 2072 2076 void UIVMActivityMonitorCloud::obtainDataAndUpdate() 2073 2077 { 2078 /* No need to refresh cached values of the ICloudMachine since it has been already done 2079 * by the VM list related class. Just fetch the machine attribute here: */ 2080 if (!m_comMachine.isOk() || m_comMachine.GetState() != KCloudMachineState_Running) 2081 { 2082 setEnabled(false); 2083 return; 2084 } 2085 if (!isEnabled()) 2086 setEnabled(true); 2087 if (m_ReadListProgressTask && !m_ReadListProgressTask->isRunning()) 2088 m_ReadListProgressTask->start(); 2074 2089 foreach (const KMetricType &enmMetricType, m_availableMetricTypes) 2075 2090 { … … 2342 2357 QString UIVMActivityMonitorCloud::formatCloudTimeStamp(const QString &strInput) 2343 2358 { 2359 if (strInput.isEmpty()) 2360 return QString(); 2344 2361 QDateTime dateTime = QDateTime::fromString(strInput, Qt::RFC2822Date); 2345 2362
Note:
See TracChangeset
for help on using the changeset viewer.