mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
kio: deal with TODO related to file meta information
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
598b8fae19
commit
7bf83bb532
3 changed files with 14 additions and 13 deletions
|
@ -83,7 +83,7 @@ void KFileMetaDataProvider::Private::readMetadata()
|
||||||
kWarning() << "the API does not handle multile URLs metadata";
|
kWarning() << "the API does not handle multile URLs metadata";
|
||||||
}
|
}
|
||||||
const QString path = m_urls.first().toLocalFile();
|
const QString path = m_urls.first().toLocalFile();
|
||||||
KFileMetaInfo metaInfo(path, KFileMetaInfo::Fastest);
|
KFileMetaInfo metaInfo(path, KFileMetaInfo::TechnicalInfo);
|
||||||
const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items();
|
const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items();
|
||||||
foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) {
|
foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) {
|
||||||
const QString uriString = metaInfoItem.name();
|
const QString uriString = metaInfoItem.name();
|
||||||
|
|
|
@ -322,8 +322,15 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool useFactory(Strigi::StreamAnalyzerFactory* factory) const {
|
bool useFactory(Strigi::StreamAnalyzerFactory* factory) const {
|
||||||
Q_UNUSED(factory);
|
if ((m_indexDetail & KFileMetaInfo::ContentInfo) == 0 && factory) {
|
||||||
// TODO: filter factories based on m_indexDetail
|
if (qstrcmp(factory->name(), "CppLineAnalyzer") == 0) {
|
||||||
|
return false;
|
||||||
|
} else if (qstrcmp(factory->name(), "TxtLineAnalyzer") == 0) {
|
||||||
|
return false;
|
||||||
|
} else if (qstrcmp(factory->name(), "TextEndAnalyzer") == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,22 +61,16 @@ public:
|
||||||
* parameters to constructors.
|
* parameters to constructors.
|
||||||
*/
|
*/
|
||||||
enum What {
|
enum What {
|
||||||
Fastest = 0x1, /**< do the fastest possible read and omit all items
|
TechnicalInfo = 0x1, /** extract technical details about the file, like
|
||||||
that might need a significantly longer time
|
|
||||||
than the others */
|
|
||||||
TechnicalInfo = 0x2, /**< extract technical details about the file, like
|
|
||||||
e.g. play time, resolution or a compressioni
|
e.g. play time, resolution or a compressioni
|
||||||
type */
|
type */
|
||||||
ContentInfo = 0x4, /**< read information about the content of the file
|
ContentInfo = 0x2, /** read information about the content of the file
|
||||||
like comments or id3 tags */
|
like comments or id3 tags */
|
||||||
ExternalSources = 0x8, /**<read external metadata sources such as
|
ExternalSources = 0x4, /** read external metadata sources such as
|
||||||
filesystem based extended attributes if
|
filesystem based extended attributes if
|
||||||
they are supported for the filesystem;
|
they are supported for the filesystem;
|
||||||
RDF storages etc */
|
RDF storages etc */
|
||||||
Thumbnail = 0x10, /**< only read the file's thumbnail, if it contains
|
Everything = TechnicalInfo | ContentInfo | ExternalSources // read everything, even if it might take a while
|
||||||
one */
|
|
||||||
LinkedData = 0x40, //< extract linked/related files like html links, source #include etc
|
|
||||||
Everything = Fastest | TechnicalInfo | ContentInfo | ExternalSources | Thumbnail | LinkedData ///< read everything, even if it might take a while
|
|
||||||
|
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(WhatFlags, What)
|
Q_DECLARE_FLAGS(WhatFlags, What)
|
||||||
|
|
Loading…
Add table
Reference in a new issue