tags 570848 +patch
thanks

Patch is attatched, just add it to the quilt series.


Index: ams-2.0.1/src/canvasfunction.cpp
===================================================================
--- ams-2.0.1.orig/src/canvasfunction.cpp	2010-02-23 14:49:01.000000000 +0000
+++ ams-2.0.1/src/canvasfunction.cpp	2010-02-23 14:51:25.000000000 +0000
@@ -34,10 +34,10 @@
   qreal x = event->scenePos().x();
   qreal y = event->scenePos().y();
 
-  x = std::min(x, 5.0 * FUNCTION_SCALE);
-  x = std::max(x, -5.0 * FUNCTION_SCALE);
-  y = std::min(y, 5.0 * FUNCTION_SCALE);
-  y = std::max(y, -5.0 * FUNCTION_SCALE);
+  x = std::min(x, (qreal)(5.0 * FUNCTION_SCALE));
+  x = std::max(x, (qreal)(-5.0 * FUNCTION_SCALE));
+  y = std::min(y, (qreal)(5.0 * FUNCTION_SCALE));
+  y = std::max(y, (qreal)(-5.0 * FUNCTION_SCALE));
 
   switch (*function.mode) {
   case 0:
@@ -58,8 +58,8 @@
       for (int _p = 0; _p < function.pointCount; ++_p) {
 	QPointF newPos = canvasPoints.at(_p)->scenePos();
 	newPos.setX(newPos.x() + delta);
-	newPos.setX(std::min(newPos.x(), 5.0 * FUNCTION_SCALE));
-	newPos.setX(std::max(newPos.x(), -5.0 * FUNCTION_SCALE));
+	newPos.setX(std::min(newPos.x(), (qreal)(5.0 * FUNCTION_SCALE)));
+	newPos.setX(std::max(newPos.x(), (qreal)(-5.0 * FUNCTION_SCALE)));
 	setPoint(_p, newPos);
       }
     } break;
@@ -69,8 +69,8 @@
       for (int _p = 0; _p < function.pointCount; ++_p) {
 	QPointF newPos = canvasPoints.at(_p)->scenePos();
 	newPos.setY(newPos.y() + delta);
-	newPos.setY(std::min(newPos.y(), 5.0 * FUNCTION_SCALE));
-	newPos.setY(std::max(newPos.y(), -5.0 * FUNCTION_SCALE));
+	newPos.setY(std::min(newPos.y(), (qreal)(5.0 * FUNCTION_SCALE)));
+	newPos.setY(std::max(newPos.y(), (qreal)(-5.0 * FUNCTION_SCALE)));
 	setPoint(_p, newPos);
       }
     } break;
@@ -80,8 +80,8 @@
       for (int _p = 0; _p < function.pointCount; ++_p) {
 	QPointF newPos = canvasPoints.at(_p)->scenePos();
 	newPos.setX(pos0[_p].x() * delta);
-	newPos.setX(std::min(newPos.x(), 5.0 * FUNCTION_SCALE));
-	newPos.setX(std::max(newPos.x(), -5.0 * FUNCTION_SCALE));
+	newPos.setX(std::min(newPos.x(), (qreal)(5.0 * FUNCTION_SCALE)));
+	newPos.setX(std::max(newPos.x(), (qreal)(-5.0 * FUNCTION_SCALE)));
 	setPoint(_p, newPos);
       }
     } break;
@@ -91,8 +91,8 @@
       for (int _p = 0; _p < function.pointCount; ++_p) {
 	QPointF newPos = canvasPoints.at(_p)->scenePos();
 	newPos.setY(pos0[_p].y() * delta);
-	newPos.setY(std::min(newPos.y(), 5.0 * FUNCTION_SCALE));
-	newPos.setY(std::max(newPos.y(), -5.0 * FUNCTION_SCALE));
+	newPos.setY(std::min(newPos.y(), (qreal)(5.0 * FUNCTION_SCALE)));
+	newPos.setY(std::max(newPos.y(), (qreal)(-5.0 * FUNCTION_SCALE)));
 	setPoint(_p, newPos);
       }
     } break;
Index: ams-2.0.1/src/function.cpp
===================================================================
--- ams-2.0.1.orig/src/function.cpp	2010-02-23 15:07:29.000000000 +0000
+++ ams-2.0.1/src/function.cpp	2010-02-23 15:09:40.000000000 +0000
@@ -144,7 +144,7 @@
   {
     qreal y = ceil(rect.topLeft().y() * zoom / FUNCTION_SCALE);
     y *= FUNCTION_SCALE / zoom;
-    QLineF l(std::max(-5.0 * FUNCTION_SCALE, rect.topLeft().x()), y, std::min(5.0 * FUNCTION_SCALE, rect.topRight().x()), y);
+    QLineF l(std::max((qreal)(-5.0 * FUNCTION_SCALE), rect.topLeft().x()), y, std::min((qreal)(5.0 * FUNCTION_SCALE), rect.topRight().x()), y);
     while (l.y1() < rect.bottomLeft().y()) {
       painter->drawLine(l);
       painter->drawText(l.p1(), s.setNum(l.y1() / FUNCTION_SCALE));
@@ -154,7 +154,7 @@
   {
     qreal x = ceil(rect.topLeft().x() * zoom / FUNCTION_SCALE);
     x *= FUNCTION_SCALE / zoom;
-    QLineF l(x, std::max(-5.0 * FUNCTION_SCALE, rect.topLeft().y()), x, std::min(5.0 * FUNCTION_SCALE, rect.bottomLeft().y()));
+    QLineF l(x, std::max((qreal)(-5.0 * FUNCTION_SCALE), rect.topLeft().y()), x, std::min((qreal)(5.0 * FUNCTION_SCALE), rect.bottomLeft().y()));
     while (l.x1() < rect.bottomRight().x()) {
       painter->drawLine(l);
       painter->drawText(l.p1(), s.setNum(l.x1() / FUNCTION_SCALE));
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to