Changeset 769 for trunk/src/gui/image/qimagereader.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/image/qimagereader.cpp
r651 r769 264 264 } 265 265 266 if (!handler && !testFormat.isEmpty() && autoDetectImageFormat &&!ignoresFormatAndExtension) {266 if (!handler && !testFormat.isEmpty() && !ignoresFormatAndExtension) { 267 267 // check if any plugin supports the format (they are not allowed to 268 268 // read from the device yet). 269 269 const qint64 pos = device ? device->pos() : 0; 270 for (int i = 0; i < keys.size(); ++i) { 271 if (i != suffixPluginIndex) { 272 QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i))); 273 if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) { 270 271 if (autoDetectImageFormat) { 272 for (int i = 0; i < keys.size(); ++i) { 273 if (i != suffixPluginIndex) { 274 QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i))); 275 if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) { 274 276 #ifdef QIMAGEREADER_DEBUG 275 qDebug() << "QImageReader::createReadHandler: the" << keys.at(i) << "plugin can read this format"; 276 #endif 277 handler = plugin->create(device, testFormat); 278 break; 277 qDebug() << "QImageReader::createReadHandler: the" << keys.at(i) << "plugin can read this format"; 278 #endif 279 handler = plugin->create(device, testFormat); 280 break; 281 } 279 282 } 283 } 284 } else { 285 QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(QLatin1String(testFormat))); 286 if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) { 287 #ifdef QIMAGEREADER_DEBUG 288 qDebug() << "QImageReader::createReadHandler: the" << testFormat << "plugin can read this format"; 289 #endif 290 handler = plugin->create(device, testFormat); 280 291 } 281 292 } … … 283 294 device->seek(pos); 284 295 } 296 285 297 #endif // QT_NO_LIBRARY 286 298
Note:
See TracChangeset
for help on using the changeset viewer.