diff --git a/src/pdf/popplerutils.cpp b/src/pdf/popplerutils.cpp --- a/src/pdf/popplerutils.cpp +++ b/src/pdf/popplerutils.cpp @@ -80,7 +80,7 @@ return QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); } -QPainterPath PopplerUtils::convertPath(GfxPath *path, Qt::FillRule fillRule) +QPainterPath PopplerUtils::convertPath(GFXPATH_CONST GfxPath *path, Qt::FillRule fillRule) { QPainterPath qpp; qpp.setFillRule(fillRule); diff --git a/src/pdf/popplerutils_p.h b/src/pdf/popplerutils_p.h --- a/src/pdf/popplerutils_p.h +++ b/src/pdf/popplerutils_p.h @@ -28,6 +28,10 @@ class QPen; class QTransform; +#if KPOPPLER_VERSION >= QT_VERSION_CHECK(0, 83, 0) +#define GFXPATH_CONST const +#endif + namespace KItinerary { /** Utilities for interacting with Poppler. */ @@ -41,7 +45,7 @@ QTransform currentTransform(GfxState *state); /** Convets a Poppler path into a Qt path. */ - QPainterPath convertPath(GfxPath *path, Qt::FillRule fillRule); + QPainterPath convertPath(GFXPATH_CONST GfxPath *path, Qt::FillRule fillRule); } }