ResourceItem: do not query full name when computing suffix
Minor optimization: do not query full name of ResourceItem when only computing suffix via QFileInfo in ResourceItem::guessType(). Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
@@ -172,7 +172,7 @@ ResourceItem::Type ResourceItem::guessType( void ) const
|
||||
typeMap["jpeg"] = TypeImage;
|
||||
}
|
||||
|
||||
const QString s = QFileInfo( fullName() ).completeSuffix().toLower();
|
||||
const QString s = QFileInfo( name() ).completeSuffix().toLower();
|
||||
QMap<QString, Type>::ConstIterator it = typeMap.find( s );
|
||||
if( it != typeMap.end() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user