From 8f136a546721f54c9792cd490bba4e07f2a072cf Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Sat, 6 Mar 2010 12:48:02 +0000 Subject: [PATCH] Remove unused SignalSlot files per Abdel's suggestion git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33637 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/Makefile.am | 6 +-- src/support/SignalSlot.cpp | 74 ------------------------------- src/support/SignalSlot.h | 51 --------------------- src/support/SignalSlotPrivate.cpp | 17 ------- src/support/SignalSlotPrivate.h | 47 -------------------- 5 files changed, 1 insertion(+), 194 deletions(-) delete mode 100644 src/support/SignalSlot.cpp delete mode 100644 src/support/SignalSlot.h delete mode 100644 src/support/SignalSlotPrivate.cpp delete mode 100644 src/support/SignalSlotPrivate.h diff --git a/src/support/Makefile.am b/src/support/Makefile.am index e443622203..6917051095 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -12,7 +12,7 @@ BUILT_SOURCES = $(PCH_FILE) ######################### Qt stuff ############################# # -MOCHEADER = SignalSlotPrivate.h SystemcallPrivate.h +MOCHEADER = SystemcallPrivate.h MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp) @@ -85,10 +85,6 @@ liblyxsupport_a_SOURCES = \ strfwd.h \ Systemcall.cpp \ Systemcall.h \ - SignalSlot.cpp \ - SignalSlot.h \ - SignalSlotPrivate.cpp \ - SignalSlotPrivate.h \ SystemcallPrivate.h \ textutils.h \ Translator.h \ diff --git a/src/support/SignalSlot.cpp b/src/support/SignalSlot.cpp deleted file mode 100644 index c1d27a8cc7..0000000000 --- a/src/support/SignalSlot.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// -*- C++ -*- -/** - * \file SignalSlot.cpp - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author André Pönitz - * - * Full author contact details are available in file CREDITS. - */ - -#include - -#include "support/SignalSlot.h" -#include "support/SignalSlotPrivate.h" - -namespace lyx { - -///////////////////////////////////////////////////////////////////// -// -// Signal -// -///////////////////////////////////////////////////////////////////// - -Signal::Signal() - : impl(new SignalImpl) -{} - - -Signal::~Signal() -{ - delete impl; -} - - -void Signal::fire() -{ - impl->fire(); -} - - -///////////////////////////////////////////////////////////////////// -// -// Slot -// -///////////////////////////////////////////////////////////////////// - -void SlotImpl::called() -{ - owner_.called(); -} - -Slot::Slot() - : impl(new SlotImpl(*this)) -{} - -Slot::~Slot() -{ - delete impl; -} - - -///////////////////////////////////////////////////////////////////// -// -// Connect -// -///////////////////////////////////////////////////////////////////// - -void connect(Signal & sig, Slot & slot) -{ - QObject::connect(sig.impl, SIGNAL(fire()), slot.impl, SLOT(called())); -} - -} // namespace lyx diff --git a/src/support/SignalSlot.h b/src/support/SignalSlot.h deleted file mode 100644 index 4290a40770..0000000000 --- a/src/support/SignalSlot.h +++ /dev/null @@ -1,51 +0,0 @@ -// -*- C++ -*- -/** - * \file SignalSlot.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author André Pönitz - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef SIGNALSLOT_H -#define SIGNALSLOT_H - -namespace lyx { - -class Slot; -class SlotImpl; -class SignalImpl; - -class Signal -{ -public: - Signal(); - ~Signal(); - void fire(); -private: - Signal(Signal const &); - void operator=(Signal const &); - SignalImpl * impl; - friend void connect(Signal & sig, Slot & slot); -}; - -class Slot -{ -public: - Slot(); - virtual ~Slot(); - virtual void called() {} -private: - Slot(Slot const &); - void operator=(Slot const &); - SlotImpl * impl; - friend void connect(Signal & sig, Slot & slot); -}; - -void connect(Signal & sig, Slot & slot); - -} // namespace lyx - -#endif diff --git a/src/support/SignalSlotPrivate.cpp b/src/support/SignalSlotPrivate.cpp deleted file mode 100644 index b89567b862..0000000000 --- a/src/support/SignalSlotPrivate.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// -*- C++ -*- -/** - * \file SignalSlotPrivate.cpp - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author André Pönitz - * - * Full author contact details are available in file CREDITS. - */ - -#include - -// trigger moc -#include "SignalSlotPrivate.h" -#include "moc_SignalSlotPrivate.cpp" - diff --git a/src/support/SignalSlotPrivate.h b/src/support/SignalSlotPrivate.h deleted file mode 100644 index 555005454d..0000000000 --- a/src/support/SignalSlotPrivate.h +++ /dev/null @@ -1,47 +0,0 @@ -// -*- C++ -*- -/** - * \file SignalSlotPrivate.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author André Pönitz - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef SIGNALSLOTPRIVATE_H -#define SIGNALSLOTPRIVATE_H - -#include - -namespace lyx { - -class SignalImpl : public QObject -{ - Q_OBJECT -public: - SignalImpl() {} - virtual ~SignalImpl() {} - -Q_SIGNALS: - void fire(); - friend class Signal; -}; - - -class Slot; -class SlotImpl : public QObject -{ - Q_OBJECT -public: - SlotImpl(Slot & owner) : owner_(owner) {} - virtual ~SlotImpl() {} -public Q_SLOTS: - void called(); -private: - Slot & owner_; -}; - -} // namespace lyx - -#endif // SIGNALSLOTPRIVATE_H -- 2.39.2