diff --git a/src/libs/vdxf/vdxfpaintdevice.cpp b/src/libs/vdxf/vdxfpaintdevice.cpp index c9a583451..b406fd8fa 100644 --- a/src/libs/vdxf/vdxfpaintdevice.cpp +++ b/src/libs/vdxf/vdxfpaintdevice.cpp @@ -136,8 +136,10 @@ int VDxfPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const return engine->getResolution(); case QPaintDevice::PdmPhysicalDpiY: return engine->getResolution(); +#if QT_VERSION > QT_VERSION_CHECK(5, 0, 2) case QPaintDevice::PdmDevicePixelRatio: return 1; +#endif default: qWarning("VDxfPaintDevice::metric(), unhandled metric %d\n", metric); break; diff --git a/src/libs/vobj/vobjpaintdevice.cpp b/src/libs/vobj/vobjpaintdevice.cpp index f20585541..078227152 100644 --- a/src/libs/vobj/vobjpaintdevice.cpp +++ b/src/libs/vobj/vobjpaintdevice.cpp @@ -156,8 +156,10 @@ int VObjPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const return engine->getResolution(); case QPaintDevice::PdmPhysicalDpiY: return engine->getResolution(); +#if QT_VERSION > QT_VERSION_CHECK(5, 0, 2) case QPaintDevice::PdmDevicePixelRatio: return 1; +#endif default: qWarning("VObjPaintDevice::metric(), unhandled metric %d\n", metric); break;