Changeset 88699 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 26, 2021 8:16:09 AM (4 years ago)
- 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 161 161 prepare(); 162 162 restorePanelVisibility(); 163 if (!comMachine.isNull()) 164 setMachines(QVector<QUuid>(1, comMachine.GetId())); 163 165 } 164 166 … … 199 201 { 200 202 QVector<QUuid> selectedMachines; 201 /* List of machines that are newly added to selected machine list: */202 QVector<QUuid> newSelections;203 203 204 204 foreach (const UIVirtualMachineItem *item, items) … … 208 208 selectedMachines << item->id(); 209 209 } 210 210 setMachines(selectedMachines); 211 } 212 213 void UIVMLogViewerWidget::setMachines(const QVector<QUuid> &machineIDs) 214 { 215 /* List of machines that are newly added to selected machine list: */ 216 QVector<QUuid> newSelections; 211 217 QVector<QUuid> unselectedMachines(m_machines); 212 218 213 foreach (const QUuid &id, selectedMachines)219 foreach (const QUuid &id, machineIDs) 214 220 { 215 221 unselectedMachines.removeAll(id); … … 217 223 newSelections << id; 218 224 } 219 m_machines = selectedMachines;225 m_machines = machineIDs; 220 226 221 227 m_pTabWidget->hide(); … … 225 231 removeLogViewerPages(unselectedMachines); 226 232 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()));234 233 } 235 234 … … 629 628 /* Add into layout: */ 630 629 m_pMainLayout->addWidget(m_pTabWidget); 630 #if 0 631 631 m_pCornerButton = new QIToolButton(m_pTabWidget); 632 #endif 632 633 if (m_pCornerButton) 633 634 { … … 637 638 connect(m_pCornerButton, &QIToolButton::clicked, this, &UIVMLogViewerWidget::sltCornerButtonClicked); 638 639 } 640 639 641 } 640 642 … … 808 810 m_pToolBar->updateLayout(); 809 811 #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")); 811 814 } 812 815 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r88686 r88699 199 199 void manageEscapeShortCut(); 200 200 void updateMachineSelectionMenu(); 201 void setMachines(const QVector<QUuid> &machineIDs); 201 202 202 203 /** Holds the widget's embedding type. */
Note:
See TracChangeset
for help on using the changeset viewer.