Drop TQT_BASE_OBJECT* defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/6/head
Michele Calgaro 1 year ago
parent 6ce4e62349
commit 06e303d75a
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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());

@ -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);

@ -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

Loading…
Cancel
Save