r16445 by craig - #3007: Enable searching for uppercase extensions in gettext plugins

scribus-commit scribus-commit at lists.scribus.net
Sun Mar 13 01:12:38 CET 2011


Author: craig
Date: Sun Mar 13 00:12:38 2011
New Revision: 16445

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16445
Log:
#3007: Enable searching for uppercase extensions in gettext plugins

Modified:
    trunk/Scribus/scribus/gtgettext.cpp

Modified: trunk/Scribus/scribus/gtgettext.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16445&path=/trunk/Scribus/scribus/gtgettext.cpp
==============================================================================
--- trunk/Scribus/scribus/gtgettext.cpp (original)
+++ trunk/Scribus/scribus/gtgettext.cpp Sun Mar 13 00:12:38 2011
@@ -62,10 +62,16 @@
 		// Attempt to determine the importer based on the file's extension. 
 		// Create a Qstring with what could be an extension.
 		QString fend = filename.right(filename.length() - filename.lastIndexOf(".") - 1);
-		// Look for that extension in the importer Qmap. 
+		QString fendL(fend.toLower());
+		// Look for that extension in the importer QMap. 
 		if (importerMap.find(fend) != importerMap.end())
 			// If the map is found, assign ida to the corresponding struct in the map.
 			ida = *importerMap[fend];
+		// Otherwise, test for the lowercase version
+		else
+		if (importerMap.find(fendL) != importerMap.end())
+			// If the map is found, assign ida to the corresponding struct in the map.
+			ida = *importerMap[fendL];
 		// Otherwise, try and ask the user.
 		else
 		{




More information about the scribus-commit mailing list