summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/BlockListController.cpp8
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp2
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp20
-rw-r--r--Swift/Controllers/Chat/ChatsManager.h4
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp10
-rw-r--r--Swift/Controllers/Chat/MUCSearchController.cpp2
-rw-r--r--Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp10
-rw-r--r--Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp4
-rw-r--r--Swift/Controllers/Chat/UserSearchController.cpp6
-rw-r--r--Swift/Controllers/ContactEditController.cpp2
-rw-r--r--Swift/Controllers/FileTransfer/FileTransferController.cpp6
-rw-r--r--Swift/Controllers/FileTransferListController.cpp6
-rw-r--r--Swift/Controllers/HighlightEditorController.cpp4
-rw-r--r--Swift/Controllers/HistoryViewController.cpp12
-rw-r--r--Swift/Controllers/MainController.cpp110
-rw-r--r--Swift/Controllers/ProfileController.cpp4
-rw-r--r--Swift/Controllers/Roster/GroupRosterItem.cpp4
-rw-r--r--Swift/Controllers/Roster/Roster.cpp4
-rw-r--r--Swift/Controllers/Roster/RosterController.cpp6
-rw-r--r--Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp4
-rw-r--r--Swift/Controllers/Storages/FileStorages.cpp4
-rw-r--r--Swift/Controllers/UnitTest/MockChatWindow.h2
-rw-r--r--Swift/Controllers/UnitTest/MockMainWindow.h4
-rw-r--r--Swift/Controllers/UnitTest/MockMainWindowFactory.h2
-rw-r--r--Swift/Controllers/UnitTest/PresenceNotifierTest.cpp4
-rw-r--r--Swift/Controllers/WhiteboardManager.cpp10
-rw-r--r--Swift/Controllers/XMLConsoleController.cpp6
27 files changed, 130 insertions, 130 deletions
diff --git a/Swift/Controllers/BlockListController.cpp b/Swift/Controllers/BlockListController.cpp
index 6fbf6b3..9ed98a8 100644
--- a/Swift/Controllers/BlockListController.cpp
+++ b/Swift/Controllers/BlockListController.cpp
@@ -27,7 +27,7 @@
namespace Swift {
-BlockListController::BlockListController(ClientBlockListManager* blockListManager, UIEventStream* uiEventStream, BlockListEditorWidgetFactory* blockListEditorWidgetFactory, EventController* eventController) : blockListManager_(blockListManager), blockListEditorWidgetFactory_(blockListEditorWidgetFactory), blockListEditorWidget_(0), eventController_(eventController), remainingRequests_(0), uiEventStream_(uiEventStream) {
+BlockListController::BlockListController(ClientBlockListManager* blockListManager, UIEventStream* uiEventStream, BlockListEditorWidgetFactory* blockListEditorWidgetFactory, EventController* eventController) : blockListManager_(blockListManager), blockListEditorWidgetFactory_(blockListEditorWidgetFactory), blockListEditorWidget_(nullptr), eventController_(eventController), remainingRequests_(0), uiEventStream_(uiEventStream) {
uiEventStream->onUIEvent.connect(boost::bind(&BlockListController::handleUIEvent, this, _1));
blockListManager_->getBlockList()->onItemAdded.connect(boost::bind(&BlockListController::handleBlockListChanged, this));
blockListManager_->getBlockList()->onItemRemoved.connect(boost::bind(&BlockListController::handleBlockListChanged, this));
@@ -56,8 +56,8 @@ void BlockListController::blockListDifferences(const std::vector<JID> &newBlockL
void BlockListController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) {
// handle UI dialog
boost::shared_ptr<RequestBlockListDialogUIEvent> requestDialogEvent = boost::dynamic_pointer_cast<RequestBlockListDialogUIEvent>(rawEvent);
- if (requestDialogEvent != NULL) {
- if (blockListEditorWidget_ == NULL) {
+ if (requestDialogEvent != nullptr) {
+ if (blockListEditorWidget_ == nullptr) {
blockListEditorWidget_ = blockListEditorWidgetFactory_->createBlockListEditorWidget();
blockListEditorWidget_->onSetNewBlockList.connect(boost::bind(&BlockListController::handleSetNewBlockList, this, _1));
}
@@ -70,7 +70,7 @@ void BlockListController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) {
// handle block state change
boost::shared_ptr<RequestChangeBlockStateUIEvent> changeStateEvent = boost::dynamic_pointer_cast<RequestChangeBlockStateUIEvent>(rawEvent);
- if (changeStateEvent != NULL) {
+ if (changeStateEvent != nullptr) {
if (changeStateEvent->getBlockState() == RequestChangeBlockStateUIEvent::Blocked) {
GenericRequest<BlockPayload>::ref blockRequest = blockListManager_->createBlockJIDRequest(changeStateEvent->getContact());
blockRequest->onResponse.connect(boost::bind(&BlockListController::handleBlockResponse, this, blockRequest, _1, _2, std::vector<JID>(1, changeStateEvent->getContact()), false));
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index d478e2a..7a3db1e 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -69,7 +69,7 @@ void ChatControllerBase::handleLogCleared() {
ChatWindow* ChatControllerBase::detachChatWindow() {
ChatWindow* chatWindow = chatWindow_;
- chatWindow_ = NULL;
+ chatWindow_ = nullptr;
return chatWindow;
}
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index 32da58a..7a52d9b 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -154,11 +154,11 @@ ChatsManager::ChatsManager(
chatWindowFactory_ = chatWindowFactory;
nickResolver_ = nickResolver;
presenceOracle_ = presenceOracle;
- avatarManager_ = NULL;
+ avatarManager_ = nullptr;
serverDiscoInfo_ = boost::make_shared<DiscoInfo>();
presenceSender_ = presenceSender;
uiEventStream_ = uiEventStream;
- mucBookmarkManager_ = NULL;
+ mucBookmarkManager_ = nullptr;
profileSettings_ = profileSettings;
presenceOracle_->onPresenceChange.connect(boost::bind(&ChatsManager::handlePresenceChange, this, _1));
uiEventConnection_ = uiEventStream_->onUIEvent.connect(boost::bind(&ChatsManager::handleUIEvent, this, _1));
@@ -168,7 +168,7 @@ ChatsManager::ChatsManager(
chatListWindow_->onRecentActivated.connect(boost::bind(&ChatsManager::handleRecentActivated, this, _1));
chatListWindow_->onClearRecentsRequested.connect(boost::bind(&ChatsManager::handleClearRecentsRequested, this));
- joinMUCWindow_ = NULL;
+ joinMUCWindow_ = nullptr;
mucSearchController_ = new MUCSearchController(jid_, mucSearchWindowFactory, iqRouter, profileSettings_);
mucSearchController_->onMUCSelected.connect(boost::bind(&ChatsManager::handleMUCSelectedAfterSearch, this, _1));
ftOverview_->onNewFileTransferController.connect(boost::bind(&ChatsManager::handleNewFileTransferController, this, _1));
@@ -239,7 +239,7 @@ void ChatsManager::saveRecents() {
void ChatsManager::handleClearRecentsRequested() {
recentChats_.clear();
saveRecents();
- handleUnreadCountChanged(NULL);
+ handleUnreadCountChanged(nullptr);
}
void ChatsManager::handleJIDAddedToRoster(const JID &jid) {
@@ -340,7 +340,7 @@ void ChatsManager::loadRecents() {
prependRecent(chat);
}
}
- handleUnreadCountChanged(NULL);
+ handleUnreadCountChanged(nullptr);
}
void ChatsManager::setupBookmarks() {
@@ -419,7 +419,7 @@ void ChatsManager::handleChatActivity(const JID& jid, const std::string& activit
ChatListWindow::Chat chat = createChatListChatItem(jid, activity, privateMessage);
/* FIXME: handle nick changes */
appendRecent(chat);
- handleUnreadCountChanged(NULL);
+ handleUnreadCountChanged(nullptr);
saveRecents();
}
@@ -744,7 +744,7 @@ ChatController* ChatsManager::getChatControllerOrCreate(const JID &contact) {
ChatController* ChatsManager::getChatControllerIfExists(const JID &contact, bool rebindIfNeeded) {
if (chatControllers_.find(contact) == chatControllers_.end()) {
if (mucRegistry_->isMUC(contact.toBare())) {
- return NULL;
+ return nullptr;
}
//Need to look for an unbound window to bind first
JID bare(contact.toBare());
@@ -766,7 +766,7 @@ ChatController* ChatsManager::getChatControllerIfExists(const JID &contact, bool
}
}
}
- return NULL;
+ return nullptr;
}
}
return chatControllers_[contact];
@@ -807,8 +807,8 @@ MUC::ref ChatsManager::handleJoinMUCRequest(const JID &mucJID, const boost::opti
muc->setCreateAsReservedIfNew();
}
- MUCController* controller = NULL;
- SingleChatWindowFactoryAdapter* chatWindowFactoryAdapter = NULL;
+ MUCController* controller = nullptr;
+ SingleChatWindowFactoryAdapter* chatWindowFactoryAdapter = nullptr;
if (reuseChatwindow) {
chatWindowFactoryAdapter = new SingleChatWindowFactoryAdapter(reuseChatwindow);
}
diff --git a/Swift/Controllers/Chat/ChatsManager.h b/Swift/Controllers/Chat/ChatsManager.h
index 7bba219..fa6ab3a 100644
--- a/Swift/Controllers/Chat/ChatsManager.h
+++ b/Swift/Controllers/Chat/ChatsManager.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -89,7 +89,7 @@ namespace Swift {
ChatListWindow::Chat createChatListChatItem(const JID& jid, const std::string& activity, bool privateMessage);
void handleChatRequest(const std::string& contact);
void finalizeImpromptuJoin(MUC::ref muc, const std::vector<JID>& jidsToInvite, const std::string& reason, const boost::optional<JID>& reuseChatJID = boost::optional<JID>());
- MUC::ref handleJoinMUCRequest(const JID& muc, const boost::optional<std::string>& password, const boost::optional<std::string>& nick, bool addAutoJoin, bool createAsReservedIfNew, bool isImpromptu, ChatWindow* reuseChatwindow = 0);
+ MUC::ref handleJoinMUCRequest(const JID& muc, const boost::optional<std::string>& password, const boost::optional<std::string>& nick, bool addAutoJoin, bool createAsReservedIfNew, bool isImpromptu, ChatWindow* reuseChatwindow = nullptr);
void handleSearchMUCRequest();
void handleMUCSelectedAfterSearch(const JID&);
void rebindControllerJID(const JID& from, const JID& to);
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 1e2b7ad..66a655c 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -154,7 +154,7 @@ MUCController::MUCController (
if (stanzaChannel->isAvailable()) {
MUCController::setOnline(true);
}
- if (avatarManager_ != NULL) {
+ if (avatarManager_ != nullptr) {
avatarChangedConnection_ = (avatarManager_->onAvatarChanged.connect(boost::bind(&MUCController::handleAvatarChanged, this, _1)));
}
MUCController::handleBareJIDCapsChanged(muc->getJID());
@@ -177,13 +177,13 @@ MUCController::MUCController (
MUCController::~MUCController() {
eventStream_->onUIEvent.disconnect(boost::bind(&MUCController::handleUIEvent, this, _1));
- chatWindow_->setRosterModel(NULL);
+ chatWindow_->setRosterModel(nullptr);
delete rosterVCardProvider_;
delete roster_;
if (loginCheckTimer_) {
loginCheckTimer_->stop();
}
- chatWindow_->setTabComplete(NULL);
+ chatWindow_->setTabComplete(nullptr);
delete completer_;
}
@@ -465,7 +465,7 @@ void MUCController::handleOccupantJoined(const MUCOccupant& occupant) {
onActivity("");
}
}
- if (avatarManager_ != NULL) {
+ if (avatarManager_ != nullptr) {
handleAvatarChanged(jid);
}
}
@@ -780,7 +780,7 @@ void MUCController::handleOccupantNicknameChanged(const std::string& oldNickname
std::string groupName(roleToGroupName(role));
roster_->addContact(newJID, realJID, newNickname, groupName, avatarManager_->getAvatarPath(newJID));
roster_->applyOnItems(SetMUC(newJID, role, affiliation));
- if (avatarManager_ != NULL) {
+ if (avatarManager_ != nullptr) {
handleAvatarChanged(newJID);
}
diff --git a/Swift/Controllers/Chat/MUCSearchController.cpp b/Swift/Controllers/Chat/MUCSearchController.cpp
index 884978c..4f28058 100644
--- a/Swift/Controllers/Chat/MUCSearchController.cpp
+++ b/Swift/Controllers/Chat/MUCSearchController.cpp
@@ -25,7 +25,7 @@ namespace Swift {
static const std::string SEARCHED_SERVICES = "searchedServices";
-MUCSearchController::MUCSearchController(const JID& jid, MUCSearchWindowFactory* factory, IQRouter* iqRouter, ProfileSettingsProvider* settings) : jid_(jid), factory_(factory), iqRouter_(iqRouter), settings_(settings), window_(NULL), walker_(NULL) {
+MUCSearchController::MUCSearchController(const JID& jid, MUCSearchWindowFactory* factory, IQRouter* iqRouter, ProfileSettingsProvider* settings) : jid_(jid), factory_(factory), iqRouter_(iqRouter), settings_(settings), window_(nullptr), walker_(nullptr) {
itemsInProgress_ = 0;
loadSavedServices();
}
diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
index 7445c4b..92a8ca0 100644
--- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
+++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
@@ -95,7 +95,7 @@ public:
joinMUCWindowFactory_ = mocks_->InterfaceMock<JoinMUCWindowFactory>();
xmppRoster_ = new XMPPRosterImpl();
mucRegistry_ = new MUCRegistry();
- nickResolver_ = new NickResolver(jid_.toBare(), xmppRoster_, NULL, mucRegistry_);
+ nickResolver_ = new NickResolver(jid_.toBare(), xmppRoster_, nullptr, mucRegistry_);
presenceOracle_ = new PresenceOracle(stanzaChannel_, xmppRoster_);
serverDiscoInfo_ = boost::make_shared<DiscoInfo>();
presenceSender_ = new StanzaChannelPresenceSender(stanzaChannel_);
@@ -124,7 +124,7 @@ public:
vcardManager_ = new VCardManager(jid_, iqRouter_, vcardStorage_);
mocks_->ExpectCall(chatListWindowFactory_, ChatListWindowFactory::createChatListWindow).With(uiEventStream_).Return(chatListWindow_);
clientBlockListManager_ = new ClientBlockListManager(iqRouter_);
- manager_ = new ChatsManager(jid_, stanzaChannel_, iqRouter_, eventController_, chatWindowFactory_, joinMUCWindowFactory_, nickResolver_, presenceOracle_, directedPresenceSender_, uiEventStream_, chatListWindowFactory_, true, NULL, mucRegistry_, entityCapsProvider_, mucManager_, mucSearchWindowFactory_, profileSettings_, ftOverview_, xmppRoster_, false, settings_, NULL, wbManager_, highlightManager_, clientBlockListManager_, emoticons_, vcardManager_);
+ manager_ = new ChatsManager(jid_, stanzaChannel_, iqRouter_, eventController_, chatWindowFactory_, joinMUCWindowFactory_, nickResolver_, presenceOracle_, directedPresenceSender_, uiEventStream_, chatListWindowFactory_, true, nullptr, mucRegistry_, entityCapsProvider_, mucManager_, mucSearchWindowFactory_, profileSettings_, ftOverview_, xmppRoster_, false, settings_, nullptr, wbManager_, highlightManager_, clientBlockListManager_, emoticons_, vcardManager_);
manager_->setAvatarManager(avatarManager_);
}
@@ -386,7 +386,7 @@ public:
manager_->handleIncomingMessage(message);
Stanza::ref stanzaContactOnRoster = stanzaChannel_->getStanzaAtIndex<Stanza>(0);
CPPUNIT_ASSERT_EQUAL(st(1), stanzaChannel_->sentStanzas.size());
- CPPUNIT_ASSERT(stanzaContactOnRoster->getPayload<DeliveryReceipt>() != 0);
+ CPPUNIT_ASSERT(stanzaContactOnRoster->getPayload<DeliveryReceipt>() != nullptr);
xmppRoster_->removeContact(messageJID);
@@ -416,7 +416,7 @@ public:
CPPUNIT_ASSERT_EQUAL(st(1), stanzaChannel_->sentStanzas.size());
Stanza::ref stanzaContactOnRoster = stanzaChannel_->getStanzaAtIndex<Stanza>(0);
- CPPUNIT_ASSERT(stanzaContactOnRoster->getPayload<DeliveryReceipt>() != 0);
+ CPPUNIT_ASSERT(stanzaContactOnRoster->getPayload<DeliveryReceipt>() != nullptr);
}
/**
@@ -729,7 +729,7 @@ public:
CPPUNIT_ASSERT_EQUAL(st(1), stanzaChannel_->sentStanzas.size());
Stanza::ref stanzaContactOnRoster = stanzaChannel_->getStanzaAtIndex<Stanza>(0);
- CPPUNIT_ASSERT(stanzaContactOnRoster->getPayload<DeliveryReceipt>() != 0);
+ CPPUNIT_ASSERT(stanzaContactOnRoster->getPayload<DeliveryReceipt>() != nullptr);
}
void testChatControllerHighlightingNotificationTesting() {
diff --git a/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp b/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
index db9bcdc..80dbc32 100644
--- a/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
+++ b/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
@@ -84,7 +84,7 @@ public:
directedPresenceSender_ = new DirectedPresenceSender(presenceSender_);
uiEventStream_ = new UIEventStream();
avatarManager_ = new NullAvatarManager();
- TimerFactory* timerFactory = NULL;
+ TimerFactory* timerFactory = nullptr;
window_ = new MockChatWindow();
mucRegistry_ = new MUCRegistry();
entityCapsProvider_ = new DummyEntityCapsProvider();
@@ -97,7 +97,7 @@ public:
vcardManager_ = new VCardManager(self_, iqRouter_, vcardStorage_);
clientBlockListManager_ = new ClientBlockListManager(iqRouter_);
mucBookmarkManager_ = new MUCBookmarkManager(iqRouter_);
- controller_ = new MUCController (self_, muc_, boost::optional<std::string>(), nick_, stanzaChannel_, iqRouter_, chatWindowFactory_, presenceOracle_, avatarManager_, uiEventStream_, false, timerFactory, eventController_, entityCapsProvider_, NULL, NULL, mucRegistry_, highlightManager_, clientBlockListManager_, chatMessageParser_, false, NULL, vcardManager_, mucBookmarkManager_);
+ controller_ = new MUCController (self_, muc_, boost::optional<std::string>(), nick_, stanzaChannel_, iqRouter_, chatWindowFactory_, presenceOracle_, avatarManager_, uiEventStream_, false, timerFactory, eventController_, entityCapsProvider_, nullptr, nullptr, mucRegistry_, highlightManager_, clientBlockListManager_, chatMessageParser_, false, nullptr, vcardManager_, mucBookmarkManager_);
}
void tearDown() {
diff --git a/Swift/Controllers/Chat/UserSearchController.cpp b/Swift/Controllers/Chat/UserSearchController.cpp
index 216488a..c1040f0 100644
--- a/Swift/Controllers/Chat/UserSearchController.cpp
+++ b/Swift/Controllers/Chat/UserSearchController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -40,8 +40,8 @@ UserSearchController::UserSearchController(Type type, const JID& jid, UIEventStr
vcardManager_->onVCardChanged.connect(boost::bind(&UserSearchController::handleVCardChanged, this, _1, _2));
avatarManager_->onAvatarChanged.connect(boost::bind(&UserSearchController::handleAvatarChanged, this, _1));
presenceOracle_->onPresenceChange.connect(boost::bind(&UserSearchController::handlePresenceChanged, this, _1));
- window_ = NULL;
- discoWalker_ = NULL;
+ window_ = nullptr;
+ discoWalker_ = nullptr;
loadSavedDirectories();
}
diff --git a/Swift/Controllers/ContactEditController.cpp b/Swift/Controllers/ContactEditController.cpp
index 734ef79..d3106ed 100644
--- a/Swift/Controllers/ContactEditController.cpp
+++ b/Swift/Controllers/ContactEditController.cpp
@@ -20,7 +20,7 @@
namespace Swift {
-ContactEditController::ContactEditController(RosterController* rosterController, VCardManager* vcardManager, ContactEditWindowFactory* contactEditWindowFactory, UIEventStream* uiEventStream) : rosterController(rosterController), vcardManager(vcardManager), contactEditWindowFactory(contactEditWindowFactory), uiEventStream(uiEventStream), contactEditWindow(NULL) {
+ContactEditController::ContactEditController(RosterController* rosterController, VCardManager* vcardManager, ContactEditWindowFactory* contactEditWindowFactory, UIEventStream* uiEventStream) : rosterController(rosterController), vcardManager(vcardManager), contactEditWindowFactory(contactEditWindowFactory), uiEventStream(uiEventStream), contactEditWindow(nullptr) {
uiEventStream->onUIEvent.connect(boost::bind(&ContactEditController::handleUIEvent, this, _1));
vcardManager->onVCardChanged.connect(boost::bind(&ContactEditController::handleVCardChanged, this, _1, _2));
}
diff --git a/Swift/Controllers/FileTransfer/FileTransferController.cpp b/Swift/Controllers/FileTransfer/FileTransferController.cpp
index fd13d99..c005705 100644
--- a/Swift/Controllers/FileTransfer/FileTransferController.cpp
+++ b/Swift/Controllers/FileTransfer/FileTransferController.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -28,12 +28,12 @@
namespace Swift {
FileTransferController::FileTransferController(const JID& receipient, const std::string& filename, FileTransferManager* fileTransferManager) :
- sending(true), otherParty(receipient), filename(filename), ftManager(fileTransferManager), ftProgressInfo(0), chatWindow(0), currentState(FileTransfer::State::WaitingForStart) {
+ sending(true), otherParty(receipient), filename(filename), ftManager(fileTransferManager), ftProgressInfo(nullptr), chatWindow(nullptr), currentState(FileTransfer::State::WaitingForStart) {
}
FileTransferController::FileTransferController(IncomingFileTransfer::ref transfer) :
- sending(false), otherParty(transfer->getSender()), filename(transfer->getFileName()), transfer(transfer), ftManager(0), ftProgressInfo(0), chatWindow(0), currentState(FileTransfer::State::WaitingForStart) {
+ sending(false), otherParty(transfer->getSender()), filename(transfer->getFileName()), transfer(transfer), ftManager(nullptr), ftProgressInfo(nullptr), chatWindow(nullptr), currentState(FileTransfer::State::WaitingForStart) {
transfer->onStateChanged.connect(boost::bind(&FileTransferController::handleFileTransferStateChange, this, _1));
}
diff --git a/Swift/Controllers/FileTransferListController.cpp b/Swift/Controllers/FileTransferListController.cpp
index a383ae5..8400e52 100644
--- a/Swift/Controllers/FileTransferListController.cpp
+++ b/Swift/Controllers/FileTransferListController.cpp
@@ -19,7 +19,7 @@
namespace Swift {
-FileTransferListController::FileTransferListController(UIEventStream* uiEventStream, FileTransferListWidgetFactory* fileTransferListWidgetFactory) : fileTransferListWidgetFactory(fileTransferListWidgetFactory), fileTransferListWidget(NULL), fileTransferOverview(0) {
+FileTransferListController::FileTransferListController(UIEventStream* uiEventStream, FileTransferListWidgetFactory* fileTransferListWidgetFactory) : fileTransferListWidgetFactory(fileTransferListWidgetFactory), fileTransferListWidget(nullptr), fileTransferOverview(nullptr) {
uiEventStream->onUIEvent.connect(boost::bind(&FileTransferListController::handleUIEvent, this, _1));
}
@@ -36,8 +36,8 @@ void FileTransferListController::setFileTransferOverview(FileTransferOverview *o
void FileTransferListController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) {
boost::shared_ptr<RequestFileTransferListUIEvent> event = boost::dynamic_pointer_cast<RequestFileTransferListUIEvent>(rawEvent);
- if (event != NULL) {
- if (fileTransferListWidget == NULL) {
+ if (event != nullptr) {
+ if (fileTransferListWidget == nullptr) {
fileTransferListWidget = fileTransferListWidgetFactory->createFileTransferListWidget();
if (fileTransferOverview) {
fileTransferListWidget->setFileTransferOverview(fileTransferOverview);
diff --git a/Swift/Controllers/HighlightEditorController.cpp b/Swift/Controllers/HighlightEditorController.cpp
index bf5dbc4..2c71e1d 100644
--- a/Swift/Controllers/HighlightEditorController.cpp
+++ b/Swift/Controllers/HighlightEditorController.cpp
@@ -23,7 +23,7 @@
namespace Swift {
HighlightEditorController::HighlightEditorController(UIEventStream* uiEventStream, HighlightEditorWindowFactory* highlightEditorWindowFactory, HighlightManager* highlightManager)
-: highlightEditorWindowFactory_(highlightEditorWindowFactory), highlightEditorWindow_(NULL), highlightManager_(highlightManager), contactSuggester_(0)
+: highlightEditorWindowFactory_(highlightEditorWindowFactory), highlightEditorWindow_(nullptr), highlightManager_(highlightManager), contactSuggester_(nullptr)
{
uiEventStream->onUIEvent.connect(boost::bind(&HighlightEditorController::handleUIEvent, this, _1));
}
@@ -31,7 +31,7 @@ HighlightEditorController::HighlightEditorController(UIEventStream* uiEventStrea
HighlightEditorController::~HighlightEditorController()
{
delete highlightEditorWindow_;
- highlightEditorWindow_ = NULL;
+ highlightEditorWindow_ = nullptr;
}
void HighlightEditorController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent)
diff --git a/Swift/Controllers/HistoryViewController.cpp b/Swift/Controllers/HistoryViewController.cpp
index d0ccc66..827d7d6 100644
--- a/Swift/Controllers/HistoryViewController.cpp
+++ b/Swift/Controllers/HistoryViewController.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* Licensed under the GNU General Public License.
* See the COPYING file for more information.
*/
@@ -42,8 +42,8 @@ HistoryViewController::HistoryViewController(
avatarManager_(avatarManager),
presenceOracle_(presenceOracle),
historyWindowFactory_(historyWindowFactory),
- historyWindow_(NULL),
- selectedItem_(NULL),
+ historyWindow_(nullptr),
+ selectedItem_(nullptr),
currentResultDate_(boost::gregorian::not_a_date_time) {
uiEventStream_->onUIEvent.connect(boost::bind(&HistoryViewController::handleUIEvent, this, _1));
@@ -72,8 +72,8 @@ HistoryViewController::~HistoryViewController() {
void HistoryViewController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) {
boost::shared_ptr<RequestHistoryUIEvent> event = boost::dynamic_pointer_cast<RequestHistoryUIEvent>(rawEvent);
- if (event != NULL) {
- if (historyWindow_ == NULL) {
+ if (event != nullptr) {
+ if (historyWindow_ == nullptr) {
historyWindow_ = historyWindowFactory_->createHistoryWindow(uiEventStream_);
historyWindow_->onSelectedContactChanged.connect(boost::bind(&HistoryViewController::handleSelectedContactChanged, this, _1));
historyWindow_->onReturnPressed.connect(boost::bind(&HistoryViewController::handleReturnPressed, this, _1));
@@ -266,7 +266,7 @@ void HistoryViewController::handlePreviousButtonClicked() {
void HistoryViewController::reset() {
roster_->removeAll();
contacts_.clear();
- selectedItem_ = NULL;
+ selectedItem_ = nullptr;
historyWindow_->resetConversationView();
}
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index b48059c..e8cd012 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -121,33 +121,33 @@ MainController::MainController(
settings_(settings),
uriHandler_(uriHandler),
idleDetector_(idleDetector),
- loginWindow_(NULL) ,
+ loginWindow_(nullptr) ,
useDelayForLatency_(useDelayForLatency),
- ftOverview_(NULL),
+ ftOverview_(nullptr),
emoticons_(emoticons) {
- storages_ = NULL;
- certificateStorage_ = NULL;
- certificateTrustChecker_ = NULL;
- statusTracker_ = NULL;
- presenceNotifier_ = NULL;
- eventNotifier_ = NULL;
- rosterController_ = NULL;
- chatsManager_ = NULL;
- historyController_ = NULL;
- historyViewController_ = NULL;
- eventWindowController_ = NULL;
- profileController_ = NULL;
- blockListController_ = NULL;
- showProfileController_ = NULL;
- contactEditController_ = NULL;
- userSearchControllerChat_ = NULL;
- userSearchControllerAdd_ = NULL;
- userSearchControllerInvite_ = NULL;
- contactsFromRosterProvider_ = NULL;
- contactSuggesterWithoutRoster_ = NULL;
- contactSuggesterWithRoster_ = NULL;
- whiteboardManager_ = NULL;
- adHocManager_ = NULL;
+ storages_ = nullptr;
+ certificateStorage_ = nullptr;
+ certificateTrustChecker_ = nullptr;
+ statusTracker_ = nullptr;
+ presenceNotifier_ = nullptr;
+ eventNotifier_ = nullptr;
+ rosterController_ = nullptr;
+ chatsManager_ = nullptr;
+ historyController_ = nullptr;
+ historyViewController_ = nullptr;
+ eventWindowController_ = nullptr;
+ profileController_ = nullptr;
+ blockListController_ = nullptr;
+ showProfileController_ = nullptr;
+ contactEditController_ = nullptr;
+ userSearchControllerChat_ = nullptr;
+ userSearchControllerAdd_ = nullptr;
+ userSearchControllerInvite_ = nullptr;
+ contactsFromRosterProvider_ = nullptr;
+ contactSuggesterWithoutRoster_ = nullptr;
+ contactSuggesterWithRoster_ = nullptr;
+ whiteboardManager_ = nullptr;
+ adHocManager_ = nullptr;
quitRequested_ = false;
clientInitialized_ = false;
offlineRequested_ = false;
@@ -221,7 +221,7 @@ MainController::MainController(
/* FIXME: deal with autologin with a cert*/
handleLoginRequest(selectedLoginJID, cachedPassword, cachedCertificate, CertificateWithKey::ref(), cachedOptions, true, true);
} else {
- profileSettings_ = NULL;
+ profileSettings_ = nullptr;
}
}
@@ -255,58 +255,58 @@ void MainController::resetClient() {
resetPendingReconnects();
vCardPhotoHash_.clear();
delete contactEditController_;
- contactEditController_ = NULL;
+ contactEditController_ = nullptr;
delete profileController_;
- profileController_ = NULL;
+ profileController_ = nullptr;
delete showProfileController_;
- showProfileController_ = NULL;
+ showProfileController_ = nullptr;
delete eventWindowController_;
- eventWindowController_ = NULL;
+ eventWindowController_ = nullptr;
delete chatsManager_;
- chatsManager_ = NULL;
+ chatsManager_ = nullptr;
#ifdef SWIFT_EXPERIMENTAL_HISTORY
delete historyViewController_;
- historyViewController_ = NULL;
+ historyViewController_ = nullptr;
delete historyController_;
- historyController_ = NULL;
+ historyController_ = nullptr;
#endif
- fileTransferListController_->setFileTransferOverview(NULL);
+ fileTransferListController_->setFileTransferOverview(nullptr);
delete ftOverview_;
- ftOverview_ = NULL;
+ ftOverview_ = nullptr;
delete blockListController_;
- blockListController_ = NULL;
+ blockListController_ = nullptr;
delete rosterController_;
- rosterController_ = NULL;
+ rosterController_ = nullptr;
delete eventNotifier_;
- eventNotifier_ = NULL;
+ eventNotifier_ = nullptr;
delete presenceNotifier_;
- presenceNotifier_ = NULL;
+ presenceNotifier_ = nullptr;
delete certificateTrustChecker_;
- certificateTrustChecker_ = NULL;
+ certificateTrustChecker_ = nullptr;
delete certificateStorage_;
- certificateStorage_ = NULL;
+ certificateStorage_ = nullptr;
delete storages_;
- storages_ = NULL;
+ storages_ = nullptr;
delete statusTracker_;
- statusTracker_ = NULL;
+ statusTracker_ = nullptr;
delete profileSettings_;
- profileSettings_ = NULL;
+ profileSettings_ = nullptr;
delete userSearchControllerChat_;
- userSearchControllerChat_ = NULL;
+ userSearchControllerChat_ = nullptr;
delete userSearchControllerAdd_;
- userSearchControllerAdd_ = NULL;
+ userSearchControllerAdd_ = nullptr;
delete userSearchControllerInvite_;
- userSearchControllerInvite_ = NULL;
+ userSearchControllerInvite_ = nullptr;
delete contactSuggesterWithoutRoster_;
- contactSuggesterWithoutRoster_ = NULL;
+ contactSuggesterWithoutRoster_ = nullptr;
delete contactSuggesterWithRoster_;
- contactSuggesterWithRoster_ = NULL;
+ contactSuggesterWithRoster_ = nullptr;
delete contactsFromRosterProvider_;
- contactsFromRosterProvider_ = NULL;
+ contactsFromRosterProvider_ = nullptr;
delete adHocManager_;
- adHocManager_ = NULL;
+ adHocManager_ = nullptr;
delete whiteboardManager_;
- whiteboardManager_ = NULL;
+ whiteboardManager_ = nullptr;
clientInitialized_ = false;
}
@@ -341,7 +341,7 @@ void MainController::handleConnected() {
purgeCachedCredentials();
}
- bool freshLogin = rosterController_ == NULL;
+ bool freshLogin = rosterController_ == nullptr;
myStatusLooksOnline_ = true;
if (freshLogin) {
profileController_ = new ProfileController(client_->getVCardManager(), uiFactory_, uiEventStream_);
@@ -372,7 +372,7 @@ void MainController::handleConnected() {
historyViewController_ = new HistoryViewController(jid_, uiEventStream_, historyController_, client_->getNickResolver(), client_->getAvatarManager(), client_->getPresenceOracle(), uiFactory_);
chatsManager_ = new ChatsManager(jid_, client_->getStanzaChannel(), client_->getIQRouter(), eventController_, uiFactory_, uiFactory_, client_->getNickResolver(), client_->getPresenceOracle(), client_->getPresenceSender(), uiEventStream_, uiFactory_, useDelayForLatency_, networkFactories_->getTimerFactory(), client_->getMUCRegistry(), client_->getEntityCapsProvider(), client_->getMUCManager(), uiFactory_, profileSettings_, ftOverview_, client_->getRoster(), !settings_->getSetting(SettingConstants::REMEMBER_RECENT_CHATS), settings_, historyController_, whiteboardManager_, highlightManager_, client_->getClientBlockListManager(), emoticons_, client_->getVCardManager());
#else
- chatsManager_ = new ChatsManager(jid_, client_->getStanzaChannel(), client_->getIQRouter(), eventController_, uiFactory_, uiFactory_, client_->getNickResolver(), client_->getPresenceOracle(), client_->getPresenceSender(), uiEventStream_, uiFactory_, useDelayForLatency_, networkFactories_->getTimerFactory(), client_->getMUCRegistry(), client_->getEntityCapsProvider(), client_->getMUCManager(), uiFactory_, profileSettings_, ftOverview_, client_->getRoster(), !settings_->getSetting(SettingConstants::REMEMBER_RECENT_CHATS), settings_, NULL, whiteboardManager_, highlightManager_, client_->getClientBlockListManager(), emoticons_, client_->getVCardManager());
+ chatsManager_ = new ChatsManager(jid_, client_->getStanzaChannel(), client_->getIQRouter(), eventController_, uiFactory_, uiFactory_, client_->getNickResolver(), client_->getPresenceOracle(), client_->getPresenceSender(), uiEventStream_, uiFactory_, useDelayForLatency_, networkFactories_->getTimerFactory(), client_->getMUCRegistry(), client_->getEntityCapsProvider(), client_->getMUCManager(), uiFactory_, profileSettings_, ftOverview_, client_->getRoster(), !settings_->getSetting(SettingConstants::REMEMBER_RECENT_CHATS), settings_, nullptr, whiteboardManager_, highlightManager_, client_->getClientBlockListManager(), emoticons_, client_->getVCardManager());
#endif
contactsFromRosterProvider_ = new ContactsFromXMPPRoster(client_->getRoster(), client_->getAvatarManager(), client_->getPresenceOracle());
contactSuggesterWithoutRoster_->addContactProvider(chatsManager_);
diff --git a/Swift/Controllers/ProfileController.cpp b/Swift/Controllers/ProfileController.cpp
index 756aaff..48a4c93 100644
--- a/Swift/Controllers/ProfileController.cpp
+++ b/Swift/Controllers/ProfileController.cpp
@@ -17,7 +17,7 @@
namespace Swift {
-ProfileController::ProfileController(VCardManager* vcardManager, ProfileWindowFactory* profileWindowFactory, UIEventStream* uiEventStream) : vcardManager(vcardManager), profileWindowFactory(profileWindowFactory), uiEventStream(uiEventStream), available(true), profileWindow(NULL), gettingVCard(false) {
+ProfileController::ProfileController(VCardManager* vcardManager, ProfileWindowFactory* profileWindowFactory, UIEventStream* uiEventStream) : vcardManager(vcardManager), profileWindowFactory(profileWindowFactory), uiEventStream(uiEventStream), available(true), profileWindow(nullptr), gettingVCard(false) {
uiEventStream->onUIEvent.connect(boost::bind(&ProfileController::handleUIEvent, this, _1));
}
@@ -92,7 +92,7 @@ void ProfileController::handleOwnVCardChanged(VCard::ref vcard) {
}
void ProfileController::handleProfileWindowAboutToBeClosed(const JID&) {
- profileWindow = NULL;
+ profileWindow = nullptr;
}
void ProfileController::setAvailable(bool b) {
diff --git a/Swift/Controllers/Roster/GroupRosterItem.cpp b/Swift/Controllers/Roster/GroupRosterItem.cpp
index 82e43df..5aa3a5e 100644
--- a/Swift/Controllers/Roster/GroupRosterItem.cpp
+++ b/Swift/Controllers/Roster/GroupRosterItem.cpp
@@ -99,7 +99,7 @@ void GroupRosterItem::removeAll() {
*/
ContactRosterItem* GroupRosterItem::removeChild(const JID& jid) {
std::vector<RosterItem*>::iterator it = children_.begin();
- ContactRosterItem* removed = NULL;
+ ContactRosterItem* removed = nullptr;
while (it != children_.end()) {
ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(*it);
if (contact && contact->getJID() == jid) {
@@ -125,7 +125,7 @@ ContactRosterItem* GroupRosterItem::removeChild(const JID& jid) {
GroupRosterItem* GroupRosterItem::removeGroupChild(const std::string& groupName) {
std::vector<RosterItem*>::iterator it = children_.begin();
- GroupRosterItem* removed = NULL;
+ GroupRosterItem* removed = nullptr;
while (it != children_.end()) {
GroupRosterItem* group = dynamic_cast<GroupRosterItem*>(*it);
if (group && group->getDisplayName() == groupName) {
diff --git a/Swift/Controllers/Roster/Roster.cpp b/Swift/Controllers/Roster/Roster.cpp
index 2e68fd4..a5be13c 100644
--- a/Swift/Controllers/Roster/Roster.cpp
+++ b/Swift/Controllers/Roster/Roster.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -25,7 +25,7 @@ namespace Swift {
Roster::Roster(bool sortByStatus, bool fullJIDMapping) : blockingSupported_(false) {
sortByStatus_ = sortByStatus;
fullJIDMapping_ = fullJIDMapping;
- root_ = new GroupRosterItem("Dummy-Root", NULL, sortByStatus_);
+ root_ = new GroupRosterItem("Dummy-Root", nullptr, sortByStatus_);
root_->onChildrenChanged.connect(boost::bind(&Roster::handleChildrenChanged, this, root_));
}
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp
index e391f41..f863ed7 100644
--- a/Swift/Controllers/Roster/RosterController.cpp
+++ b/Swift/Controllers/Roster/RosterController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -96,7 +96,7 @@ RosterController::RosterController(const JID& jid, XMPPRoster* xmppRoster, Avata
handleShowOfflineToggled(settings_->getSetting(SettingConstants::SHOW_OFFLINE));
- ownContact_ = boost::make_shared<ContactRosterItem>(myJID_.toBare(), myJID_.toBare(), nickManager_->getOwnNick(), static_cast<GroupRosterItem*>(0));
+ ownContact_ = boost::make_shared<ContactRosterItem>(myJID_.toBare(), myJID_.toBare(), nickManager_->getOwnNick(), static_cast<GroupRosterItem*>(nullptr));
ownContact_->setVCard(vcardManager_->getVCard(myJID_.toBare()));
ownContact_->setAvatarPath(pathToString(avatarManager_->getAvatarPath(myJID_.toBare())));
mainWindow_->setMyContactRosterItem(ownContact_);
@@ -110,7 +110,7 @@ RosterController::~RosterController() {
delete offlineFilter_;
delete expandiness_;
- mainWindow_->setRosterModel(NULL);
+ mainWindow_->setRosterModel(nullptr);
if (mainWindow_->canDelete()) {
delete mainWindow_;
}
diff --git a/Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp b/Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp
index 551bd6b..91cc764 100644
--- a/Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp
+++ b/Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -70,7 +70,7 @@ class RosterControllerTest : public CppUnit::TestFixture {
avatarManager_ = new NullAvatarManager();
mainWindowFactory_ = new MockMainWindowFactory();
mucRegistry_ = new MUCRegistry();
- nickResolver_ = new NickResolver(jid_.toBare(), xmppRoster_, NULL, mucRegistry_);
+ nickResolver_ = new NickResolver(jid_.toBare(), xmppRoster_, nullptr, mucRegistry_);
channel_ = new DummyIQChannel();
router_ = new IQRouter(channel_);
stanzaChannel_ = new DummyStanzaChannel();
diff --git a/Swift/Controllers/Storages/FileStorages.cpp b/Swift/Controllers/Storages/FileStorages.cpp
index 7ba2b0f..49f9ecf 100644
--- a/Swift/Controllers/Storages/FileStorages.cpp
+++ b/Swift/Controllers/Storages/FileStorages.cpp
@@ -25,7 +25,7 @@ FileStorages::FileStorages(const boost::filesystem::path& baseDir, const JID& ji
#ifdef SWIFT_EXPERIMENTAL_HISTORY
historyStorage = new SQLiteHistoryStorage(baseDir / "history.db");
#else
- historyStorage = NULL;
+ historyStorage = nullptr;
#endif
}
@@ -57,7 +57,7 @@ HistoryStorage* FileStorages::getHistoryStorage() const {
#ifdef SWIFT_EXPERIMENTAL_HISTORY
return historyStorage;
#else
- return NULL;
+ return nullptr;
#endif
}
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h
index b4588e7..e535eca 100644
--- a/Swift/Controllers/UnitTest/MockChatWindow.h
+++ b/Swift/Controllers/UnitTest/MockChatWindow.h
@@ -43,7 +43,7 @@ namespace Swift {
virtual void replaceSystemMessage(const ChatMessage& /*message*/, const std::string& /*id*/, const TimestampBehaviour /*timestampBehaviour*/) {}
// File transfer related stuff
- virtual std::string addFileTransfer(const std::string& /*senderName*/, bool /*senderIsSelf*/,const std::string& /*filename*/, const boost::uintmax_t /*sizeInBytes*/, const std::string& /*description*/) { return 0; }
+ virtual std::string addFileTransfer(const std::string& /*senderName*/, bool /*senderIsSelf*/,const std::string& /*filename*/, const boost::uintmax_t /*sizeInBytes*/, const std::string& /*description*/) { return nullptr; }
virtual void setFileTransferProgress(std::string /*id*/, const int /*alreadyTransferedBytes*/) { }
virtual void setFileTransferStatus(std::string /*id*/, const FileTransferState /*state*/, const std::string& /*msg*/) { }
diff --git a/Swift/Controllers/UnitTest/MockMainWindow.h b/Swift/Controllers/UnitTest/MockMainWindow.h
index 9177bdc..43522ce 100644
--- a/Swift/Controllers/UnitTest/MockMainWindow.h
+++ b/Swift/Controllers/UnitTest/MockMainWindow.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -12,7 +12,7 @@ namespace Swift {
class Roster;
class MockMainWindow : public MainWindow {
public:
- MockMainWindow() : roster(NULL) {}
+ MockMainWindow() : roster(nullptr) {}
virtual ~MockMainWindow() {}
virtual void setRosterModel(Roster* roster) {this->roster = roster;}
virtual void setMyNick(const std::string& /*name*/) {}
diff --git a/Swift/Controllers/UnitTest/MockMainWindowFactory.h b/Swift/Controllers/UnitTest/MockMainWindowFactory.h
index 4af0c79..adf4fdf 100644
--- a/Swift/Controllers/UnitTest/MockMainWindowFactory.h
+++ b/Swift/Controllers/UnitTest/MockMainWindowFactory.h
@@ -13,7 +13,7 @@ namespace Swift {
class MockMainWindowFactory : public MainWindowFactory {
public:
- MockMainWindowFactory() : last(NULL) {}
+ MockMainWindowFactory() : last(nullptr) {}
virtual ~MockMainWindowFactory() {}
diff --git a/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp b/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
index e1284fd..b3b364f 100644
--- a/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
+++ b/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -57,7 +57,7 @@ class PresenceNotifierTest : public CppUnit::TestFixture {
user2 = JID("user2@foo.com/baz");
avatarManager = new DummyAvatarManager();
roster = new XMPPRosterImpl();
- nickResolver = new NickResolver(JID("foo@bar.com"), roster, NULL, mucRegistry);
+ nickResolver = new NickResolver(JID("foo@bar.com"), roster, nullptr, mucRegistry);
presenceOracle = new PresenceOracle(stanzaChannel, roster);
timerFactory = new DummyTimerFactory();
}
diff --git a/Swift/Controllers/WhiteboardManager.cpp b/Swift/Controllers/WhiteboardManager.cpp
index 91f01c8..9594be4 100644
--- a/Swift/Controllers/WhiteboardManager.cpp
+++ b/Swift/Controllers/WhiteboardManager.cpp
@@ -50,7 +50,7 @@ namespace Swift {
WhiteboardWindow* WhiteboardManager::findWhiteboardWindow(const JID& contact) {
if (whiteboardWindows_.find(contact.toBare()) == whiteboardWindows_.end()) {
- return NULL;
+ return nullptr;
}
return whiteboardWindows_[contact.toBare()];
}
@@ -71,7 +71,7 @@ namespace Swift {
boost::shared_ptr<ShowWhiteboardUIEvent> showWindowEvent = boost::dynamic_pointer_cast<ShowWhiteboardUIEvent>(event);
if (showWindowEvent) {
WhiteboardWindow* window = findWhiteboardWindow(showWindowEvent->getContact());
- if (window != NULL) {
+ if (window != nullptr) {
window->activateWindow();
}
}
@@ -93,7 +93,7 @@ namespace Swift {
session->onRequestRejected.connect(boost::bind(&WhiteboardManager::handleRequestReject, this, _1));
WhiteboardWindow* window = findWhiteboardWindow(contact);
- if (window == NULL) {
+ if (window == nullptr) {
createNewWhiteboardWindow(contact, session);
} else {
window->setSession(session);
@@ -113,7 +113,7 @@ namespace Swift {
session->onRequestAccepted.connect(boost::bind(&WhiteboardManager::handleSessionAccept, this, _1));
WhiteboardWindow* window = findWhiteboardWindow(session->getTo());
- if (window == NULL) {
+ if (window == nullptr) {
createNewWhiteboardWindow(session->getTo(), session);
} else {
window->setSession(session);
@@ -132,7 +132,7 @@ namespace Swift {
void WhiteboardManager::handleSessionAccept(const JID& contact) {
WhiteboardWindow* window = findWhiteboardWindow(contact);
- if (window != NULL) {
+ if (window != nullptr) {
window->show();
}
onRequestAccepted(contact);
diff --git a/Swift/Controllers/XMLConsoleController.cpp b/Swift/Controllers/XMLConsoleController.cpp
index 175a4eb..2d4ca0a 100644
--- a/Swift/Controllers/XMLConsoleController.cpp
+++ b/Swift/Controllers/XMLConsoleController.cpp
@@ -11,7 +11,7 @@
namespace Swift {
-XMLConsoleController::XMLConsoleController(UIEventStream* uiEventStream, XMLConsoleWidgetFactory* xmlConsoleWidgetFactory) : xmlConsoleWidgetFactory(xmlConsoleWidgetFactory), xmlConsoleWidget(NULL) {
+XMLConsoleController::XMLConsoleController(UIEventStream* uiEventStream, XMLConsoleWidgetFactory* xmlConsoleWidgetFactory) : xmlConsoleWidgetFactory(xmlConsoleWidgetFactory), xmlConsoleWidget(nullptr) {
uiEventStream->onUIEvent.connect(boost::bind(&XMLConsoleController::handleUIEvent, this, _1));
}
@@ -21,8 +21,8 @@ XMLConsoleController::~XMLConsoleController() {
void XMLConsoleController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) {
boost::shared_ptr<RequestXMLConsoleUIEvent> event = boost::dynamic_pointer_cast<RequestXMLConsoleUIEvent>(rawEvent);
- if (event != NULL) {
- if (xmlConsoleWidget == NULL) {
+ if (event != nullptr) {
+ if (xmlConsoleWidget == nullptr) {
xmlConsoleWidget = xmlConsoleWidgetFactory->createXMLConsoleWidget();
}
xmlConsoleWidget->show();