summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-07-06 14:01:08 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-07-10 11:53:53 (GMT)
commitf86ecc365a4efbde5dc388af7b083cb2b7908999 (patch)
treee10910f630f2fc88c1d4f68b581c38115d7c1b57 /Swift/QtUI
parentb9535a45e856213050ec1e73539a68ebcc0f801e (diff)
downloadswift-f86ecc365a4efbde5dc388af7b083cb2b7908999.zip
swift-f86ecc365a4efbde5dc388af7b083cb2b7908999.tar.bz2
Show correct times for file-transfer requests and MUC invitations
The code passed local time to the B2QDATE macro. The B2QDATE macro however requires its input to be in UTC. Test-Information: Tested a file-transfer and MUC invite between two Swift instances. Change-Id: I3a44f35d804b4029a6ff80548a6cb8a1d3edc27e
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtWebKitChatView.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp
index b7f96f6..57706d4 100644
--- a/Swift/QtUI/QtWebKitChatView.cpp
+++ b/Swift/QtUI/QtWebKitChatView.cpp
@@ -689,7 +689,7 @@ std::string QtWebKitChatView::addFileTransfer(const std::string& senderName, boo
QString qAvatarPath = "qrc:/icons/avatar.png";
std::string id = "ftmessage" + boost::lexical_cast<std::string>(idCounter_++);
- addMessageBottom(boost::make_shared<MessageSnippet>(htmlString, QtUtilities::htmlEscape(P2QSTRING(senderName)), B2QDATE(boost::posix_time::second_clock::local_time()), qAvatarPath, senderIsSelf, appendToPrevious, theme_, P2QSTRING(id), ChatSnippet::getDirection(actionText)));
+ addMessageBottom(boost::make_shared<MessageSnippet>(htmlString, QtUtilities::htmlEscape(P2QSTRING(senderName)), B2QDATE(boost::posix_time::second_clock::universal_time()), qAvatarPath, senderIsSelf, appendToPrevious, theme_, P2QSTRING(id), ChatSnippet::getDirection(actionText)));
previousMessageWasSelf_ = senderIsSelf;
previousSenderName_ = P2QSTRING(senderName);
@@ -723,7 +723,7 @@ std::string QtWebKitChatView::addWhiteboardRequest(const QString& contact, bool
}
QString qAvatarPath = "qrc:/icons/avatar.png";
std::string id = "wbmessage" + boost::lexical_cast<std::string>(idCounter_++);
- addMessageBottom(boost::make_shared<MessageSnippet>(htmlString, QtUtilities::htmlEscape(contact), B2QDATE(boost::posix_time::second_clock::local_time()), qAvatarPath, false, false, theme_, P2QSTRING(id), ChatSnippet::getDirection(actionText)));
+ addMessageBottom(boost::make_shared<MessageSnippet>(htmlString, QtUtilities::htmlEscape(contact), B2QDATE(boost::posix_time::second_clock::universal_time()), qAvatarPath, false, false, theme_, P2QSTRING(id), ChatSnippet::getDirection(actionText)));
previousMessageWasSelf_ = false;
previousSenderName_ = contact;
return Q2PSTRING(wb_id);
@@ -926,7 +926,7 @@ void QtWebKitChatView::addMUCInvitation(const std::string& senderName, const JID
QString qAvatarPath = "qrc:/icons/avatar.png";
- addMessageBottom(boost::make_shared<MessageSnippet>(htmlString, QtUtilities::htmlEscape(P2QSTRING(senderName)), B2QDATE(boost::posix_time::second_clock::local_time()), qAvatarPath, false, appendToPrevious, theme_, id, ChatSnippet::getDirection(message)));
+ addMessageBottom(boost::make_shared<MessageSnippet>(htmlString, QtUtilities::htmlEscape(P2QSTRING(senderName)), B2QDATE(boost::posix_time::second_clock::universal_time()), qAvatarPath, false, appendToPrevious, theme_, id, ChatSnippet::getDirection(message)));
previousMessageWasSelf_ = false;
previousSenderName_ = P2QSTRING(senderName);
previousMessageKind_ = PreviousMessageWasMUCInvite;