summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-08-02 18:49:56 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-08-02 18:49:56 (GMT)
commitf7e0c20b5a1596d1adcc8b0c688ca005522fe0f1 (patch)
tree3b78baa28457f43c775a32d6b4f5da9517e4256a /Swift/Controllers
parentdb698bbb6d8c7e878e2cb997e18e572f3646e11d (diff)
downloadswift-f7e0c20b5a1596d1adcc8b0c688ca005522fe0f1.zip
swift-f7e0c20b5a1596d1adcc8b0c688ca005522fe0f1.tar.bz2
Small style fixes for the previous patch.
Change-Id: I0c9a0865e25a9b0cdc760998dadc7026df16dbfe
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp5
-rw-r--r--Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp6
-rw-r--r--Swift/Controllers/UnitTest/MockChatWindow.h16
3 files changed, 12 insertions, 15 deletions
diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
index 06c1b84..77a1cda 100644
--- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
+++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
@@ -111,8 +111,7 @@ public:
mocks_->ExpectCall(chatListWindowFactory_, ChatListWindowFactory::createChatListWindow).With(uiEventStream_).Return(chatListWindow_);
clientBlockListManager_ = new ClientBlockListManager(iqRouter_);
- emoticons_ = new std::map<std::string, std::string>();
- manager_ = new ChatsManager(jid_, stanzaChannel_, iqRouter_, eventController_, chatWindowFactory_, joinMUCWindowFactory_, nickResolver_, presenceOracle_, directedPresenceSender_, uiEventStream_, chatListWindowFactory_, true, NULL, mucRegistry_, entityCapsManager_, mucManager_, mucSearchWindowFactory_, profileSettings_, ftOverview_, xmppRoster_, false, settings_, NULL, wbManager_, highlightManager_, clientBlockListManager_, emoticons_);
+ manager_ = new ChatsManager(jid_, stanzaChannel_, iqRouter_, eventController_, chatWindowFactory_, joinMUCWindowFactory_, nickResolver_, presenceOracle_, directedPresenceSender_, uiEventStream_, chatListWindowFactory_, true, NULL, mucRegistry_, entityCapsManager_, mucManager_, mucSearchWindowFactory_, profileSettings_, ftOverview_, xmppRoster_, false, settings_, NULL, wbManager_, highlightManager_, clientBlockListManager_, &emoticons_);
manager_->setAvatarManager(avatarManager_);
}
@@ -489,7 +488,7 @@ private:
WhiteboardManager* wbManager_;
HighlightManager* highlightManager_;
ClientBlockListManager* clientBlockListManager_;
- std::map<std::string, std::string>* emoticons_;
+ std::map<std::string, std::string> emoticons_;
};
CPPUNIT_TEST_SUITE_REGISTRATION(ChatsManagerTest);
diff --git a/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp b/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
index 287fbd3..cf6c581 100644
--- a/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
+++ b/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
@@ -67,8 +67,7 @@ public:
highlightManager_ = new HighlightManager(settings_);
muc_ = boost::make_shared<MUC>(stanzaChannel_, iqRouter_, directedPresenceSender_, mucJID_, mucRegistry_);
mocks_->ExpectCall(chatWindowFactory_, ChatWindowFactory::createChatWindow).With(muc_->getJID(), uiEventStream_).Return(window_);
- emoticons_ = new std::map<std::string, std::string>();
- controller_ = new MUCController (self_, muc_, boost::optional<std::string>(), nick_, stanzaChannel_, iqRouter_, chatWindowFactory_, presenceOracle_, avatarManager_, uiEventStream_, false, timerFactory, eventController_, entityCapsProvider_, NULL, NULL, mucRegistry_, highlightManager_, emoticons_);
+ controller_ = new MUCController (self_, muc_, boost::optional<std::string>(), nick_, stanzaChannel_, iqRouter_, chatWindowFactory_, presenceOracle_, avatarManager_, uiEventStream_, false, timerFactory, eventController_, entityCapsProvider_, NULL, NULL, mucRegistry_, highlightManager_, &emoticons_);
}
void tearDown() {
@@ -87,7 +86,6 @@ public:
delete iqChannel_;
delete mucRegistry_;
delete avatarManager_;
- delete emoticons_;
}
void finishJoin() {
@@ -347,7 +345,7 @@ private:
DummyEntityCapsProvider* entityCapsProvider_;
DummySettingsProvider* settings_;
HighlightManager* highlightManager_;
- std::map<std::string, std::string>* emoticons_;
+ std::map<std::string, std::string> emoticons_;
};
CPPUNIT_TEST_SUITE_REGISTRATION(MUCControllerTest);
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h
index fbfea93..74478d5 100644
--- a/Swift/Controllers/UnitTest/MockChatWindow.h
+++ b/Swift/Controllers/UnitTest/MockChatWindow.h
@@ -19,17 +19,17 @@ namespace Swift {
virtual ~MockChatWindow();
virtual std::string addMessage(const ChatMessage& message, const std::string& /*senderName*/, bool /*senderIsSelf*/, boost::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {
- lastMessageBody_ = bodyFromMessage(message); return "id";};
+ lastMessageBody_ = bodyFromMessage(message); return "id";}
- virtual std::string addAction(const ChatMessage& /*message*/, const std::string& /*senderName*/, bool /*senderIsSelf*/, boost::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {return "id";};
+ virtual std::string addAction(const ChatMessage& /*message*/, const std::string& /*senderName*/, bool /*senderIsSelf*/, boost::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {return "id";}
- virtual void addSystemMessage(const ChatMessage& /*message*/, Direction /*direction*/) {};
- virtual void addPresenceMessage(const ChatMessage& /*message*/, Direction /*direction*/) {};
+ virtual void addSystemMessage(const ChatMessage& /*message*/, Direction /*direction*/) {}
+ virtual void addPresenceMessage(const ChatMessage& /*message*/, Direction /*direction*/) {}
- virtual void addErrorMessage(const ChatMessage& /*message*/) {};
- virtual void replaceMessage(const ChatMessage& /*message*/, const std::string& /*id*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {};
- virtual void replaceWithAction(const ChatMessage& /*message*/, const std::string& /*id*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {};
- virtual void replaceLastMessage(const ChatMessage& /*message*/) {};
+ virtual void addErrorMessage(const ChatMessage& /*message*/) {}
+ virtual void replaceMessage(const ChatMessage& /*message*/, const std::string& /*id*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {}
+ virtual void replaceWithAction(const ChatMessage& /*message*/, const std::string& /*id*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {}
+ virtual void replaceLastMessage(const ChatMessage& /*message*/) {}
// File transfer related stuff
virtual std::string addFileTransfer(const std::string& /*senderName*/, bool /*senderIsSelf*/,const std::string& /*filename*/, const boost::uintmax_t /*sizeInBytes*/) { return 0; }