break;
case QEvent::ToolTip:
- tryShowNameToolTip(event);
+ tryShowNameToolTip(static_cast<QHelpEvent*>(event));
default:
break;
m_placeholderLabel->setVisible(true);
}
-void DolphinView::tryShowNameToolTip(QEvent* event)
+void DolphinView::tryShowNameToolTip(QHelpEvent* event)
{
if (!GeneralSettings::showToolTips() && m_mode == DolphinView::IconsView) {
- QHelpEvent *hoverEvent = reinterpret_cast<QHelpEvent *>(event);
- const std::optional<int> index = m_view->itemAt(hoverEvent->pos());
+ const std::optional<int> index = m_view->itemAt(event->pos());
if (!index.has_value()) {
return;
if(isElided) {
const KFileItem item = m_model->fileItem(index.value());
const QString text = item.text();
- const QPoint pos = mapToGlobal(hoverEvent->pos());
+ const QPoint pos = mapToGlobal(event->pos());
QToolTip::showText(pos, text);
}
}
class ViewProperties;
class QLabel;
class QGraphicsSceneDragDropEvent;
+class QHelpEvent;
class QRegularExpression;
/**
void updatePlaceholderLabel();
- void tryShowNameToolTip(QEvent* event);
+ void tryShowNameToolTip(QHelpEvent* event);
private:
void updatePalette();