From b321f39374749078d6e274a18e0f157b25767b6b Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calgaro@yahoo.it>
Date: Tue, 10 Mar 2026 17:52:20 +0900
Subject: Remove use of TDE_VERSION

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 kdecompat.h                                        | 30 ----------------------
 kmymoney2/converter/convertertest.cpp              |  1 -
 kmymoney2/dialogs/knewfiledlg.cpp                  |  1 -
 kmymoney2/dialogs/kstartdlg.cpp                    |  3 ---
 kmymoney2/dialogs/mymoneyqifprofileeditor.cpp      |  1 -
 kmymoney2/export.h                                 |  2 --
 kmymoney2/kmymoney2.cpp                            |  1 -
 .../ofximport/dialogs/mymoneyofxconnector.h        |  1 +
 kmymoney2/reports/pivotgridtest.cpp                | 25 ------------------
 kmymoney2/reports/pivottabletest.cpp               |  1 -
 kmymoney2/reports/querytabletest.cpp               |  1 -
 kmymoney2/reports/reportstestcommon.cpp            |  1 -
 kmymoney2/views/kmymoneyview.cpp                   |  2 --
 kmymoney2/widgets/kmymoneycalendar.cpp             | 13 +++++++---
 kmymoney2/widgets/kmymoneycalendar.h               |  5 ----
 kmymoney2/widgets/kmymoneydateinput.cpp            |  1 -
 kmymoney2/widgets/kmymoneydatetbl.cpp              | 13 ----------
 kmymoney2/widgets/kmymoneydatetbl.h                |  5 ----
 kmymoney2/widgets/kmymoneyedit.h                   |  6 -----
 kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp     |  4 ---
 20 files changed, 10 insertions(+), 107 deletions(-)
 delete mode 100644 kdecompat.h

diff --git a/kdecompat.h b/kdecompat.h
deleted file mode 100644
index 3a24b7d..0000000
--- a/kdecompat.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***************************************************************************
-                          kdecompat.h
-                             -------------------
-    copyright            : (C) 2004 by Thomas Baumgart
-    email                : ipwizard@users.sourceforge.net
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#ifndef _KDECOMPAT_H
-#define _KDECOMPAT_H
-
-#include <tdeversion.h>
-
-#ifndef TDE_MAKE_VERSION
-#define TDE_MAKE_VERSION(a,b,c) (((a)<<16) | ((b)<<8) | (c))
-#endif
-
-#ifndef QT_IS_VERSION
-#define QT_IS_VERSION(a,b,c) (TQT_VERSION >= TDE_MAKE_VERSION(a,b,c))
-#endif
-
-#endif // _KDECOMPAT_H
diff --git a/kmymoney2/converter/convertertest.cpp b/kmymoney2/converter/convertertest.cpp
index 9b0a385..129843a 100644
--- a/kmymoney2/converter/convertertest.cpp
+++ b/kmymoney2/converter/convertertest.cpp
@@ -25,7 +25,6 @@
 #include <tqfile.h>
 
 #include <kdebug.h>
-#include <tdeversion.h>
 #include <tdeglobal.h>
 #include <tdeglobalsettings.h>
 #include <tdelocale.h>
diff --git a/kmymoney2/dialogs/knewfiledlg.cpp b/kmymoney2/dialogs/knewfiledlg.cpp
index eabc150..d3deea3 100644
--- a/kmymoney2/dialogs/knewfiledlg.cpp
+++ b/kmymoney2/dialogs/knewfiledlg.cpp
@@ -28,7 +28,6 @@
 // ----------------------------------------------------------------------------
 // TDE Headers
 
-#include <tdeversion.h>
 #include <tdeglobal.h>
 #include <tdelocale.h>
 #include <tdestandarddirs.h>
diff --git a/kmymoney2/dialogs/kstartdlg.cpp b/kmymoney2/dialogs/kstartdlg.cpp
index 380f108..1a9aae8 100644
--- a/kmymoney2/dialogs/kstartdlg.cpp
+++ b/kmymoney2/dialogs/kstartdlg.cpp
@@ -28,10 +28,7 @@
 // ----------------------------------------------------------------------------
 // TDE Includes
 
-#include <tdeversion.h>
-
 #include <tdestandarddirs.h>
-
 #include <kiconloader.h>
 #include <tdeconfig.h>
 #include <tdeglobalsettings.h>
diff --git a/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp b/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp
index 1af0674..cfa0fc9 100644
--- a/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp
+++ b/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp
@@ -31,7 +31,6 @@
 // ----------------------------------------------------------------------------
 // TDE Includes
 
-#include <tdeversion.h>
 #include <tdelocale.h>
 #include <tdeglobal.h>
 #include <tdeconfig.h>
diff --git a/kmymoney2/export.h b/kmymoney2/export.h
index b3cd785..f5a3cb1 100644
--- a/kmymoney2/export.h
+++ b/kmymoney2/export.h
@@ -21,8 +21,6 @@
 #ifndef _KMYMONEY_EXPORT_H
 #define _KMYMONEY_EXPORT_H
 
-#include <tdeversion.h>
-
 #ifdef __TDE_HAVE_GCC_VISIBILITY
   #include <tdemacros.h>
   #define KMYMONEY_EXPORT TDE_EXPORT
diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp
index eee3563..8cc1da4 100644
--- a/kmymoney2/kmymoney2.cpp
+++ b/kmymoney2/kmymoney2.cpp
@@ -44,7 +44,6 @@
 // ----------------------------------------------------------------------------
 // TDE Includes
 
-#include <tdeversion.h>
 #include <kdebug.h>
 #include <tdeapplication.h>
 #include <tdeshortcut.h>
diff --git a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h
index 0f3cf24..5a86ea2 100644
--- a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h
+++ b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h
@@ -23,6 +23,7 @@
 // Library Includes
 
 #include <libofx/libofx.h>
+#include <tdeversion.h>
 
 // if OFX has a major version number defined, we'll take it
 // if not, we assume 0.8.3. 0.8.3 was the last version w/o version number info
diff --git a/kmymoney2/reports/pivotgridtest.cpp b/kmymoney2/reports/pivotgridtest.cpp
index 921d477..fc77838 100644
--- a/kmymoney2/reports/pivotgridtest.cpp
+++ b/kmymoney2/reports/pivotgridtest.cpp
@@ -19,32 +19,7 @@
 #include <config.h>
 #endif
 
-/*
-#include <tqvaluelist.h>
-#include <tqvaluevector.h>
-#include <tqdom.h>
-#include <tqfile.h>
-
-#include <kdebug.h>
-#include <tdeversion.h>
-#include <tdeglobal.h>
-#include <tdeglobalsettings.h>
-#include <tdelocale.h>
-#include <tdestandarddirs.h>
-
-// DOH, mmreport.h uses this without including it!!
-#include "../mymoney/mymoneyaccount.h"
-
-#include "../mymoney/mymoneysecurity.h"
-#include "../mymoney/mymoneyprice.h"
-#include "../mymoney/mymoneyreport.h"
-#include "../mymoney/mymoneystatement.h"
-#include "../mymoney/storage/mymoneystoragedump.h"
-#include "../mymoney/storage/mymoneystoragexml.h"
-*/
-
 #include "pivotgridtest.h"
-
 #include "reportstestcommon.h"
 
 #define private public
diff --git a/kmymoney2/reports/pivottabletest.cpp b/kmymoney2/reports/pivottabletest.cpp
index b4e95ce..cb65b56 100644
--- a/kmymoney2/reports/pivottabletest.cpp
+++ b/kmymoney2/reports/pivottabletest.cpp
@@ -25,7 +25,6 @@
 #include <tqfile.h>
 
 #include <kdebug.h>
-#include <tdeversion.h>
 #include <tdeglobal.h>
 #include <tdeglobalsettings.h>
 #include <tdelocale.h>
diff --git a/kmymoney2/reports/querytabletest.cpp b/kmymoney2/reports/querytabletest.cpp
index d4e8a55..d48baac 100644
--- a/kmymoney2/reports/querytabletest.cpp
+++ b/kmymoney2/reports/querytabletest.cpp
@@ -24,7 +24,6 @@
 #include <tqfile.h>
 
 #include <kdebug.h>
-#include <tdeversion.h>
 #include <tdeglobal.h>
 #include <tdeglobalsettings.h>
 #include <tdelocale.h>
diff --git a/kmymoney2/reports/reportstestcommon.cpp b/kmymoney2/reports/reportstestcommon.cpp
index 11de77b..6ccc10c 100644
--- a/kmymoney2/reports/reportstestcommon.cpp
+++ b/kmymoney2/reports/reportstestcommon.cpp
@@ -25,7 +25,6 @@
 #include <tqfile.h>
 
 #include <kdebug.h>
-#include <tdeversion.h>
 #include <tdeglobal.h>
 #include <tdeglobalsettings.h>
 #include <tdelocale.h>
diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp
index d9f59c0..bda0eb5 100644
--- a/kmymoney2/views/kmymoneyview.cpp
+++ b/kmymoney2/views/kmymoneyview.cpp
@@ -40,8 +40,6 @@
 // ----------------------------------------------------------------------------
 // TDE Includes
 
-#include <tdeversion.h>
-
 #include <tdefiledialog.h>
 #include <tdeglobal.h>
 #include <tdestandarddirs.h>
diff --git a/kmymoney2/widgets/kmymoneycalendar.cpp b/kmymoney2/widgets/kmymoneycalendar.cpp
index 88b39bc..586b429 100644
--- a/kmymoney2/widgets/kmymoneycalendar.cpp
+++ b/kmymoney2/widgets/kmymoneycalendar.cpp
@@ -63,7 +63,6 @@
 
 // ----------------------------------------------------------------------------
 // TDE Includes
-#include <tdeversion.h>
 #include <tdeglobal.h>
 #include <tdeapplication.h>
 #include <tdelocale.h>
@@ -337,7 +336,9 @@ kMyMoneyCalendar::yearBackwardClicked()
 void
 kMyMoneyCalendar::selectWeekClicked()
 {
-#if TDE_VERSION >= 310 && TDE_VERSION <= 314
+#if 0
+  // TODO: old code that doesn't work with current TDE.
+  // Kept here in case we come around to fix it once day.
   int week;
   TDEPopupFrame* popup = new TDEPopupFrame(this);
   KDateInternalWeekSelector* picker = new KDateInternalWeekSelector(/*fontsize, */popup);
@@ -376,7 +377,9 @@ kMyMoneyCalendar::selectWeekClicked()
 void
 kMyMoneyCalendar::selectMonthClicked()
 {
-#if TDE_VERSION >= 310 && TDE_VERSION <= 314
+#if 0
+  // TODO: old code that doesn't work with current TDE.
+  // Kept here in case we come around to fix it once day.
   int month;
   TDEPopupFrame* popup = new TDEPopupFrame(this);
   KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(/*fontsize, */popup);
@@ -408,7 +411,9 @@ kMyMoneyCalendar::selectMonthClicked()
 void
 kMyMoneyCalendar::selectYearClicked()
 {
-#if TDE_VERSION >= 310 && TDE_VERSION <= 314
+#if 0
+  // TODO: old code that doesn't work with current TDE.
+  // Kept here in case we come around to fix it once day.
   int year;
   TDEPopupFrame* popup = new TDEPopupFrame(this);
   KDateInternalYearSelector* picker = new KDateInternalYearSelector(fontsize, popup);
diff --git a/kmymoney2/widgets/kmymoneycalendar.h b/kmymoney2/widgets/kmymoneycalendar.h
index 08d8bc3..11fea7d 100644
--- a/kmymoney2/widgets/kmymoneycalendar.h
+++ b/kmymoney2/widgets/kmymoneycalendar.h
@@ -52,11 +52,6 @@
 #include <tqframe.h>
 #include <tqdatetime.h>
 
-// ----------------------------------------------------------------------------
-// TDE Includes
-
-#include <tdeversion.h>
-
 // ----------------------------------------------------------------------------
 // Project Includes
 #include "kmymoneydatetbl.h"
diff --git a/kmymoney2/widgets/kmymoneydateinput.cpp b/kmymoney2/widgets/kmymoneydateinput.cpp
index ee0c3c0..fbf74b8 100644
--- a/kmymoney2/widgets/kmymoneydateinput.cpp
+++ b/kmymoney2/widgets/kmymoneydateinput.cpp
@@ -37,7 +37,6 @@
 
 // ----------------------------------------------------------------------------
 // TDE Includes
-#include <tdeversion.h>
 #include <tdeglobal.h>
 #include <tdelocale.h>
 #include <kiconloader.h>
diff --git a/kmymoney2/widgets/kmymoneydatetbl.cpp b/kmymoney2/widgets/kmymoneydatetbl.cpp
index c4e2095..fa2ad6c 100644
--- a/kmymoney2/widgets/kmymoneydatetbl.cpp
+++ b/kmymoney2/widgets/kmymoneydatetbl.cpp
@@ -57,7 +57,6 @@
 
 // ----------------------------------------------------------------------------
 // TDE Includes
-#include <tdeversion.h>
 #include <kdatetbl.h> // Use the classes available for maximum re-use
 #include <tdeglobal.h>
 #include <tdeglobalsettings.h>
@@ -111,11 +110,7 @@ kMyMoneyDateTbl::paintCell(TQPainter *painter, int row, int col)
   // -----
   font.setPointSize(fontsize);
 
-#if TDE_VERSION < 310
-  int firstWeekDay = TDEGlobal::locale()->weekStartsMonday() ? 1 : 0;
-#else
   int firstWeekDay = TDEGlobal::locale()->weekStartDay();
-#endif
 
   if (row==0)
   { // we are drawing the headline
@@ -380,11 +375,7 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(TQMouseEvent *e)
     return;
   }
 
-#if TDE_VERSION < 310
-  int dayoff = TDEGlobal::locale()->weekStartsMonday() ? 1 : 0;
-#else
   int dayoff = TDEGlobal::locale()->weekStartDay();
-#endif
 
   // -----
   int row, col, pos, temp;
@@ -573,11 +564,7 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(TQMouseEvent* e)
     return;
   }
 
-#if TDE_VERSION < 310
-  int firstWeekDay = TDEGlobal::locale()->weekStartsMonday() ? 1 : 0;
-#else
   int firstWeekDay = TDEGlobal::locale()->weekStartDay();
-#endif
 
   TQDate drawDate(date);
   TQString text;
diff --git a/kmymoney2/widgets/kmymoneydatetbl.h b/kmymoney2/widgets/kmymoneydatetbl.h
index 74e6a10..a9d735b 100644
--- a/kmymoney2/widgets/kmymoneydatetbl.h
+++ b/kmymoney2/widgets/kmymoneydatetbl.h
@@ -49,11 +49,6 @@
 #include <tqgridview.h>
 #include <tqdatetime.h>
 
-// ----------------------------------------------------------------------------
-// TDE Includes
-
-#include <tdeversion.h>
-
 // ----------------------------------------------------------------------------
 // Project Includes
 
diff --git a/kmymoney2/widgets/kmymoneyedit.h b/kmymoney2/widgets/kmymoneyedit.h
index 7fe87f9..f2af5a0 100644
--- a/kmymoney2/widgets/kmymoneyedit.h
+++ b/kmymoney2/widgets/kmymoneyedit.h
@@ -17,8 +17,6 @@
 #ifndef KMYMONEYEDIT_H
 #define KMYMONEYEDIT_H
 
-#include <tdeversion.h>
-
 // ----------------------------------------------------------------------------
 // TQt Includes
 
@@ -42,10 +40,6 @@ class KPushButton;
 class MyMoneyMoney;
 class kMyMoneyCalculator;
 
-#if TDE_VERSION <= TDE_MAKE_VERSION(3,1,0)
-  #define KDoubleValidator TQDoubleValidator
-#endif
-
 /**
   * This class is derived from KDoubleValidator and uses
   * the monetary symbols instead of the numeric symbols.
diff --git a/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp b/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp
index 990787b..34f961a 100644
--- a/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp
+++ b/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp
@@ -380,11 +380,7 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(TQMouseEvent* e)
       return;
     }
 
-  #if TDE_VERSION < 310
-    int firstWeekDay = TDEGlobal::locale()->weekStartsMonday() ? 1 : 0;
-  #else
     int firstWeekDay = TDEGlobal::locale()->weekStartDay();
-  #endif
 
     TQDate drawDate(date);
     TQString text;
-- 
cgit v1.2.3

