]> Git trees. - libqmvoc.git/commitdiff
fix a range; small headers cleanup
authorPino Toscano <pino@kde.org>
Mon, 31 Oct 2005 09:55:23 +0000 (09:55 +0000)
committerPino Toscano <pino@kde.org>
Mon, 31 Oct 2005 09:55:23 +0000 (09:55 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=476014

kdeeduplot/kplotobject.cpp
kdeeduplot/kplotobject.h
kdeeduplot/kplotwidget.h

index 2ca2780cbff78f62d4f003e6ac79fb627089c922..e29c4efa512684e0fa69ca9daeb9f7c6e75dd715 100644 (file)
  *                                                                         *
  ***************************************************************************/
 
-#include <qpainter.h>
-#include <kdebug.h>
-#include <klocale.h>
 #include "kplotobject.h"
 
+#include <kdebug.h>
+
 KPlotObject::KPlotObject() {
        KPlotObject( "", Qt::white, POINTS );
 }
@@ -38,7 +37,7 @@ KPlotObject::~KPlotObject()
 }
 
 void KPlotObject::removePoint( int index ) {
-       if ( ( index < 1 ) || ( index > pList.count() - 1 ) ) {
+       if ( ( index < 0 ) || ( index >= pList.count() ) ) {
                kdWarning() << "Ignoring attempt to remove non-existent plot object" << endl;
                return;
        }
index ae01e442f4c9b03cc40049d7dbdd52faa11d2c25..86593f491955c7c6a850b8582260def7ade304ce 100644 (file)
@@ -18,8 +18,7 @@
 #ifndef KPLOTOBJECT_H
 #define KPLOTOBJECT_H
 
-class QPainter;
-
+#include <QColor>
 #include <QPointF>
 #include <QRectF>
 #include <QString>
index e1dc32c761fa195774f9f8b2890a2785603300ab..5e62aaedce1f7c52f1411d63c9985373b45e6dc8 100644 (file)
@@ -15,8 +15,8 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef _KPLOTWIDGET_H_
-#define _KPLOTWIDGET_H_
+#ifndef KPLOTWIDGET_H
+#define KPLOTWIDGET_H
 
 #include <qcolor.h>
 #include <qrect.h>