From 50855e76de13f2ca1361130493cc026b1ea50bba Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calgaro@yahoo.it>
Date: Mon, 23 Mar 2026 11:58:42 +0900
Subject: Remove use of TDE_VERSION

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 kfloppy/main.cpp                  |  1 -
 kgpg/kgpg.cpp                     |  1 -
 kgpg/kgpgoptions.cpp              |  1 -
 kgpg/popuppublic.cpp              |  1 -
 kmilo/kmilod/defaultskin.cpp      |  1 -
 superkaramba/src/imagelabel.cpp   |  8 -----
 superkaramba/src/karamba.cpp      | 23 ++-----------
 superkaramba/src/karambaapp.h     | 12 -------
 superkaramba/src/main.cpp         |  1 -
 superkaramba/src/rsssensor.cpp    |  4 ---
 superkaramba/src/showdesktop.cpp  | 12 +------
 superkaramba/src/taskmanager.cpp  | 68 +--------------------------------------
 superkaramba/src/taskmanager.h    | 13 --------
 tdefilereplace/knewprojectdlg.cpp |  1 -
 tdelirc/irkick/irkick.cpp         |  3 --
 15 files changed, 5 insertions(+), 145 deletions(-)

diff --git a/kfloppy/main.cpp b/kfloppy/main.cpp
index 9c8823f..3158419 100644
--- a/kfloppy/main.cpp
+++ b/kfloppy/main.cpp
@@ -22,7 +22,6 @@
 
 */
 
-#include <tdeversion.h>
 #include <tdeapplication.h>
 #include <tdecmdlineargs.h>
 #include <tdeaboutdata.h>
diff --git a/kgpg/kgpg.cpp b/kgpg/kgpg.cpp
index 5073b96..1585bf0 100644
--- a/kgpg/kgpg.cpp
+++ b/kgpg/kgpg.cpp
@@ -32,7 +32,6 @@
 #include <tqhbuttongroup.h>
 #include <tdeglobal.h>
 #include <kactivelabel.h>
-#include <tdeversion.h>
 #include <tdelocale.h>
 #include <tdeconfig.h>
 #include <tdeapplication.h>
diff --git a/kgpg/kgpgoptions.cpp b/kgpg/kgpgoptions.cpp
index 2676d6d..e1daa27 100644
--- a/kgpg/kgpgoptions.cpp
+++ b/kgpg/kgpgoptions.cpp
@@ -24,7 +24,6 @@
 #include <tqtoolbutton.h>
 #include <tqfile.h>
 #include <tdeconfig.h>
-#include <tdeversion.h>
 #include <tdelocale.h>
 #include <tdeprocio.h>
 #include <tqcheckbox.h>
diff --git a/kgpg/popuppublic.cpp b/kgpg/popuppublic.cpp
index eeebd4b..26aefbc 100644
--- a/kgpg/popuppublic.cpp
+++ b/kgpg/popuppublic.cpp
@@ -32,7 +32,6 @@
 #include <tqtoolbutton.h>
 #include <tqtextcodec.h>
 
-#include <tdeversion.h>
 #include <tdelistview.h>
 #include <tdeprocess.h>
 #include <tdeprocio.h>
diff --git a/kmilo/kmilod/defaultskin.cpp b/kmilo/kmilod/defaultskin.cpp
index af96dee..01cc35c 100644
--- a/kmilo/kmilod/defaultskin.cpp
+++ b/kmilo/kmilod/defaultskin.cpp
@@ -31,7 +31,6 @@
 #include <twin.h>
 #include <netwm.h>
 #include <tdeglobalsettings.h>
-#include <tdeversion.h>
 #include <tdeconfig.h>
 
 #include "defaultskin.h"
diff --git a/superkaramba/src/imagelabel.cpp b/superkaramba/src/imagelabel.cpp
index 4b934a9..c3481b4 100644
--- a/superkaramba/src/imagelabel.cpp
+++ b/superkaramba/src/imagelabel.cpp
@@ -445,11 +445,7 @@ void ImageLabel::parseImages(TQString fn, TQString fn_roll, int _xoff,
   if ( fileOnNet )
   {
     TQString tmpFile;
-#if defined(KDE_3_2)
     if(TDEIO::NetAccess::download(KURL(path), tmpFile, karambaApp->parentWindow()))
-#else
-    if(TDEIO::NetAccess::download(KURL(path), tmpFile))
-#endif
     {
       pixmap_off = KPixmap(tmpFile);
       TDEIO::NetAccess::removeTempFile(tmpFile);
@@ -493,11 +489,7 @@ void ImageLabel::parseImages(TQString fn, TQString fn_roll, int _xoff,
   if ( fileOnNet )
   {
     TQString tmpFile;
-#if defined(KDE_3_2)
     if(TDEIO::NetAccess::download(KURL(path), tmpFile, karambaApp->parentWindow()))
-#else
-    if(TDEIO::NetAccess::download(KURL(path), tmpFile))
-#endif
     {
       pixmap_on = KPixmap(tmpFile);
       TDEIO::NetAccess::removeTempFile(tmpFile);
diff --git a/superkaramba/src/karamba.cpp b/superkaramba/src/karamba.cpp
index f4e3767..effafda 100644
--- a/superkaramba/src/karamba.cpp
+++ b/superkaramba/src/karamba.cpp
@@ -36,7 +36,6 @@
 #include <krun.h>
 #include <tdelocale.h>
 #include <twin.h>
-#include <tdeversion.h>
 #include <kdirwatch.h>
 
 #include <tdeparts/componentfactory.h>
@@ -762,12 +761,7 @@ bool karamba::parseConfig()
       // Matthew Kay: set window type to "dock"
       // (plays better with taskbar themes this way)
       KWin::setType(winId(), NET::Dock);
-      #if defined(TDE_MAKE_VERSION)
-        #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9)
-          //KDE 3.2 addition for the always on top issues
-          KWin::setState(winId(), NET::KeepBelow);
-        #endif
-      #endif
+      KWin::setState(winId(), NET::KeepBelow);
     }
 
     m_theme.close();
@@ -804,13 +798,7 @@ void karamba::start()
 void karamba::makeActive()
 {
   KWin::setType(winId(), NET::Normal);
-
-  #if defined(TDE_MAKE_VERSION)
-    #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9)
-      //KDE 3.2 addition for the always on top issues
-      KWin::setState(winId(), NET::Modal);
-    #endif
-  #endif
+  KWin::setState(winId(), NET::Modal);
 }
 
 void karamba::makePassive()
@@ -828,12 +816,7 @@ void karamba::makePassive()
   // Matthew Kay: set window type to "dock" (plays better with taskbar themes
   // this way)
   KWin::setType(winId(), NET::Dock);
-  #if defined(TDE_MAKE_VERSION)
-    #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9)
-      //KDE 3.2 addition for the always on top issues
-      KWin::setState(winId(), NET::KeepBelow);
-    #endif
-  #endif
+  KWin::setState(winId(), NET::KeepBelow);
 }
 
 void karamba::popupNotify(int)
diff --git a/superkaramba/src/karambaapp.h b/superkaramba/src/karambaapp.h
index 8e53914..d3d0868 100644
--- a/superkaramba/src/karambaapp.h
+++ b/superkaramba/src/karambaapp.h
@@ -12,20 +12,8 @@
 #define KARAMBAAPP_H
 
 #include "tdeapplication.h"
-#include <tdeversion.h>
 #include <ksystemtray.h>
 
-#undef KDE_3_2
-#undef KDE_3_3
-#if defined(TDE_MAKE_VERSION)
-#if TDE_VERSION >= TDE_MAKE_VERSION(3,2,0)
-#define KDE_3_2
-#endif
-#if TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
-#define KDE_3_3
-#endif
-#endif
-
 #define karambaApp ((KarambaApplication*)tqApp)
 
 class karamba;
diff --git a/superkaramba/src/main.cpp b/superkaramba/src/main.cpp
index feee817..453856b 100644
--- a/superkaramba/src/main.cpp
+++ b/superkaramba/src/main.cpp
@@ -32,7 +32,6 @@
 #include <tqstringlist.h>
 #include <tdeconfig.h>
 #include <tdestandarddirs.h>
-#include <tdeversion.h>
 
 #include "karamba.h"
 #include "karambasessionmanaged.h"
diff --git a/superkaramba/src/rsssensor.cpp b/superkaramba/src/rsssensor.cpp
index e0a4f9e..ebbdeec 100644
--- a/superkaramba/src/rsssensor.cpp
+++ b/superkaramba/src/rsssensor.cpp
@@ -47,11 +47,7 @@ void RssSensor::update()
     TQString tmpFile;
     bool OK = false;
 
-#if defined(KDE_3_3)
     if(TDEIO::NetAccess::download(KURL(source), tmpFile, karambaApp->parentWindow()))
-#else
-    if(TDEIO::NetAccess::download(KURL(source), tmpFile))
-#endif
     {
         file.setName(tmpFile);
         if ( file.open(IO_ReadOnly | IO_Translate) )
diff --git a/superkaramba/src/showdesktop.cpp b/superkaramba/src/showdesktop.cpp
index f37c35e..d53db40 100644
--- a/superkaramba/src/showdesktop.cpp
+++ b/superkaramba/src/showdesktop.cpp
@@ -51,12 +51,6 @@ void ShowDesktop::slotCurrentDesktopChanged(int)
     showDesktop( false );
 }
 
-#ifdef KDE_3_3
-#define NET_ALL_TYPES_MASK (NET::AllTypesMask)
-#else
-#define NET_ALL_TYPES_MASK (-1LU)
-#endif
-
 void ShowDesktop::slotWindowChanged(WId w, unsigned int dirty)
 {
   if (!showingDesktop)
@@ -67,11 +61,7 @@ void ShowDesktop::slotWindowChanged(WId w, unsigned int dirty)
   {
     NETWinInfo inf(tqt_xdisplay(), w, tqt_xrootwin(),
                    NET::XAWMState | NET::WMWindowType);
-#ifdef KDE_3_2
-    NET::WindowType windowType = inf.windowType(NET_ALL_TYPES_MASK);
-#else
-    NET::WindowType windowType = inf.windowType();
-#endif
+    NET::WindowType windowType = inf.windowType(NET::AllTypesMask);
     if ((windowType == NET::Normal || windowType == NET::Unknown)
         && inf.mappingState() == NET::Visible )
     {
diff --git a/superkaramba/src/taskmanager.cpp b/superkaramba/src/taskmanager.cpp
index abfd99f..099cd15 100644
--- a/superkaramba/src/taskmanager.cpp
+++ b/superkaramba/src/taskmanager.cpp
@@ -106,21 +106,11 @@ Task* TaskManager::findTask(WId w)
     return 0;
 }
 
-#ifdef KDE_3_3
-#define NET_ALL_TYPES_MASK (NET::AllTypesMask)
-#else
-#define NET_ALL_TYPES_MASK (-1LU)
-#endif
-
 void TaskManager::windowAdded(WId w )
 {
   NETWinInfo info(tqt_xdisplay(),  w, tqt_xrootwin(),
                   NET::WMWindowType | NET::WMPid | NET::WMState );
-  #ifdef KDE_3_2
-  NET::WindowType windowType = info.windowType(NET_ALL_TYPES_MASK);
-  #else
-  NET::WindowType windowType = info.windowType();
-  #endif
+  NET::WindowType windowType = info.windowType(NET::AllTypesMask);
   // ignore NET::Tool and other special window types
   if (windowType != NET::Normal && windowType != NET::Override
       && windowType != NET::Unknown && windowType != NET::Dialog)
@@ -334,11 +324,7 @@ Task::Task(WId win, TaskManager * parent, const char *name) :
   _lastWidth(0), _lastHeight(0), _lastResize(false), _lastIcon(),
   _thumbSize(0.2), _thumb(), _grab()
 {
-#ifdef KDE_3_2
   _info = KWin::windowInfo(_win, 0, 0);
-#else
-  _info = KWin::info(_win);
-#endif
   // try to load icon via net_wm
   _pixmap = KWin::icon(_win, 16, 16, true);
 
@@ -359,11 +345,7 @@ Task::~Task()
 
 void Task::refresh(bool icon)
 {
-#ifdef KDE_3_2
   _info = KWin::windowInfo(_win, 0, 0);
-#else
-  _info = KWin::info(_win);
-#endif
   if (icon)
   {
     // try to load icon via net_wm
@@ -398,56 +380,32 @@ void Task::setActive(bool a)
 
 bool Task::isMaximized() const
 {
-#ifdef KDE_3_2
   return(_info.state() & NET::Max);
-#else
-  return(_info.state & NET::Max);
-#endif
 }
 
 bool Task::isIconified() const
 {
-#ifdef KDE_3_2
   return (_info.mappingState() == NET::Iconic);
-#else
-  return (_info.mappingState == NET::Iconic);
-#endif
 }
 
 bool Task::isAlwaysOnTop() const
 {
-#ifdef KDE_3_2
   return (_info.state() & NET::StaysOnTop);
-#else
-  return (_info.state & NET::StaysOnTop);
-#endif
 }
 
 bool Task::isShaded() const
 {
-#ifdef KDE_3_2
   return (_info.state() & NET::Shaded);
-#else
-  return (_info.state & NET::Shaded);
-#endif
 }
 
 bool Task::isOnCurrentDesktop() const
 {
-#ifdef KDE_3_2
   return (_info.onAllDesktops() || _info.desktop() == twin_module->currentDesktop());
-#else
-  return (_info.onAllDesktops || _info.desktop == twin_module->currentDesktop());
-#endif
 }
 
 bool Task::isOnAllDesktops() const
 {
-#ifdef KDE_3_2
   return _info.onAllDesktops();
-#else
-  return _info.onAllDesktops;
-#endif
 }
 
 bool Task::isActive() const
@@ -463,11 +421,7 @@ bool Task::isOnTop() const
 bool Task::isModified() const
 {
   static TQString modStr = TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]");
-#ifdef KDE_3_2
   int modStrPos = _info.visibleName().find(modStr);
-#else
-  int modStrPos = _info.visibleName.find(modStr);
-#endif
 
   return ( modStrPos != -1 );
 }
@@ -623,11 +577,7 @@ void Task::maximize()
   NETWinInfo ni( tqt_xdisplay(),  _win, tqt_xrootwin(), NET::WMState);
   ni.setState( NET::Max, NET::Max );
 
-#ifdef KDE_3_2
   if (_info.mappingState() == NET::Iconic)
-#else
-  if (_info.mappingState == NET::Iconic)
-#endif
     activate();
 }
 
@@ -635,11 +585,7 @@ void Task::restore()
 {
   NETWinInfo ni( tqt_xdisplay(),  _win, tqt_xrootwin(), NET::WMState);
   ni.setState( 0, NET::Max );
-#ifdef KDE_3_2
   if (_info.mappingState() == NET::Iconic)
-#else
-  if (_info.mappingState == NET::Iconic)
-#endif
     activate();
 }
 
@@ -689,30 +635,18 @@ void Task::toDesktop(int desk)
   NETWinInfo ni(tqt_xdisplay(), _win, tqt_xrootwin(), NET::WMDesktop);
   if (desk == 0)
   {
-#ifdef KDE_3_2
     if (_info.onAllDesktops())
     {
         ni.setDesktop(twin_module->currentDesktop());
         KWin::forceActiveWindow(_win);
     }
-#else
-    if (_info.onAllDesktops)
-    {
-        ni.setDesktop(twin_module->currentDesktop());
-        KWin::setActiveWindow(_win);
-    }
-#endif
     else
         ni.setDesktop(NETWinInfo::OnAllDesktops);
     return;
   }
   ni.setDesktop(desk);
   if (desk == twin_module->currentDesktop())
-#ifdef KDE_3_2
     KWin::forceActiveWindow(_win);
-#else
-    KWin::setActiveWindow(_win);
-#endif
 }
 
 void Task::toCurrentDesktop()
diff --git a/superkaramba/src/taskmanager.h b/superkaramba/src/taskmanager.h
index da6d834..ef6eea4 100644
--- a/superkaramba/src/taskmanager.h
+++ b/superkaramba/src/taskmanager.h
@@ -76,21 +76,12 @@ public:
     TaskManager* taskManager() const { return (TaskManager*) parent(); }
 
     WId window() const { return _win; }
-#ifdef KDE_3_2
     TQString name() const { return _info.name(); }
     TQString visibleName() const { return _info.visibleName(); }
     /**
      * Returns the desktop on which this task's window resides.
      */
     int desktop() const { return _info.desktop(); }
-#else
-    TQString name() const { return _info.name; }
-    TQString visibleName() const { return _info.visibleName; }
-    /**
-     * Returns the desktop on which this task's window resides.
-     */
-    int desktop() const { return _info.desktop; }
-#endif
     TQString visibleNameWithState() const { return _info.visibleNameWithState(); }
     TQString iconName() const;
     TQString visibleIconName() const;
@@ -349,11 +340,7 @@ private:
     bool                _active;
     WId                 _win;
     TQPixmap             _pixmap;
-#ifdef KDE_3_2
     KWin::WindowInfo    _info;
-#else
-    KWin::Info          _info;
-#endif
     TQValueList<WId>     _transients;
 
     int                 _lastWidth;
diff --git a/tdefilereplace/knewprojectdlg.cpp b/tdefilereplace/knewprojectdlg.cpp
index 0a6873f..aa072c3 100644
--- a/tdefilereplace/knewprojectdlg.cpp
+++ b/tdefilereplace/knewprojectdlg.cpp
@@ -39,7 +39,6 @@
 #include <tdelocale.h>
 #include <kpushbutton.h>
 #include <tdestandarddirs.h>
-#include <tdeversion.h>
 #include <kiconloader.h>
 #include <kdebug.h>
 #include <tdeapplication.h>
diff --git a/tdelirc/irkick/irkick.cpp b/tdelirc/irkick/irkick.cpp
index 62873a3..7336327 100644
--- a/tdelirc/irkick/irkick.cpp
+++ b/tdelirc/irkick/irkick.cpp
@@ -14,12 +14,9 @@
 #include <tqtimer.h>
 #include <tqevent.h>
 
-#include <tdeversion.h>
 #include <tdeapplication.h>
 #include <tdeaction.h>
-#if !(TDE_VERSION_MINOR<=1 && TDE_VERSION_RELEASE<=5)
 #include <tdeactioncollection.h>
-#endif
 #include <tdesimpleconfig.h>
 #include <ksystemtray.h>
 #include <kiconloader.h>
-- 
cgit v1.2.3

