summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-11-07 19:41:39 +0900
committerMichele Calgaro <[email protected]>2024-11-07 19:49:05 +0900
commit48c5483324a52bc94394a7f6fc25b8312a644d04 (patch)
treeab12c2e8f287004df852e74dcf55f8f638d4194d
parent6f13f99328f451f3b769e5a1fd85b6bd8945725e (diff)
downloadkkbswitch-48c5483324a52bc94394a7f6fc25b8312a644d04.tar.gz
kkbswitch-48c5483324a52bc94394a7f6fc25b8312a644d04.zip
Don't use obsolete header kapp.h and remove some old conditional code
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r--kkbswitch/boldmenuitem.cpp6
-rw-r--r--kkbswitch/kbconfig.cpp9
-rw-r--r--kkbswitch/kbconfigdlg.cpp6
-rw-r--r--kkbswitch/kbpickicondlg.cpp6
-rw-r--r--kkbswitch/kbswitchintf.cpp1
-rw-r--r--kkbswitch/kbswitchtrayicon.cpp23
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 <kdebug.h>
#include <tdeglobalsettings.h>
#include <tdeversion.h>
-#if TDE_VERSION_MAJOR >= 3
- #include <tdeapplication.h>
-#else
- #include <kapp.h>
-#endif
+#include <tdeapplication.h>
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 <tdeversion.h>
#include <tdelocale.h>
#include <tdeglobal.h>
-#if TDE_VERSION_MAJOR >= 3
- #include <kstandarddirs.h>
- #include <tdeapplication.h>
-#else
- #include <kstddirs.h>
- #include <kapp.h>
-#endif
+#include <kstandarddirs.h>
+#include <tdeapplication.h>
#include <tdeglobalsettings.h>
#include <kdebug.h>
#include <kglobalaccel.h>
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 <tdelistbox.h>
#include <tdelocale.h>
#include <kdebug.h>
-#if TDE_VERSION_MAJOR >= 3
- #include <tdeapplication.h>
-#else
- #include <kapp.h>
-#endif
+#include <tdeapplication.h>
#include <tdelistview.h>
#include <kkeydialog.h>
#include <tdeconfig.h>
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 <tdeversion.h>
#include <tdelocale.h>
-#if TDE_VERSION_MAJOR >= 3
- #include <kstandarddirs.h>
-#else
- #include <kstddirs.h>
-#endif
+#include <kstandarddirs.h>
#include <tdeglobal.h>
#include <tdefiledialog.h>
#include <tdemessagebox.h>
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 <kapp.h>
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 <tdepopupmenu.h>
-#if TDE_VERSION_MAJOR >= 3
- #include <kstandarddirs.h>
-#else
- #include <kstddirs.h>
-#endif
+#include <kstandarddirs.h>
#include <tdelocale.h>
#include <kstdaction.h>
#include <tdeaction.h>
#include <tdeaboutapplication.h>
-#if TDE_VERSION_MAJOR >= 3
- #include <tdeapplication.h>
-#else
- #include <kapp.h>
-#endif
+#include <tdeapplication.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <tdeversion.h>
@@ -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");