Copied FindLibExiv2.cmake from ECM 5.53.0 until we raise min version.
Thanks-to: Boudewijn Rempt <boud@valdyas.org>
for final fix to kis_xmp_io.cpp.
CCBUG: 402566
rempt |
Krita |
Copied FindLibExiv2.cmake from ECM 5.53.0 until we raise min version.
Thanks-to: Boudewijn Rempt <boud@valdyas.org>
for final fix to kis_xmp_io.cpp.
CCBUG: 402566
Built fine against exiv2-0.26 and exiv2-0.27.
No Linters Available |
No Unit Test Coverage |
Buildable 6396 | |
Build 6414: arc lint + arc unit |
PS: Backportable to 4.1 branch replacing a single hunk:
diff --git a/libs/ui/kisexiv2/kis_exiv2.h b/libs/ui/kisexiv2/kis_exiv2.h index 9343265f1e..6b66aa7852 100644 --- a/libs/ui/kisexiv2/kis_exiv2.h +++ b/libs/ui/kisexiv2/kis_exiv2.h @@ -21,7 +21,7 @@ #include <metadata/kis_meta_data_value.h> -#include <exiv2/value.hpp> +#include <exiv2/exiv2.hpp> #include "kritaui_export.h" /// Convert an exiv value to a KisMetaData value
TBH inverting all the EXIV2_TEST_VERSION(...) conditions will avoid swapping all the code branches for old and new exiv2, reducing the diff of this patch.
libs/ui/kisexiv2/kis_xmp_io.cpp | ||
---|---|---|
279–280 | the == here seems wrong, as it will execute the code of the loop only once |
CMakeLists.txt | ||
---|---|---|
614 | the PURPOSE here is not added in the new code (OK, the text is not exactly useful, but still) | |
libs/ui/kisexiv2/kis_exif_io.cpp | ||
445 | extra line change | |
532 | extra line change | |
533 | extra line change | |
libs/ui/kisexiv2/kis_xmp_io.cpp | ||
22–26 | considering that kis_exiv2.h now includes exiv2/exiv2.hpp, and that exiv2/exiv2.hpp includes all the exiv2 headers, isn't this snippet redundant now? | |
279–280 | should it be just < now? |
libs/ui/kisexiv2/kis_exif_io.cpp | ||
---|---|---|
532 | I thought it was probably not intended to have this empty line inside the #else part in the first place |
libs/ui/kisexiv2/kis_xmp_io.cpp | ||
---|---|---|
279–280 | This causes krita to crash here when opening certain jpg files (with XMP tags). I think it should be xav->count() instead of xav->size()... (that does fix the crashes for me) According to the docs (http://www.exiv2.org/doc/classExiv2_1_1XmpArrayValue.html), |
You apparently "fixed" the wrong line though:
https://phabricator.kde.org/R37:47c1a78a0f02e7d6a970616c20801ddb6ba0c58e
This is rather in loadFrom(), line 279...
The one in saveFrom() that you changed should have been fine, as it is a QList, where size() and count() are effectively the same.