diff options
| author | Edwin Mons <edwin.mons@isode.com> | 2019-11-19 13:36:05 (GMT) |
|---|---|---|
| committer | Edwin Mons <edwin.mons@isode.com> | 2019-11-19 13:58:45 (GMT) |
| commit | 261ba8d8595ed8cb90f9c4feb1d6ef642942bcba (patch) | |
| tree | c7e60d473509db8c4dbff5aa83fbde963d8dd75e /Swift | |
| parent | 697ae6ae84512a744958b24118197ec7bfdbc1f0 (diff) | |
| download | swift-261ba8d8595ed8cb90f9c4feb1d6ef642942bcba.zip swift-261ba8d8595ed8cb90f9c4feb1d6ef642942bcba.tar.bz2 | |
Remove std::endl from SWIFT_LOG calls
The std::endl is now added by ~Log, but only for output to stderr or a
log file. Calls to the Android logging system or manually set callbacks
will not include the newline in the logging output.
JIRA: SWIFT-430
Test-Information:
Unit tests pass on Debian 9
Checked that running Swift with logging to stderr still had a newline.
Change-Id: I096fdba78a3b8f87db2097951c28c528592183e8
Diffstat (limited to 'Swift')
| -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 | ||||
| -rw-r--r-- | Swift/QtUI/CAPICertificateSelector.cpp | 12 | ||||
| -rw-r--r-- | Swift/QtUI/QtAboutWidget.cpp | 4 | ||||
| -rw-r--r-- | Swift/QtUI/QtScaledAvatarCache.cpp | 8 | ||||
| -rw-r--r-- | Swift/QtUI/QtSpellCheckerWindow.cpp | 4 | ||||
| -rw-r--r-- | Swift/QtUI/QtSwift.cpp | 8 | ||||
| -rw-r--r-- | Swift/QtUI/QtTextEdit.cpp | 4 | ||||
| -rw-r--r-- | Swift/QtUI/QtUIFactory.cpp | 6 | ||||
| -rw-r--r-- | Swift/QtUI/QtWebKitChatView.cpp | 18 | ||||
| -rw-r--r-- | Swift/QtUI/Trellis/QtDynamicGridLayout.cpp | 8 |
19 files changed, 81 insertions, 81 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 | ||
diff --git a/Swift/QtUI/CAPICertificateSelector.cpp b/Swift/QtUI/CAPICertificateSelector.cpp index e47121b..7e4bc0b 100644 --- a/Swift/QtUI/CAPICertificateSelector.cpp +++ b/Swift/QtUI/CAPICertificateSelector.cpp | |||
| @@ -80,11 +80,11 @@ std::string selectCAPICertificate() { | |||
| 80 | if (titleLength == 0 || promptLength == 0) { | 80 | if (titleLength == 0 || promptLength == 0) { |
| 81 | int error = GetLastError(); | 81 | int error = GetLastError(); |
| 82 | switch (error) { | 82 | switch (error) { |
| 83 | case ERROR_INSUFFICIENT_BUFFER: SWIFT_LOG(error) << "Insufficient buffer for rendering cert dialog" << std::endl;break; | 83 | case ERROR_INSUFFICIENT_BUFFER: SWIFT_LOG(error) << "Insufficient buffer for rendering cert dialog"; break; |
| 84 | case ERROR_INVALID_FLAGS: SWIFT_LOG(error) << "Invalid flags for rendering cert dialog" << std::endl;break; | 84 | case ERROR_INVALID_FLAGS: SWIFT_LOG(error) << "Invalid flags for rendering cert dialog"; break; |
| 85 | case ERROR_INVALID_PARAMETER: SWIFT_LOG(error) << "Invalid parameter for rendering cert dialog" << std::endl;break; | 85 | case ERROR_INVALID_PARAMETER: SWIFT_LOG(error) << "Invalid parameter for rendering cert dialog"; break; |
| 86 | case ERROR_NO_UNICODE_TRANSLATION: SWIFT_LOG(error) << "Invalid unicode for rendering cert dialog" << std::endl;break; | 86 | case ERROR_NO_UNICODE_TRANSLATION: SWIFT_LOG(error) << "Invalid unicode for rendering cert dialog"; break; |
| 87 | default: SWIFT_LOG(error) << "Unexpected multibyte conversion errorcode" << std::endl; | 87 | default: SWIFT_LOG(error) << "Unexpected multibyte conversion errorcode"; |
| 88 | 88 | ||
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| @@ -103,7 +103,7 @@ std::string selectCAPICertificate() { | |||
| 103 | 103 | ||
| 104 | if (hstore) { | 104 | if (hstore) { |
| 105 | if (CertCloseStore(hstore, 0) == FALSE) { | 105 | if (CertCloseStore(hstore, 0) == FALSE) { |
| 106 | SWIFT_LOG(debug) << "Failed to close the certificate store handle." << std::endl; | 106 | SWIFT_LOG(debug) << "Failed to close the certificate store handle."; |
| 107 | } | 107 | } |
| 108 | } | 108 | } |
| 109 | 109 | ||
diff --git a/Swift/QtUI/QtAboutWidget.cpp b/Swift/QtUI/QtAboutWidget.cpp index 2db0c9d..0a4e0ba 100644 --- a/Swift/QtUI/QtAboutWidget.cpp +++ b/Swift/QtUI/QtAboutWidget.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2017 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 | */ |
| @@ -150,7 +150,7 @@ void QtAboutWidget::openPlainTextWindow(const QString& path) { | |||
| 150 | text->activateWindow(); | 150 | text->activateWindow(); |
| 151 | } | 151 | } |
| 152 | else { | 152 | else { |
| 153 | SWIFT_LOG(error) << "Failed to open " << Q2PSTRING(path) << "." << std::endl; | 153 | SWIFT_LOG(error) << "Failed to open " << Q2PSTRING(path) << "."; |
| 154 | } | 154 | } |
| 155 | } | 155 | } |
| 156 | 156 | ||
diff --git a/Swift/QtUI/QtScaledAvatarCache.cpp b/Swift/QtUI/QtScaledAvatarCache.cpp index 37ea6a9..e3a28d6 100644 --- a/Swift/QtUI/QtScaledAvatarCache.cpp +++ b/Swift/QtUI/QtScaledAvatarCache.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2011-2016 Isode Limited. | 2 | * Copyright (c) 2011-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 | */ |
| @@ -53,8 +53,8 @@ QString QtScaledAvatarCache::getScaledAvatarPath(const QString& path) { | |||
| 53 | if (avatarFile.exists() && !avatarFile.absolutePath().startsWith(":/")) { | 53 | if (avatarFile.exists() && !avatarFile.absolutePath().startsWith(":/")) { |
| 54 | QString cacheSubPath = QString("ScaledAvatarCacheV%1/%2").arg(QString::number(QT_SCALED_AVATAR_CACHE_VERSION), QString::number(size)); | 54 | QString cacheSubPath = QString("ScaledAvatarCacheV%1/%2").arg(QString::number(QT_SCALED_AVATAR_CACHE_VERSION), QString::number(size)); |
| 55 | if (!avatarFile.dir().mkpath(cacheSubPath)) { | 55 | if (!avatarFile.dir().mkpath(cacheSubPath)) { |
| 56 | SWIFT_LOG(error) << "avatarFile.dir(): " << Q2PSTRING(avatarFile.dir().absolutePath()) << std::endl; | 56 | SWIFT_LOG(error) << "avatarFile.dir(): " << Q2PSTRING(avatarFile.dir().absolutePath()); |
| 57 | SWIFT_LOG(error) << "Failed creating cache folder: " << Q2PSTRING(cacheSubPath) << std::endl; | 57 | SWIFT_LOG(error) << "Failed creating cache folder: " << Q2PSTRING(cacheSubPath); |
| 58 | return path; | 58 | return path; |
| 59 | } | 59 | } |
| 60 | QDir targetDir(avatarFile.dir().absoluteFilePath(cacheSubPath)); | 60 | QDir targetDir(avatarFile.dir().absoluteFilePath(cacheSubPath)); |
| @@ -75,7 +75,7 @@ QString QtScaledAvatarCache::getScaledAvatarPath(const QString& path) { | |||
| 75 | return path; | 75 | return path; |
| 76 | } | 76 | } |
| 77 | } else { | 77 | } else { |
| 78 | SWIFT_LOG(warning) << "Failed to load " << Q2PSTRING(path) << std::endl; | 78 | SWIFT_LOG(warning) << "Failed to load " << Q2PSTRING(path); |
| 79 | } | 79 | } |
| 80 | } | 80 | } |
| 81 | return targetFile; | 81 | return targetFile; |
diff --git a/Swift/QtUI/QtSpellCheckerWindow.cpp b/Swift/QtUI/QtSpellCheckerWindow.cpp index a8178c4..23b0963 100644 --- a/Swift/QtUI/QtSpellCheckerWindow.cpp +++ b/Swift/QtUI/QtSpellCheckerWindow.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (c) 2016 Isode Limited. | 8 | * Copyright (c) 2016-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 | */ |
| @@ -64,7 +64,7 @@ void QtSpellCheckerWindow::setSupportedLanguages(const std::vector<std::string>& | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | void QtSpellCheckerWindow::setActiveLanguage(const std::string& language) { | 66 | void QtSpellCheckerWindow::setActiveLanguage(const std::string& language) { |
| 67 | SWIFT_LOG_ASSERT(languageItems_.find(language) != languageItems_.end(), warning) << "Language '" << language << "' is not available." << std::endl; | 67 | SWIFT_LOG_ASSERT(languageItems_.find(language) != languageItems_.end(), warning) << "Language '" << language << "' is not available."; |
| 68 | if (languageItems_.find(language) != languageItems_.end()) { | 68 | if (languageItems_.find(language) != languageItems_.end()) { |
| 69 | languageItems_[language]->setSelected(true); | 69 | languageItems_[language]->setSelected(true); |
| 70 | } | 70 | } |
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index f1ad38e..73fd733 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.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 | */ |
| @@ -191,7 +191,7 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa | |||
| 191 | Log::setLogFile(fileName); | 191 | Log::setLogFile(fileName); |
| 192 | } | 192 | } |
| 193 | catch (...) { | 193 | catch (...) { |
| 194 | SWIFT_LOG(error) << "Error while retrieving the specified log file name from the command line" << std::endl; | 194 | SWIFT_LOG(error) << "Error while retrieving the specified log file name from the command line"; |
| 195 | } | 195 | } |
| 196 | } | 196 | } |
| 197 | //TODO this old option can be purged | 197 | //TODO this old option can be purged |
| @@ -222,13 +222,13 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa | |||
| 222 | for (auto&& fontName : fontNames) { | 222 | for (auto&& fontName : fontNames) { |
| 223 | std::string fontPath = std::string(":/") + fontName; | 223 | std::string fontPath = std::string(":/") + fontName; |
| 224 | int error = QFontDatabase::addApplicationFont(P2QSTRING(fontPath)); | 224 | int error = QFontDatabase::addApplicationFont(P2QSTRING(fontPath)); |
| 225 | SWIFT_LOG_ASSERT(error != -1, error) << "Failed to load font " << fontPath << std::endl; | 225 | SWIFT_LOG_ASSERT(error != -1, error) << "Failed to load font " << fontPath; |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | #ifdef SWIFTEN_PLATFORM_LINUX | 228 | #ifdef SWIFTEN_PLATFORM_LINUX |
| 229 | std::string fontPath = std::string(":/themes/Default/Noto/NotoColorEmoji.ttf"); | 229 | std::string fontPath = std::string(":/themes/Default/Noto/NotoColorEmoji.ttf"); |
| 230 | int error = QFontDatabase::addApplicationFont(P2QSTRING(fontPath)); | 230 | int error = QFontDatabase::addApplicationFont(P2QSTRING(fontPath)); |
| 231 | SWIFT_LOG_ASSERT(error != -1, error) << "Failed to load font " << fontPath << std::endl; | 231 | SWIFT_LOG_ASSERT(error != -1, error) << "Failed to load font " << fontPath; |
| 232 | QFont::insertSubstitution(QApplication::font().family(),"NotoColorEmoji"); | 232 | QFont::insertSubstitution(QApplication::font().family(),"NotoColorEmoji"); |
| 233 | #endif | 233 | #endif |
| 234 | #ifdef SWIFTEN_PLATFORM_WINDOWS | 234 | #ifdef SWIFTEN_PLATFORM_WINDOWS |
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp index e63cd4f..b3c57a7 100644 --- a/Swift/QtUI/QtTextEdit.cpp +++ b/Swift/QtUI/QtTextEdit.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2017 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 | */ |
| @@ -240,7 +240,7 @@ void QtTextEdit::setUpSpellChecker() { | |||
| 240 | } | 240 | } |
| 241 | else { | 241 | else { |
| 242 | // Spellchecking is not working, as we did not get a valid checker from the factory. Disable spellchecking. | 242 | // Spellchecking is not working, as we did not get a valid checker from the factory. Disable spellchecking. |
| 243 | SWIFT_LOG(warning) << "Spellchecking is currently misconfigured in Swift (e.g. missing dictionary or broken dictionary file). Disable spellchecking." << std::endl; | 243 | SWIFT_LOG(warning) << "Spellchecking is currently misconfigured in Swift (e.g. missing dictionary or broken dictionary file). Disable spellchecking."; |
| 244 | settings_->storeSetting(QtUISettingConstants::SPELL_CHECKER, false); | 244 | settings_->storeSetting(QtUISettingConstants::SPELL_CHECKER, false); |
| 245 | } | 245 | } |
| 246 | 246 | ||
diff --git a/Swift/QtUI/QtUIFactory.cpp b/Swift/QtUI/QtUIFactory.cpp index 93fca5f..49f55dd 100644 --- a/Swift/QtUI/QtUIFactory.cpp +++ b/Swift/QtUI/QtUIFactory.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 | */ |
| @@ -49,9 +49,9 @@ QtUIFactory::QtUIFactory(SettingsProviderHierachy* settings, QtSettingsProvider* | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | QtUIFactory::~QtUIFactory() { | 51 | QtUIFactory::~QtUIFactory() { |
| 52 | SWIFT_LOG(debug) << "Entering QtUIFactory destructor. chatWindows size:" << chatWindows_.size() << std::endl; | 52 | SWIFT_LOG(debug) << "Entering QtUIFactory destructor. chatWindows size:" << chatWindows_.size(); |
| 53 | for (auto chat : chatWindows_) { | 53 | for (auto chat : chatWindows_) { |
| 54 | SWIFT_LOG_ASSERT(chat.isNull(), debug) << "QtUIFactory has active chat windows and has not been reset properly" << std::endl; | 54 | SWIFT_LOG_ASSERT(chat.isNull(), debug) << "QtUIFactory has active chat windows and has not been reset properly"; |
| 55 | } | 55 | } |
| 56 | delete chatWindowFactory_; | 56 | delete chatWindowFactory_; |
| 57 | } | 57 | } |
diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp index bca9e2e..75a23f8 100644 --- a/Swift/QtUI/QtWebKitChatView.cpp +++ b/Swift/QtUI/QtWebKitChatView.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 | */ |
| @@ -141,7 +141,7 @@ void QtWebKitChatView::addMessageBottom(std::shared_ptr<ChatSnippet> snippet) { | |||
| 141 | 141 | ||
| 142 | void QtWebKitChatView::addMessageTop(std::shared_ptr<ChatSnippet> /* snippet */) { | 142 | void QtWebKitChatView::addMessageTop(std::shared_ptr<ChatSnippet> /* snippet */) { |
| 143 | // TODO: Implement this in a sensible manner later. | 143 | // TODO: Implement this in a sensible manner later. |
| 144 | SWIFT_LOG(error) << "Not yet implemented!" << std::endl; | 144 | SWIFT_LOG(error) << "Not yet implemented!"; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | void QtWebKitChatView::addToDOM(std::shared_ptr<ChatSnippet> snippet) { | 147 | void QtWebKitChatView::addToDOM(std::shared_ptr<ChatSnippet> snippet) { |
| @@ -384,7 +384,7 @@ void QtWebKitChatView::setFileTransferProgress(QString id, const int percentageD | |||
| 384 | rememberScrolledToBottom(); | 384 | rememberScrolledToBottom(); |
| 385 | QWebElement ftElement = findElementWithID(document_, "div", id); | 385 | QWebElement ftElement = findElementWithID(document_, "div", id); |
| 386 | if (ftElement.isNull()) { | 386 | if (ftElement.isNull()) { |
| 387 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id!" << std::endl; | 387 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id!"; |
| 388 | return; | 388 | return; |
| 389 | } | 389 | } |
| 390 | QWebElement progressBar = ftElement.findFirst("div.progressbar"); | 390 | QWebElement progressBar = ftElement.findFirst("div.progressbar"); |
| @@ -398,7 +398,7 @@ void QtWebKitChatView::setFileTransferStatus(QString id, const ChatWindow::FileT | |||
| 398 | rememberScrolledToBottom(); | 398 | rememberScrolledToBottom(); |
| 399 | QWebElement ftElement = findElementWithID(document_, "div", id); | 399 | QWebElement ftElement = findElementWithID(document_, "div", id); |
| 400 | if (ftElement.isNull()) { | 400 | if (ftElement.isNull()) { |
| 401 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl; | 401 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id); |
| 402 | return; | 402 | return; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| @@ -483,7 +483,7 @@ int QtWebKitChatView::getSnippetPositionByDate(const QDate& date) { | |||
| 483 | 483 | ||
| 484 | void QtWebKitChatView::resetTopInsertPoint() { | 484 | void QtWebKitChatView::resetTopInsertPoint() { |
| 485 | // TODO: Implement or refactor later. | 485 | // TODO: Implement or refactor later. |
| 486 | SWIFT_LOG(error) << "Not yet implemented!" << std::endl; | 486 | SWIFT_LOG(error) << "Not yet implemented!"; |
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | std::string QtWebKitChatView::addMessage( | 489 | std::string QtWebKitChatView::addMessage( |
| @@ -624,7 +624,7 @@ void QtWebKitChatView::resizeEvent(QResizeEvent* event) { | |||
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | std::string QtWebKitChatView::addFileTransfer(const std::string& senderName, const std::string& avatarPath, bool senderIsSelf, const std::string& filename, const boost::uintmax_t sizeInBytes, const std::string& description) { | 626 | std::string QtWebKitChatView::addFileTransfer(const std::string& senderName, const std::string& avatarPath, bool senderIsSelf, const std::string& filename, const boost::uintmax_t sizeInBytes, const std::string& description) { |
| 627 | SWIFT_LOG(debug) << "addFileTransfer" << std::endl; | 627 | SWIFT_LOG(debug) << "addFileTransfer"; |
| 628 | QString ft_id = QString("ft%1").arg(P2QSTRING(boost::lexical_cast<std::string>(idCounter_++))); | 628 | QString ft_id = QString("ft%1").arg(P2QSTRING(boost::lexical_cast<std::string>(idCounter_++))); |
| 629 | 629 | ||
| 630 | QString actionText; | 630 | QString actionText; |
| @@ -726,7 +726,7 @@ static bool isFilePathWritable(const QString& path) { | |||
| 726 | void QtWebKitChatView::setFileTransferWarning(QString id, QString warningText) { | 726 | void QtWebKitChatView::setFileTransferWarning(QString id, QString warningText) { |
| 727 | QWebElement ftElement = findElementWithID(document_, "div", id); | 727 | QWebElement ftElement = findElementWithID(document_, "div", id); |
| 728 | if (ftElement.isNull()) { | 728 | if (ftElement.isNull()) { |
| 729 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl; | 729 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id); |
| 730 | return; | 730 | return; |
| 731 | } | 731 | } |
| 732 | 732 | ||
| @@ -737,7 +737,7 @@ void QtWebKitChatView::setFileTransferWarning(QString id, QString warningText) { | |||
| 737 | void QtWebKitChatView::removeFileTransferWarning(QString id) { | 737 | void QtWebKitChatView::removeFileTransferWarning(QString id) { |
| 738 | QWebElement ftElement = findElementWithID(document_, "div", id); | 738 | QWebElement ftElement = findElementWithID(document_, "div", id); |
| 739 | if (ftElement.isNull()) { | 739 | if (ftElement.isNull()) { |
| 740 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl; | 740 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id); |
| 741 | return; | 741 | return; |
| 742 | } | 742 | } |
| 743 | 743 | ||
| @@ -829,7 +829,7 @@ void QtWebKitChatView::handleHTMLButtonClicked(QString id, QString encodedArgume | |||
| 829 | window_->resendMessage(Q2PSTRING(chatID)); | 829 | window_->resendMessage(Q2PSTRING(chatID)); |
| 830 | } | 830 | } |
| 831 | else { | 831 | else { |
| 832 | SWIFT_LOG(debug) << "Unknown HTML button! ( " << Q2PSTRING(id) << " )" << std::endl; | 832 | SWIFT_LOG(debug) << "Unknown HTML button! ( " << Q2PSTRING(id) << " )"; |
| 833 | } | 833 | } |
| 834 | } | 834 | } |
| 835 | 835 | ||
diff --git a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp index 2402529..53e2733 100644 --- a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp +++ b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2014-2016 Isode Limited. | 2 | * Copyright (c) 2014-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 | */ |
| @@ -514,9 +514,9 @@ void QtDynamicGridLayout::updateTabPositions() { | |||
| 514 | 514 | ||
| 515 | void QtDynamicGridLayout::moveTab(QtTabWidget* tabWidget, int oldIndex, int newIndex) { | 515 | void QtDynamicGridLayout::moveTab(QtTabWidget* tabWidget, int oldIndex, int newIndex) { |
| 516 | #if QT_VERSION >= 0x040500 | 516 | #if QT_VERSION >= 0x040500 |
| 517 | SWIFT_LOG_ASSERT(movingTab_ == nullptr, error) << std::endl; | 517 | SWIFT_LOG_ASSERT(movingTab_ == nullptr, error); |
| 518 | movingTab_ = qobject_cast<QtTabbable*>(tabWidget->widget(oldIndex)); | 518 | movingTab_ = qobject_cast<QtTabbable*>(tabWidget->widget(oldIndex)); |
| 519 | SWIFT_LOG_ASSERT(movingTab_ != nullptr, error) << std::endl; | 519 | SWIFT_LOG_ASSERT(movingTab_ != nullptr, error); |
| 520 | 520 | ||
| 521 | if (movingTab_) { | 521 | if (movingTab_) { |
| 522 | // Install event filter that filters out events issued during the internal movement of the | 522 | // Install event filter that filters out events issued during the internal movement of the |
| @@ -526,7 +526,7 @@ void QtDynamicGridLayout::moveTab(QtTabWidget* tabWidget, int oldIndex, int newI | |||
| 526 | tabWidget->tabBar()->moveTab(oldIndex, newIndex); | 526 | tabWidget->tabBar()->moveTab(oldIndex, newIndex); |
| 527 | 527 | ||
| 528 | qApp->removeEventFilter(this); | 528 | qApp->removeEventFilter(this); |
| 529 | SWIFT_LOG_ASSERT(movingTab_ == tabWidget->widget(newIndex), error) << std::endl; | 529 | SWIFT_LOG_ASSERT(movingTab_ == tabWidget->widget(newIndex), error); |
| 530 | } | 530 | } |
| 531 | movingTab_ = nullptr; | 531 | movingTab_ = nullptr; |
| 532 | tabWidget->widget(newIndex)->setFocus(); | 532 | tabWidget->widget(newIndex)->setFocus(); |
Swift