VirtualBox

Changeset 88505 in vbox


Ignore:
Timestamp:
Apr 14, 2021 12:45:54 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9686. Adding updates for vm register signals

File:
1 edited

Legend:

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

    r88205 r88505  
    324324
    325325    void sltMachineStateChanged(const QUuid &uId, const KMachineState state);
     326    void sltMachineRegistered(const QUuid &uId, bool fRegistered);
    326327    void sltTimeout();
    327328
     
    942943    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange,
    943944            this, &UIActivityOverviewModel::sltMachineStateChanged);
    944 
     945    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineRegistered,
     946            this, &UIActivityOverviewModel::sltMachineRegistered);
    945947    if (m_pTimer)
    946948    {
     
    10591061            m_itemList[iIndex].resetDebugger();
    10601062    }
    1061     //
    1062     // /* Remove the machine in case machine is no longer working. */
    1063     // if (iIndex != -1 && state != KMachineState_Running)
    1064     // {
    1065     //     emit layoutAboutToBeChanged();
    1066     //     removeItem(uId);
    1067     //     emit layoutChanged();
    1068     //     setupPerformanceCollector();
    1069     //     return;
    1070     // }
    1071     // /* Insert the machine if it is working. */
    1072     // if (iIndex == -1 && state == KMachineState_Running)
    1073     // {
    1074     //     emit layoutAboutToBeChanged();
    1075     //     CMachine comMachine = uiCommon().virtualBox().FindMachine(uId.toString());
    1076     //     if (!comMachine.isNull())
    1077     //         addItem(uId, comMachine.GetName());
    1078     //     emit layoutChanged();
    1079     //     setupPerformanceCollector();
    1080     //     return;
    1081     // }
     1063}
     1064
     1065void UIActivityOverviewModel::sltMachineRegistered(const QUuid &uId, bool fRegistered)
     1066{
     1067    if (fRegistered)
     1068    {
     1069        CMachine comMachine = uiCommon().virtualBox().FindMachine(uId.toString());
     1070        if (!comMachine.isNull())
     1071            addItem(uId, comMachine.GetName(), comMachine.GetState());
     1072    }
     1073    else
     1074        removeItem(uId);
     1075    emit sigDataUpdate();
    10821076}
    10831077
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