summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Mons <edwin.mons@isode.com>2019-11-19 13:36:05 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2019-11-19 13:58:45 (GMT)
commit261ba8d8595ed8cb90f9c4feb1d6ef642942bcba (patch)
treec7e60d473509db8c4dbff5aa83fbde963d8dd75e /Swift/QtUI/QtWebKitChatView.cpp
parent697ae6ae84512a744958b24118197ec7bfdbc1f0 (diff)
downloadswift-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/QtUI/QtWebKitChatView.cpp')
-rw-r--r--Swift/QtUI/QtWebKitChatView.cpp18
1 files changed, 9 insertions, 9 deletions
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
142void QtWebKitChatView::addMessageTop(std::shared_ptr<ChatSnippet> /* snippet */) { 142void 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
147void QtWebKitChatView::addToDOM(std::shared_ptr<ChatSnippet> snippet) { 147void 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
484void QtWebKitChatView::resetTopInsertPoint() { 484void 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
489std::string QtWebKitChatView::addMessage( 489std::string QtWebKitChatView::addMessage(
@@ -624,7 +624,7 @@ void QtWebKitChatView::resizeEvent(QResizeEvent* event) {
624} 624}
625 625
626std::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) { 626std::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) {
726void QtWebKitChatView::setFileTransferWarning(QString id, QString warningText) { 726void 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) {
737void QtWebKitChatView::removeFileTransferWarning(QString id) { 737void 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