Commit 5729da0f authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications] Restore fallback to local URL when no place is found

This got removed in d82513ce as I thought a user would
always have a "Root" entry, leading to "Root/foo" paths.

However, if you hide a place, it will naturally not be considered for `closestItem`
resulting in the final `QUrl::toDisplayString` being hit, giving us a not so
nice `file:///` URL.
parent 8dc93d16
......@@ -28,11 +28,11 @@
#include <KFilePlacesModel>
#include <KService>
#include <KShell>
#include <KLocalizedString>
#include <kio/global.h>
#include "jobviewv2adaptor.h"
#include "jobviewv3adaptor.h"
......@@ -121,6 +121,10 @@ QString JobPrivate::prettyDestUrl() const
return text;
}
if (url.isLocalFile()) {
return KShell::tildeCollapse(url.toLocalFile());
}
return url.toDisplayString(QUrl::RemoveUserInfo);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment