[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/kio/kio
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2005-08-06 20:25:21
Message-ID: 1123359921.202973.23334.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 443635 by goutte:
Try harder to use a local file (for example for media:)
(Based on a patch from dreamer at ddl aspnet ru)
CCBUG:102726
M +5 -3 previewjob.cpp
--- branches/KDE/3.5/kdelibs/kio/kio/previewjob.cpp #443634:443635
@@ -380,15 +380,17 @@
void PreviewJob::getOrCreateThumbnail()
{
// We still need to load the orig file ! (This is getting tedious) :)
- KURL currentURL = d->currentItem.item->url();
- if ( currentURL.isLocalFile() )
- createThumbnail( currentURL.path() );
+ const KFileItem* item = d->currentItem.item;
+ const QString localPath = item->localPath();
+ if ( !localPath.isEmpty() )
+ createThumbnail( localPath );
else
{
d->state = PreviewJobPrivate::STATE_GETORIG;
KTempFile localFile;
KURL localURL;
localURL.setPath( d->tempName = localFile.name() );
+ const KURL currentURL = item->url();
KIO::Job * job = KIO::file_copy( currentURL, localURL, -1, true,
false, false /* No GUI */ );
job->addMetaData("thumbnail","1");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic