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