| 374 | } |
| 375 | |
| 376 | void MainWindowPrivate::tabToolTipRequested(Sublime::View* view, Sublime::Container* container, int tab) |
| 377 | { |
| 378 | if (m_tabTooltip.second) { |
| 379 | if (m_tabTooltip.first == view) { |
| 380 | // tooltip already shown, don't do anything. prevents flicker when moving mouse over same tab |
| 381 | return; |
| 382 | } else { |
| 383 | m_tabTooltip.second.data()->close(); |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | auto* urlDoc = qobject_cast<Sublime::UrlDocument*>(view->document()); |
| 388 | |
| 389 | if (urlDoc) { |
| 390 | DUChainReadLocker lock; |
| 391 | TopDUContext* top = DUChainUtils::standardContextForUrl(urlDoc->url()); |
| 392 | |
| 393 | if (top) { |
| 394 | if (auto* navigationWidget = top->createNavigationWidget()) { |
| 395 | auto* tooltip = new KDevelop::NavigationToolTip(m_mainWindow, QCursor::pos() + QPoint(20, 20), navigationWidget); |
| 396 | tooltip->resize(navigationWidget->sizeHint() + QSize(10, 10)); |
| 397 | tooltip->setHandleRect(container->tabRect(tab)); |
| 398 | |
| 399 | m_tabTooltip.first = view; |
| 400 | m_tabTooltip.second = tooltip; |
| 401 | ActiveToolTip::showToolTip(m_tabTooltip.second.data()); |
| 402 | } |
| 403 | } |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | void MainWindowPrivate::dockBarContextMenuRequested(Qt::DockWidgetArea area, const QPoint& position) |
| 408 | { |
nothing calls this directly
no test coverage detected