kutils: minor KExiv2 class review

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-16 05:13:48 +03:00
parent 0c6d9f7d70
commit 23415ff1d6
2 changed files with 7 additions and 7 deletions

View file

@ -61,7 +61,7 @@ static int KExiv2Deinit()
return 0; return 0;
} }
Q_DESTRUCTOR_FUNCTION(KExiv2Deinit); Q_DESTRUCTOR_FUNCTION(KExiv2Deinit);
#endif #endif // HAVE_EXIV2
class KExiv2Private class KExiv2Private
{ {
@ -194,7 +194,7 @@ KExiv2::DataMap KExiv2::data() const
#if defined(HAVE_EXIV2) #if defined(HAVE_EXIV2)
if (d->m_exiv2image.get()) { if (d->m_exiv2image.get()) {
try { try {
kDebug() << "Mapping Exiv2 data for" << d->m_path; kDebug() << "Mapping EXIF data for" << d->m_path;
const Exiv2::ExifData exiv2data = d->m_exiv2image->exifData(); const Exiv2::ExifData exiv2data = d->m_exiv2image->exifData();
for (Exiv2::ExifData::const_iterator it = exiv2data.begin(); it != exiv2data.end(); it++) { for (Exiv2::ExifData::const_iterator it = exiv2data.begin(); it != exiv2data.end(); it++) {
const std::string key = (*it).key(); const std::string key = (*it).key();

View file

@ -28,7 +28,7 @@
class KExiv2Private; class KExiv2Private;
/*! /*!
Class to obtain Exiv2 metadata, preview and rotate images based on the metadata. Class to obtain EXIF metadata, preview and rotate images based on the metadata.
@note Initialization and cleanup of the Exiv2 library resources is automatic @note Initialization and cleanup of the Exiv2 library resources is automatic
@since 4.20 @since 4.20
@ -39,23 +39,23 @@ public:
typedef QMap<QByteArray,QString> DataMap; typedef QMap<QByteArray,QString> DataMap;
/*! /*!
@brief Contructs object from @p path and obtains Exiv2 data if possible @brief Contructs object from @p path and obtains EXIF data if possible
*/ */
KExiv2(const QString &path); KExiv2(const QString &path);
/*! /*!
@return Largest preview image if provided in the Exiv2 data, the image is not rotated @return Largest preview image if provided in the EXIF data, the image is not rotated
automatically and may be null automatically and may be null
*/ */
QImage preview() const; QImage preview() const;
/*! /*!
@return Rotates @p image according to the Exiv2 orientation data @return Rotates @p image according to the EXIF orientation data
*/ */
bool rotateImage(QImage &image) const; bool rotateImage(QImage &image) const;
/*! /*!
@return Map of all Exiv2 properties @return Map of all EXIF properties
*/ */
DataMap data() const; DataMap data() const;