|
|
|
@ -523,27 +523,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::determineMimeType()
|
|
|
|
|
KMimeType::Ptr KFileItem::mimeTypePtrFast()
|
|
|
|
|
{
|
|
|
|
|
if ( !m_pMimeType || !m_bMimeTypeKnown )
|
|
|
|
|
{
|
|
|
|
|
bool isLocalURL;
|
|
|
|
|
KURL url = mostLocalURL(isLocalURL);
|
|
|
|
|
return m_pMimeType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_pMimeType = KMimeType::findByURL( url, m_fileMode, isLocalURL );
|
|
|
|
|
//kdDebug() << "finding mimetype for " << url.url() << " : " << m_pMimeType->name() << endl;
|
|
|
|
|
m_bMimeTypeKnown = true;
|
|
|
|
|
}
|
|
|
|
|
KMimeType::Ptr KFileItem::determineMimeType()
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return m_pMimeType;
|
|
|
|
|
return m_pMimeType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool KFileItem::isMimeTypeKnown() const
|
|
|
|
|