mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
289 lines
12 KiB
Diff
289 lines
12 KiB
Diff
Description: fix build in arm s/double/qreal
|
|
Author: Ana Guerrero <ana@debian.org>
|
|
Last-Update: 2011-02-13
|
|
Applied-Upstream: Calligra master, koffice 2.3 branch
|
|
|
|
--- a/kplato/libs/ui/kptintervaledit.cpp
|
|
+++ b/kplato/libs/ui/kptintervaledit.cpp
|
|
@@ -42,7 +42,7 @@ IntervalEdit::IntervalEdit( CalendarDay
|
|
setIntervals( intervals );
|
|
if ( ! intervals.isEmpty() ) {
|
|
startTime->setTime( intervals.last()->endTime() );
|
|
- double l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 ) / (1000.0*60.0*60.0);
|
|
+ qreal l = ( intervals.last()->endTime().msecsTo( QTime().addMSecs( -1 ) ) + 1 ) / (1000.0*60.0*60.0);
|
|
length->setValue( qMin( l, (qreal) 8.0 ) );
|
|
}
|
|
}
|
|
--- a/krita/image/brushengine/kis_paintop.cc
|
|
+++ b/krita/image/brushengine/kis_paintop.cc
|
|
@@ -86,7 +86,7 @@ KisFixedPaintDeviceSP KisPaintOp::cached
|
|
return d->dab;
|
|
}
|
|
|
|
-void KisPaintOp::splitCoordinate(double coordinate, qint32 *whole, double *fraction)
|
|
+void KisPaintOp::splitCoordinate(qreal coordinate, qint32 *whole, qreal *fraction)
|
|
{
|
|
qint32 i = static_cast<qint32>(coordinate);
|
|
|
|
--- a/krita/image/brushengine/kis_paintop.h
|
|
+++ b/krita/image/brushengine/kis_paintop.h
|
|
@@ -108,7 +108,7 @@ public:
|
|
/**
|
|
* Split the coordinate into whole + fraction, where fraction is always >= 0.
|
|
*/
|
|
- static void splitCoordinate(double coordinate, qint32 *whole, double *fraction);
|
|
+ static void splitCoordinate(qreal coordinate, qint32 *whole, qreal *fraction);
|
|
|
|
/**
|
|
* returns the scale and rotation dynamically computed for the single dab
|
|
--- a/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp
|
|
+++ b/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector.cpp
|
|
@@ -161,12 +161,12 @@ inline int iconSize(qreal width, qreal h
|
|
qreal xm = width/2.;
|
|
qreal ym = height/2.;
|
|
if(xm>=2*ym || ym>=2*xm)
|
|
- return qBound(5., radius, 32.);
|
|
+ return qBound(qreal(5.), radius, qreal(32.));
|
|
|
|
qreal a=-2;
|
|
qreal b=2.*(xm+ym);
|
|
qreal c=radius*radius-xm*xm-ym*ym;
|
|
- return qBound(5., ((-b+sqrt(b*b-4*a*c))/(2*a)), 32.);
|
|
+ return qBound(qreal(5.), qreal((-b+sqrt(b*b-4*a*c))/(2*a)), qreal(32.));
|
|
}
|
|
|
|
void KisColorSelector::resizeEvent(QResizeEvent* e) {
|
|
--- a/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp
|
|
+++ b/krita/plugins/extensions/dockers/colorselectorng/kis_color_selector_simple.cpp
|
|
@@ -39,7 +39,7 @@ void KisColorSelectorSimple::setColor(co
|
|
emit paramChanged(-1, -1, -1, c.hslSaturationF(), c.lightnessF());
|
|
break;
|
|
case KisColorSelector::LH:
|
|
- m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
|
|
+ m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
|
|
m_lastClickPos.setY(1.-c.lightnessF());
|
|
emit paramChanged(c.hueF(), -1, -1, -1, c.lightnessF());
|
|
break;
|
|
@@ -49,17 +49,17 @@ void KisColorSelectorSimple::setColor(co
|
|
emit paramChanged(-1, c.saturationF(), c.valueF(), -1, -1);
|
|
break;
|
|
case KisColorSelector::VH:
|
|
- m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
|
|
+ m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
|
|
m_lastClickPos.setY(c.valueF());
|
|
emit paramChanged(c.hueF(), -1, c.valueF(), -1, -1);
|
|
break;
|
|
case KisColorSelector::hsvSH:
|
|
- m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
|
|
+ m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
|
|
m_lastClickPos.setY(1-c.saturationF());
|
|
emit paramChanged(c.hueF(), c.saturationF(), -1, -1, -1);
|
|
break;
|
|
case KisColorSelector::hslSH:
|
|
- m_lastClickPos.setX(qBound(0., c.hueF(), 1.));
|
|
+ m_lastClickPos.setX(qBound<qreal>(0., c.hueF(), 1.));
|
|
m_lastClickPos.setY(1-c.hslSaturationF());
|
|
emit paramChanged(c.hueF(), -1, -1, c.hslSaturationF(), -1);
|
|
break;
|
|
@@ -80,7 +80,7 @@ void KisColorSelectorSimple::setColor(co
|
|
emit paramChanged(-1, -1, -1, c.hslSaturationF(), -1);
|
|
break;
|
|
case KisColorSelector::H:
|
|
- m_lastClickPos.setX(1-qBound(0., c.hueF(), 1.));
|
|
+ m_lastClickPos.setX(1-qBound<qreal>(0., c.hueF(), 1.));
|
|
emit paramChanged(c.hueF(), -1, -1, -1, -1);
|
|
break;
|
|
default:
|
|
--- a/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp
|
|
+++ b/krita/plugins/extensions/dockers/colorselectorng/kis_shade_selector_line.cpp
|
|
@@ -139,9 +139,9 @@ void KisShadeSelectorLine::paintEvent(QP
|
|
while(hue<0) hue+=1.;
|
|
while(hue>1) hue-=1.;
|
|
|
|
- qreal saturation = qBound(0., m_color.saturationF()+(i*saturationStep)+m_saturationShift, 1.);
|
|
+ qreal saturation = qBound<qreal>(0., m_color.saturationF()+(i*saturationStep)+m_saturationShift, 1.);
|
|
|
|
- qreal value = qBound(0., m_color.valueF()+(i*valueStep)+m_valueShift, 1.);
|
|
+ qreal value = qBound<qreal>(0., m_color.valueF()+(i*valueStep)+m_valueShift, 1.);
|
|
|
|
|
|
koColor.fromQColor(QColor::fromHsvF(hue, saturation, value));
|
|
--- a/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h
|
|
+++ b/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h
|
|
@@ -51,7 +51,7 @@ public:
|
|
KisBrushOp(const KisBrushBasedPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
|
|
virtual ~KisBrushOp();
|
|
|
|
- double paintAt(const KisPaintInformation& info);
|
|
+ qreal paintAt(const KisPaintInformation& info);
|
|
virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
|
|
|
|
private:
|
|
--- a/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp
|
|
+++ b/krita/plugins/paintops/defaultpaintops/smudge/kis_smudgeop.cpp
|
|
@@ -95,7 +95,7 @@ KisSmudgeOp::~KisSmudgeOp()
|
|
of the current iteration.
|
|
*/
|
|
|
|
-double KisSmudgeOp::paintAt(const KisPaintInformation& info)
|
|
+qreal KisSmudgeOp::paintAt(const KisPaintInformation& info)
|
|
{
|
|
KisBrushSP brush = m_brush;
|
|
|
|
@@ -118,7 +118,7 @@ double KisSmudgeOp::paintAt(const KisPai
|
|
is where the dab will be positioned and the fractional part determines
|
|
the sub-pixel positioning. */
|
|
qint32 x, y;
|
|
- double xFraction, yFraction;
|
|
+ qreal xFraction, yFraction;
|
|
|
|
splitCoordinate(pt.x(), &x, &xFraction);
|
|
splitCoordinate(pt.y(), &y, &yFraction);
|
|
--- a/krita/plugins/paintops/deform/kis_deform_paintop.cpp
|
|
+++ b/krita/plugins/paintops/deform/kis_deform_paintop.cpp
|
|
@@ -94,9 +94,9 @@ qreal KisDeformPaintOp::paintAt(const Ki
|
|
KisFixedPaintDeviceSP dab = cachedDab(painter()->device()->colorSpace());
|
|
|
|
qint32 x;
|
|
- double subPixelX;
|
|
+ qreal subPixelX;
|
|
qint32 y;
|
|
- double subPixelY;
|
|
+ qreal subPixelY;
|
|
|
|
QPointF pt = info.pos();
|
|
if (m_sizeProperties.jitterEnabled){
|
|
@@ -151,7 +151,7 @@ qreal KisDeformPaintOp::paintAt(const Ki
|
|
}
|
|
|
|
|
|
-double KisDeformPaintOp::spacing(double /*pressure*/) const
|
|
+qreal KisDeformPaintOp::spacing(qreal /*pressure*/) const
|
|
{
|
|
return m_spacing;
|
|
}
|
|
--- a/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp
|
|
+++ b/krita/plugins/paintops/hatching/kis_hatching_paintop.cpp
|
|
@@ -67,7 +67,7 @@ KisHatchingPaintOp::~KisHatchingPaintOp(
|
|
delete m_hatchingBrush;
|
|
}
|
|
|
|
-double KisHatchingPaintOp::paintAt(const KisPaintInformation& info)
|
|
+qreal KisHatchingPaintOp::paintAt(const KisPaintInformation& info)
|
|
{
|
|
//------START SIMPLE ERROR CATCHING-------
|
|
if (!painter()->device()) return 1;
|
|
@@ -104,7 +104,7 @@ double KisHatchingPaintOp::paintAt(const
|
|
QPointF pt = info.pos() - hotSpot;
|
|
|
|
qint32 x, y;
|
|
- double xFraction, yFraction;
|
|
+ qreal xFraction, yFraction;
|
|
|
|
splitCoordinate(pt.x(), &x, &xFraction);
|
|
splitCoordinate(pt.y(), &y, &yFraction);
|
|
--- a/krita/plugins/paintops/hatching/kis_hatching_paintop.h
|
|
+++ b/krita/plugins/paintops/hatching/kis_hatching_paintop.h
|
|
@@ -50,7 +50,7 @@ public:
|
|
* Paint a hatched dab around the mouse cursor according to
|
|
* sensor settings and user preferences.
|
|
*/
|
|
- double paintAt(const KisPaintInformation& info);
|
|
+ qreal paintAt(const KisPaintInformation& info);
|
|
|
|
/**
|
|
* Returns a number between -90 and 90, and corresponds to the
|
|
--- a/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp
|
|
+++ b/krita/plugins/paintops/sketch/kis_sketch_paintop.cpp
|
|
@@ -265,7 +265,7 @@ KisDistanceInformation KisSketchPaintOp:
|
|
|
|
|
|
|
|
-double KisSketchPaintOp::paintAt(const KisPaintInformation& info)
|
|
+qreal KisSketchPaintOp::paintAt(const KisPaintInformation& info)
|
|
{
|
|
return paintLine(info, info).spacing;
|
|
}
|
|
--- a/krita/plugins/paintops/sketch/kis_sketch_paintop.h
|
|
+++ b/krita/plugins/paintops/sketch/kis_sketch_paintop.h
|
|
@@ -38,7 +38,7 @@ public:
|
|
KisSketchPaintOp(const KisSketchPaintOpSettings *settings, KisPainter * painter, KisImageWSP image);
|
|
virtual ~KisSketchPaintOp();
|
|
virtual KisDistanceInformation paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist = KisDistanceInformation());
|
|
- double paintAt(const KisPaintInformation& info);
|
|
+ qreal paintAt(const KisPaintInformation& info);
|
|
|
|
private:
|
|
// pixel buffer
|
|
--- a/krita/plugins/paintops/spray/spray_brush.cpp
|
|
+++ b/krita/plugins/paintops/spray/spray_brush.cpp
|
|
@@ -74,7 +74,7 @@ qreal SprayBrush::rotationAngle()
|
|
if ( m_shapeDynamicsProperties->randomRotation ){
|
|
|
|
if ( m_properties->gaussian ) {
|
|
- rotation = linearInterpolation(rotation ,M_PI * 2.0 * qBound(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0), m_shapeDynamicsProperties->randomRotationWeight );
|
|
+ rotation = linearInterpolation(rotation ,M_PI * 2.0 * qBound<qreal>(0.0, m_rand->nextGaussian(0.0, 0.50) , 1.0), m_shapeDynamicsProperties->randomRotationWeight );
|
|
} else {
|
|
rotation = linearInterpolation(rotation, M_PI * 2.0 * drand48(), m_shapeDynamicsProperties->randomRotationWeight );
|
|
}
|
|
@@ -322,9 +322,9 @@ void SprayBrush::paint(KisPaintDeviceSP
|
|
QPointF pt = pos - hotSpot;
|
|
|
|
qint32 ix;
|
|
- double xFraction;
|
|
+ qreal xFraction;
|
|
qint32 iy;
|
|
- double yFraction;
|
|
+ qreal yFraction;
|
|
|
|
KisPaintOp::splitCoordinate(pt.x(), &ix, &xFraction);
|
|
KisPaintOp::splitCoordinate(pt.y(), &iy, &yFraction);
|
|
--- a/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
|
|
+++ b/krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
|
|
@@ -278,7 +278,7 @@ KoPointerEvent KisToolDyna::filterEvent(
|
|
#endif
|
|
|
|
m_pressure = m_mouse.vel * 100;
|
|
- m_pressure = qBound(0.0,m_pressure, 1.0);
|
|
+ m_pressure = qBound(qreal(0.0),m_pressure, qreal(1.0));
|
|
|
|
m_odelx = delx;
|
|
m_odely = dely;
|
|
--- a/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp
|
|
+++ b/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.cpp
|
|
@@ -65,7 +65,7 @@ KisWateryMixPaintOp::~KisWateryMixPaintO
|
|
{
|
|
}
|
|
|
|
-double KisWateryMixPaintOp::paintAt(const KisPaintInformation& info)
|
|
+qreal KisWateryMixPaintOp::paintAt(const KisPaintInformation& info)
|
|
{
|
|
//------START SIMPLE ERROR CATCHING-------
|
|
if (!painter()->device()) return 1;
|
|
@@ -91,7 +91,7 @@ double KisWateryMixPaintOp::paintAt(cons
|
|
QPointF pt = info.pos() - hotSpot;
|
|
|
|
qint32 x, y;
|
|
- double xFraction, yFraction;
|
|
+ qreal xFraction, yFraction;
|
|
|
|
splitCoordinate(pt.x(), &x, &xFraction);
|
|
splitCoordinate(pt.y(), &y, &yFraction);
|
|
@@ -187,4 +187,4 @@ void KisWateryMixPaintOp::absorb ()
|
|
void KisWateryMixPaintOp::dilute ()
|
|
{
|
|
}
|
|
-*/
|
|
\ No newline at end of file
|
|
+*/
|
|
--- a/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h
|
|
+++ b/krita/plugins/paintops/waterymixbrush/kis_waterymix_paintop.h
|
|
@@ -53,7 +53,7 @@ public:
|
|
/**
|
|
* Document me
|
|
*/
|
|
- double paintAt(const KisPaintInformation& info);
|
|
+ qreal paintAt(const KisPaintInformation& info);
|
|
|
|
/*
|
|
/// Absorb the color beneath the brush
|