mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
use foreach() for iteration in QImageWriter::supportedImageFormats()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a6c67c7ad2
commit
5d2c8bd4a8
1 changed files with 4 additions and 5 deletions
|
@ -595,11 +595,10 @@ QList<QByteArray> QImageWriter::supportedImageFormats()
|
|||
|
||||
#ifndef QT_NO_LIBRARY
|
||||
QFactoryLoader *l = imageloader();
|
||||
QStringList keys = l->keys();
|
||||
for (int i = 0; i < keys.count(); ++i) {
|
||||
QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
|
||||
if (plugin && (plugin->capabilities(0, keys.at(i).toLatin1()) & QImageIOPlugin::CanWrite) != 0)
|
||||
formats << keys.at(i).toLatin1();
|
||||
foreach (const QString &key, l->keys()) {
|
||||
QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(key));
|
||||
if (plugin && (plugin->capabilities(0, key.toLatin1()) & QImageIOPlugin::CanWrite) != 0)
|
||||
formats << key.toLatin1();
|
||||
}
|
||||
#endif // QT_NO_LIBRARY
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue