diff --git a/kexiv2/libkexiv2/kexiv2_p.h b/kexiv2/libkexiv2/kexiv2_p.h index 706fbdaa..ce7a1908 100644 --- a/kexiv2/libkexiv2/kexiv2_p.h +++ b/kexiv2/libkexiv2/kexiv2_p.h @@ -63,9 +63,6 @@ // Exiv2 includes ------------------------------------------------------- -// NOTE: All Exiv2 header must be stay there to not expose external source code to Exiv2 API -// and reduce Exiv2 dependency to client code. - // The pragmas are required to be able to catch exceptions thrown by libexiv2: // See http://gcc.gnu.org/wiki/Visibility, the section about c++ exceptions. // They are needed for all libexiv2 versions that do not care about visibility. @@ -73,17 +70,7 @@ #pragma GCC visibility push(default) #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // Check if Exiv2 support XMP diff --git a/kexiv2/libkexiv2/kexiv2exif.cpp b/kexiv2/libkexiv2/kexiv2exif.cpp index 855a046e..ed601bc7 100644 --- a/kexiv2/libkexiv2/kexiv2exif.cpp +++ b/kexiv2/libkexiv2/kexiv2exif.cpp @@ -990,7 +990,11 @@ bool KExiv2::setTiffThumbnail(const QImage& thumbImage, bool setProgramName) con if (pos == d->exifMetadata().end() || pos->count() != 1 || pos->toLong() != 0) { +#if EXIV2_TEST_VERSION(0,27,0) + throw Exiv2::Error(Exiv2::kerErrorMessage, "Exif.Image.NewSubfileType missing or not set as main image"); +#else throw Exiv2::Error(1, "Exif.Image.NewSubfileType missing or not set as main image"); +#endif } // Remove sub-IFD tags