summaryrefslogtreecommitdiffstats
path: root/kchart
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-06-03 13:02:24 +0900
committerMichele Calgaro <[email protected]>2023-06-03 13:02:24 +0900
commit72e96ecd25ffe8dcf9c0b0bdefc8ea259fe1dded (patch)
treee5fe2e983cadd94279139a4f75be81533d6b0424 /kchart
parent5d5725effa1a9e1567b9226f49338e8fe00a3107 (diff)
downloadkoffice-72e96ecd25ffe8dcf9c0b0bdefc8ea259fe1dded.tar.gz
koffice-72e96ecd25ffe8dcf9c0b0bdefc8ea259fe1dded.zip
Drop Qt2 obsolete classes
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kchart')
-rw-r--r--kchart/kchart_part.cpp6
-rw-r--r--kchart/kdchart/KDChartBWPainter.cpp5
-rw-r--r--kchart/kdchart/KDChartGlobal.h33
-rw-r--r--kchart/kdchart/KDChartLinesPainter.cpp9
-rw-r--r--kchart/kdchart/KDChartParams.h10
-rw-r--r--kchart/kdchart/KDChartSeriesCollection.cpp12
-rw-r--r--kchart/kdchart/KDChartSeriesCollection.h8
-rw-r--r--kchart/kdchart/KDChartVectorSeries.h8
8 files changed, 3 insertions, 88 deletions
diff --git a/kchart/kchart_part.cpp b/kchart/kchart_part.cpp
index fb6a6414..1956904b 100644
--- a/kchart/kchart_part.cpp
+++ b/kchart/kchart_part.cpp
@@ -1621,8 +1621,6 @@ bool KChartPart::loadData( const TQDomDocument& doc,
m_currentData.setUsedRows( rows );
kdDebug(35001) << "Expanded!" << endl;
TQDomNode n = data.firstChild();
- //TQArray<int> tmpExp(rows*cols);
- //TQArray<bool> tmpMissing(rows*cols);
for (int i=0; i!=rows; i++) {
for (int j=0; j!=cols; j++) {
if (n.isNull()) {
@@ -1717,8 +1715,8 @@ bool KChartPart::loadOldXML( const TQDomDocument& doc )
m_currentData.expand(rows, cols);
kdDebug(35001) << "Expanded!" << endl;
TQDomNode n = data.firstChild();
- TQArray<int> tmpExp(rows*cols);
- TQArray<bool> tmpMissing(rows*cols);
+ TQMemArray<int> tmpExp(rows*cols);
+ TQMemArray<bool> tmpMissing(rows*cols);
for (int i=0; i!=rows; i++) {
for (int j=0; j!=cols; j++) {
diff --git a/kchart/kdchart/KDChartBWPainter.cpp b/kchart/kdchart/KDChartBWPainter.cpp
index 19d4fa6b..a8d95d3f 100644
--- a/kchart/kdchart/KDChartBWPainter.cpp
+++ b/kchart/kdchart/KDChartBWPainter.cpp
@@ -31,12 +31,7 @@
#include "KDChartTextPiece.h"
#include <tqpainter.h>
-#if COMPAT_TQT_VERSION >= 0x030000
#include <tqmemarray.h>
-#else
-#include <tqarray.h>
-#define TQMemArray TQArray
-#endif
#include <stdlib.h>
diff --git a/kchart/kdchart/KDChartGlobal.h b/kchart/kdchart/KDChartGlobal.h
index 2dc4fdb3..91772b01 100644
--- a/kchart/kdchart/KDChartGlobal.h
+++ b/kchart/kdchart/KDChartGlobal.h
@@ -78,40 +78,7 @@
#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 <tqarray.h>
-
-#else
-
#include <tqmemarray.h>
-
-#endif
-// end of #if COMPAT_TQT_VERSION < 0x030000
-
#include <tqptrlist.h>
#include <tqptrvector.h>
diff --git a/kchart/kdchart/KDChartLinesPainter.cpp b/kchart/kdchart/KDChartLinesPainter.cpp
index 24a9b906..705abb98 100644
--- a/kchart/kdchart/KDChartLinesPainter.cpp
+++ b/kchart/kdchart/KDChartLinesPainter.cpp
@@ -31,12 +31,7 @@
#include <KDChartPropertySet.h>
#include <tqpainter.h>
-
-#if COMPAT_TQT_VERSION >= 0x030000
#include <tqvaluevector.h>
-#else
-#include <tqarray.h>
-#endif
#include <stdlib.h>
@@ -286,11 +281,7 @@ void KDChartLinesPainter::specificPaintData( TQPainter* painter,
( dataset >= static_cast < int > ( datasetStart ) && dataset >= 0 );
--dataset )
++arrayNumDatasets;
-#if COMPAT_TQT_VERSION >= 0x030000
TQValueVector<MyPoint> allPoints(
-#else
- TQArray<MyPoint> allPoints(
-#endif
arrayNumDatasets * arrayNumValues );
KDChartPropertySet curPropSet;
diff --git a/kchart/kdchart/KDChartParams.h b/kchart/kdchart/KDChartParams.h
index 0cbde9c9..089c725b 100644
--- a/kchart/kdchart/KDChartParams.h
+++ b/kchart/kdchart/KDChartParams.h
@@ -40,6 +40,7 @@
#include <tqtextstream.h>
#include <tqsimplerichtext.h>
#include <tqdom.h>
+#include <tqvaluevector.h>
#include <limits.h>
#include <math.h>
@@ -54,11 +55,6 @@
#include "KDChartAxisParams.h"
#include "KDChartPropertySet.h"
-#if COMPAT_TQT_VERSION >= 0x030000
-#include <tqvaluevector.h>
-#else
-#include <tqarray.h>
-#endif
/** \file KDChartParams.h
\brief Header for all common chart parameters.
@@ -2097,11 +2093,7 @@ public slots:
uint& chart ) const;
public:
-#if COMPAT_TQT_VERSION >= 0x030000
typedef TQValueVector<uint> AxesArray;
-#else
- typedef TQArray<uint> AxesArray;
-#endif
public slots:
bool chartAxes( uint chart, uint& cnt, AxesArray& axes ) const;
diff --git a/kchart/kdchart/KDChartSeriesCollection.cpp b/kchart/kdchart/KDChartSeriesCollection.cpp
index 812db8fd..217f5102 100644
--- a/kchart/kdchart/KDChartSeriesCollection.cpp
+++ b/kchart/kdchart/KDChartSeriesCollection.cpp
@@ -132,11 +132,7 @@ double KDChartSeriesCollection::maxValue( int coordinate ) const
bool first_max = true;
// find the first max
-#if COMPAT_TQT_VERSION >= 0x030000
TQValueVector<KDChartBaseSeries *>::const_iterator i;
-#else
- TQArray<KDChartBaseSeries *>::ConstIterator i;
-#endif
for ( i = (*this).begin(); i != (*this).end(); i ++ )
{
double temp = (*i)->maxValue(coordinate, ok);
@@ -163,11 +159,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<KDChartBaseSeries *>::const_iterator i;
-#else
- TQArray<KDChartBaseSeries *>::ConstIterator i;
-#endif
for ( i = (*this).begin(); !ok && i != (*this).end(); i ++ )
result = (*i)->minValue(coordinate, ok);
@@ -186,11 +178,7 @@ double KDChartSeriesCollection::minValue( int coordinate ) const
unsigned int KDChartSeriesCollection::indexOf( KDChartBaseSeries *series )
{
unsigned int index = 0;
-#if COMPAT_TQT_VERSION >= 0x030000
TQValueVector<KDChartBaseSeries *>::const_iterator i;
-#else
- TQArray<KDChartBaseSeries *>::ConstIterator i;
-#endif
for ( i = (*this).begin(); i != (*this).end(); i ++, index ++ )
if ( *i == series )
break;
diff --git a/kchart/kdchart/KDChartSeriesCollection.h b/kchart/kdchart/KDChartSeriesCollection.h
index bacda726..8ce3044c 100644
--- a/kchart/kdchart/KDChartSeriesCollection.h
+++ b/kchart/kdchart/KDChartSeriesCollection.h
@@ -34,22 +34,14 @@
#include "KDChartTableBase.h"
#include "KDChartBaseSeries.h"
-#if COMPAT_TQT_VERSION >= 0x030000
#include <tqvaluevector.h>
-#else
-#include <tqarray.h>
-#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<KDChartBaseSeries *>
-#else
- public TQArray<KDChartBaseSeries *>
-#endif
{
// Standard KDChartTableDataBase interface
public:
diff --git a/kchart/kdchart/KDChartVectorSeries.h b/kchart/kdchart/KDChartVectorSeries.h
index 6bb33510..57470899 100644
--- a/kchart/kdchart/KDChartVectorSeries.h
+++ b/kchart/kdchart/KDChartVectorSeries.h
@@ -38,21 +38,13 @@
// - Implement a TQValueVector interface
#include "KDChartBaseSeries.h"
-#if COMPAT_TQT_VERSION >= 0x030000
#include <tqvaluevector.h>
-#else
-#include <tqarray.h>
-#endif
class KDChartSeriesCollection;
class KDCHART_EXPORT KDChartVectorSeries : public KDChartBaseSeries,
-#if COMPAT_TQT_VERSION >= 0x030000
public TQValueVector<KDChartData>
-#else
- public TQArray<KDChartData>
-#endif
{
public:
virtual ~KDChartVectorSeries();