diff options
Diffstat (limited to 'Swift/Controllers')
| -rw-r--r-- | Swift/Controllers/AccountController.cpp | 6 | ||||
| -rw-r--r-- | Swift/Controllers/Chat/ChatController.cpp | 12 | ||||
| -rw-r--r-- | Swift/Controllers/Chat/ChatsManager.cpp | 12 | ||||
| -rw-r--r-- | Swift/Controllers/Chat/MUCSearchController.cpp | 12 | ||||
| -rw-r--r-- | Swift/Controllers/FileTransfer/FileTransferController.cpp | 6 | ||||
| -rw-r--r-- | Swift/Controllers/Highlighting/HighlightManager.cpp | 4 | ||||
| -rw-r--r-- | Swift/Controllers/Settings/XMLSettingsProvider.cpp | 10 | ||||
| -rw-r--r-- | Swift/Controllers/StatusCache.cpp | 8 | ||||
| -rw-r--r-- | Swift/Controllers/Storages/AvatarFileStorage.cpp | 14 | ||||
| -rw-r--r-- | Swift/Controllers/Storages/CertificateFileStorage.cpp | 6 |
10 files changed, 45 insertions, 45 deletions
diff --git a/Swift/Controllers/AccountController.cpp b/Swift/Controllers/AccountController.cpp index b877ce9..a257cc4 100644 --- a/Swift/Controllers/AccountController.cpp +++ b/Swift/Controllers/AccountController.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2018 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -781,10 +781,10 @@ void AccountController::enableMessageCarbons() { | |||
| 781 | auto enableCarbonsRequest = EnableCarbonsRequest::create(client_->getIQRouter()); | 781 | auto enableCarbonsRequest = EnableCarbonsRequest::create(client_->getIQRouter()); |
| 782 | enableCarbonsRequestHandlerConnection_ = enableCarbonsRequest->onResponse.connect([&](Payload::ref /*payload*/, ErrorPayload::ref error) { | 782 | enableCarbonsRequestHandlerConnection_ = enableCarbonsRequest->onResponse.connect([&](Payload::ref /*payload*/, ErrorPayload::ref error) { |
| 783 | if (error) { | 783 | if (error) { |
| 784 | SWIFT_LOG(warning) << "Failed to enable carbons." << std::endl; | 784 | SWIFT_LOG(warning) << "Failed to enable carbons."; |
| 785 | } | 785 | } |
| 786 | else { | 786 | else { |
| 787 | SWIFT_LOG(debug) << "Successfully enabled carbons." << std::endl; | 787 | SWIFT_LOG(debug) << "Successfully enabled carbons."; |
| 788 | } | 788 | } |
| 789 | enableCarbonsRequestHandlerConnection_.disconnect(); | 789 | enableCarbonsRequestHandlerConnection_.disconnect(); |
| 790 | }); | 790 | }); |
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp index 5f441f8..debd83f 100644 --- a/Swift/Controllers/Chat/ChatController.cpp +++ b/Swift/Controllers/Chat/ChatController.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2018 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -190,7 +190,7 @@ void ChatController::preHandleIncomingMessage(std::shared_ptr<MessageEvent> mess | |||
| 190 | // handle XEP-0184 Message Receipts | 190 | // handle XEP-0184 Message Receipts |
| 191 | // incomming receipts | 191 | // incomming receipts |
| 192 | if (std::shared_ptr<DeliveryReceipt> receipt = message->getPayload<DeliveryReceipt>()) { | 192 | if (std::shared_ptr<DeliveryReceipt> receipt = message->getPayload<DeliveryReceipt>()) { |
| 193 | SWIFT_LOG(debug) << "received receipt for id: " << receipt->getReceivedID() << std::endl; | 193 | SWIFT_LOG(debug) << "received receipt for id: " << receipt->getReceivedID(); |
| 194 | if (requestedReceipts_.find(receipt->getReceivedID()) != requestedReceipts_.end()) { | 194 | if (requestedReceipts_.find(receipt->getReceivedID()) != requestedReceipts_.end()) { |
| 195 | chatWindow_->setMessageReceiptState(requestedReceipts_[receipt->getReceivedID()], ChatWindow::ReceiptReceived); | 195 | chatWindow_->setMessageReceiptState(requestedReceipts_[receipt->getReceivedID()], ChatWindow::ReceiptReceived); |
| 196 | requestedReceipts_.erase(receipt->getReceivedID()); | 196 | requestedReceipts_.erase(receipt->getReceivedID()); |
| @@ -407,7 +407,7 @@ void ChatController::handleWhiteboardStateChange(const ChatWindow::WhiteboardSes | |||
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | void ChatController::handleFileTransferCancel(std::string id) { | 409 | void ChatController::handleFileTransferCancel(std::string id) { |
| 410 | SWIFT_LOG(debug) << "handleFileTransferCancel(" << id << ")" << std::endl; | 410 | SWIFT_LOG(debug) << "handleFileTransferCancel(" << id << ")"; |
| 411 | if (ftControllers.find(id) != ftControllers.end()) { | 411 | if (ftControllers.find(id) != ftControllers.end()) { |
| 412 | ftControllers[id]->cancel(); | 412 | ftControllers[id]->cancel(); |
| 413 | } else { | 413 | } else { |
| @@ -416,7 +416,7 @@ void ChatController::handleFileTransferCancel(std::string id) { | |||
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | void ChatController::handleFileTransferStart(std::string id, std::string description) { | 418 | void ChatController::handleFileTransferStart(std::string id, std::string description) { |
| 419 | SWIFT_LOG(debug) << "handleFileTransferStart(" << id << ", " << description << ")" << std::endl; | 419 | SWIFT_LOG(debug) << "handleFileTransferStart(" << id << ", " << description << ")"; |
| 420 | if (ftControllers.find(id) != ftControllers.end()) { | 420 | if (ftControllers.find(id) != ftControllers.end()) { |
| 421 | ftControllers[id]->start(description); | 421 | ftControllers[id]->start(description); |
| 422 | } else { | 422 | } else { |
| @@ -425,7 +425,7 @@ void ChatController::handleFileTransferStart(std::string id, std::string descrip | |||
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | void ChatController::handleFileTransferAccept(std::string id, std::string filename) { | 427 | void ChatController::handleFileTransferAccept(std::string id, std::string filename) { |
| 428 | SWIFT_LOG(debug) << "handleFileTransferAccept(" << id << ", " << filename << ")" << std::endl; | 428 | SWIFT_LOG(debug) << "handleFileTransferAccept(" << id << ", " << filename << ")"; |
| 429 | if (ftControllers.find(id) != ftControllers.end()) { | 429 | if (ftControllers.find(id) != ftControllers.end()) { |
| 430 | ftControllers[id]->accept(filename); | 430 | ftControllers[id]->accept(filename); |
| 431 | } else { | 431 | } else { |
| @@ -434,7 +434,7 @@ void ChatController::handleFileTransferAccept(std::string id, std::string filena | |||
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | void ChatController::handleSendFileRequest(std::string filename) { | 436 | void ChatController::handleSendFileRequest(std::string filename) { |
| 437 | SWIFT_LOG(debug) << "ChatController::handleSendFileRequest(" << filename << ")" << std::endl; | 437 | SWIFT_LOG(debug) << "ChatController::handleSendFileRequest(" << filename << ")"; |
| 438 | eventStream_->send(std::make_shared<SendFileUIEvent>(getToJID(), filename)); | 438 | eventStream_->send(std::make_shared<SendFileUIEvent>(getToJID(), filename)); |
| 439 | } | 439 | } |
| 440 | 440 | ||
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp index 6530a7e..193af7f 100644 --- a/Swift/Controllers/Chat/ChatsManager.cpp +++ b/Swift/Controllers/Chat/ChatsManager.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2018 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -175,7 +175,7 @@ ChatsManager::~ChatsManager() { | |||
| 175 | roster_->onRosterCleared.disconnect(boost::bind(&ChatsManager::handleRosterCleared, this)); | 175 | roster_->onRosterCleared.disconnect(boost::bind(&ChatsManager::handleRosterCleared, this)); |
| 176 | ftOverview_->onNewFileTransferController.disconnect(boost::bind(&ChatsManager::handleNewFileTransferController, this, _1)); | 176 | ftOverview_->onNewFileTransferController.disconnect(boost::bind(&ChatsManager::handleNewFileTransferController, this, _1)); |
| 177 | delete joinMUCWindow_; | 177 | delete joinMUCWindow_; |
| 178 | SWIFT_LOG(debug) << "Destroying ChatsManager, containing " << chatControllers_.size() << " chats and " << mucControllers_.size() << " MUCs" << std::endl; | 178 | SWIFT_LOG(debug) << "Destroying ChatsManager, containing " << chatControllers_.size() << " chats and " << mucControllers_.size() << " MUCs"; |
| 179 | for (JIDChatControllerPair controllerPair : chatControllers_) { | 179 | for (JIDChatControllerPair controllerPair : chatControllers_) { |
| 180 | delete controllerPair.second; | 180 | delete controllerPair.second; |
| 181 | } | 181 | } |
| @@ -311,7 +311,7 @@ void ChatsManager::loadRecents() { | |||
| 311 | boost::archive::text_iarchive ia(deserializeStream); | 311 | boost::archive::text_iarchive ia(deserializeStream); |
| 312 | ia >> recentChats; | 312 | ia >> recentChats; |
| 313 | } catch (const boost::archive::archive_exception& e) { | 313 | } catch (const boost::archive::archive_exception& e) { |
| 314 | SWIFT_LOG(debug) << "Failed to load recents: " << e.what() << std::endl; | 314 | SWIFT_LOG(debug) << "Failed to load recents: " << e.what(); |
| 315 | return; | 315 | return; |
| 316 | } | 316 | } |
| 317 | recentChats.erase(std::remove(recentChats.begin(), recentChats.end(), ChatListWindow::Chat()), recentChats.end()); | 317 | recentChats.erase(std::remove(recentChats.begin(), recentChats.end(), ChatListWindow::Chat()), recentChats.end()); |
| @@ -936,7 +936,7 @@ void ChatsManager::handleUserNicknameChanged(MUCController* mucController, const | |||
| 936 | JID oldMUCChatJID = mucController->getToJID().withResource(oldNickname); | 936 | JID oldMUCChatJID = mucController->getToJID().withResource(oldNickname); |
| 937 | JID newMUCChatJID = mucController->getToJID().withResource(newNickname); | 937 | JID newMUCChatJID = mucController->getToJID().withResource(newNickname); |
| 938 | 938 | ||
| 939 | SWIFT_LOG(debug) << "nickname change in " << mucController->getToJID().toString() << " from " << oldNickname << " to " << newNickname << std::endl; | 939 | SWIFT_LOG(debug) << "nickname change in " << mucController->getToJID().toString() << " from " << oldNickname << " to " << newNickname; |
| 940 | 940 | ||
| 941 | // get current chat controller | 941 | // get current chat controller |
| 942 | ChatController *chatController = getChatControllerIfExists(oldMUCChatJID); | 942 | ChatController *chatController = getChatControllerIfExists(oldMUCChatJID); |
| @@ -983,7 +983,7 @@ void ChatsManager::handleIncomingMessage(std::shared_ptr<Message> incomingMessag | |||
| 983 | controller->handleIncomingOwnMessage(forwardedMessage); | 983 | controller->handleIncomingOwnMessage(forwardedMessage); |
| 984 | } | 984 | } |
| 985 | else { | 985 | else { |
| 986 | SWIFT_LOG(error) << "Carbons message ignored." << std::endl; | 986 | SWIFT_LOG(error) << "Carbons message ignored."; |
| 987 | } | 987 | } |
| 988 | return; | 988 | return; |
| 989 | } | 989 | } |
| @@ -1141,7 +1141,7 @@ void ChatsManager::handleLocalServiceFound(const JID& service, std::shared_ptr<D | |||
| 1141 | && identity.getType() == "text")) { | 1141 | && identity.getType() == "text")) { |
| 1142 | localMUCServiceJID_ = service; | 1142 | localMUCServiceJID_ = service; |
| 1143 | localMUCServiceFinderWalker_->endWalk(); | 1143 | localMUCServiceFinderWalker_->endWalk(); |
| 1144 | SWIFT_LOG(debug) << "Use following MUC service for impromptu chats: " << localMUCServiceJID_ << std::endl; | 1144 | SWIFT_LOG(debug) << "Use following MUC service for impromptu chats: " << localMUCServiceJID_; |
| 1145 | break; | 1145 | break; |
| 1146 | } | 1146 | } |
| 1147 | } | 1147 | } |
diff --git a/Swift/Controllers/Chat/MUCSearchController.cpp b/Swift/Controllers/Chat/MUCSearchController.cpp index 5db917a..0b54d25 100644 --- a/Swift/Controllers/Chat/MUCSearchController.cpp +++ b/Swift/Controllers/Chat/MUCSearchController.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2016 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -92,7 +92,7 @@ void MUCSearchController::handleSearchService(const JID& jid) { | |||
| 92 | delete walker_; | 92 | delete walker_; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | SWIFT_LOG(debug) << "Starting walking MUC services" << std::endl; | 95 | SWIFT_LOG(debug) << "Starting walking MUC services"; |
| 96 | itemsInProgress_ = 0; | 96 | itemsInProgress_ = 0; |
| 97 | walker_ = new DiscoServiceWalker(jid, iqRouter_); | 97 | walker_ = new DiscoServiceWalker(jid, iqRouter_); |
| 98 | walker_->onServiceFound.connect(boost::bind(&MUCSearchController::handleDiscoServiceFound, this, _1, _2)); | 98 | walker_->onServiceFound.connect(boost::bind(&MUCSearchController::handleDiscoServiceFound, this, _1, _2)); |
| @@ -113,14 +113,14 @@ void MUCSearchController::handleDiscoServiceFound(const JID& jid, std::shared_pt | |||
| 113 | } | 113 | } |
| 114 | } | 114 | } |
| 115 | if (isMUC) { | 115 | if (isMUC) { |
| 116 | SWIFT_LOG(debug) << "MUC Service found: " << jid << std::endl; | 116 | SWIFT_LOG(debug) << "MUC Service found: " << jid; |
| 117 | services_.erase(std::remove(services_.begin(), services_.end(), jid), services_.end()); | 117 | services_.erase(std::remove(services_.begin(), services_.end(), jid), services_.end()); |
| 118 | services_.push_back(jid); | 118 | services_.push_back(jid); |
| 119 | serviceDetails_[jid].setName(name); | 119 | serviceDetails_[jid].setName(name); |
| 120 | serviceDetails_[jid].setJID(jid); | 120 | serviceDetails_[jid].setJID(jid); |
| 121 | serviceDetails_[jid].setComplete(false); | 121 | serviceDetails_[jid].setComplete(false); |
| 122 | itemsInProgress_++; | 122 | itemsInProgress_++; |
| 123 | SWIFT_LOG(debug) << "Requesting items of " << jid << " (" << itemsInProgress_ << " item requests in progress)" << std::endl; | 123 | SWIFT_LOG(debug) << "Requesting items of " << jid << " (" << itemsInProgress_ << " item requests in progress)"; |
| 124 | GetDiscoItemsRequest::ref discoItemsRequest = GetDiscoItemsRequest::create(jid, iqRouter_); | 124 | GetDiscoItemsRequest::ref discoItemsRequest = GetDiscoItemsRequest::create(jid, iqRouter_); |
| 125 | discoItemsRequest->onResponse.connect(boost::bind(&MUCSearchController::handleRoomsItemsResponse, this, _1, _2, jid)); | 125 | discoItemsRequest->onResponse.connect(boost::bind(&MUCSearchController::handleRoomsItemsResponse, this, _1, _2, jid)); |
| 126 | discoItemsRequest->send(); | 126 | discoItemsRequest->send(); |
| @@ -132,7 +132,7 @@ void MUCSearchController::handleDiscoServiceFound(const JID& jid, std::shared_pt | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | void MUCSearchController::handleDiscoWalkFinished() { | 134 | void MUCSearchController::handleDiscoWalkFinished() { |
| 135 | SWIFT_LOG(debug) << "MUC Walk finished" << std::endl; | 135 | SWIFT_LOG(debug) << "MUC Walk finished"; |
| 136 | updateInProgressness(); | 136 | updateInProgressness(); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| @@ -144,7 +144,7 @@ void MUCSearchController::removeService(const JID& jid) { | |||
| 144 | 144 | ||
| 145 | void MUCSearchController::handleRoomsItemsResponse(std::shared_ptr<DiscoItems> items, ErrorPayload::ref error, const JID& jid) { | 145 | void MUCSearchController::handleRoomsItemsResponse(std::shared_ptr<DiscoItems> items, ErrorPayload::ref error, const JID& jid) { |
| 146 | itemsInProgress_--; | 146 | itemsInProgress_--; |
| 147 | SWIFT_LOG(debug) << "Items received for " << jid << " (" << itemsInProgress_ << " item requests in progress)" << std::endl; | 147 | SWIFT_LOG(debug) << "Items received for " << jid << " (" << itemsInProgress_ << " item requests in progress)"; |
| 148 | updateInProgressness(); | 148 | updateInProgressness(); |
| 149 | if (error) { | 149 | if (error) { |
| 150 | handleDiscoError(jid, error); | 150 | handleDiscoError(jid, error); |
diff --git a/Swift/Controllers/FileTransfer/FileTransferController.cpp b/Swift/Controllers/FileTransfer/FileTransferController.cpp index 27e9dbf..5b86a7b 100644 --- a/Swift/Controllers/FileTransfer/FileTransferController.cpp +++ b/Swift/Controllers/FileTransfer/FileTransferController.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (c) 2015-2017 Isode Limited. | 8 | * Copyright (c) 2015-2019 Isode Limited. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * See the COPYING file for more information. | 10 | * See the COPYING file for more information. |
| 11 | */ | 11 | */ |
| @@ -82,7 +82,7 @@ boost::uintmax_t FileTransferController::getSize() const { | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | void FileTransferController::start(std::string& description) { | 84 | void FileTransferController::start(std::string& description) { |
| 85 | SWIFT_LOG(debug) << "FileTransferController::start" << std::endl; | 85 | SWIFT_LOG(debug) << "FileTransferController::start"; |
| 86 | fileReadStream = std::make_shared<FileReadBytestream>(boost::filesystem::path(filename)); | 86 | fileReadStream = std::make_shared<FileReadBytestream>(boost::filesystem::path(filename)); |
| 87 | OutgoingFileTransfer::ref outgoingTransfer = ftManager->createOutgoingFileTransfer(otherParty, boost::filesystem::path(filename), description, fileReadStream); | 87 | OutgoingFileTransfer::ref outgoingTransfer = ftManager->createOutgoingFileTransfer(otherParty, boost::filesystem::path(filename), description, fileReadStream); |
| 88 | if (outgoingTransfer) { | 88 | if (outgoingTransfer) { |
| @@ -98,7 +98,7 @@ void FileTransferController::start(std::string& description) { | |||
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | void FileTransferController::accept(std::string& file) { | 100 | void FileTransferController::accept(std::string& file) { |
| 101 | SWIFT_LOG(debug) << "FileTransferController::accept" << std::endl; | 101 | SWIFT_LOG(debug) << "FileTransferController::accept"; |
| 102 | IncomingFileTransfer::ref incomingTransfer = std::dynamic_pointer_cast<IncomingFileTransfer>(transfer); | 102 | IncomingFileTransfer::ref incomingTransfer = std::dynamic_pointer_cast<IncomingFileTransfer>(transfer); |
| 103 | if (incomingTransfer) { | 103 | if (incomingTransfer) { |
| 104 | fileWriteStream = std::make_shared<FileWriteBytestream>(boost::filesystem::path(file)); | 104 | fileWriteStream = std::make_shared<FileWriteBytestream>(boost::filesystem::path(file)); |
diff --git a/Swift/Controllers/Highlighting/HighlightManager.cpp b/Swift/Controllers/Highlighting/HighlightManager.cpp index 2ca77e7..f09d94c 100644 --- a/Swift/Controllers/Highlighting/HighlightManager.cpp +++ b/Swift/Controllers/Highlighting/HighlightManager.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (c) 2014-2017 Isode Limited. | 8 | * Copyright (c) 2014-2019 Isode Limited. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * See the COPYING file for more information. | 10 | * See the COPYING file for more information. |
| 11 | */ | 11 | */ |
| @@ -85,7 +85,7 @@ HighlightConfiguration HighlightManager::highlightConfigurationFromString(const | |||
| 85 | } | 85 | } |
| 86 | catch (boost::archive::archive_exception&) { | 86 | catch (boost::archive::archive_exception&) { |
| 87 | configuration = getDefaultConfig(); | 87 | configuration = getDefaultConfig(); |
| 88 | SWIFT_LOG(warning) << "Failed to load highlight configuration. Will use default configuration instead." << std::endl; | 88 | SWIFT_LOG(warning) << "Failed to load highlight configuration. Will use default configuration instead."; |
| 89 | } | 89 | } |
| 90 | return configuration; | 90 | return configuration; |
| 91 | } | 91 | } |
diff --git a/Swift/Controllers/Settings/XMLSettingsProvider.cpp b/Swift/Controllers/Settings/XMLSettingsProvider.cpp index f1049f1..a316cef 100644 --- a/Swift/Controllers/Settings/XMLSettingsProvider.cpp +++ b/Swift/Controllers/Settings/XMLSettingsProvider.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2012-2016 Isode Limited. | 2 | * Copyright (c) 2012-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -20,14 +20,14 @@ XMLSettingsProvider::XMLSettingsProvider(const std::string& xmlConfig) : level_( | |||
| 20 | PlatformXMLParserFactory factory; | 20 | PlatformXMLParserFactory factory; |
| 21 | auto parser = factory.createXMLParser(this, true); | 21 | auto parser = factory.createXMLParser(this, true); |
| 22 | if (parser->parse(xmlConfig)) { | 22 | if (parser->parse(xmlConfig)) { |
| 23 | SWIFT_LOG(debug) << "Found and parsed system config" << std::endl; | 23 | SWIFT_LOG(debug) << "Found and parsed system config"; |
| 24 | } | 24 | } |
| 25 | else { | 25 | else { |
| 26 | SWIFT_LOG(debug) << "Found invalid system config" << std::endl; | 26 | SWIFT_LOG(debug) << "Found invalid system config"; |
| 27 | } | 27 | } |
| 28 | } | 28 | } |
| 29 | else { | 29 | else { |
| 30 | SWIFT_LOG(debug) << "No system config found" << std::endl; | 30 | SWIFT_LOG(debug) << "No system config found"; |
| 31 | } | 31 | } |
| 32 | } | 32 | } |
| 33 | 33 | ||
| @@ -110,7 +110,7 @@ void XMLSettingsProvider::handleStartElement(const std::string& element, const s | |||
| 110 | void XMLSettingsProvider::handleEndElement(const std::string& /*element*/, const std::string& /*ns*/) { | 110 | void XMLSettingsProvider::handleEndElement(const std::string& /*element*/, const std::string& /*ns*/) { |
| 111 | if (level_ == SettingLevel) { | 111 | if (level_ == SettingLevel) { |
| 112 | values_[currentElement_] = currentText_; | 112 | values_[currentElement_] = currentText_; |
| 113 | SWIFT_LOG(debug) << "Setting value of " << currentElement_ << " to " << currentText_ << std::endl; | 113 | SWIFT_LOG(debug) << "Setting value of " << currentElement_ << " to " << currentText_; |
| 114 | } | 114 | } |
| 115 | level_--; | 115 | level_--; |
| 116 | } | 116 | } |
diff --git a/Swift/Controllers/StatusCache.cpp b/Swift/Controllers/StatusCache.cpp index 3c6baed..f9196f6 100644 --- a/Swift/Controllers/StatusCache.cpp +++ b/Swift/Controllers/StatusCache.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2012-2016 Isode Limited. | 2 | * Copyright (c) 2012-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -76,13 +76,13 @@ void StatusCache::loadRecents() { | |||
| 76 | previousStatuses_.push_back(PreviousStatus(boost::trim_copy(bits[1]), type)); | 76 | previousStatuses_.push_back(PreviousStatus(boost::trim_copy(bits[1]), type)); |
| 77 | } | 77 | } |
| 78 | catch (const boost::bad_lexical_cast& e) { | 78 | catch (const boost::bad_lexical_cast& e) { |
| 79 | SWIFT_LOG(error) << "Failed to load recent status cache entry: " << e.what() << std::endl; | 79 | SWIFT_LOG(error) << "Failed to load recent status cache entry: " << e.what(); |
| 80 | } | 80 | } |
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | } | 83 | } |
| 84 | catch (const boost::filesystem::filesystem_error& e) { | 84 | catch (const boost::filesystem::filesystem_error& e) { |
| 85 | SWIFT_LOG(error) << "Failed to load recents: " << e.what() << std::endl; | 85 | SWIFT_LOG(error) << "Failed to load recents: " << e.what(); |
| 86 | } | 86 | } |
| 87 | } | 87 | } |
| 88 | 88 | ||
| @@ -100,7 +100,7 @@ void StatusCache::saveRecents() { | |||
| 100 | file.close(); | 100 | file.close(); |
| 101 | } | 101 | } |
| 102 | catch (const boost::filesystem::filesystem_error& e) { | 102 | catch (const boost::filesystem::filesystem_error& e) { |
| 103 | SWIFT_LOG(error) << "Failed to save recents: " << e.what() << std::endl; | 103 | SWIFT_LOG(error) << "Failed to save recents: " << e.what(); |
| 104 | } | 104 | } |
| 105 | } | 105 | } |
| 106 | 106 | ||
diff --git a/Swift/Controllers/Storages/AvatarFileStorage.cpp b/Swift/Controllers/Storages/AvatarFileStorage.cpp index 9d9b9ea..808c432 100644 --- a/Swift/Controllers/Storages/AvatarFileStorage.cpp +++ b/Swift/Controllers/Storages/AvatarFileStorage.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2018 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -30,13 +30,13 @@ AvatarFileStorage::AvatarFileStorage(const boost::filesystem::path& avatarsDir, | |||
| 30 | jidAvatars.insert(std::make_pair(jid, r.first)); | 30 | jidAvatars.insert(std::make_pair(jid, r.first)); |
| 31 | } | 31 | } |
| 32 | else if (!r.first.empty() || !r.second.empty()) { | 32 | else if (!r.first.empty() || !r.second.empty()) { |
| 33 | SWIFT_LOG(error) << "Invalid entry in avatars file: " << r.second << std::endl; | 33 | SWIFT_LOG(error) << "Invalid entry in avatars file: " << r.second; |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| 38 | catch (...) { | 38 | catch (...) { |
| 39 | SWIFT_LOG(error) << "Error reading avatars file" << std::endl; | 39 | SWIFT_LOG(error) << "Error reading avatars file"; |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| 42 | } | 42 | } |
| @@ -54,7 +54,7 @@ void AvatarFileStorage::addAvatar(const std::string& hash, const ByteArray& avat | |||
| 54 | boost::filesystem::create_directories(avatarPath.parent_path()); | 54 | boost::filesystem::create_directories(avatarPath.parent_path()); |
| 55 | } | 55 | } |
| 56 | catch (const boost::filesystem::filesystem_error& e) { | 56 | catch (const boost::filesystem::filesystem_error& e) { |
| 57 | SWIFT_LOG(error) << "filesystem error: " << e.what() << std::endl; | 57 | SWIFT_LOG(error) << "filesystem error: " << e.what(); |
| 58 | } | 58 | } |
| 59 | } | 59 | } |
| 60 | 60 | ||
| @@ -63,7 +63,7 @@ void AvatarFileStorage::addAvatar(const std::string& hash, const ByteArray& avat | |||
| 63 | file.write(reinterpret_cast<const char*>(vecptr(avatar)), static_cast<std::streamsize>(avatar.size())); | 63 | file.write(reinterpret_cast<const char*>(vecptr(avatar)), static_cast<std::streamsize>(avatar.size())); |
| 64 | } | 64 | } |
| 65 | catch (const boost::filesystem::filesystem_error& e) { | 65 | catch (const boost::filesystem::filesystem_error& e) { |
| 66 | SWIFT_LOG(error) << "filesystem error: " << e.what() << std::endl; | 66 | SWIFT_LOG(error) << "filesystem error: " << e.what(); |
| 67 | } | 67 | } |
| 68 | } | 68 | } |
| 69 | 69 | ||
| @@ -77,7 +77,7 @@ ByteArray AvatarFileStorage::getAvatar(const std::string& hash) const { | |||
| 77 | readByteArrayFromFile(data, getAvatarPath(hash)); | 77 | readByteArrayFromFile(data, getAvatarPath(hash)); |
| 78 | } | 78 | } |
| 79 | catch (const boost::filesystem::filesystem_error& e) { | 79 | catch (const boost::filesystem::filesystem_error& e) { |
| 80 | SWIFT_LOG(error) << "filesystem error: " << e.what() << std::endl; | 80 | SWIFT_LOG(error) << "filesystem error: " << e.what(); |
| 81 | } | 81 | } |
| 82 | return data; | 82 | return data; |
| 83 | } | 83 | } |
| @@ -107,7 +107,7 @@ void AvatarFileStorage::saveJIDAvatars() { | |||
| 107 | file.close(); | 107 | file.close(); |
| 108 | } | 108 | } |
| 109 | catch (...) { | 109 | catch (...) { |
| 110 | SWIFT_LOG(error) << "Error writing avatars file" << std::endl; | 110 | SWIFT_LOG(error) << "Error writing avatars file"; |
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | 113 | ||
diff --git a/Swift/Controllers/Storages/CertificateFileStorage.cpp b/Swift/Controllers/Storages/CertificateFileStorage.cpp index 2e1343f..a8661df 100644 --- a/Swift/Controllers/Storages/CertificateFileStorage.cpp +++ b/Swift/Controllers/Storages/CertificateFileStorage.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2018 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -31,7 +31,7 @@ bool CertificateFileStorage::hasCertificate(Certificate::ref certificate) const | |||
| 31 | return true; | 31 | return true; |
| 32 | } | 32 | } |
| 33 | else { | 33 | else { |
| 34 | SWIFT_LOG(warning) << "Stored certificate does not match received certificate" << std::endl; | 34 | SWIFT_LOG(warning) << "Stored certificate does not match received certificate"; |
| 35 | return false; | 35 | return false; |
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| @@ -57,7 +57,7 @@ void CertificateFileStorage::addCertificate(Certificate::ref certificate) { | |||
| 57 | file.close(); | 57 | file.close(); |
| 58 | } | 58 | } |
| 59 | catch (...) { | 59 | catch (...) { |
| 60 | SWIFT_LOG(warning) << "Failed to store certificate to " << certificatePath << std::endl; | 60 | SWIFT_LOG(warning) << "Failed to store certificate to " << certificatePath; |
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| 63 | 63 | ||
Swift