mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kio: pass the full path to KIO::pixmapForUrl() from KFileWidgetPrivate::setLocationText()
for best MIME type determination results the content of the file may have to be read and relative path (only the filename in this case) does not cut it Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f6ebdfe0a7
commit
ed8815b5c9
1 changed files with 9 additions and 3 deletions
|
@ -1165,7 +1165,13 @@ void KFileWidgetPrivate::removeDummyHistoryEntry()
|
||||||
void KFileWidgetPrivate::setLocationText(const KUrl& url)
|
void KFileWidgetPrivate::setLocationText(const KUrl& url)
|
||||||
{
|
{
|
||||||
if (!url.isEmpty()) {
|
if (!url.isEmpty()) {
|
||||||
QPixmap urlIcon = KIO::pixmapForUrl(url, KIconLoader::Small);
|
QPixmap urlIcon;
|
||||||
|
const QString u = url.url();
|
||||||
|
if (!KUrl::isRelativeUrl(u)) {
|
||||||
|
urlIcon = KIO::pixmapForUrl(url, KIconLoader::Small);
|
||||||
|
} else {
|
||||||
|
urlIcon = KIO::pixmapForUrl(KUrl(this->url, u), KIconLoader::Small);
|
||||||
|
}
|
||||||
if (url.hasPath()) {
|
if (url.hasPath()) {
|
||||||
if (!url.directory().isEmpty()) {
|
if (!url.directory().isEmpty()) {
|
||||||
KUrl u(url);
|
KUrl u(url);
|
||||||
|
|
Loading…
Add table
Reference in a new issue