]> cloud.milkyroute.net Git - dolphin.git/commitdiff
dolphinview: Add widget parameter to elided QToolTip::showText
authorAkseli Lahtinen <akselmo@akselmo.dev>
Thu, 27 Feb 2025 10:07:33 +0000 (12:07 +0200)
committerAkseli Lahtinen <akselmo@akselmo.dev>
Thu, 27 Feb 2025 12:05:07 +0000 (14:05 +0200)
Without this parameter the QToolTip can not always determine what
is the parent, so it will create a toplevel window in those cases.

Make sure we have dolphinview itself as a widget there, so QToolTip
and thus QtWayland can resolve what is the parent. This
avoids creating random windows when opening a tooltip.

BUG:500009

src/views/dolphinview.cpp

index fc4f5e2df9905b37b45177c14b319f31d3c7e0d4..d5908a0814801c493af44eb4f44f56b8326046b1 100644 (file)
@@ -2440,7 +2440,7 @@ bool DolphinView::tryShowNameToolTip(QHelpEvent *event)
             const KFileItem item = m_model->fileItem(index.value());
             const QString text = item.text();
             const QPoint pos = mapToGlobal(event->pos());
-            QToolTip::showText(pos, text);
+            QToolTip::showText(pos, text, this);
             return true;
         }
     }