From 1a2f76163a8ce08c850f1f632d0a295be57d6807 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 3 Jun 2023 13:33:59 +0900 Subject: Drop Qt2 obsolete classes Signed-off-by: Michele Calgaro (cherry picked from commit a3a44b5daea0e8674401be3b8b9f15bccd64520d) --- libkdchart/KDChartBWPainter.cpp | 5 ----- libkdchart/KDChartGlobal.h | 34 ---------------------------------- libkdchart/KDChartLinesPainter.cpp | 9 --------- libkdchart/KDChartParams.h | 11 +---------- libkdchart/KDChartSeriesCollection.cpp | 12 ------------ libkdchart/KDChartSeriesCollection.h | 10 +--------- libkdchart/KDChartVectorSeries.h | 8 -------- 7 files changed, 2 insertions(+), 87 deletions(-) (limited to 'libkdchart') diff --git a/libkdchart/KDChartBWPainter.cpp b/libkdchart/KDChartBWPainter.cpp index f935b03..363b8e3 100644 --- a/libkdchart/KDChartBWPainter.cpp +++ b/libkdchart/KDChartBWPainter.cpp @@ -36,12 +36,7 @@ #include "KDChartTextPiece.h" #include -#if COMPAT_TQT_VERSION >= 0x030000 #include -#else -#include -#define TQMemArray TQArray -#endif #include diff --git a/libkdchart/KDChartGlobal.h b/libkdchart/KDChartGlobal.h index 2dc4fdb..fc96072 100644 --- a/libkdchart/KDChartGlobal.h +++ b/libkdchart/KDChartGlobal.h @@ -77,41 +77,7 @@ #endif #endif - -#if COMPAT_TQT_VERSION < 0x030000 - -#if !defined(Q_ASSERT) -#if defined(TQT_CHECK_STATE) -#if defined(TQT_FATAL_ASSERT) -#define Q_ASSERT(x) ((x) ? (void)0 : tqFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)) -#else -#define Q_ASSERT(x) ((x) ? (void)0 : tqWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)) -#endif -#else -#define Q_ASSERT(x) -#endif -#endif - -#if !defined(TQT_NO_COMPAT) -// source compatibility with TQt 2.x -#ifndef Q_OS_TEMP -# if !defined(ASSERT) -# define ASSERT(x) Q_ASSERT(x) -# endif -#endif // Q_OS_TEMP -#endif // TQT_NO_COMPAT - -#define TQMemArray TQArray - -#include - -#else - #include - -#endif -// end of #if COMPAT_TQT_VERSION < 0x030000 - #include #include diff --git a/libkdchart/KDChartLinesPainter.cpp b/libkdchart/KDChartLinesPainter.cpp index 8e4fa4e..fbf5f0f 100644 --- a/libkdchart/KDChartLinesPainter.cpp +++ b/libkdchart/KDChartLinesPainter.cpp @@ -36,12 +36,7 @@ #include #include - -#if COMPAT_TQT_VERSION >= 0x030000 #include -#else -#include -#endif #include @@ -291,11 +286,7 @@ void KDChartLinesPainter::specificPaintData( TQPainter* painter, ( dataset >= static_cast < int > ( datasetStart ) && dataset >= 0 ); --dataset ) ++arrayNumDatasets; -#if COMPAT_TQT_VERSION >= 0x030000 TQValueVector allPoints( -#else - TQArray allPoints( -#endif arrayNumDatasets * arrayNumValues ); KDChartPropertySet curPropSet; diff --git a/libkdchart/KDChartParams.h b/libkdchart/KDChartParams.h index 0cbde9c..327071a 100644 --- a/libkdchart/KDChartParams.h +++ b/libkdchart/KDChartParams.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -54,12 +55,6 @@ #include "KDChartAxisParams.h" #include "KDChartPropertySet.h" -#if COMPAT_TQT_VERSION >= 0x030000 -#include -#else -#include -#endif - /** \file KDChartParams.h \brief Header for all common chart parameters. @@ -2097,11 +2092,7 @@ public slots: uint& chart ) const; public: -#if COMPAT_TQT_VERSION >= 0x030000 typedef TQValueVector AxesArray; -#else - typedef TQArray AxesArray; -#endif public slots: bool chartAxes( uint chart, uint& cnt, AxesArray& axes ) const; diff --git a/libkdchart/KDChartSeriesCollection.cpp b/libkdchart/KDChartSeriesCollection.cpp index 212504e..333917b 100644 --- a/libkdchart/KDChartSeriesCollection.cpp +++ b/libkdchart/KDChartSeriesCollection.cpp @@ -135,11 +135,7 @@ double KDChartSeriesCollection::maxValue( int coordinate ) const bool first_max = true; // find the first max -#if COMPAT_TQT_VERSION >= 0x030000 TQValueVector::const_iterator i; -#else - TQArray::ConstIterator i; -#endif for ( i = (*this).begin(); i != (*this).end(); i ++ ) { double temp = (*i)->maxValue(coordinate, ok); @@ -166,11 +162,7 @@ double KDChartSeriesCollection::minValue( int coordinate ) const double result = 0; // if no valid min/max, then this is the default // find the first min -#if COMPAT_TQT_VERSION >= 0x030000 TQValueVector::const_iterator i; -#else - TQArray::ConstIterator i; -#endif for ( i = (*this).begin(); !ok && i != (*this).end(); i ++ ) result = (*i)->minValue(coordinate, ok); @@ -189,11 +181,7 @@ double KDChartSeriesCollection::minValue( int coordinate ) const unsigned int KDChartSeriesCollection::indexOf( KDChartBaseSeries *series ) { unsigned int index = 0; -#if COMPAT_TQT_VERSION >= 0x030000 TQValueVector::const_iterator i; -#else - TQArray::ConstIterator i; -#endif for ( i = (*this).begin(); i != (*this).end(); i ++, index ++ ) if ( *i == series ) break; diff --git a/libkdchart/KDChartSeriesCollection.h b/libkdchart/KDChartSeriesCollection.h index bacda72..9818aff 100644 --- a/libkdchart/KDChartSeriesCollection.h +++ b/libkdchart/KDChartSeriesCollection.h @@ -31,25 +31,17 @@ // to avoid problems in TableBase - it doesn't include this - bug! #include +#include #include "KDChartTableBase.h" #include "KDChartBaseSeries.h" -#if COMPAT_TQT_VERSION >= 0x030000 -#include -#else -#include -#endif class KDChartParams; #include "KDChartAxisParams.h" // takes ownership of any series passed to it, and will delete // them when it is deleted. class KDCHART_EXPORT KDChartSeriesCollection : public KDChartTableDataBase, -#if COMPAT_TQT_VERSION >= 0x030000 public TQValueVector -#else - public TQArray -#endif { // Standard KDChartTableDataBase interface public: diff --git a/libkdchart/KDChartVectorSeries.h b/libkdchart/KDChartVectorSeries.h index 6bb3351..5747089 100644 --- a/libkdchart/KDChartVectorSeries.h +++ b/libkdchart/KDChartVectorSeries.h @@ -38,21 +38,13 @@ // - Implement a TQValueVector interface #include "KDChartBaseSeries.h" -#if COMPAT_TQT_VERSION >= 0x030000 #include -#else -#include -#endif class KDChartSeriesCollection; class KDCHART_EXPORT KDChartVectorSeries : public KDChartBaseSeries, -#if COMPAT_TQT_VERSION >= 0x030000 public TQValueVector -#else - public TQArray -#endif { public: virtual ~KDChartVectorSeries(); -- cgit v1.2.1