1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

修复MinGW32目标,Qt5.5.1版本下的编译。

This commit is contained in:
tianduanrui 2021-03-28 20:44:29 +08:00
parent 0539487678
commit 97e1619d8d
3 changed files with 20 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#include "qqtbodymouselocker_win.h"
#include "qqtbodymouselocker_win.h"
#include <QWidget>
#include <QEvent>
#include <QMouseEvent>
@ -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;
}

View File

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

View File

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