From 0a37cfd7954f4f3bdbfa4d5bbfafb5081cc8fac4 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 9 Mar 2009 00:48:49 +0100 Subject: [PATCH] ResourcesItem: evaluate complete suffix when determining file type by extension - allows to classify legacy extensions such as ".cs.xml" --- src/core/resources_item.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/resources_item.cpp b/src/core/resources_item.cpp index 871a7f58e..a5838f4c3 100644 --- a/src/core/resources_item.cpp +++ b/src/core/resources_item.cpp @@ -155,6 +155,7 @@ ResourcesItem::Type ResourcesItem::guessType( void ) const typeMap["sf2"] = TypeSoundFont; typeMap["xpf"] = TypePreset; + typeMap["cs.xml"] = TypePreset; typeMap["mmp"] = TypeProject; typeMap["mmpz"] = TypeProject; @@ -171,7 +172,7 @@ ResourcesItem::Type ResourcesItem::guessType( void ) const typeMap["jpeg"] = TypeImage; } - const QString s = QFileInfo( fullName() ).suffix().toLower(); + const QString s = QFileInfo( fullName() ).completeSuffix().toLower(); QMap::ConstIterator it = typeMap.find( s ); if( it != typeMap.end() ) {