From 295752d2ee63c60bc7e5cc3b07b6c4b6b7f3ddd3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 7 Nov 2024 19:41:39 +0900 Subject: [PATCH] Don't use obsolete header kapp.h and remove some old conditional code Signed-off-by: Michele Calgaro (cherry picked from commit 48c5483324a52bc94394a7f6fc25b8312a644d04) --- kkbswitch/boldmenuitem.cpp | 6 +----- kkbswitch/kbconfig.cpp | 9 ++------- kkbswitch/kbconfigdlg.cpp | 6 +----- kkbswitch/kbpickicondlg.cpp | 6 +----- kkbswitch/kbswitchintf.cpp | 1 - kkbswitch/kbswitchtrayicon.cpp | 23 +++++------------------ 6 files changed, 10 insertions(+), 41 deletions(-) diff --git a/kkbswitch/boldmenuitem.cpp b/kkbswitch/boldmenuitem.cpp index ab9abbc..8162e8b 100644 --- a/kkbswitch/boldmenuitem.cpp +++ b/kkbswitch/boldmenuitem.cpp @@ -23,11 +23,7 @@ #include #include #include -#if TDE_VERSION_MAJOR >= 3 - #include -#else - #include -#endif +#include BoldMenuItem::BoldMenuItem(const TQString &text, const TQColor &active_text_color, diff --git a/kkbswitch/kbconfig.cpp b/kkbswitch/kbconfig.cpp index f2e7fff..9c8c64d 100644 --- a/kkbswitch/kbconfig.cpp +++ b/kkbswitch/kbconfig.cpp @@ -21,13 +21,8 @@ #include #include #include -#if TDE_VERSION_MAJOR >= 3 - #include - #include -#else - #include - #include -#endif +#include +#include #include #include #include diff --git a/kkbswitch/kbconfigdlg.cpp b/kkbswitch/kbconfigdlg.cpp index 84475f0..44d3bb6 100644 --- a/kkbswitch/kbconfigdlg.cpp +++ b/kkbswitch/kbconfigdlg.cpp @@ -35,11 +35,7 @@ #include #include #include -#if TDE_VERSION_MAJOR >= 3 - #include -#else - #include -#endif +#include #include #include #include diff --git a/kkbswitch/kbpickicondlg.cpp b/kkbswitch/kbpickicondlg.cpp index a9a15f4..f21cde6 100644 --- a/kkbswitch/kbpickicondlg.cpp +++ b/kkbswitch/kbpickicondlg.cpp @@ -25,11 +25,7 @@ #include #include -#if TDE_VERSION_MAJOR >= 3 - #include -#else - #include -#endif +#include #include #include #include diff --git a/kkbswitch/kbswitchintf.cpp b/kkbswitch/kbswitchintf.cpp index a3f1d4d..826a3d3 100644 --- a/kkbswitch/kbswitchintf.cpp +++ b/kkbswitch/kbswitchintf.cpp @@ -16,7 +16,6 @@ ***************************************************************************/ #include "kbswitchintf.h" -//#include KBSwitchIntf::KBSwitchIntf(TQObject *parent, KBConfig *conf) : TQObject(parent, "KBSwitchIntf"), DCOPObject("KBSwitchIntf") diff --git a/kkbswitch/kbswitchtrayicon.cpp b/kkbswitch/kbswitchtrayicon.cpp index 057d3ab..76ebfc9 100644 --- a/kkbswitch/kbswitchtrayicon.cpp +++ b/kkbswitch/kbswitchtrayicon.cpp @@ -25,20 +25,12 @@ #include "boldmenuitem.h" #endif #include -#if TDE_VERSION_MAJOR >= 3 - #include -#else - #include -#endif +#include #include #include #include #include -#if TDE_VERSION_MAJOR >= 3 - #include -#else - #include -#endif +#include #include #include #include @@ -64,12 +56,7 @@ static TQColor getActiveTextColor(TDEPopupMenu *menu) KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){ TQPixmap pix; -#if TDE_VERSION_MAJOR >= 3 TDEActionCollection *actions = new TDEActionCollection(this); - #define ACTION_PARENT actions -#else - #define ACTION_PARENT this -#endif m_kbconf = conf; //TQObject::connect(conf, TQ_SIGNAL(changed()), this, TQ_SLOT(updateMenuIcons())); @@ -78,11 +65,11 @@ KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){ TQObject::connect(menu, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotMenuActivated(int))); menu->insertSeparator(); - TDEAction *pref = KStdAction::preferences(this, TQ_SIGNAL(preferencesSelected()), ACTION_PARENT); + TDEAction *pref = KStdAction::preferences(this, TQ_SIGNAL(preferencesSelected()), actions); pref->plug(menu); - TDEAction *help = KStdAction::help(this, TQ_SLOT(slotHelp()), ACTION_PARENT); + TDEAction *help = KStdAction::help(this, TQ_SLOT(slotHelp()), actions); help->plug(menu); - TDEAction *about = KStdAction::aboutApp(this, TQ_SLOT(slotAbout()), ACTION_PARENT); + TDEAction *about = KStdAction::aboutApp(this, TQ_SLOT(slotAbout()), actions); about->plug(menu); /*TQString path = locate("icon", "hicolor/16x16/apps/locale.png");