From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: TQt4 port kmymoney This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdchart/KDChartGlobal.h | 135 ++++++++++----------------------------------- 1 file changed, 28 insertions(+), 107 deletions(-) (limited to 'libkdchart/KDChartGlobal.h') diff --git a/libkdchart/KDChartGlobal.h b/libkdchart/KDChartGlobal.h index 4a5f9e7..868dfa3 100644 --- a/libkdchart/KDChartGlobal.h +++ b/libkdchart/KDChartGlobal.h @@ -29,11 +29,11 @@ #ifndef __KDCHARTGLOBAL_H__ #define __KDCHARTGLOBAL_H__ -#include +#include #include -#if defined(unix) || defined(__unix__) || defined(Q_WS_MAC) || defined(Q_WS_LINUX) +#if defined(unix) || defined(__unix__) || defined(TQ_WS_MAC) || defined(TQ_WS_LINUX) #include #else #define MINDOUBLE DBL_MIN @@ -53,115 +53,36 @@ #if defined(_MSC_VER) -#ifndef QT_NO_STL -#define QT_NO_STL // Avoid a name clash +#ifndef TQT_NO_STL +#define TQT_NO_STL // Avoid a name clash #endif #endif -// important: make the old format of QT_VERSION comparable -// to the new format that is used since Qt 3.0.0 -#if QT_VERSION == 141 -#define COMPAT_QT_VERSION 0x010401 -#endif -#if QT_VERSION == 142 -#define COMPAT_QT_VERSION 0x010402 -#endif -#if QT_VERSION == 143 -#define COMPAT_QT_VERSION 0x010403 -#endif -#if QT_VERSION == 144 -#define COMPAT_QT_VERSION 0x010404 -#endif -#if QT_VERSION == 145 -#define COMPAT_QT_VERSION 0x010405 -#endif -#if QT_VERSION == 200 -#define COMPAT_QT_VERSION 0x020000 -#endif -#if QT_VERSION == 201 -#define COMPAT_QT_VERSION 0x020001 -#endif -#if QT_VERSION == 202 -#define COMPAT_QT_VERSION 0x020002 -#endif -#if QT_VERSION == 210 -#define COMPAT_QT_VERSION 0x020100 -#endif -#if QT_VERSION == 211 -#define COMPAT_QT_VERSION 0x020101 -#endif -#if QT_VERSION == 220 -#define COMPAT_QT_VERSION 0x020200 -#endif -#if QT_VERSION == 221 -#define COMPAT_QT_VERSION 0x020201 -#endif -#if QT_VERSION == 222 -#define COMPAT_QT_VERSION 0x020202 -#endif -#if QT_VERSION == 223 -#define COMPAT_QT_VERSION 0x020203 -#endif -#if QT_VERSION == 224 -#define COMPAT_QT_VERSION 0x020204 -#endif -#if QT_VERSION == 230 -#define COMPAT_QT_VERSION 0x020300 -#endif -#if QT_VERSION == 231 -#define COMPAT_QT_VERSION 0x020301 -#endif -#if QT_VERSION == 232 -#define COMPAT_QT_VERSION 0x020302 -#if defined(_MSC_VER) -#pragma message( "using Qt 2.3.2" ) -#endif -#endif -#if QT_VERSION == 300 -#define COMPAT_QT_VERSION 0x030000 -#endif -#if QT_VERSION == 301 -#define COMPAT_QT_VERSION 0x030001 -#endif -#if QT_VERSION == 302 -#define COMPAT_QT_VERSION 0x030002 -#endif -#if QT_VERSION == 303 -#define COMPAT_QT_VERSION 0x030003 -#endif -#if QT_VERSION == 304 -#define COMPAT_QT_VERSION 0x030004 -#endif -#if QT_VERSION == 305 -#define COMPAT_QT_VERSION 0x030005 -#endif -#if QT_VERSION == 310 -#define COMPAT_QT_VERSION 0x030100 -#endif -// --- new format since Qt 3.0.0 or since 3.0.4 ??? -#ifndef COMPAT_QT_VERSION +// --- new format since TQt 3.0.0 or since 3.0.4 ??? +#ifndef COMPAT_TQT_VERSION #if defined(_MSC_VER) -#pragma message( "using Qt > 2.3.2" ) +#pragma message( "using TQt > 2.3.2" ) #endif -#define COMPAT_QT_VERSION QT_VERSION +//#define COMPAT_TQT_VERSION [[[TQT_VERSION IS DEPRECATED]]] +#define COMPAT_TQT_VERSION 0x039999 #endif -// since Qt 3.1 they do /not/ include limits.h or climits on windows anymore +// since TQt 3.1 they do /not/ include limits.h or climits on windows anymore // so we must include that manually -#if COMPAT_QT_VERSION > 0x030099 +#if COMPAT_TQT_VERSION > 0x030099 #if defined(_MSC_VER) #include #endif #endif -#if COMPAT_QT_VERSION < 0x030000 +#if COMPAT_TQT_VERSION < 0x030000 #if !defined(Q_ASSERT) -#if defined(QT_CHECK_STATE) -#if defined(QT_FATAL_ASSERT) +#if defined(TQT_CHECK_STATE) +#if defined(TQT_FATAL_ASSERT) #define Q_ASSERT(x) ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)) #else #define Q_ASSERT(x) ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)) @@ -171,32 +92,32 @@ #endif #endif -#if !defined(QT_NO_COMPAT) -// source compatibility with Qt 2.x +#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 // QT_NO_COMPAT +#endif // TQT_NO_COMPAT -#define QPtrList QList -#define QPtrListIterator QListIterator -#define QPtrVector QVector -#define QMemArray QArray +#define TQPtrList TQList +#define TQPtrListIterator TQListIterator +#define TQPtrVector TQVector +#define TQMemArray TQArray -#include -#include -#include +#include +#include +#include #else -#include -#include -#include +#include +#include +#include #endif -// end of #if COMPAT_QT_VERSION < 0x030000 +// end of #if COMPAT_TQT_VERSION < 0x030000 -- cgit v1.2.1