[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kio
From:       Darío Andrés Rodríguez <andresbajotierra () gmail ! co
Date:       2010-04-02 12:16:23
Message-ID: 20100402121623.EDAAAAC88B () svn ! kde ! org
[Download RAW message or body]

SVN commit 1110210 by darioandres:

- Update KFileItem and KFileMetaPropsPlugin to only request limited metaData
  (avoid reading all the file and blocking the UI)
  This implements http://reviewboard.kde.org/r/3325/ as a temporary fix until \
KFileMetaInfo+Strigi limits get improved

CCBUG: 216932



 M  +2 -1      kfile/kmetaprops.cpp  
 M  +2 -2      kio/kfileitem.cpp  
 M  +5 -2      kio/kfileitem.h  


--- trunk/KDE/kdelibs/kio/kfile/kmetaprops.cpp #1110209:1110210
@@ -63,7 +63,8 @@
     d->m_info  = fileitem.metaInfo();
     if (!d->m_info.isValid())
     {
-        d->m_info = \
KFileMetaInfo(properties->kurl().path(KUrl::RemoveTrailingSlash)); +        d->m_info \
= KFileMetaInfo(properties->kurl().path(KUrl::RemoveTrailingSlash), QString(), +      \
KFileMetaInfo::ContentInfo | KFileMetaInfo::TechnicalInfo);  \
fileitem.setMetaInfo(d->m_info);  }
 
--- trunk/KDE/kdelibs/kio/kio/kfileitem.cpp #1110209:1110210
@@ -1217,13 +1217,13 @@
     d->m_metaInfo = info;
 }
 
-KFileMetaInfo KFileItem::metaInfo(bool autoget, int) const
+KFileMetaInfo KFileItem::metaInfo(bool autoget, int what) const
 {
     if ((isRegularFile() || isDir()) && autoget && !d->m_metaInfo.isValid())
     {
         bool isLocalUrl;
         KUrl url(mostLocalUrl(isLocalUrl));
-        d->m_metaInfo = KFileMetaInfo(url);//, mimetype() );
+        d->m_metaInfo = KFileMetaInfo(url.toLocalFile(), mimetype(), \
(KFileMetaInfo::What)what);  }
     return d->m_metaInfo;
 }
--- trunk/KDE/kdelibs/kio/kio/kfileitem.h #1110209:1110210
@@ -550,11 +550,14 @@
 
     /**
      * Returns the metainfo of this item.
+     *
+     * (since 4.4.3) By default it uses the KFileMetaInfo::ContentInfo | \
KFileMetaInfo::TechnicalInfo. +     * If you need more information, create your own \
                KFileMetaInfo object and set it using setMetaInfo()
      * @param autoget if true, the metainfo will automatically be created
-     * @param what ignored
+     * @param what how much metainfo you need to retrieve from the file \
                (KFileMetaInfo::WhatFlag)
      */
     KFileMetaInfo metaInfo(bool autoget = true,
-                                   int what = KFileMetaInfo::Fastest) const;
+                           int what = KFileMetaInfo::ContentInfo | \
KFileMetaInfo::TechnicalInfo) const;  
     /**
      * @deprecated simply use '='


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic