Use of metadata macro definitions

Replaced the metadata string with the common macro definition
This commit is contained in:
Mirco Miranda
2024-06-07 15:08:37 +00:00
committed by Albert Astals Cid
parent cb5ca7fc48
commit 7499e3b8d4
6 changed files with 39 additions and 32 deletions

View File

@ -319,7 +319,7 @@ public:
{
auto xmp = xmpData();
if (!xmp.isEmpty()) {
image.setText(QStringLiteral(META_KEY_XMP), xmp);
image.setText(QStringLiteral(META_KEY_XMP_ADOBE), xmp);
}
auto descr = description();
if (!descr.isEmpty()) {
@ -563,7 +563,7 @@ public:
meta.pvarSoftware.VT.pszVal = software.data();
}
auto xmp = image.text(QStringLiteral(META_KEY_XMP)).toUtf8();
auto xmp = image.text(QStringLiteral(META_KEY_XMP_ADOBE)).toUtf8();
if (!xmp.isNull()) {
if (auto err = PKImageEncode_SetXMPMetadata_WMP(pEncoder, reinterpret_cast<quint8 *>(xmp.data()), xmp.size())) {
qCWarning(LOG_JXRPLUGIN) << "JXRHandler::write() error while setting XMP data:" << err;