┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewautoscroller.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2009-06-13 10:05:35 +0000
committerFrank Reininghaus <[email protected]>2009-06-13 10:05:35 +0000
commitf44125b0438b073fb9d6ab88a7530000ba8ea5ba (patch)
tree37a82fe02051b5609d9e93c0c9f088ebde6dd89b /src/dolphinviewautoscroller.cpp
parent6e745224228ea099f1834cc5b8c2dff15a0145bc (diff)
Use qAbs() instead of fabs(). The values in question are integers
anyway (so fabs() is not the 'right' function for them), and this change makes the Sun Studio compiler happy. Thanks to tropikhajma at gmail.com for the patch. BUG: 196265 svn path=/trunk/KDE/kdebase/apps/; revision=981325
Diffstat (limited to 'src/dolphinviewautoscroller.cpp')
-rw-r--r--src/dolphinviewautoscroller.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dolphinviewautoscroller.cpp b/src/dolphinviewautoscroller.cpp
index 4e7af7f59..75dab3214 100644
--- a/src/dolphinviewautoscroller.cpp
+++ b/src/dolphinviewautoscroller.cpp
@@ -167,12 +167,12 @@ int DolphinViewAutoScroller::calculateScrollIncrement(int cursorPos, int rangeSi
const int autoScrollBorder = 64;
if (cursorPos < autoScrollBorder) {
- inc = -minSpeed + fabs(cursorPos - autoScrollBorder) * (cursorPos - autoScrollBorder) / speedLimiter;
+ inc = -minSpeed + qAbs(cursorPos - autoScrollBorder) * (cursorPos - autoScrollBorder) / speedLimiter;
if (inc < -maxSpeed) {
inc = -maxSpeed;
}
} else if (cursorPos > rangeSize - autoScrollBorder) {
- inc = minSpeed + fabs(cursorPos - rangeSize + autoScrollBorder) * (cursorPos - rangeSize + autoScrollBorder) / speedLimiter;
+ inc = minSpeed + qAbs(cursorPos - rangeSize + autoScrollBorder) * (cursorPos - rangeSize + autoScrollBorder) / speedLimiter;
if (inc > maxSpeed) {
inc = maxSpeed;
}