VirtualBox

Changeset 85548 in vbox for trunk


Ignore:
Timestamp:
Jul 30, 2020 9:36:35 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9686, bugref:9510. Some fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp

    r85547 r85548  
    13021302    updateColumnsMenu();
    13031303
    1304     if (m_pShowPerformanceMonitorAction)
    1305         m_pShowPerformanceMonitorAction->setText(tr("Show Performance Monitor"));
    13061304    if (m_pModel)
    13071305        m_pModel->setColumnCaptions(m_columnTitles);
     
    13131311void UIResourceMonitorWidget::showEvent(QShowEvent *pEvent)
    13141312{
    1315     QAction *pSwitchAction = m_pActionPool->action(UIActionIndexST_M_VMResourceMonitor_S_SwitchToMachinePerformance);
    1316     if (pSwitchAction && m_pTableView)
    1317         pSwitchAction->setEnabled(m_pTableView->hasSelection());
     1313    if (m_pShowPerformanceMonitorAction && m_pTableView)
     1314        m_pShowPerformanceMonitorAction->setEnabled(m_pTableView->hasSelection());
    13181315
    13191316    QIWithRetranslateUI<QWidget>::showEvent(pEvent);
     
    14171414{
    14181415    updateColumnsMenu();
    1419     m_pShowPerformanceMonitorAction = new QAction(this);
    1420     connect(m_pShowPerformanceMonitorAction, &QAction::triggered, this, &UIResourceMonitorWidget::sltHandleShowPerformanceMonitor);
    1421     QAction *pSwitchAction = m_pActionPool->action(UIActionIndexST_M_VMResourceMonitor_S_SwitchToMachinePerformance);
    1422     if (pSwitchAction)
    1423         connect(pSwitchAction, &QAction::triggered, this, &UIResourceMonitorWidget::sltHandleShowPerformanceMonitor);
     1416    m_pShowPerformanceMonitorAction =
     1417        m_pActionPool->action(UIActionIndexST_M_VMResourceMonitor_S_SwitchToMachinePerformance);
     1418
     1419    if (m_pShowPerformanceMonitorAction)
     1420        connect(m_pShowPerformanceMonitorAction, &QAction::triggered, this, &UIResourceMonitorWidget::sltHandleShowPerformanceMonitor);
    14241421}
    14251422
     
    15171514{
    15181515    Q_UNUSED(deselected);
    1519     QAction *pSwitchAction = m_pActionPool->action(UIActionIndexST_M_VMResourceMonitor_S_SwitchToMachinePerformance);
    1520     if (pSwitchAction)
    1521         pSwitchAction->setEnabled(!selected.isEmpty());
     1516    if (m_pShowPerformanceMonitorAction)
     1517        m_pShowPerformanceMonitorAction->setEnabled(!selected.isEmpty());
    15221518}
    15231519
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette