From kde-commits Thu Dec 02 20:55:18 2010 From: Peter Penz Date: Thu, 02 Dec 2010 20:55:18 +0000 To: kde-commits Subject: KDE/kdelibs/kio/kio Message-Id: <20101202205518.422F2AC8A4 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129132335531796 SVN commit 1202948 by ppenz: Fix issue that previews are not shown in the trash. The root cause is that KUrl::isLocalFile() for the trash returns false (which is correct corresponding to the documentation of isLocalFile()) and hence the maximum size for remote files is used (which is 0 per default). From a users point of view the trash should be considered as "local" and hence the maximum size for local files should be considered for previews. BUG: 257928 FIXED-IN: 4.6.0 M +2 -1 previewjob.cpp --- trunk/KDE/kdelibs/kio/kio/previewjob.cpp #1202947:1202948 @@ -352,7 +352,8 @@ bool skipCurrentItem = false; const KIO::filesize_t size = (KIO::filesize_t)entry.numberValue( KIO::UDSEntry::UDS_SIZE, 0 ); - if (d->currentItem.item.mostLocalUrl().isLocalFile()) + const KUrl itemUrl = d->currentItem.item.mostLocalUrl(); + if (itemUrl.isLocalFile() || itemUrl.protocol() == QLatin1String("trash")) { skipCurrentItem = !d->ignoreMaximumSize && size > d->maximumLocalSize && !d->currentItem.plugin->property("IgnoreMaximumSize").toBool();