| 698 | } |
| 699 | |
| 700 | void MainWindow::onClickBookmarkIcon() |
| 701 | { |
| 702 | WebWidget *currentView = m_tabWidget->currentWebWidget(); |
| 703 | if (!currentView) |
| 704 | return; |
| 705 | |
| 706 | // Search for bookmark already existing, if not found, add to bookmarks, otherwise edit the existing bookmark |
| 707 | BookmarkNode *node = ui->toolBar->getURLWidget()->getBookmarkNode(); |
| 708 | if (node == nullptr) |
| 709 | addPageToBookmarks(); |
| 710 | else |
| 711 | { |
| 712 | if (!m_bookmarkDialog) |
| 713 | m_bookmarkDialog = new BookmarkDialog(m_bookmarkManager); |
| 714 | |
| 715 | m_bookmarkDialog->setDialogHeader(tr("Bookmark")); |
| 716 | m_bookmarkDialog->setBookmarkInfo(node->getName(), node->getURL(), node->getParent()); |
| 717 | |
| 718 | // Set position of add bookmark dialog to align just under the URL bar on the right side |
| 719 | m_bookmarkDialog->alignAndShow(frameGeometry(), ui->toolBar->frameGeometry(), ui->toolBar->getURLWidget()->frameGeometry()); |
| 720 | } |
| 721 | } |
| 722 | |
| 723 | BrowserTabWidget *MainWindow::getTabWidget() const |
| 724 | { |
nothing calls this directly
no test coverage detected