kexiv2: fix build against >= 0.27.0

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-05-03 05:40:22 +00:00
parent ead23d2f84
commit 3ce86f9935
2 changed files with 5 additions and 14 deletions

View file

@ -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 <exiv2/exv_conf.h>
#include <exiv2/error.hpp>
#include <exiv2/image.hpp>
#include <exiv2/jpgimage.hpp>
#include <exiv2/datasets.hpp>
#include <exiv2/tags.hpp>
#include <exiv2/preview.hpp>
#include <exiv2/properties.hpp>
#include <exiv2/types.hpp>
#include <exiv2/exif.hpp>
#include <exiv2/xmpsidecar.hpp>
#include <exiv2/exiv2.hpp>
// Check if Exiv2 support XMP

View file

@ -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