From 180ea1fc8d5e4c89a5082649aa9d2ba4190ef0dd Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calgaro@yahoo.it>
Date: Sat, 7 Mar 2026 11:06:50 +0900
Subject: Remove use of KDE_IS_VERSION

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 src/calendarhandler.h                      |  2 +-
 src/configdialog.cpp                       |  5 ---
 src/gui/listview.cpp                       | 49 ------------------------------
 src/gui/listview.h                         | 13 --------
 src/newstuff/dialog.cpp                    | 16 ++--------
 src/newstuff/manager.cpp                   |  2 --
 src/newstuff/newscript.cpp                 | 13 +-------
 src/newstuff/newscript.h                   | 15 +--------
 src/translators/freedbimporter.cpp         |  8 -----
 src/translators/pilotdb/libflatfile/DB.cpp |  8 ++---
 src/translators/pilotdb/portability.h      |  4 +--
 11 files changed, 12 insertions(+), 123 deletions(-)

diff --git a/src/calendarhandler.h b/src/calendarhandler.h
index 9729af3..573dc38 100644
--- a/src/calendarhandler.h
+++ b/src/calendarhandler.h
@@ -21,7 +21,7 @@
 
 // libkcal is not binary compatible between versions
 // for now, just support KDE 3.4 and higher
-#if defined(HAVE_KCAL) && KDE_IS_VERSION(3,3,90)
+#if defined(HAVE_KCAL)
 #define USE_KCAL
 #endif
 
diff --git a/src/configdialog.cpp b/src/configdialog.cpp
index 1090040..142ea03 100644
--- a/src/configdialog.cpp
+++ b/src/configdialog.cpp
@@ -538,11 +538,6 @@ void ConfigDialog::setupFetchPage() {
   m_newStuffBtn->setIconSet(SmallIconSet(TQString::fromLatin1("knewstuff")));
   TQWhatsThis::add(m_newStuffBtn, i18n("Click to download additional data sources via the Internet."));
 
-#if !KDE_IS_VERSION(3,3,90)
-  // only available in KDE 3.4 and up
-  m_newStuffBtn->setEnabled(false);
-#endif
-
   vlay->addWidget(newSourceBtn);
   vlay->addWidget(m_modifySourceBtn);
   vlay->addWidget(m_removeSourceBtn);
diff --git a/src/gui/listview.cpp b/src/gui/listview.cpp
index 4576c92..b6d903b 100644
--- a/src/gui/listview.cpp
+++ b/src/gui/listview.cpp
@@ -32,11 +32,6 @@ ListView::ListView(TQWidget* parent_, const char* name_) : TDEListView(parent_,
           TQ_SLOT(slotSelectionChanged()));
   connect(this, TQ_SIGNAL(doubleClicked(TQListViewItem*)),
           TQ_SLOT(slotDoubleClicked(TQListViewItem*)));
-#if !KDE_IS_VERSION(3,3,90)
-  m_shadeSortColumn = false;
-  // call it once to initialize
-  slotUpdateColors();
-#endif
   connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(slotUpdateColors()));
   m_comparisons.setAutoDelete(true);
 }
@@ -143,43 +138,7 @@ int ListView::compare(int col, const GUI::ListViewItem* item1, GUI::ListViewItem
   return 0;
 }
 
-#if !KDE_IS_VERSION(3,3,90)
-void ListView::setShadeSortColumn(bool shade_) {
-  if(m_shadeSortColumn != shade_) {
-    m_shadeSortColumn = shade_;
-    repaint();
-  }
-}
-#endif
-
 void ListView::slotUpdateColors() {
-#if !KDE_IS_VERSION(3,3,90)
-  m_backColor2 = viewport()->colorGroup().base();
-  if(m_backColor2 == TQt::black) {
-    m_backColor2 = TQColor(50, 50, 50);  // dark gray
-  } else {
-    int h,s,v;
-    m_backColor2.hsv(&h, &s, &v);
-    if(v > 175) {
-      m_backColor2 = m_backColor2.dark(105);
-    } else {
-      m_backColor2 = m_backColor2.light(120);
-    }
-  }
-
-  m_altColor2 = alternateBackground();
-  if(m_altColor2 == TQt::black) {
-    m_altColor2 = TQColor(50, 50, 50);  // dark gray
-  } else {
-    int h,s,v;
-    m_altColor2.hsv(&h, &s, &v);
-    if(v > 175) {
-      m_altColor2 = m_altColor2.dark(105);
-    } else {
-      m_altColor2 = m_altColor2.light(120);
-    }
-  }
-#endif
   Tellico::updateContrastColor(viewport()->colorGroup());
   repaint();
 }
@@ -293,15 +252,7 @@ void ListViewItem::setSelected(bool s_) {
 }
 
 TQColor ListViewItem::backgroundColor(int column_) {
-#if KDE_IS_VERSION(3,3,90)
   return TDEListViewItem::backgroundColor(column_);
-#else
-  ListView* view = listView();
-  if(view->columns() > 1 && view->shadeSortColumn() && column_ == view->sortColumn()) {
-    return isAlternate() ? view->alternateBackground2() : view->background2();
-  }
-  return isAlternate() ? view->alternateBackground() : view->viewport()->colorGroup().base();
-#endif
 }
 
 void ListViewItem::paintCell(TQPainter* p_, const TQColorGroup& cg_,
diff --git a/src/gui/listview.h b/src/gui/listview.h
index 00857fc..013c1f1 100644
--- a/src/gui/listview.h
+++ b/src/gui/listview.h
@@ -82,14 +82,6 @@ public:
   void clearComparisons();
   virtual int compare(int col, const GUI::ListViewItem* item1, GUI::ListViewItem* item2, bool asc);
 
-#if !KDE_IS_VERSION(3,3,90)
-  // taken from KDE bug 59791
-  void setShadeSortColumn(bool shade_);
-  bool shadeSortColumn() const { return m_shadeSortColumn; }
-  const TQColor& background2() const { return m_backColor2; }
-  const TQColor& alternateBackground2() const { return m_altColor2; }
-#endif
-
 protected slots:
   /**
    * Handles everything when an item is selected. The proper signal is emitted, depending
@@ -117,11 +109,6 @@ private:
   bool m_isClear;
   ListViewItemList m_selectedItems;
   TQDict<ListViewComparison> m_comparisons;
-#if !KDE_IS_VERSION(3,3,90)
-  bool m_shadeSortColumn;
-  TQColor m_backColor2;
-  TQColor m_altColor2;
-#endif
 };
 
 /**
diff --git a/src/newstuff/dialog.cpp b/src/newstuff/dialog.cpp
index 6e59499..43a5414 100644
--- a/src/newstuff/dialog.cpp
+++ b/src/newstuff/dialog.cpp
@@ -42,16 +42,6 @@
 #include <tqtimer.h>
 #include <tqprogressbar.h>
 
-#if KDE_IS_VERSION(3,4,90)
-#define ENTRYNAME(e) e->name(m_lang)
-#define ENTRYSUMM(e) e->summary(m_lang)
-#define ENTRYEMAIL(e) e->authorEmail()
-#else
-#define ENTRYNAME(e) e->name()
-#define ENTRYSUMM(e) e->summary()
-#define ENTRYEMAIL(e) TQString()
-#endif
-
 #define OPENDESKTOP_REDIRECT_URL "opendesktop.org/content/download.php?content="
 #define OPENDESKTOP_REDIRECT_TEXT "If the download does not start in 3 seconds:</span><span class=\"defaulttext\">&nbsp;<a href=\""
 
@@ -322,7 +312,7 @@ void Dialog::slotResult(TDEIO::Job* job_) {
     if(stuff.tagName() == Latin1Literal("content")) {
       KNS::Entry* entry = new KNS::Entry(stuff);
       if(!entry->type().isEmpty() && entry->type() != m_typeName) {
-        myLog() << "NewStuff::Dialog::slotResult() - type mismatch, skipping " << ENTRYNAME(entry) << endl;
+        myLog() << "NewStuff::Dialog::slotResult() - type mismatch, skipping " << entry->name(m_lang) << endl;
         continue;
       }
 
@@ -343,7 +333,7 @@ void Dialog::addEntry(KNS::Entry* entry_) {
   }
 
   Item* item = new Item(m_listView);
-  item->setText(0, ENTRYNAME(entry_));
+  item->setText(0, entry_->name(m_lang));
   item->setText(1, entry_->version());
   item->setText(2, TQString::number(entry_->rating()));
   item->setText(3, TQString::number(entry_->downloads()));
@@ -389,7 +379,7 @@ void Dialog::slotSelected(TQListViewItem* item_) {
   if(!license.isEmpty()) {
     license.prepend('(').append(')');
   }
-  TQString name = TQString::fromLatin1("%1 %2").arg(ENTRYNAME(entry)).arg(license);
+  TQString name = TQString::fromLatin1("%1 %2").arg(entry->name(m_lang)).arg(license);
   TQFont font = m_nameLabel->font();
   font.setBold(true);
   font.setItalic(false);
diff --git a/src/newstuff/manager.cpp b/src/newstuff/manager.cpp
index f6d6e1b..4ad3f5f 100644
--- a/src/newstuff/manager.cpp
+++ b/src/newstuff/manager.cpp
@@ -374,7 +374,6 @@ void Manager::slotDownloadJobResult(TDEIO::Job* job_) {
       emit signalInstalled(0);
     }
   } else {
-#if KDE_IS_VERSION(3,3,90)
     // needed so the GPG signature can be checked
     NewScript* newScript = new NewScript(this, Kernel::self()->widget());
     connect(newScript, TQ_SIGNAL(installFinished()), this, TQ_SLOT(slotInstallFinished()));
@@ -382,7 +381,6 @@ void Manager::slotDownloadJobResult(TDEIO::Job* job_) {
     // if it was a success, it gets deleted later
     deleteTempFile = !newScript->install(job->destURL().path());
     m_scriptEntryMap.insert(newScript, entry);
-#endif
     // if failed, emit empty signal now
     if(deleteTempFile) {
       emit signalInstalled(0);
diff --git a/src/newstuff/newscript.cpp b/src/newstuff/newscript.cpp
index 4ec83e3..a0d2b8d 100644
--- a/src/newstuff/newscript.cpp
+++ b/src/newstuff/newscript.cpp
@@ -17,15 +17,12 @@
 #include <kurl.h>
 
 #include <tqwidget.h>
+#include <tdenewstuff/knewstuffsecure.h>
 
 using Tellico::NewStuff::NewScript;
 
 NewScript::NewScript(Manager* manager_, TQWidget* parentWidget_)
-#if KDE_IS_VERSION(3,3,90)
     : TDENewStuffSecure(TQString::fromLatin1("tellico script"), parentWidget_)
-#else
-    : TQObject(parentWidget_)
-#endif
     , m_manager(manager_), m_success(false) {
 }
 
@@ -37,12 +34,4 @@ void NewScript::installResource() {
   m_url = u;
 }
 
-#if KDE_IS_VERSION(3,3,90)
-#include <tdenewstuff/knewstuffsecure.h>
-#define SUPERCLASS TDENewStuffSecure
-#else
-#define SUPERCLASS TQObject
-#endif
-
 #include "newscript.moc"
-#undef SUPERCLASS
diff --git a/src/newstuff/newscript.h b/src/newstuff/newscript.h
index dbbfc9f..463f2a5 100644
--- a/src/newstuff/newscript.h
+++ b/src/newstuff/newscript.h
@@ -14,16 +14,8 @@
 #ifndef TELLICO_NEWSTUFF_NEWSCRIPT_H
 #define TELLICO_NEWSTUFF_NEWSCRIPT_H
 
-#include <tdeversion.h>
 #include <kurl.h>
-
-#if KDE_IS_VERSION(3,3,90)
 #include <tdenewstuff/knewstuffsecure.h>
-#define SUPERCLASS TDENewStuffSecure
-#else
-#define SUPERCLASS TQObject
-#endif
-
 #include <tqobject.h>
 
 namespace Tellico {
@@ -31,7 +23,7 @@ namespace Tellico {
 
 class Manager;
 
-class NewScript : public SUPERCLASS {
+class NewScript : public TDENewStuffSecure {
 TQ_OBJECT
   
 
@@ -46,10 +38,6 @@ private:
   virtual void installResource();
 
   Manager* m_manager;
-#if !KDE_IS_VERSION(3,3,90)
-  // TDENewStuffSecure has a protected variable
-  TQString m_tarName;
-#endif
   KURL m_url;
   bool m_success : 1;
 };
@@ -57,5 +45,4 @@ private:
   }
 }
 
-#undef SUPERCLASS
 #endif
diff --git a/src/translators/freedbimporter.cpp b/src/translators/freedbimporter.cpp
index ae3eb4f..2480d88 100644
--- a/src/translators/freedbimporter.cpp
+++ b/src/translators/freedbimporter.cpp
@@ -269,11 +269,7 @@ void FreeDBImporter::readCDROM() {
   TQStringList trackList;
   KCDDB::TrackInfoList t = info.trackInfoList;
   for(uint i = 0; i < t.count(); ++i) {
-#if KDE_IS_VERSION(3,4,90)
     TQString s = t[i].get(TQString::fromLatin1("title")).toString() + "::" + info.artist;
-#else
-    TQString s = t[i].title + "::" + info.artist;
-#endif
     if(i < lengths.count()) {
       s += "::" + Tellico::minutes(lengths[i]);
     }
@@ -388,11 +384,7 @@ void FreeDBImporter::readCache() {
     TQStringList trackList;
     KCDDB::TrackInfoList t = info.trackInfoList;
     for(uint i = 0; i < t.count(); ++i) {
-#if KDE_IS_VERSION(3,4,90)
       trackList << t[i].get(TQString::fromLatin1("title")).toString();
-#else
-      trackList << t[i].title;
-#endif
     }
     entry->setField(track, trackList.join(TQString::fromLatin1("; ")));
 
diff --git a/src/translators/pilotdb/libflatfile/DB.cpp b/src/translators/pilotdb/libflatfile/DB.cpp
index 0eee0e2..598fa94 100644
--- a/src/translators/pilotdb/libflatfile/DB.cpp
+++ b/src/translators/pilotdb/libflatfile/DB.cpp
@@ -1268,7 +1268,7 @@ void PalmLib::FlatFile::DB::outputPDB(PalmLib::Database& pdb) const
     unsigned i;
 
     // Let the superclass have a chance.
-    SUPERCLASS(PalmLib::FlatFile, Database, outputPDB, (pdb));
+    TDENewStuffSecure(PalmLib::FlatFile, Database, outputPDB, (pdb));
 
     // Set the database's type and creator.
     pdb.type(PalmLib::mktag('D','B','0','0'));
@@ -1393,7 +1393,7 @@ unsigned PalmLib::FlatFile::DB::getMaxNumOfListViews() const
 void PalmLib::FlatFile::DB::doneWithSchema()
 {
     // Let the superclass have a chance.
-    SUPERCLASS(PalmLib::FlatFile, Database, doneWithSchema, ());
+    TDENewStuffSecure(PalmLib::FlatFile, Database, doneWithSchema, ());
 /* false from the 0.3.3 version
     if (getNumOfListViews() < 1)
         throw PalmLib::error("at least one list view must be specified");
@@ -1415,7 +1415,7 @@ void PalmLib::FlatFile::DB::setOption(const std::string& name,
         else
             m_flags |= 0x8000;
     } else {
-        SUPERCLASS(PalmLib::FlatFile, Database, setOption, (name, value));
+        TDENewStuffSecure(PalmLib::FlatFile, Database, setOption, (name, value));
     }
 }
 
@@ -1425,7 +1425,7 @@ PalmLib::FlatFile::DB::getOptions(void) const
     typedef PalmLib::FlatFile::Database::options_list_t::value_type value;
     PalmLib::FlatFile::Database::options_list_t result;
 
-    result = SUPERCLASS(PalmLib::FlatFile, Database, getOptions, ());
+    result = TDENewStuffSecure(PalmLib::FlatFile, Database, getOptions, ());
 
     if (m_flags & 1)
         result.push_back(value("find", "true"));
diff --git a/src/translators/pilotdb/portability.h b/src/translators/pilotdb/portability.h
index cb41f79..a51552e 100644
--- a/src/translators/pilotdb/portability.h
+++ b/src/translators/pilotdb/portability.h
@@ -64,9 +64,9 @@
  * calling the superclass nice and simple.
  */
 #ifndef _MSC_VER
-#define SUPERCLASS(namespace, class, function, args) namespace::class::function args
+#define TDENewStuffSecure(namespace, class, function, args) namespace::class::function args
 #else
-#define SUPERCLASS(namespace, class, function, args) this-> class::function args
+#define TDENewStuffSecure(namespace, class, function, args) this->class::function args
 #endif
 
 #endif
-- 
cgit v1.2.3

