r18341 by fschmid - Fixed Bug #11636: Impossible to open files made with version prior to Rev 18297

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 26 18:44:53 UTC 2013


Author: fschmid
Date: Wed Jun 26 18:44:53 2013
New Revision: 18341

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18341
Log:
Fixed Bug #11636: Impossible to open files made with version prior to Rev 18297

Modified:
    trunk/Scribus/scribus/fileloader.cpp

Modified: trunk/Scribus/scribus/fileloader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18341&path=/trunk/Scribus/scribus/fileloader.cpp
==============================================================================
--- trunk/Scribus/scribus/fileloader.cpp (original)
+++ trunk/Scribus/scribus/fileloader.cpp Wed Jun 26 18:44:53 2013
@@ -124,17 +124,25 @@
 	QList<FileFormat>::const_iterator itEnd(fileFormats.constEnd());
 	for ( ; it != itEnd ; ++it )
 	{
-		if (it->fileExtensions.contains(ext))
-		{
-			if (it->plug != 0)
+		bool found = false;
+		for (int a = 0; a < it->fileExtensions.count(); a++)
+		{
+			QString exts = it->fileExtensions[a];
+			if (ext.contains(exts, Qt::CaseInsensitive))
 			{
-				if (it->plug->fileSupported(0, m_fileName))
+				if (it->plug != 0)
 				{
-					ret = it->formatId;
-					break;
+					if (it->plug->fileSupported(0, m_fileName))
+					{
+						ret = it->formatId;
+						found = true;
+						break;
+					}
 				}
 			}
 		}
+		if (found)
+			break;
 	}
 	m_fileType = ret;
 	return ret;




More information about the scribus-commit mailing list