~ubuntu-branches/ubuntu/oneiric/kde4libs/oneiric-security

« back to all changes in this revision

Viewing changes to kfile/kfilepreviewgenerator.cpp

  • Committer: Package Import Robot
  • Author(s): Michał Zając, Michał Zając, Jonathan Riddell
  • Date: 2011-02-27 14:10:59 UTC
  • mfrom: (1.14.3 upstream)
  • Revision ID: package-import@ubuntu.com-20110227141059-asgzcw48ao08rvkp
Tags: 4:4.6.1-0ubuntu1
[ Michał Zając ]
* New upstream release
* Refreshed kubuntu_06_user_disk_mounting.diff
* Refreshed kubuntu_77_ksambashare.diff
* Refreshed *.install files

[ Jonathan Riddell ]
* Add back kubuntu_77_no_kbookmark_write_error.diff workaround for LP:
  #627815

Show diffs side-by-side

added added

removed removed

Lines of Context:
607
607
 
608
608
    // check whether the item is part of the directory lister (it is possible
609
609
    // that a preview from an old directory lister is received)
610
 
    const KUrl url = item.url();
611
 
    KDirLister* dirLister = dirModel->dirLister();
612
610
    bool isOldPreview = true;
613
 
    const KUrl::List dirs = dirLister->directories();
614
 
    const QString itemDir = url.directory();
615
 
    foreach (const KUrl& url, dirs) {
616
 
        if (url.path() == itemDir) {
 
611
 
 
612
    KUrl itemParentDir(item.url());
 
613
    itemParentDir.setPath(itemParentDir.directory());
 
614
 
 
615
    foreach (const KUrl& dir, dirModel->dirLister()->directories()) {
 
616
        if (dir == itemParentDir || !dir.hasPath()) {
617
617
            isOldPreview = false;
618
618
            break;
619
619
        }
641
641
    // remember the preview and URL, so that it can be applied to the model
642
642
    // in KFilePreviewGenerator::dispatchIconUpdateQueue()
643
643
    ItemInfo preview;
644
 
    preview.url = url;
 
644
    preview.url = item.url();
645
645
    preview.pixmap = icon;
646
646
    m_previews.append(preview);
647
647