diff options
author | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
commit | cfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch) | |
tree | 18d94153a302445196fc0c18586abf44a1ce4a38 /Swift/Controllers/EventWindowController.cpp | |
parent | 1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff) | |
download | swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2 |
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines
in the process.
Changed CheckTabs.py tool to disallow hard tabs in source
files.
Test-Information:
Manually checked 30 random files that the conversion worked
as expected.
Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Swift/Controllers/EventWindowController.cpp')
-rw-r--r-- | Swift/Controllers/EventWindowController.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp index 91fedd2..2739a87 100644 --- a/Swift/Controllers/EventWindowController.cpp +++ b/Swift/Controllers/EventWindowController.cpp @@ -14,41 +14,41 @@ namespace Swift { EventWindowController::EventWindowController(EventController* eventController, EventWindowFactory* windowFactory) { - eventController_ = eventController; - windowFactory_ = windowFactory; - window_ = windowFactory_->createEventWindow(); - eventAddedConnection_ = eventController_->onEventQueueEventAdded.connect(boost::bind(&EventWindowController::handleEventQueueEventAdded, this, _1)); + eventController_ = eventController; + windowFactory_ = windowFactory; + window_ = windowFactory_->createEventWindow(); + eventAddedConnection_ = eventController_->onEventQueueEventAdded.connect(boost::bind(&EventWindowController::handleEventQueueEventAdded, this, _1)); } EventWindowController::~EventWindowController() { - if (window_->canDelete()) { - delete window_; - } + if (window_->canDelete()) { + delete window_; + } } void EventWindowController::handleEventQueueEventAdded(boost::shared_ptr<StanzaEvent> event) { - if (event->getConcluded()) { - handleEventConcluded(event); - } else { - boost::shared_ptr<MessageEvent> message = boost::dynamic_pointer_cast<MessageEvent>(event); - if (!(message && message->isReadable())) { - event->onConclusion.connect(boost::bind(&EventWindowController::handleEventConcluded, this, event)); - window_->addEvent(event, true); - } - } + if (event->getConcluded()) { + handleEventConcluded(event); + } else { + boost::shared_ptr<MessageEvent> message = boost::dynamic_pointer_cast<MessageEvent>(event); + if (!(message && message->isReadable())) { + event->onConclusion.connect(boost::bind(&EventWindowController::handleEventConcluded, this, event)); + window_->addEvent(event, true); + } + } } void EventWindowController::handleEventConcluded(boost::shared_ptr<StanzaEvent> event) { - window_->removeEvent(event); - bool includeAsCompleted = true; - /* Because subscription requests get duplicated, don't add them back */ - if (boost::dynamic_pointer_cast<SubscriptionRequestEvent>(event) || boost::dynamic_pointer_cast<MessageEvent>(event)) { - includeAsCompleted = false; - } - if (includeAsCompleted) { - window_->addEvent(event, false); - } - event->onConclusion.disconnect(boost::bind(&EventWindowController::handleEventConcluded, this, event)); + window_->removeEvent(event); + bool includeAsCompleted = true; + /* Because subscription requests get duplicated, don't add them back */ + if (boost::dynamic_pointer_cast<SubscriptionRequestEvent>(event) || boost::dynamic_pointer_cast<MessageEvent>(event)) { + includeAsCompleted = false; + } + if (includeAsCompleted) { + window_->addEvent(event, false); + } + event->onConclusion.disconnect(boost::bind(&EventWindowController::handleEventConcluded, this, event)); } } |