Changeset 846 for trunk/src/gui/image/qimagewriter.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/image/qimagewriter.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 115 115 #include <private/qpnghandler_p.h> 116 116 #endif 117 #ifndef QT_NO_IMAGEFORMAT_JPEG 118 #include <private/qjpeghandler_p.h> 119 #endif 120 #ifndef QT_NO_IMAGEFORMAT_MNG 121 #include <private/qmnghandler_p.h> 122 #endif 123 #ifndef QT_NO_IMAGEFORMAT_TIFF 124 #include <private/qtiffhandler_p.h> 125 #endif 126 #ifdef QT_BUILTIN_GIF_READER 127 #include <private/qgifhandler_p.h> 128 #endif 117 129 118 130 QT_BEGIN_NAMESPACE 119 131 120 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)132 #ifndef QT_NO_LIBRARY 121 133 Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, 122 134 (QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats"))) … … 130 142 QImageIOHandler *handler = 0; 131 143 132 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)144 #ifndef QT_NO_LIBRARY 133 145 // check if any plugins can write the image 134 146 QFactoryLoader *l = loader(); … … 143 155 if (QFile *file = qobject_cast<QFile *>(device)) { 144 156 if (!(suffix = QFileInfo(file->fileName()).suffix().toLower().toLatin1()).isEmpty()) { 145 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)157 #ifndef QT_NO_LIBRARY 146 158 int index = keys.indexOf(QString::fromLatin1(suffix)); 147 159 if (index != -1) … … 154 166 QByteArray testFormat = !form.isEmpty() ? form : suffix; 155 167 156 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)168 #ifndef QT_NO_LIBRARY 157 169 if (suffixPluginIndex != -1) { 158 170 // when format is missing, check if we can find a plugin for the … … 162 174 handler = plugin->create(device, suffix); 163 175 } 164 #endif // Q _NO_LIBRARY176 #endif // QT_NO_LIBRARY 165 177 166 178 // check if any built-in handlers can write the image … … 171 183 handler = new QPngHandler; 172 184 #endif 185 #ifndef QT_NO_IMAGEFORMAT_JPEG 186 } else if (testFormat == "jpg" || testFormat == "jpeg") { 187 handler = new QJpegHandler; 188 #endif 189 #ifndef QT_NO_IMAGEFORMAT_MNG 190 } else if (testFormat == "mng") { 191 handler = new QMngHandler; 192 #endif 193 #ifndef QT_NO_IMAGEFORMAT_TIFF 194 } else if (testFormat == "tif" || testFormat == "tiff") { 195 handler = new QTiffHandler; 196 #endif 197 #ifdef QT_BUILTIN_GIF_READER 198 } else if (testFormat == "gif") { 199 handler = new QGifHandler; 200 #endif 173 201 #ifndef QT_NO_IMAGEFORMAT_BMP 174 202 } else if (testFormat == "bmp") { … … 193 221 } 194 222 195 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)223 #ifndef QT_NO_LIBRARY 196 224 if (!testFormat.isEmpty()) { 197 225 for (int i = 0; i < keys.size(); ++i) { … … 204 232 } 205 233 } 206 #endif 234 #endif // QT_NO_LIBRARY 207 235 208 236 if (!handler) … … 670 698 formats << "png"; 671 699 #endif 672 673 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) 700 #ifndef QT_NO_IMAGEFORMAT_JPEG 701 formats << "jpg" << "jpeg"; 702 #endif 703 #ifndef QT_NO_IMAGEFORMAT_MNG 704 formats << "mng"; 705 #endif 706 #ifndef QT_NO_IMAGEFORMAT_TIFF 707 formats << "tif" << "tiff"; 708 #endif 709 #ifdef QT_BUILTIN_GIF_READER 710 formats << "gif"; 711 #endif 712 713 #ifndef QT_NO_LIBRARY 674 714 QFactoryLoader *l = loader(); 675 715 QStringList keys = l->keys();
Note:
See TracChangeset
for help on using the changeset viewer.