[kst/f19] respin kst-2.0.6-fix-qreal-vs-double-for-arm.patch

Rex Dieter rdieter at fedoraproject.org
Tue Mar 19 17:45:48 UTC 2013


commit 10640c81d75186d1efc5f3dd0d22d75974a4aa4e
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Tue Mar 19 12:45:25 2013 -0500

    respin kst-2.0.6-fix-qreal-vs-double-for-arm.patch

 kst-2.0.6-fix-qreal-vs-double-for-arm.patch |  134 ++++++++++++++++++++++++++-
 kst.spec                                    |    6 +-
 2 files changed, 134 insertions(+), 6 deletions(-)
---
diff --git a/kst-2.0.6-fix-qreal-vs-double-for-arm.patch b/kst-2.0.6-fix-qreal-vs-double-for-arm.patch
index 39ff4f5..3dd7c53 100644
--- a/kst-2.0.6-fix-qreal-vs-double-for-arm.patch
+++ b/kst-2.0.6-fix-qreal-vs-double-for-arm.patch
@@ -1,7 +1,6 @@
-diff -up kst-2.0.6/src/libkstapp/applicationsettingsdialog.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/applicationsettingsdialog.cpp
 diff -up kst-2.0.6/src/libkstapp/arrowitem.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/arrowitem.cpp
 --- kst-2.0.6/src/libkstapp/arrowitem.cpp.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
-+++ kst-2.0.6/src/libkstapp/arrowitem.cpp	2013-03-19 07:28:05.890643783 -0500
++++ kst-2.0.6/src/libkstapp/arrowitem.cpp	2013-03-19 09:55:52.156800203 -0500
 @@ -65,7 +65,7 @@ void ArrowItem::paint(QPainter *painter)
      double sina = sin(theta);
      double cosa = cos(theta);
@@ -22,7 +21,7 @@ diff -up kst-2.0.6/src/libkstapp/arrowitem.cpp.fix-qreal-vs-double-for-arm kst-2
      m.map( deltax, yin, &x1, &y1);
 diff -up kst-2.0.6/src/libkstapp/mainwindow.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/mainwindow.cpp
 --- kst-2.0.6/src/libkstapp/mainwindow.cpp.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
-+++ kst-2.0.6/src/libkstapp/mainwindow.cpp	2013-03-19 07:28:05.890643783 -0500
++++ kst-2.0.6/src/libkstapp/mainwindow.cpp	2013-03-19 09:55:52.156800203 -0500
 @@ -673,7 +673,7 @@ void MainWindow::savePrinterDefaults(QPr
    _dialogDefaults->setValue("print/landscape", printer->orientation() == QPrinter::Landscape);
    _dialogDefaults->setValue("print/paperSize", int(printer->paperSize()));
@@ -32,9 +31,36 @@ diff -up kst-2.0.6/src/libkstapp/mainwindow.cpp.fix-qreal-vs-double-for-arm kst-
    printer->getPageMargins(&left, &top, &right, &bottom, QPrinter::Millimeter);
    _dialogDefaults->setValue("print/topLeftMargin", QPointF(left, top));
    _dialogDefaults->setValue("print/bottomRightMargin", QPointF(right, bottom));
+diff -up kst-2.0.6/src/libkstapp/plotaxis.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/plotaxis.cpp
+--- kst-2.0.6/src/libkstapp/plotaxis.cpp.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstapp/plotaxis.cpp	2013-03-19 09:55:52.157800190 -0500
+@@ -772,8 +772,8 @@ bool PlotAxis::isLinearTickMode() {
+ }
+ 
+ void PlotAxis::updateInterpretTicks(MajorTickMode tickMode) {
+-  double min;
+-  double max;
++  qreal min;
++  qreal max;
+ 
+   if (_orientation == Qt::Horizontal) {
+     min = plotItem()->projectionRect().left();
+@@ -788,9 +788,9 @@ void PlotAxis::updateInterpretTicks(Majo
+   double max_jd = convertTimeValueToJD(max);
+   double range_jd = fabs(max_jd - min_jd);
+   double base_jd;
+-  double range_u;
+-  double tickspacing_u;
+-  double tickspacing;
++  qreal range_u;
++  qreal tickspacing_u;
++  qreal tickspacing;
+   QString units;
+ 
+   double minimum_units = tickMode;
 diff -up kst-2.0.6/src/libkstapp/plotitem.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/plotitem.cpp
 --- kst-2.0.6/src/libkstapp/plotitem.cpp.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
-+++ kst-2.0.6/src/libkstapp/plotitem.cpp	2013-03-19 07:28:05.892643758 -0500
++++ kst-2.0.6/src/libkstapp/plotitem.cpp	2013-03-19 09:55:52.158800178 -0500
 @@ -975,7 +975,7 @@ void PlotItem::paintPlot(QPainter *paint
    }
    if (isUseAxisScale()) {
@@ -70,7 +96,7 @@ diff -up kst-2.0.6/src/libkstapp/plotitem.cpp.fix-qreal-vs-double-for-arm kst-2.
  }
 diff -up kst-2.0.6/src/libkstapp/plotrenderitem.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/plotrenderitem.cpp
 --- kst-2.0.6/src/libkstapp/plotrenderitem.cpp.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
-+++ kst-2.0.6/src/libkstapp/plotrenderitem.cpp	2013-03-19 07:28:05.889643795 -0500
++++ kst-2.0.6/src/libkstapp/plotrenderitem.cpp	2013-03-19 09:55:52.159800165 -0500
 @@ -712,9 +712,9 @@ void PlotRenderItem::highlightNearestDat
      bool bFoundImage = false;
  
@@ -83,3 +109,101 @@ diff -up kst-2.0.6/src/libkstapp/plotrenderitem.cpp.fix-qreal-vs-double-for-arm
      qreal dxPerPix = double(projectionRect().width())/double(rect().width());
  
      foreach(RelationPtr relation, relationList()) {
+diff -up kst-2.0.6/src/libkstapp/viewitem.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/viewitem.cpp
+--- kst-2.0.6/src/libkstapp/viewitem.cpp.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstapp/viewitem.cpp	2013-03-19 09:55:52.159800165 -0500
+@@ -1087,8 +1087,8 @@ void ViewItem::creationPolygonChanged(Vi
+ 
+   if (event == View::MouseMove) {
+     const QPolygonF poly = mapFromScene(view()->creationPolygon(View::MouseMove));
+-    double x0 = qMin(0.0, poly.last().x());
+-    double y0 = qMin(0.0, poly.last().y());
++    double x0 = qMin((qreal)0.0, poly.last().x());
++    double y0 = qMin((qreal)0.0, poly.last().y());
+     QRectF newRect(x0, y0, fabs(poly.last().x()), fabs(poly.last().y()));
+     setViewRect(newRect);
+     return;
+@@ -1096,14 +1096,14 @@ void ViewItem::creationPolygonChanged(Vi
+ 
+   if (event == View::MouseRelease) {
+     const QPolygonF poly = mapFromScene(view()->creationPolygon(View::MouseRelease));
+-    double x0 = qMin(0.0, poly.last().x());
+-    double y0 = qMin(0.0, poly.last().y());
++    double x0 = qMin((qreal)0.0, poly.last().x());
++    double y0 = qMin((qreal)0.0, poly.last().y());
+     QRectF newRect(x0, y0, fabs(poly.last().x()), fabs(poly.last().y()));
+ 
+     if (!newRect.isValid()) {
+       newRect = newRect.normalized();
+-      newRect.setWidth(qMax(3.0, newRect.width()));
+-      newRect.setHeight(qMax(3.0, newRect.height()));
++      newRect.setWidth(qMax((qreal)3.0, newRect.width()));
++      newRect.setHeight(qMax((qreal)3.0, newRect.height()));
+       setPos(pos() + newRect.topLeft());
+ 
+       newRect.moveTopLeft(QPointF(0, 0));
+@@ -1262,7 +1262,7 @@ void ViewItem::startDragging(QWidget *wi
+   qreal x2 = x1+x3;
+   qreal dx;
+ 
+-  dx = qMin(0.0, x1);
++  dx = qMin((qreal)0.0, x1);
+   dx = qMin(x2,dx);
+   dx = qMin(x3,dx);
+ 
+@@ -1271,7 +1271,7 @@ void ViewItem::startDragging(QWidget *wi
+   qreal y2 = y1+y3;
+   qreal dy;
+ 
+-  dy = qMin(0.0, y1);
++  dy = qMin((qreal)0.0, y1);
+   dy = qMin(y2,dy);
+   dy = qMin(y3,dy);
+ 
+diff -up kst-2.0.6/src/libkstmath/image.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstmath/image.cpp
+--- kst-2.0.6/src/libkstmath/image.cpp.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstmath/image.cpp	2013-03-19 11:39:08.055340812 -0500
+@@ -780,7 +780,7 @@ void Image::paintLegendSymbol(QPainter *
+   QRect bound(QPoint(0,0),size);
+ 
+   if (hasColorMap() && (_pal.colorCount()>0)) {
+-    double spacing;
++    qreal spacing;
+     int minor_ticks;
+     computeMajorTickSpacing(&spacing, &minor_ticks, TicksCoarse, upperThreshold() - lowerThreshold());
+ 
+diff -up kst-2.0.6/src/libkstmath/plottickcalculator.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstmath/plottickcalculator.cpp
+--- kst-2.0.6/src/libkstmath/plottickcalculator.cpp.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstmath/plottickcalculator.cpp	2013-03-19 12:17:16.231734670 -0500
+@@ -26,7 +26,7 @@ namespace Kst {
+  * on the axis (but at least 2). The value of M is set by the requested
+  * MajorTickMode.
+  */
+-void computeMajorTickSpacing(double *major_spacing, int *minor_count, MajorTickMode majorTickCount, double R) {
++void computeMajorTickSpacing(qreal *major_spacing, int *minor_count, MajorTickMode majorTickCount, qreal R) {
+   qreal M = majorTickCount;
+   qreal B = floor(log10(R/M));
+ 
+@@ -63,7 +63,7 @@ void computeMajorTickSpacing(double *maj
+ }
+ 
+ // compute the major ticks for hours (base = 24) or min/sec (base = 60)
+-void computeMajorTickSpacing(double *major_spacing, int *minor_count, MajorTickMode majorTickCount, double R, timeUnits time_units) {
++void computeMajorTickSpacing(qreal *major_spacing, int *minor_count, MajorTickMode majorTickCount, qreal R, timeUnits time_units) {
+   double base60list[] =     {1.0,2.0,5.0,10.0,20.0,30.0,60.0};
+   int minorlist_minutes[] = {  6,  4,  5,   5,   4,   6,   4};
+   int minorlist_seconds[] = {  5,  4,  5,   5,   4,   6,   6};
+diff -up kst-2.0.6/src/libkstmath/plottickcalculator.h.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstmath/plottickcalculator.h
+--- kst-2.0.6/src/libkstmath/plottickcalculator.h.fix-qreal-vs-double-for-arm	2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstmath/plottickcalculator.h	2013-03-19 09:55:52.160800153 -0500
+@@ -27,8 +27,8 @@ enum MajorTickMode {
+ 
+ enum timeUnits {Hour, Minute, Second};
+ 
+-KSTMATH_EXPORT void computeMajorTickSpacing(double *major_spacing, int *minor_count, MajorTickMode majorTickCount, double range);
+-KSTMATH_EXPORT void computeMajorTickSpacing(double *major_spacing, int *minor_count, MajorTickMode majorTickCount, double range, timeUnits time_units);
++KSTMATH_EXPORT void computeMajorTickSpacing(qreal *major_spacing, int *minor_count, MajorTickMode majorTickCount, qreal range);
++KSTMATH_EXPORT void computeMajorTickSpacing(qreal *major_spacing, int *minor_count, MajorTickMode majorTickCount, qreal range, timeUnits time_units);
+ 
+ }
+ 
diff --git a/kst.spec b/kst.spec
index 5d000a6..5ecc4fa 100644
--- a/kst.spec
+++ b/kst.spec
@@ -1,6 +1,6 @@
 Name:       kst
 Version:    2.0.6
-Release:    3%{?dist}
+Release:    4%{?dist}
 Summary:    A data viewing program
 
 Group:      Applications/Engineering
@@ -100,6 +100,7 @@ A plugin allowing kst to open and read data in getdata (dirfile) format.
 %patch50 -p1 -b .fix-qreal-vs-double-for-arm
 
 %build
+
 %cmake -Dkst_merge_files=1 -Dkst_rpath=0 \
   -Dkst_install_prefix=%{_prefix} -Dkst_install_libdir=%{_lib} \
   -Dkst_test=1 -Dkst_release=1 -Dkst_verbose=1 \
@@ -181,6 +182,9 @@ rm -rf %{buildroot}
 #%{_datadir}/services/kst/kstdata_dirfilesource.desktop
 
 %changelog
+* Tue Mar 19 2013 Rex Dieter <rdieter at fedoraproject.org> 2.0.6-4
+- respin kst-2.0.6-fix-qreal-vs-double-for-arm.patch
+
 * Tue Mar 19 2013 Rex Dieter <rdieter at fedoraproject.org> 2.0.6-3
 - s/qt-devel/qt4-devel/
 - drop extraneous buildrequires


More information about the scm-commits mailing list