From f87e9cbd209d6bf89f6df15c0ee1c742dc066cef Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calgaro@yahoo.it>
Date: Thu, 12 Mar 2026 15:05:58 +0900
Subject: Remove use of TDE_VERSION

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 ksystemlog/src/findManager.h     |  1 -
 ksystemlog/src/ksystemlog.cpp    | 16 +---------------
 ksystemlog/src/ksystemlog.h      | 10 +---------
 ksystemlog/src/logLineFilter.cpp |  9 ---------
 ksystemlog/src/logLineFilter.h   |  9 ---------
 ksystemlog/src/logListItem.cpp   |  6 ------
 ksystemlog/src/slotLogAction.cpp | 10 +---------
 ksystemlog/src/view.cpp          | 19 -------------------
 ksystemlog/src/view.h            | 10 ----------
 9 files changed, 3 insertions(+), 87 deletions(-)

diff --git a/ksystemlog/src/findManager.h b/ksystemlog/src/findManager.h
index 048e5ff..96a819f 100644
--- a/ksystemlog/src/findManager.h
+++ b/ksystemlog/src/findManager.h
@@ -19,7 +19,6 @@
 //KDE includes
 #include <kfinddialog.h>
 #include <kfind.h>
-#include <tdeversion.h>
 
 //Project includes
 #include "logManager.h"
diff --git a/ksystemlog/src/ksystemlog.cpp b/ksystemlog/src/ksystemlog.cpp
index 56f5266..6159fd6 100644
--- a/ksystemlog/src/ksystemlog.cpp
+++ b/ksystemlog/src/ksystemlog.cpp
@@ -54,7 +54,6 @@
 #include <tdeconfig.h>
 
 //For compatibility with old versions of KDE
-#include <tdeversion.h>
 
 #include <dcopclient.h>
 
@@ -323,11 +322,7 @@ void KSystemLog::setupActions() {
 
 	//TODO Find a solution to display at the right place this action (see Akregator interface)
 	filterBarAction=new TDEToggleAction(i18n("Show &Filter Bar"), TQString(), 0, this, TQ_SLOT(slotToggleFilterBar()), actionCollection(), "toggle_filter_bar");
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
 	filterBarAction->setEnabled(true);
-#else
-	filterBarAction->setEnabled(false);
-#endif
 
 	KStdAction::preferences(this, TQ_SLOT(slotOptions()), actionCollection());
 	
@@ -393,11 +388,7 @@ void KSystemLog::setupActions() {
 void KSystemLog::setupLogActions() {
 	
 	//Define a macro allowing the connection of the signal from log action to the slotLogAction object
-	#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,4,0)
-		#define CONNECTED_SLOT(action) connect(action, TQ_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), slotLogAction, TQ_SLOT(slotLogAction(TDEAction::ActivationReason, TQt::ButtonState)));
-	#else
-		#define CONNECTED_SLOT(action) connect(action, TQ_SIGNAL(activated()), slotLogAction, TQ_SLOT(slotLogAction()));
-	#endif
+	#define CONNECTED_SLOT(action) connect(action, TQ_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), slotLogAction, TQ_SLOT(slotLogAction(TDEAction::ActivationReason, TQt::ButtonState)));
 	
 	
 	//Construct the slotLogAction object
@@ -678,14 +669,12 @@ LogManager* KSystemLog::newTab() {
 	
 	tabs->insertTab(manager->getView(), SmallIcon(NO_MODE_ICON), i18n("No Log"));
 	
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,4,0)
 	if (tabs->count()>1) {
 		tabs->setTabBarHidden(false);
 	}
 	else {
 		tabs->setTabBarHidden(true);
 	}
-#endif
 
 	tabs->setCurrentPage(tabs->count()-1);
 	
@@ -776,12 +765,9 @@ void KSystemLog::closeTab() {
 	}
 	*/
 	
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,4,0)
 	if (tabs->count()==1) {
 		tabs->setTabBarHidden(true);
 	}
-#endif
-	
 }
 
 
diff --git a/ksystemlog/src/ksystemlog.h b/ksystemlog/src/ksystemlog.h
index 541c2a5..16b8f01 100644
--- a/ksystemlog/src/ksystemlog.h
+++ b/ksystemlog/src/ksystemlog.h
@@ -38,8 +38,6 @@
 #include <ktabwidget.h>
 #include <tdeactionclasses.h>
 #include <tdepopupmenu.h>
-//For compatibility with old versions of KDE
-#include <tdeversion.h>
 
 //Project includes
 #include "detailDialog.h"
@@ -51,13 +49,7 @@
 #include "findManager.h"
 
 #include "globals.h"
-
-//Include the right header for the management of Log Action clicking, depending of the version of KDE
-#if defined(TDE_MAKE_VERSION) && (TDE_VERSION >= TDE_MAKE_VERSION(3,4,0))
-	#include "slotLogAction.h"
-#else
-	#include "slotLogActionCompatibility.h"
-#endif
+#include "slotLogAction.h"
 
 #define STATUS_BAR_LINE_COUNT 1
 #define STATUS_BAR_LAST_MODIFICATION 2
diff --git a/ksystemlog/src/logLineFilter.cpp b/ksystemlog/src/logLineFilter.cpp
index 97a18bb..0eb23c9 100644
--- a/ksystemlog/src/logLineFilter.cpp
+++ b/ksystemlog/src/logLineFilter.cpp
@@ -18,12 +18,6 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
  ***************************************************************************/
 
-//For compatibility with old versions of KDE
-#include <tdeversion.h>
-
-//The filter is activated only if KDE version >= 3.3
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
-
 #include <tqpainter.h>
 
 #include <tdelocale.h>
@@ -75,6 +69,3 @@ void LogLineFilter::focusOutEvent( TQFocusEvent *ev )
     }
     TDEListViewSearchLine::focusOutEvent( ev );
 }
-
-
-#endif
diff --git a/ksystemlog/src/logLineFilter.h b/ksystemlog/src/logLineFilter.h
index 19bf82e..459d8cf 100644
--- a/ksystemlog/src/logLineFilter.h
+++ b/ksystemlog/src/logLineFilter.h
@@ -21,12 +21,6 @@
 #ifndef LOG_LINE_FILTER_H
 #define LOG_LINE_FILTER_H
 
-//For compatibility with old versions of KDE
-#include <tdeversion.h>
-
-//The filter is activated only if KDE version >= 3.3
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
-
 #include <tdelistviewsearchline.h>
 
 /**
@@ -52,7 +46,4 @@ class LogLineFilter : public TDEListViewSearchLine
 
 };
 
-#endif
-
 #endif //LOG_LINE_FILTER_H
-
diff --git a/ksystemlog/src/logListItem.cpp b/ksystemlog/src/logListItem.cpp
index daa4371..63c5584 100644
--- a/ksystemlog/src/logListItem.cpp
+++ b/ksystemlog/src/logListItem.cpp
@@ -32,8 +32,6 @@
 #include <tdelocale.h>
 #include <tdemessagebox.h>
 #include <kdebug.h>
-//For compatibility with old versions of KDE
-#include <tdeversion.h>
 
 //Project includes
 #include "itemFactory.h"
@@ -163,14 +161,10 @@ void LogListItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, in
 	
 	
 	//Use or not an alternate background
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,4,0)
 	if (line->isParentLogLine()==true && column==0)
 		pBuf.fillRect( buffer.rect(), isSelected() ? cg.highlight() : cg.highlight() );
 	else
 		pBuf.fillRect( buffer.rect(), isSelected() ? cg.highlight() : backgroundColor(column) );
-#else
-	pBuf.fillRect( buffer.rect(), isSelected() ? cg.highlight() : backgroundColor() );
-#endif
 
 
 	//Change the pen color
diff --git a/ksystemlog/src/slotLogAction.cpp b/ksystemlog/src/slotLogAction.cpp
index cda7419..fa6f746 100644
--- a/ksystemlog/src/slotLogAction.cpp
+++ b/ksystemlog/src/slotLogAction.cpp
@@ -19,17 +19,9 @@
  ***************************************************************************/
 
 #include <tdelocale.h>
-//For compatibility with old versions of KDE
-#include <tdeversion.h>
-
 #include "ksystemlog.h"
 
-//Include the right header, depending of the version of KDE
-#if defined(TDE_MAKE_VERSION) && (TDE_VERSION >= TDE_MAKE_VERSION(3,4,0))
-	#include "slotLogAction.h"
-#else
-	#include "slotLogActionCompatibility.h"
-#endif
+#include "slotLogAction.h"
 
 SlotLogAction::SlotLogAction(KSystemLog* p) :
 	parent(p) {
diff --git a/ksystemlog/src/view.cpp b/ksystemlog/src/view.cpp
index 4756ad8..eaf91c5 100644
--- a/ksystemlog/src/view.cpp
+++ b/ksystemlog/src/view.cpp
@@ -41,8 +41,6 @@
 #include <tdelocale.h>
 #include <kiconloader.h>
 #include <kdebug.h>
-//For compatibility with old versions of KDE
-#include <tdeversion.h>
 
 //Project includes
 #include "view.h"
@@ -69,7 +67,6 @@ View::View(TQWidget *parent) :
 	topLayout->setAutoAdd(true);
 	
 	
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
 	filterBar=new TQHBox(this);
 	filterBar->setSpacing(5);
 	filterBar->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
@@ -97,25 +94,19 @@ View::View(TQWidget *parent) :
 	label->setBuddy(searchFilter);
 	
 	toggleFilterBar();
-#endif
 	
 	
 	this->initLogList();
 
-
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
 	//We initialize the table after, after the initialization of the table
 	search->setListView(table);
 	
 	//Connect the pressed signal of the clear button to the clear slot of "clear"
 	connect(clearSearch, TQ_SIGNAL(pressed()), search, TQ_SLOT(clear()));
-#endif
-
 }
 
 
 View::~View() {
-#if defined(TDE_MAKE_VERSION) && (TDE_VERSION >= TDE_MAKE_VERSION(3,3,0))
 	delete clearSearch;
 	
 	delete search;
@@ -123,7 +114,6 @@ View::~View() {
 	delete searchFilter;
 
 	delete filterBar;
-#endif
 	
 	kdDebug() << "Destroying View" << endl;
 }
@@ -154,13 +144,11 @@ bool View::isTooltipEnabled() {
 }
 
 void View::toggleFilterBar() {
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
 	//The newly created bar is only displayed if the config file allow it
 	if (KSystemLogConfig::toggleFilterBar()==true)
 		filterBar->show();
 	else
 		filterBar->hide();
-#endif
 }
 
 
@@ -244,7 +232,6 @@ void View::setLastItemSelected() {
 }
 
 void View::updateSearchFilter() {
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
 	//We first delete all items
 	int count=searchFilter->count() - 1;
 	while (count>=0) {
@@ -266,7 +253,6 @@ void View::updateSearchFilter() {
 	}
 
 	searchFilter->setCurrentItem(0);
-#endif
 }
 
 
@@ -361,7 +347,6 @@ void View::setSortEnabled(bool enabled) {
 }
 
 void View::initSearchFilter(TQWidget* filterBox) {
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
 	searchFilter=new TQComboBox(filterBox);
 		
 	TQWhatsThis::add(searchFilter, i18n("<qt>Allows you to apply the item filter only on the specified column here. \"<i>All</i>\" column means no specific filter.</qt>"));
@@ -375,8 +360,6 @@ void View::initSearchFilter(TQWidget* filterBox) {
 	connect(searchFilter, TQ_SIGNAL(activated(int)), search, TQ_SLOT(setFocus()));
 	connect(searchFilter, TQ_SIGNAL(activated(int)), this, TQ_SLOT(changeColumnFilter(int)));
 	connect(searchFilter, TQ_SIGNAL(activated(int)), search, TQ_SLOT(updateSearch()));
-#endif
-
 }
 
 
@@ -403,7 +386,6 @@ TDEListView* View::getLogList() {
 
 
 void View::changeColumnFilter(int column) {
-#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
 	TQValueList<int> filterColumns;
 	
 	//The user select all columns
@@ -430,7 +412,6 @@ void View::changeColumnFilter(int column) {
 	}
 	
 	//search->updateSearch();
-#endif
 }
 
 
diff --git a/ksystemlog/src/view.h b/ksystemlog/src/view.h
index 8bd4082..8a9864c 100644
--- a/ksystemlog/src/view.h
+++ b/ksystemlog/src/view.h
@@ -31,13 +31,7 @@
 #include <kicondialog.h>
 #include <tdelistview.h>
 
-//For compatibility with old versions of KDE
-#include <tdeversion.h>
-
-//The filter is activated only if KDE version >= 3.3
-#if defined(TDE_MAKE_VERSION) && (TDE_VERSION >= TDE_MAKE_VERSION(3,3,0))
 #include "logLineFilter.h"
-#endif
 
 #include <tdeconfig.h>
 
@@ -167,7 +161,6 @@ class View : public TQWidget, public KSystemLogInterface {
 		 */
 		TDEListView* table;
 		
-#if defined(TDE_MAKE_VERSION) && (TDE_VERSION >= TDE_MAKE_VERSION(3,3,0))
 		TQHBox* filterBar;
 		
 		TDEToolBarButton* clearSearch;
@@ -181,9 +174,6 @@ class View : public TQWidget, public KSystemLogInterface {
 		 * Filter of the column list
 		 */
 		TQComboBox* searchFilter;
-#endif
-
-	
 };
 
 #endif // VIEW_H
-- 
cgit v1.2.3

