diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.cpp index 01830ef6f9..12e8d251de 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.cpp @@ -40,7 +40,10 @@ #include "cafPdmUiItem.h" #include + +#if ( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) ) #include +#endif #include @@ -92,6 +95,7 @@ int FontTools::absolutePointSize( FontSize normalPointSize, RelativeSize relativ //-------------------------------------------------------------------------------------------------- int FontTools::pointSizeToPixelSize( int pointSize ) { +#if ( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) ) auto app = dynamic_cast( QCoreApplication::instance() ); if ( app ) { @@ -99,6 +103,7 @@ int FontTools::pointSizeToPixelSize( int pointSize ) double inches = pointSize / 72.0; return static_cast( std::ceil( inches * dpi ) ); } +#endif return pointSize; } @@ -115,6 +120,7 @@ int FontTools::pointSizeToPixelSize( FontSize pointSize ) //-------------------------------------------------------------------------------------------------- int FontTools::pixelSizeToPointSize( int pixelSize ) { +#if ( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) ) auto app = dynamic_cast( QCoreApplication::instance() ); if ( app ) { @@ -122,6 +128,7 @@ int FontTools::pixelSizeToPointSize( int pixelSize ) double inches = pixelSize / dpi; return static_cast( std::ceil( inches * 72.0 ) ); } +#endif return pixelSize; }