diff --git a/src/exquisite/qqtbodymouselocker_win.cpp b/src/exquisite/qqtbodymouselocker_win.cpp index 29547e34..69288f48 100644 --- a/src/exquisite/qqtbodymouselocker_win.cpp +++ b/src/exquisite/qqtbodymouselocker_win.cpp @@ -1,4 +1,4 @@ -#include "qqtbodymouselocker_win.h" +#include "qqtbodymouselocker_win.h" #include #include #include @@ -69,7 +69,11 @@ QRect QQtBodyMouseLockerPrivate::getTargetRect ( QWidget* target ) p0 = w.mapToGlobal ( p0 ); p1 = w.mapToGlobal ( p1 ); +#if QT_VERSION > QT_VERSION_CHECK(5, 5, 1) qreal ratio = w.devicePixelRatioF(); +#else + qreal ratio = 1.0; +#endif QRect r0 = QRect ( p0, p1 ); QRect qr0 = QRect ( QPoint ( r0.left() * ratio, r0.top() * ratio ), QPoint ( r0.right() * ratio, r0.bottom() * ratio ) ); @@ -95,7 +99,11 @@ QRect QQtBodyMouseLockerPrivate::getSourceRect ( QWidget* target ) p1 = w.mapToGlobal ( p1 ); QRect r0 = QRect ( p0, p1 ); +#if QT_VERSION > QT_VERSION_CHECK(5, 5, 1) qreal ratio = w.devicePixelRatioF(); +#else + qreal ratio = 1.0; +#endif QRect qr0 = QRect ( QPoint ( r0.left() * ratio, r0.top() * ratio ), QPoint ( r0.right() * ratio, r0.bottom() * ratio ) ); return qr0; } diff --git a/src/exquisite/qqtbodymousewheelscalingeffect.cpp b/src/exquisite/qqtbodymousewheelscalingeffect.cpp index 6ea8faab..e1e882b9 100644 --- a/src/exquisite/qqtbodymousewheelscalingeffect.cpp +++ b/src/exquisite/qqtbodymousewheelscalingeffect.cpp @@ -65,7 +65,11 @@ void QQtBodyMouseWheelScalingEffect::wheelEvent ( QWheelEvent* event, QWidget* t p1 = w.mapToGlobal ( p1 ); QRect r0 = QRect ( p0, p1 ); #ifdef __DESKTOP_WIN__ +#if QT_VERSION > QT_VERSION_CHECK(5, 5, 1) qreal ratio = w.devicePixelRatioF(); +#else + qreal ratio = 1.0; +#endif #else qreal ratio = 1; #endif diff --git a/src/network/qqtwebloader.cpp b/src/network/qqtwebloader.cpp index 40d7a90d..4459dc84 100644 --- a/src/network/qqtwebloader.cpp +++ b/src/network/qqtwebloader.cpp @@ -40,9 +40,15 @@ QQtNetworkReply& QQtNetworkReply::operator = ( const QNetworkReply& other ) #if QT_VERSION > QT_VERSION_CHECK(5, 9, 0) for ( int i = ( int ) QNetworkRequest::HttpStatusCodeAttribute; i <= ( int ) QNetworkRequest::RedirectPolicyAttribute; i++ ) -#else +#elif QT_VERSION > QT_VERSION_CHECK(5, 6, 3) for ( int i = ( int ) QNetworkRequest::HttpStatusCodeAttribute; i <= ( int ) QNetworkRequest::HTTP2WasUsedAttribute; i++ ) +#elif QT_VERSION > QT_VERSION_CHECK(5, 5, 1) + for ( int i = ( int ) QNetworkRequest::HttpStatusCodeAttribute; + i <= ( int ) QNetworkRequest::FollowRedirectsAttribute; i++ ) +#else + for ( int i = ( int ) QNetworkRequest::HttpStatusCodeAttribute; + i <= ( int ) QNetworkRequest::EmitAllUploadProgressSignalsAttribute; i++ ) #endif { QNetworkRequest::Attribute ii = ( QNetworkRequest::Attribute ) i;