From 7191d788415f190680c8a699b2b7bb88ddf28917 Mon Sep 17 00:00:00 2001 From: sandman Date: Mon, 01 Jul 2002 23:38:26 +0000 Subject: - fixed some "unused variable" warnings from the KDE code - replaced sqrt() calls QPE's qSqrt() --- diff --git a/noncore/styles/theme/ogfxeffect.cpp b/noncore/styles/theme/ogfxeffect.cpp index a991728..55f3c1f 100644 --- a/noncore/styles/theme/ogfxeffect.cpp +++ b/noncore/styles/theme/ogfxeffect.cpp @@ -10,6 +10,8 @@ #include #include +#include + #include "ogfxeffect.h" @@ -21,7 +23,7 @@ QPixmap& OGfxEffect::gradient(QPixmap &pixmap, const QColor &ca, - const QColor &cb, GradientType eff, int ncols) + const QColor &cb, GradientType eff, int /*ncols*/) { if(pixmap.depth() > 8 && (eff == VerticalGradient || eff == HorizontalGradient)) { @@ -91,13 +93,11 @@ QPixmap& OGfxEffect::gradient(QPixmap &pixmap, const QColor &ca, QPixmap& OGfxEffect::blend(QPixmap &pixmap, float initial_intensity, const QColor &bgnd, GradientType eff, - bool anti_dir, int ncols) + bool anti_dir, int /*ncols*/) { QImage image = pixmap.convertToImage(); OGfxEffect::blend(image, initial_intensity, bgnd, eff, anti_dir); - unsigned int tmp; - if ( pixmap. depth ( ) <= 8 ) image. convertDepth ( pixmap. depth ( )); @@ -218,7 +218,7 @@ QImage& OGfxEffect::blend(QImage &image, float initial_intensity, if (eff == RectangleGradient) intensity = initial_intensity + QMAX(xvar, yvar); else - intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar); + intensity = initial_intensity + qSqrt(xvar * xvar + yvar * yvar); if (intensity > 1) intensity = 1; if (intensity < 0) intensity = 0; @@ -262,7 +262,7 @@ QImage& OGfxEffect::blend(QImage &image, float initial_intensity, if (eff == RectangleGradient) intensity = initial_intensity + QMAX(xvar, yvar); else - intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar); + intensity = initial_intensity + qSqrt(xvar * xvar + yvar * yvar); if (intensity > 1) intensity = 1; if (intensity < 0) intensity = 0; -- cgit v0.9.0.2