r18207 by fschmid - Don't scan Qt4 based OSG plugins on startup.

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 16 08:39:56 UTC 2013


Author: fschmid
Date: Sat Mar 16 08:39:56 2013
New Revision: 18207

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18207
Log:
Don't scan Qt4 based OSG plugins on startup.

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18207&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sat Mar 16 08:39:56 2013
@@ -494,39 +494,35 @@
 	palettesStatus[0] = false;
 	guidesStatus[0] = false;
 #ifdef HAVE_OSG
-	#ifdef USE_QT5
-		osgFilterString = tr("All Files (*)");
-	#else
-		QStringList supportedExts;
-		supportedExts << "osg" << "dxf" << "flt" << "ive" << "geo" << "sta" << "stl" << "logo" << "3ds" << "ac" << "obj";
-		QStringList realSupportedExts;
-		QMap<QString, QString> formats;
-		osgDB::FileNameList plugins = osgDB::listAllAvailablePlugins();
-		for(osgDB::FileNameList::iterator itr = plugins.begin(); itr != plugins.end(); ++itr)
-		{
-			osgDB::ReaderWriterInfoList infoList;
-			if (osgDB::queryPlugin(*itr, infoList))
-			{
-				for(osgDB::ReaderWriterInfoList::iterator rwi_itr = infoList.begin(); rwi_itr != infoList.end(); ++rwi_itr)
+	QStringList supportedExts;
+	supportedExts << "osg" << "dxf" << "flt" << "ive" << "geo" << "sta" << "stl" << "logo" << "3ds" << "ac" << "obj";
+	QStringList realSupportedExts;
+	QMap<QString, QString> formats;
+	osgDB::FileNameList plugins = osgDB::listAllAvailablePlugins();
+	for(osgDB::FileNameList::iterator itr = plugins.begin(); itr != plugins.end(); ++itr)
+	{
+		osgDB::ReaderWriterInfoList infoList;
+		if (QString::fromStdString(*itr).contains("qfont"))
+			continue;
+		if (osgDB::queryPlugin(*itr, infoList))
+		{
+			for(osgDB::ReaderWriterInfoList::iterator rwi_itr = infoList.begin(); rwi_itr != infoList.end(); ++rwi_itr)
+			{
+				osgDB::ReaderWriterInfo& info = *(*rwi_itr);
+				osgDB::ReaderWriter::FormatDescriptionMap::iterator fdm_itr;
+				for(fdm_itr = info.extensions.begin(); fdm_itr != info.extensions.end(); ++fdm_itr)
 				{
-					osgDB::ReaderWriterInfo& info = *(*rwi_itr);
-					osgDB::ReaderWriter::FormatDescriptionMap::iterator fdm_itr;
-					for(fdm_itr = info.extensions.begin(); fdm_itr != info.extensions.end(); ++fdm_itr)
-					{
-						if (supportedExts.contains(QString::fromStdString(fdm_itr->first)))
-						{
-							formats.insert("*." + QString::fromStdString(fdm_itr->first) + " *." + QString::fromStdString(fdm_itr->first).toUpper(), QString::fromStdString(fdm_itr->second) + " (*." + QString::fromStdString(fdm_itr->first) + " *." + QString::fromStdString(fdm_itr->first).toUpper() + ")");
-						}
-					}
+					if (supportedExts.contains(QString::fromStdString(fdm_itr->first)))
+						formats.insert("*." + QString::fromStdString(fdm_itr->first) + " *." + QString::fromStdString(fdm_itr->first).toUpper(), QString::fromStdString(fdm_itr->second) + " (*." + QString::fromStdString(fdm_itr->first) + " *." + QString::fromStdString(fdm_itr->first).toUpper() + ")");
 				}
 			}
 		}
-		realSupportedExts = formats.keys();
-		QString docexts = realSupportedExts.join(" ");
-		QStringList longList = formats.values();
-		QString longDesc = longList.join(";;") + ";;";
-		osgFilterString = tr("All Supported Formats (%1);;%2All Files (*)").arg(docexts).arg(longDesc);
-	#endif
+	}
+	realSupportedExts = formats.keys();
+	QString docexts = realSupportedExts.join(" ");
+	QStringList longList = formats.values();
+	QString longDesc = longList.join(";;") + ";;";
+	osgFilterString = tr("All Supported Formats (%1);;%2All Files (*)").arg(docexts).arg(longDesc);
 #endif
 }
 




More information about the scribus-commit mailing list