avoid auto-sending text when a file is pasted in chat. The text is copied to the edit window instead (Patch from Phenom)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6602 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-08-23 20:51:21 +00:00
parent b73e08d618
commit 38d875fa7f

View File

@ -883,15 +883,8 @@ void ChatWidget::fileHashingFinished(QList<HashedFile> hashedFiles)
std::cerr << "ChatWidget::fileHashingFinished message : " << message.toStdString() << std::endl; std::cerr << "ChatWidget::fileHashingFinished message : " << message.toStdString() << std::endl;
#endif #endif
/* convert to real html document */ ui->chatTextEdit->insertHtml(message);
QTextBrowser textBrowser;
textBrowser.setHtml(message);
std::wstring msg = textBrowser.toHtml().toStdWString();
if (rsMsgs->sendPrivateChat(peerId, msg)) {
QDateTime currentTime = QDateTime::currentDateTime();
addChatMsg(false, name, currentTime, currentTime, QString::fromStdWString(msg), TYPE_NORMAL);
}
} }
bool ChatWidget::fileSave() bool ChatWidget::fileSave()