VirtualBox

Changeset 71059 in vbox


Ignore:
Timestamp:
Feb 19, 2018 4:32:29 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120922
Message:

FE/Qt: bugref:6699 Initialize guest session tree widget correctly

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlTreeItem.cpp

    r71052 r71059  
    195195{
    196196    prepare();
     197    initProcessSubTree();
    197198}
    198199
     
    203204{
    204205    prepare();
    205 
     206    initProcessSubTree();
    206207}
    207208
     
    240241}
    241242
     243void UIGuestSessionTreeItem::initProcessSubTree()
     244{
     245    if (!m_comGuestSession.isOk())
     246        return;
     247    QVector<CGuestProcess> processes = m_comGuestSession.GetProcesses();
     248    for(int  i =0; i < processes.size(); ++i)
     249        addGuestProcess(processes[i]);
     250}
     251
    242252void UIGuestSessionTreeItem::sltGuestSessionUpdated()
    243253{
     
    250260    if (!guestProcess.isOk())
    251261        return;
     262    addGuestProcess(guestProcess);
     263}
     264
     265void UIGuestSessionTreeItem::addGuestProcess(CGuestProcess guestProcess)
     266{
    252267    QStringList strList;
    253268    strList
     
    255270        << QString("Process Name: %1").arg(guestProcess.GetName())
    256271        << QString("Process Status: %1").arg(processStatusString(guestProcess.GetStatus()));
     272
    257273    /*UIGuestProcessTreeItem *newItem = */new UIGuestProcessTreeItem(this, guestProcess, strList);
    258274}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIGuestControlTreeItem.h

    r71049 r71059  
    9696    virtual void cleanupListener()  /* override */;
    9797    virtual void setColumnText()  /* override */;
    98 
     98    void addGuestProcess(CGuestProcess guestProcess);
     99    void initProcessSubTree();
    99100    CGuestSession m_comGuestSession;
    100101
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIInformationGuestSession.cpp

    r71058 r71059  
    135135private slots:
    136136
    137     void sltExpandAll(bool bExpand)
     137    void sltExpandAll()
    138138    {
    139139        expandCollapseAll(true);
     
    177177    prepareObjects();
    178178    prepareConnections();
     179    initGuestSessionTree();
    179180}
    180181
     
    331332}
    332333
     334void UIInformationGuestSession::initGuestSessionTree()
     335{
     336    if (!m_comGuest.isOk())
     337        return;
     338
     339    QVector<CGuestSession> sessions = m_comGuest.GetSessions();
     340    for (int i = 0; i < sessions.size(); ++i)
     341    {
     342        addGuestSession(sessions.at(i));
     343    }
     344}
     345
    333346void UIInformationGuestSession::cleanupListener()
    334347{
     
    357370    if (!guestSession.isOk())
    358371        return;
    359 
     372    addGuestSession(guestSession);
     373}
     374
     375void UIInformationGuestSession::addGuestSession(CGuestSession guestSession)
     376{
    360377    UIGuestSessionTreeItem* sessionTreeItem = new UIGuestSessionTreeItem(m_pTreeWidget, guestSession);
    361378    connect(sessionTreeItem, &UIGuestSessionTreeItem::sigGuessSessionUpdated,
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/guestctrl/UIInformationGuestSession.h

    r71049 r71059  
    6666    void prepareConnections();
    6767    void prepareListener();
     68    void initGuestSessionTree();
    6869    void updateTreeWidget();
    6970    void cleanupListener();
     71    void addGuestSession(CGuestSession guestSession);
     72
    7073    CGuest                    m_comGuest;
    7174    QVBoxLayout              *m_pMainLayout;
Note: See TracChangeset for help on using the changeset viewer.

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