Changeset 86946 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 20, 2020 6:13:28 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r86945 r86946 427 427 void sltHandleOpenLinkInNewTab(const QUrl &url); 428 428 void sltHandleTabClose(int iTabIndex); 429 void sltHandleContextMenuTabClose(); 429 430 /** Closes/deletes all tabs other than the one with tab index @iTabIndex. */ 430 void sltHandle OtherTabs();431 void sltHandleCloseOtherTabs(); 431 432 void sltHandleCurrentChanged(int iTabIndex); 432 433 void sltHandleFontSizeChange(int iFontPointSize); … … 1614 1615 } 1615 1616 1616 void UIHelpBrowserTabManager::sltHandleOtherTabs() 1617 void UIHelpBrowserTabManager::sltHandleContextMenuTabClose() 1618 { 1619 QAction *pAction = qobject_cast<QAction*>(sender()); 1620 if (!pAction) 1621 return; 1622 int iTabIndex = pAction->data().toInt(); 1623 if (iTabIndex < 0 || iTabIndex >= count()) 1624 return; 1625 sltHandleTabClose(iTabIndex); 1626 } 1627 1628 void UIHelpBrowserTabManager::sltHandleCloseOtherTabs() 1617 1629 { 1618 1630 QAction *pAction = qobject_cast<QAction*>(sender()); … … 1652 1664 QMenu menu; 1653 1665 QAction *pCloseAll = menu.addAction(UIHelpBrowserWidget::tr("Close other tabs")); 1654 connect(pCloseAll, &QAction::triggered, this, &UIHelpBrowserTabManager::sltHandle OtherTabs);1666 connect(pCloseAll, &QAction::triggered, this, &UIHelpBrowserTabManager::sltHandleCloseOtherTabs); 1655 1667 pCloseAll->setData(tabBar()->tabAt(pos)); 1668 1669 QAction *pClose = menu.addAction(UIHelpBrowserWidget::tr("Close tab")); 1670 connect(pClose, &QAction::triggered, this, &UIHelpBrowserTabManager::sltHandleContextMenuTabClose); 1671 pClose->setData(tabBar()->tabAt(pos)); 1672 1656 1673 menu.exec(tabBar()->mapToGlobal(pos)); 1657 1674 }
Note:
See TracChangeset
for help on using the changeset viewer.