Changeset View
Changeset View
Standalone View
Standalone View
src/embeddedimagedata.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 43 | public: | |||
---|---|---|---|---|---|
50 | Q_DECLARE_FLAGS(ImageTypes, ImageType) | 50 | Q_DECLARE_FLAGS(ImageTypes, ImageType) | ||
51 | 51 | | |||
52 | /** | 52 | /** | ||
53 | * Extracts the images stored in the metadata tags from a file. | 53 | * Extracts the images stored in the metadata tags from a file. | ||
54 | * By default, the front cover is extracted. | 54 | * By default, the front cover is extracted. | ||
55 | */ | 55 | */ | ||
56 | QMap<ImageType, QByteArray> imageData(const QString &fileUrl, const EmbeddedImageData::ImageTypes types = FrontCover) const; | 56 | QMap<ImageType, QByteArray> imageData(const QString &fileUrl, const EmbeddedImageData::ImageTypes types = FrontCover) const; | ||
57 | 57 | | |||
58 | /** | ||||
59 | * Provides a list of mimetypes which are supported for reading | ||||
60 | * of embedded images in e.g. audio files. | ||||
61 | * @since 5.52 | ||||
62 | */ | ||||
mgallien: You can make it static because you are returning a static member. It means that you should… | |||||
I had it this way before, but actually reverted it to make it consistent with the plugins, and this would also allow to potentially change the implementation later, wouldn't it? Anyway, your call. astippich: I had it this way before, but actually reverted it to make it consistent with the plugins, and… | |||||
63 | QStringList mimeTypes() const; | ||||
64 | | ||||
58 | private: | 65 | private: | ||
59 | class Private; | 66 | class Private; | ||
60 | std::unique_ptr<Private> d; | 67 | std::unique_ptr<Private> d; | ||
61 | EmbeddedImageData& operator=(const EmbeddedImageData&); | 68 | EmbeddedImageData& operator=(const EmbeddedImageData&); | ||
62 | }; | 69 | }; | ||
63 | 70 | | |||
64 | } | 71 | } | ||
65 | 72 | | |||
66 | #endif // KFILEMETADATA_EMBEDDEDIMAGEDATA_H | 73 | #endif // KFILEMETADATA_EMBEDDEDIMAGEDATA_H |
You can make it static because you are returning a static member. It means that you should probably return by const reference (even if I do not remember if it is always the best answer).