Replace QList<QByteArray> with QByteArrayList
This commit is contained in:
@@ -17,12 +17,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <QList>
|
||||
#include <QBuffer>
|
||||
#include <QByteArray>
|
||||
#include <QByteArrayList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
#include <QBuffer>
|
||||
#include <QImage>
|
||||
#include <QImageReader>
|
||||
#include <QPixmap>
|
||||
@@ -61,16 +61,16 @@ QStringList ImageUtils::SupportedImageFormats() {
|
||||
|
||||
}
|
||||
|
||||
QList<QByteArray> ImageUtils::ImageFormatsForMimeType(const QByteArray &mimetype) {
|
||||
QByteArrayList ImageUtils::ImageFormatsForMimeType(const QByteArray &mimetype) {
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
return QImageReader::imageFormatsForMimeType(mimetype);
|
||||
#else
|
||||
if (mimetype == "image/bmp") return QList<QByteArray>() << "BMP";
|
||||
else if (mimetype == "image/gif") return QList<QByteArray>() << "GIF";
|
||||
else if (mimetype == "image/jpeg") return QList<QByteArray>() << "JPG";
|
||||
else if (mimetype == "image/png") return QList<QByteArray>() << "PNG";
|
||||
else return QList<QByteArray>();
|
||||
if (mimetype == "image/bmp") return QByteArrayList() << "BMP";
|
||||
else if (mimetype == "image/gif") return QByteArrayList() << "GIF";
|
||||
else if (mimetype == "image/jpeg") return QByteArrayList() << "JPG";
|
||||
else if (mimetype == "image/png") return QByteArrayList() << "PNG";
|
||||
else return QByteArrayList();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user