PlacesPanel: tooltip, use toLocalFile instead of path

To avoid Windows compatiblity issues.
This commit is contained in:
Méven Car 2020-11-14 08:59:35 +01:00
parent 8999580e2a
commit f2d2f325b6

View file

@ -486,7 +486,7 @@ void PlacesPanel::slotStorageSetupDone(int index, bool success)
void PlacesPanel::slotShowTooltip()
{
const QUrl url = m_model->data(m_hoveredIndex).value("url").value<QUrl>();
const QString text = url.isLocalFile() ? url.path() : url.toString();
const QString text = url.toDisplayString(QUrl::PreferLocalFile);
QToolTip::showText(m_hoverPos, text);
}