OSDN Git Service

use single variable assignment in QWidgetPrivate::scrollRect()
authorIvailo Monev <xakepa10@laimg.moc>
Fri, 1 May 2020 19:14:06 +0000 (19:14 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Fri, 1 May 2020 19:14:06 +0000 (19:14 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/gui/painting/qbackingstore.cpp

index 7e509dd..ecdb93a 100644 (file)
@@ -743,9 +743,8 @@ void QWidgetPrivate::scrollRect(const QRect &rect, int dx, int dy)
     static const int accelEnv = qgetenv("QT_NO_FAST_SCROLL").toInt() == 0;
 
     QRect scrollRect = rect & clipRect();
-    bool overlapped = false;
-    bool accelerateScroll = accelEnv && isOpaque
-                            && !(overlapped = isOverlapped(scrollRect.translated(data.crect.topLeft())));
+    bool overlapped = isOverlapped(scrollRect.translated(data.crect.topLeft()));
+    bool accelerateScroll = accelEnv && isOpaque && !overlapped;
 
     if (!accelerateScroll) {
         if (overlapped) {