r16444 by craig - #3007: Enable searching for uppercase extensions in gettext plugins
scribus-commit
scribus-commit at lists.scribus.net
Sun Mar 13 01:12:31 CET 2011
Author: craig
Date: Sun Mar 13 00:12:31 2011
New Revision: 16444
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16444
Log:
#3007: Enable searching for uppercase extensions in gettext plugins
Modified:
branches/Version135/Scribus/scribus/gtgettext.cpp
Modified: branches/Version135/Scribus/scribus/gtgettext.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16444&path=/branches/Version135/Scribus/scribus/gtgettext.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/gtgettext.cpp (original)
+++ branches/Version135/Scribus/scribus/gtgettext.cpp Sun Mar 13 00:12:31 2011
@@ -60,12 +60,18 @@
if (importer == -1)
{
// Attempt to determine the importer based on the file's extension.
- // Create a Qstring with what could be an extension.
+ // Create a QString with what could be an extension.
QString fend = filename.right(filename.length() - filename.lastIndexOf(".") - 1);
+ 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