1
/***************************************************************************
2
* Copyright (C) 2005 by Nicolas Ternisien *
3
* nicolas.ternisien@gmail.com *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
22
//For compatibility with old versions of KDE
23
#include <kdeversion.h>
25
#include "ksystemlog.h"
27
//Include the right header, depending of the version of KDE
28
#if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,4,0))
29
#include "slotLogAction.h"
31
#include "slotLogActionCompatibility.h"
34
SlotLogAction::SlotLogAction(KSystemLog* p) :
39
#if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,4,0))
40
void SlotLogAction::slotLogAction(KAction::ActivationReason reason, Qt::ButtonState state) {
41
const QObject* sender=QObject::sender();
43
//We can call the correct method from KSystemLog, which manage the two parameters
44
parent->logActionClicked(sender, reason, state);
47
void SlotLogAction::slotLogAction() {
48
const QObject* sender=QObject::sender();
50
//In the other case, We can only call the method from KSystemLog, which keeps compatibility
51
parent->logActionClicked(sender);
55
//Include the right MOC file, depending of the version of KDE
56
#if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,4,0))
57
#include "slotLogAction.moc"
59
#include "slotLogActionCompatibility.moc"