mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
DolphinTabWidget: prefer QUrl::toDisplayString() for tooltips
This is better for remote urls. !35
This commit is contained in:
parent
be3ffecf0b
commit
360a8dd883
|
@ -382,7 +382,7 @@ void DolphinTabWidget::tabUrlChanged(const QUrl& url)
|
|||
const int index = indexOf(qobject_cast<QWidget*>(sender()));
|
||||
if (index >= 0) {
|
||||
tabBar()->setTabText(index, tabName(tabPageAt(index)));
|
||||
tabBar()->setTabToolTip(index, url.path());
|
||||
tabBar()->setTabToolTip(index, url.toDisplayString(QUrl::PreferLocalFile));
|
||||
if (tabBar()->isVisible()) {
|
||||
tabBar()->setTabIcon(index, QIcon::fromTheme(KIO::iconNameForUrl(url)));
|
||||
} else {
|
||||
|
@ -423,7 +423,7 @@ void DolphinTabWidget::tabInserted(int index)
|
|||
tabBar()->setTabIcon(i, QIcon::fromTheme(KIO::iconNameForUrl(url)));
|
||||
}
|
||||
if (tabBar()->tabToolTip(i).isEmpty()) {
|
||||
tabBar()->setTabToolTip(index, url.path());
|
||||
tabBar()->setTabToolTip(index, url.toDisplayString(QUrl::PreferLocalFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue