VirtualBox

Changeset 88711 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 26, 2021 4:48:01 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8161. Clearing com data from activity overview model earlier

Location:
trunk/src/VBox/Frontends/VirtualBox/src/activity/overview
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp

    r88708 r88711  
    216216class UIActivityOverviewItem
    217217{
     218
    218219public:
     220
    219221    UIActivityOverviewItem(const QUuid &uid, const QString &strVMName, KMachineState enmState);
    220222    //yUIActivityOverviewItem(const QUuid &uid);
     
    308310    int      columnCount(const QModelIndex &parent = QModelIndex()) const /* override */;
    309311    QVariant data(const QModelIndex &index, int role) const /* override */;
     312    void clearData();
    310313    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
    311314    void setColumnCaptions(const QMap<int, QString>& captions);
     
    10281031        return gpConverter->toString(m_itemList[index.row()].m_enmMachineState);
    10291032    return m_itemList[index.row()].m_columnData[index.column()];
     1033}
     1034
     1035void UIActivityOverviewModel::clearData()
     1036{
     1037    m_itemList.clear();
    10301038}
    10311039
     
    14361444    connect(&uiCommon(), &UICommon::sigAskToCommitData,
    14371445            this, &UIVMActivityOverviewWidget::sltSaveSettings);
     1446    connect(&uiCommon(), &UICommon::sigAskToDetachCOM,
     1447            this, &UIVMActivityOverviewWidget::sltClearCOMData);
    14381448}
    14391449
     
    15761586}
    15771587
     1588void UIVMActivityOverviewWidget::sltClearCOMData()
     1589{
     1590    if (m_pModel)
     1591        m_pModel->clearData();
     1592}
     1593
    15781594void UIVMActivityOverviewWidget::sltToggleColumnSelectionMenu(bool fChecked)
    15791595{
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.h

    r88708 r88711  
    8787    void sltNotRunningVMVisibility(bool fShow);
    8888    void sltSaveSettings();
     89    void sltClearCOMData();
    8990
    9091private:
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