VirtualBox

Changeset 88699 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 26, 2021 8:16:09 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9930. Some fixes

Location:
trunk/src/VBox/Frontends/VirtualBox/src/logviewer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r88686 r88699  
    161161    prepare();
    162162    restorePanelVisibility();
     163    if (!comMachine.isNull())
     164        setMachines(QVector<QUuid>(1, comMachine.GetId()));
    163165}
    164166
     
    199201{
    200202    QVector<QUuid> selectedMachines;
    201     /* List of machines that are newly added to selected machine list: */
    202     QVector<QUuid> newSelections;
    203203
    204204    foreach (const UIVirtualMachineItem *item, items)
     
    208208        selectedMachines << item->id();
    209209    }
    210 
     210    setMachines(selectedMachines);
     211}
     212
     213void UIVMLogViewerWidget::setMachines(const QVector<QUuid> &machineIDs)
     214{
     215    /* List of machines that are newly added to selected machine list: */
     216    QVector<QUuid> newSelections;
    211217    QVector<QUuid> unselectedMachines(m_machines);
    212218
    213     foreach (const QUuid &id, selectedMachines)
     219    foreach (const QUuid &id, machineIDs)
    214220    {
    215221        unselectedMachines.removeAll(id);
     
    217223            newSelections << id;
    218224    }
    219     m_machines = selectedMachines;
     225    m_machines = machineIDs;
    220226
    221227    m_pTabWidget->hide();
     
    225231    removeLogViewerPages(unselectedMachines);
    226232    m_pTabWidget->show();
    227 
    228     printf("new selections\n");
    229     foreach (const QUuid &id, newSelections)
    230         printf("%s\n", qPrintable(id.toString()));
    231     printf("unselected\n");
    232     foreach (const QUuid &id, unselectedMachines)
    233         printf("%s\n", qPrintable(id.toString()));
    234233}
    235234
     
    629628            /* Add into layout: */
    630629            m_pMainLayout->addWidget(m_pTabWidget);
     630#if 0
    631631            m_pCornerButton = new QIToolButton(m_pTabWidget);
     632#endif
    632633            if (m_pCornerButton)
    633634            {
     
    637638                connect(m_pCornerButton, &QIToolButton::clicked, this, &UIVMLogViewerWidget::sltCornerButtonClicked);
    638639            }
     640
    639641        }
    640642
     
    808810        m_pToolBar->updateLayout();
    809811#endif
    810     m_pCornerButton->setToolTip(tr("Select machines to show their log"));
     812    if (m_pCornerButton)
     813        m_pCornerButton->setToolTip(tr("Select machines to show their log"));
    811814}
    812815
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r88686 r88699  
    199199    void manageEscapeShortCut();
    200200    void updateMachineSelectionMenu();
     201    void setMachines(const QVector<QUuid> &machineIDs);
    201202
    202203    /** Holds the widget's embedding type. */
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