src/gui/image/qimagewriter.cpp
changeset 30 5dc02b23752f
parent 22 79de32ba3296
child 33 3e2da88830cd
--- a/src/gui/image/qimagewriter.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/gui/image/qimagewriter.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -117,7 +117,7 @@
 
 QT_BEGIN_NAMESPACE
 
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
 Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
                           (QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
 #endif
@@ -129,7 +129,7 @@
     QByteArray suffix;
     QImageIOHandler *handler = 0;
 
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
     // check if any plugins can write the image
     QFactoryLoader *l = loader();
     QStringList keys = l->keys();
@@ -142,7 +142,7 @@
         // this allows plugins to override our built-in handlers.
         if (QFile *file = qobject_cast<QFile *>(device)) {
             if (!(suffix = QFileInfo(file->fileName()).suffix().toLower().toLatin1()).isEmpty()) {
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
                 int index = keys.indexOf(QString::fromLatin1(suffix));
                 if (index != -1)
                     suffixPluginIndex = index;
@@ -153,7 +153,7 @@
 
     QByteArray testFormat = !form.isEmpty() ? form : suffix;
 
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
     if (suffixPluginIndex != -1) {
         // when format is missing, check if we can find a plugin for the
         // suffix.
@@ -161,7 +161,7 @@
         if (plugin && (plugin->capabilities(device, suffix) & QImageIOPlugin::CanWrite))
             handler = plugin->create(device, suffix);
     }
-#endif // Q_NO_LIBRARY
+#endif // QT_NO_LIBRARY
 
     // check if any built-in handlers can write the image
     if (!handler && !testFormat.isEmpty()) {
@@ -192,7 +192,7 @@
         }
     }
 
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
     if (!testFormat.isEmpty()) {
         for (int i = 0; i < keys.size(); ++i) {
             QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
@@ -203,7 +203,7 @@
             }
         }
     }
-#endif
+#endif // QT_NO_LIBRARY
 
     if (!handler)
         return 0;
@@ -670,7 +670,7 @@
     formats << "png";
 #endif
 
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
     QFactoryLoader *l = loader();
     QStringList keys = l->keys();
     for (int i = 0; i < keys.count(); ++i) {