Changeset 89594 in vbox
- Timestamp:
- Jun 10, 2021 10:19:23 AM (3 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
r89586 r89594 60 60 const ULONG uAllowedLogSize = _256M; 61 61 62 class UILabelTab : public UIVMLog Page62 class UILabelTab : public UIVMLogTab 63 63 { 64 64 … … 68 68 69 69 UILabelTab(QWidget *pParent, const QUuid &uMachineId, const QString &strMachineName) 70 : UIVMLogPage(pParent, uMachineId, strMachineName) 71 { 72 } 70 : UIVMLogTab(pParent, uMachineId, strMachineName) 71 { 72 } 73 74 protected: 75 void retranslateUi(){} 73 76 }; 74 77 … … 603 606 if (m_pTabWidget && m_pTabWidget->tabBar()) 604 607 { 608 int iIndex = m_pTabWidget->tabBar()->tabAt(pos); 609 if (iIndex == -1) 610 return; 611 UIVMLogTab *pTab = qobject_cast<UIVMLogTab*>(m_pTabWidget->widget(iIndex)); 612 if (!pTab) 613 return; 605 614 QMenu menu; 606 menu.addAction(tr("Close Other Tabs")); 615 616 QAction *pCloseAction = menu.addAction(QString("%1 %2").arg(tr("Close Logs of")).arg(pTab->machineName())); 617 pCloseAction->setData(pTab->machineId()); 618 connect(pCloseAction, &QAction::triggered, this, &UIVMLogViewerWidget::sltCloseMachineLogs); 607 619 menu.exec(m_pTabWidget->tabBar()->mapToGlobal(pos)); 608 620 } 621 } 622 623 void UIVMLogViewerWidget::sltCloseMachineLogs() 624 { 625 QAction *pAction = qobject_cast<QAction*>(sender()); 626 if (!pAction) 627 return; 628 QUuid machineId = pAction->data().toUuid(); 629 if (machineId.isNull()) 630 return; 631 609 632 } 610 633 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r89586 r89594 142 142 /** @} */ 143 143 void sltShowTabBarContextMenu(const QPoint &pos); 144 void sltCloseMachineLogs(); 144 145 145 146 private:
Note:
See TracChangeset
for help on using the changeset viewer.