diff options
Diffstat (limited to 'tdeio/tdeio/tdefileitem.cpp')
-rw-r--r-- | tdeio/tdeio/tdefileitem.cpp | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/tdeio/tdeio/tdefileitem.cpp b/tdeio/tdeio/tdefileitem.cpp index 98013f1aa..8ef5072ce 100644 --- a/tdeio/tdeio/tdefileitem.cpp +++ b/tdeio/tdeio/tdefileitem.cpp @@ -556,27 +556,32 @@ TQString KFileItem::mimetype() const TQString KFileItem::mimetypeFast() const { - if (isMimeTypeKnown()) { - return mimetype(); - } - else { - return m_pMimeType->name(); - } + if (isMimeTypeKnown()) { + return mimetype(); + } + else { + return m_pMimeType->name(); + } +} + +KMimeType::Ptr KFileItem::mimeTypePtrFast() +{ + return m_pMimeType; } KMimeType::Ptr KFileItem::determineMimeType() { - if ( !m_pMimeType || !m_bMimeTypeKnown ) - { - bool isLocalURL; - KURL url = mostLocalURL(isLocalURL); + if ( !m_pMimeType || !m_bMimeTypeKnown ) + { + bool isLocalURL; + KURL url = mostLocalURL(isLocalURL); - m_pMimeType = KMimeType::findByURL( url, m_fileMode, isLocalURL ); - //kdDebug() << "finding mimetype for " << url.url() << " : " << m_pMimeType->name() << endl; - m_bMimeTypeKnown = true; - } + m_pMimeType = KMimeType::findByURL( url, m_fileMode, isLocalURL ); + //kdDebug() << "finding mimetype for " << url.url() << " : " << m_pMimeType->name() << endl; + m_bMimeTypeKnown = true; + } - return m_pMimeType; + return m_pMimeType; } bool KFileItem::isMimeTypeKnown() const |