From 3ed5568ec45dc8c1a1c6803ac91771c0f4a92f29 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 3 Jun 2009 20:44:41 +0000 Subject: [PATCH] use qAbs() instead of abs() BUG: 194790 svn path=/trunk/KDE/kdebase/workspace/; revision=977309 --- effects/slideback/slideback.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/effects/slideback/slideback.cpp b/effects/slideback/slideback.cpp index 61c60faea3..7c921a6668 100644 --- a/effects/slideback/slideback.cpp +++ b/effects/slideback/slideback.cpp @@ -134,18 +134,18 @@ QRect SlideBackEffect::getSlideDestination( const QRect &windowUnderGeometry, co int downSlide = windowUnderGeometry.bottom() - windowOverGeometry.top() + 20; int horizSlide = leftSlide; - if( abs( horizSlide ) > abs( rightSlide ) ) + if( qAbs( horizSlide ) > qAbs( rightSlide ) ) { horizSlide = rightSlide; } int vertSlide = upSlide; - if( abs( vertSlide ) > abs( downSlide ) ) + if( qAbs( vertSlide ) > qAbs( downSlide ) ) { vertSlide = downSlide; } QRect slideRect = windowOverGeometry; - if( abs( horizSlide ) < abs( vertSlide ) ) + if( qAbs( horizSlide ) < qAbs( vertSlide ) ) { slideRect.moveLeft( slideRect.x() + horizSlide ); } @@ -233,8 +233,8 @@ void SlideBackEffect::postPaintWindow( EffectWindow* w ) if( destinationList.contains( w ) ) { // has window reched its destination? - if(( abs( motionManager.transformedGeometry( w ).x() - destinationList[w].x() ) < 1 ) && - ( abs( motionManager.transformedGeometry( w ).y() - destinationList[w].y() ) < 1 ) ) + if(( qAbs( motionManager.transformedGeometry( w ).x() - destinationList[w].x() ) < 1 ) && + ( qAbs( motionManager.transformedGeometry( w ).y() - destinationList[w].y() ) < 1 ) ) { // If we are still intersecting with the activeWindow it is moving. slide to somewhere else // restore the stacking order of all windows not intersecting any more except panels @@ -304,8 +304,8 @@ void SlideBackEffect::postPaintWindow( EffectWindow* w ) else { // is window back at its original position? - if(( abs( motionManager.transformedGeometry( w ).x() - w->geometry().x() ) < 1 ) && - ( abs( motionManager.transformedGeometry( w ).y() - w->geometry().y() ) < 1 ) ) + if(( qAbs( motionManager.transformedGeometry( w ).x() - w->geometry().x() ) < 1 ) && + ( qAbs( motionManager.transformedGeometry( w ).y() - w->geometry().y() ) < 1 ) ) { motionManager.unmanage( w ); }