[SCM] libksysguard packaging branch, kubuntu_xenial_archive, updated. ubuntu/4%5.5.5-0ubuntu1-2-gd285a46

Scarlett Clark sgclark-guest at moszumanska.debian.org
Fri Apr 15 01:26:12 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/plasma/libksysguard.git;a=commitdiff;h=d285a46

The following commit has been merged in the kubuntu_xenial_archive branch:
commit d285a468ce3f6aeec21943c69cbe9e46a8e31341
Author: Scarlett Clark <sgclark at kubuntu.org>
Date:   Thu Apr 14 18:25:49 2016 -0700

    Add files.
---
 debian/changelog                                   |   1 +
 debian/patches/series                              |   1 +
 ...plotter_use_std_namespaced_isnan_and_isinf.diff | 155 +++++++++++++++++++++
 3 files changed, 157 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index cc30f9a..53e4605 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ libksysguard (4:5.5.5-0ubuntu2) UNRELEASED; urgency=medium
 
   * Add upstream patch to fix build with new libc6.
      
+  * Add files. 
 
  -- Scarlett Clark <sgclark at kubuntu.org>  Thu, 14 Apr 2016 18:23:55 -0700
 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a96b083
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream_signalplotter_use_std_namespaced_isnan_and_isinf.diff
diff --git a/debian/patches/upstream_signalplotter_use_std_namespaced_isnan_and_isinf.diff b/debian/patches/upstream_signalplotter_use_std_namespaced_isnan_and_isinf.diff
new file mode 100644
index 0000000..4208218
--- /dev/null
+++ b/debian/patches/upstream_signalplotter_use_std_namespaced_isnan_and_isinf.diff
@@ -0,0 +1,155 @@
+diff --git a/signalplotter/ksignalplotter.cpp b/signalplotter/ksignalplotter.cpp
+--- a/signalplotter/ksignalplotter.cpp
++++ b/signalplotter/ksignalplotter.cpp
+@@ -32,8 +32,6 @@
+ #include "ksignalplotter_p.h"
+ #include "processcore/processcore_debug.h"
+ 
+-#include <math.h>  //For floor, ceil, log10 etc for calculating ranges
+-
+ #include <QPainter>
+ #include <QPixmap>
+ #include <QPainterPath>
+@@ -49,7 +47,7 @@
+ 
+ #include <klocalizedstring.h>
+ #include <kiconloader.h>
+-#include <math.h>
++#include <cmath>
+ #include <limits>
+ 
+ #ifdef SVG_SUPPORT
+@@ -485,20 +483,20 @@
+         qreal value=0;
+         for(int i = sampleBuf.count()-1; i>= 0; i--) {
+             qreal newValue = sampleBuf[i];
+-            if( !isinf(newValue) && !isnan(newValue) )
++            if( !std::isinf(newValue) && !std::isnan(newValue) )
+                 value += newValue;
+         }
+-        if(isnan(mMinValue) || mMinValue > value) mMinValue = value;
+-        if(isnan(mMaxValue) || mMaxValue < value) mMaxValue = value;
++        if(std::isnan(mMinValue) || mMinValue > value) mMinValue = value;
++        if(std::isnan(mMaxValue) || mMaxValue < value) mMaxValue = value;
+         if(value > 0.7*mMaxValue)
+             mRescaleTime = time;
+     } else {
+         qreal value;
+         for(int i = sampleBuf.count()-1; i>= 0; i--) {
+             value = sampleBuf[i];
+-            if( !isinf(value) && !isnan(value) ) {
+-                if(isnan(mMinValue) || mMinValue > value) mMinValue = value;
+-                if(isnan(mMaxValue) || mMaxValue < value) mMaxValue = value;
++            if( !std::isinf(value) && !std::isnan(value) ) {
++                if(std::isnan(mMinValue) || mMinValue > value) mMinValue = value;
++                if(std::isnan(mMaxValue) || mMaxValue < value) mMaxValue = value;
+                 if(value > 0.7*mMaxValue)
+                     mRescaleTime = time;
+             }
+@@ -789,9 +787,9 @@
+     qreal max = mUserMaxValue;
+     qreal min = mUserMinValue;
+     if( mUseAutoRange ) {
+-        if(!isnan(mMaxValue) && mMaxValue * 0.99 > max)  //Allow max value to go very slightly over the given max, for rounding reasons
++        if(!std::isnan(mMaxValue) && mMaxValue * 0.99 > max)  //Allow max value to go very slightly over the given max, for rounding reasons
+             max = mMaxValue;
+-        if(!isnan(mMinValue) && mMinValue * 0.99 < min) {
++        if(!std::isnan(mMinValue) && mMinValue * 0.99 < min) {
+             min = mMinValue;
+         }
+     }
+@@ -920,23 +918,23 @@
+     bool firstLine = true;
+     for (int j = 0; j < count; ++j) {
+         qreal point0 = datapoints[j];
+-        if( isnan(point0) )
++        if( std::isnan(point0) )
+             continue; //Just do not draw points with nans. skip them
+ 
+         qreal point1 = prev_datapoints[j];
+         qreal point2 = prev_prev_datapoints[j];
+ 
+-        if(isnan(point1))
++        if(std::isnan(point1))
+             point1 = point0;
+-        else if(mSmoothGraph && !isinf(point1)) {
++        else if(mSmoothGraph && !std::isinf(point1)) {
+             // Apply a weighted average just to smooth the graph out a bit
+             // Do not try to smooth infinities or nans
+             point0 = (2*point0 + point1)/3;
+-            if(!isnan(point2) && !isinf(point2))
++            if(!std::isnan(point2) && !std::isinf(point2))
+                 point1 = (2*point1 + point2)/3;
+             // We don't bother to average out y2.  This will introduce slight inaccuracies in the gradients, but they aren't really noticeable.
+         }
+-        if(isnan(point2))
++        if(std::isnan(point2))
+             point2 = point1;
+ 
+         if (mStackBeams) {
+@@ -1046,12 +1044,12 @@
+ }
+ QString KSignalPlotter::lastValueAsString( int i, int precision) const
+ {
+-    if(d->mBeamData.isEmpty() || d->mBeamData.first().size() <= i || isnan(d->mBeamData.first().at(i))) return QString();
++    if(d->mBeamData.isEmpty() || d->mBeamData.first().size() <= i || std::isnan(d->mBeamData.first().at(i))) return QString();
+     return valueAsString(d->mBeamData.first().at(i), precision); //retrieve the newest value for this beam
+ }
+ QString KSignalPlotter::valueAsString( qreal value, int precision) const
+ {
+-    if(isnan(value))
++    if(std::isnan(value))
+         return QString();
+     value = value / d->mScaleDownBy; // scale the value.  E.g. from Bytes to KiB
+     return d->scaledValueAsString(value, precision);
+diff --git a/tests/signalplottertest.cpp b/tests/signalplottertest.cpp
+--- a/tests/signalplottertest.cpp
++++ b/tests/signalplottertest.cpp
+@@ -56,8 +56,8 @@
+     s->addBeam(Qt::blue);
+     s->addBeam(Qt::red);
+ 
+-    QVERIFY( isnan(s->lastValue(0)) ); //unset, so should default to NaN
+-    QVERIFY( isnan(s->lastValue(1)) ); //unset, so should default to NaN
++    QVERIFY( std::isnan(s->lastValue(0)) ); //unset, so should default to NaN
++    QVERIFY( std::isnan(s->lastValue(1)) ); //unset, so should default to NaN
+     QCOMPARE(s->numBeams(), 2);
+     QVERIFY(s->beamColor(0) == Qt::blue);
+     QVERIFY(s->beamColor(1) == Qt::red);
+@@ -92,7 +92,7 @@
+     QVERIFY(s->beamColor(0) == Qt::blue);
+     QVERIFY(s->beamColor(1) == Qt::red);
+     QCOMPARE(s->lastValue(0), 1.0);
+-    QVERIFY( isnan(s->lastValue(1)) ); //unset, so should default to NaN
++    QVERIFY( std::isnan(s->lastValue(1)) ); //unset, so should default to NaN
+ }
+ 
+ void TestSignalPlotter::testReorderBeams()
+@@ -153,8 +153,8 @@
+     s->addBeam(Qt::blue);
+     s->addBeam(Qt::red);
+     QCOMPARE(s->numBeams(), 2);
+-    QVERIFY(isnan(s->lastValue(0))); //unset, so should default to NaN
+-    QVERIFY(isnan(s->lastValue(1))); //unset, so should default to NaN
++    QVERIFY(std::isnan(s->lastValue(0))); //unset, so should default to NaN
++    QVERIFY(std::isnan(s->lastValue(1))); //unset, so should default to NaN
+     //Add some data
+     QList<qreal> data;
+     data << 1.0 << 2.0;
+@@ -189,13 +189,13 @@
+     QCOMPARE(s->numBeams(), 3);
+     QCOMPARE(s->lastValue(0), 2.0);
+     QCOMPARE(s->lastValue(1), 1.0);
+-    QVERIFY(isnan(s->lastValue(2))); //unset, so should default to NaN
++    QVERIFY(std::isnan(s->lastValue(2))); //unset, so should default to NaN
+ 
+     newOrder.clear();
+     newOrder << 2 << 0 << 1;
+     s->reorderBeams(newOrder);
+     QCOMPARE(s->numBeams(), 3);
+-    QVERIFY(isnan(s->lastValue(0))); //unset, so should default to NaN
++    QVERIFY(std::isnan(s->lastValue(0))); //unset, so should default to NaN
+     QCOMPARE(s->lastValue(1), 2.0);
+     QCOMPARE(s->lastValue(2), 1.0);
+ }
+

-- 
libksysguard packaging



More information about the pkg-kde-commits mailing list