diff options
author | Michele Calgaro <[email protected]> | 2023-08-12 18:45:19 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-08-15 20:28:52 +0900 |
commit | 3d297171d72202d45020af005b80100e10013365 (patch) | |
tree | 2396efab17705aeaee28d0317c5c5c411ef3dd54 | |
parent | 70482cdde8d7ed05f7ab2871470cefed68abc27b (diff) | |
download | ksystemlog-3d297171d72202d45020af005b80100e10013365.tar.gz ksystemlog-3d297171d72202d45020af005b80100e10013365.zip |
Drop TQT_BASE_OBJECT* defines
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit 06e303d75a7afefd8420abbd71c28de443c96807)
-rw-r--r-- | ksystemlog/src/ksystemlog.cpp | 7 | ||||
-rw-r--r-- | ksystemlog/src/ksystemlog.h | 7 | ||||
-rw-r--r-- | ksystemlog/src/slotLogAction.cpp | 18 |
3 files changed, 2 insertions, 30 deletions
diff --git a/ksystemlog/src/ksystemlog.cpp b/ksystemlog/src/ksystemlog.cpp index 66231bc..d0f2b47 100644 --- a/ksystemlog/src/ksystemlog.cpp +++ b/ksystemlog/src/ksystemlog.cpp @@ -937,12 +937,7 @@ TDEToggleAction* KSystemLog::getLogAction(const char* name) { return( static_cast<TDEToggleAction*> (actionCollection()->action(name)) ); } -#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,4,0) void KSystemLog::logActionClicked(const TQObject* sender, TDEAction::ActivationReason reason, TQt::ButtonState state) { -#else -void KSystemLog::logActionClicked(const TQObject* sender) { -#endif - TDEToggleAction* action=getLogAction(sender->name()); LogMode* mode=mapActionLogModes[action]; @@ -954,10 +949,8 @@ void KSystemLog::logActionClicked(const TQObject* sender) { //TODO Be sure that the + is the right symbol to combine TQt Constants //If the user uses the middle button OR left button + shift OR left button + control : = it opens the log in a new tab -#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,4,0) if (state==Qt::MidButton || (state==TQt::ControlButton+Qt::LeftButton) || (state==TQt::ShiftButton+Qt::LeftButton)) newTab(); -#endif this->load(mode, activeLogManager()); diff --git a/ksystemlog/src/ksystemlog.h b/ksystemlog/src/ksystemlog.h index e77b89e..541c2a5 100644 --- a/ksystemlog/src/ksystemlog.h +++ b/ksystemlog/src/ksystemlog.h @@ -107,14 +107,7 @@ class KSystemLog : public TDEMainWindow { void setCurrentLogManager(LogManager* view); - -#if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,4,0) - //Actual KDE method void logActionClicked(const TQObject* sender, TDEAction::ActivationReason reason, TQt::ButtonState state); -#else - //Method for old versions of KDE - void logActionClicked(const TQObject* sender); -#endif void load(LogMode* logMode, LogManager* manager); diff --git a/ksystemlog/src/slotLogAction.cpp b/ksystemlog/src/slotLogAction.cpp index 146e7c3..94ff7e6 100644 --- a/ksystemlog/src/slotLogAction.cpp +++ b/ksystemlog/src/slotLogAction.cpp @@ -36,25 +36,11 @@ SlotLogAction::SlotLogAction(KSystemLog* p) : } -#if defined(TDE_MAKE_VERSION) && (TDE_VERSION >= TDE_MAKE_VERSION(3,4,0)) void SlotLogAction::slotLogAction(TDEAction::ActivationReason reason, TQt::ButtonState state) { - const TQObject* sender=TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(TQObject::sender())); + const TQObject* sender=TQT_TQOBJECT(TQObject::sender()); //We can call the correct method from KSystemLog, which manage the two parameters parent->logActionClicked(sender, reason, state); } -#else -void SlotLogAction::slotLogAction() { - const TQObject* sender=TQObject::sender(); - - //In the other case, We can only call the method from KSystemLog, which keeps compatibility - parent->logActionClicked(sender); -} -#endif -//Include the right MOC file, depending of the version of KDE -#if defined(TDE_MAKE_VERSION) && (TDE_VERSION >= TDE_MAKE_VERSION(3,4,0)) - #include "slotLogAction.moc" -#else - #include "slotLogActionCompatibility.moc" -#endif +#include "slotLogAction.moc" |