summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimagewriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qimagewriter.cpp')
-rw-r--r--src/gui/image/qimagewriter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 503a1b2..552729f 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -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 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
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 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
// 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 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
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 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
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 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
}
}
-#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 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
}
}
}
-#endif
+#endif // QT_NO_LIBRARY
if (!handler)
return 0;
@@ -670,7 +670,7 @@ QList<QByteArray> QImageWriter::supportedImageFormats()
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) {