mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
send plain text message instead of html, when the text contains no html specifics. This is a huge gain in forum posts size, up to a factor of 50
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4247 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
29553d1ae3
commit
844aa174b5
@ -144,6 +144,12 @@ void CreateForumMsg::createMsg()
|
|||||||
QString name = misc::removeNewLine(ui.forumSubject->text());
|
QString name = misc::removeNewLine(ui.forumSubject->text());
|
||||||
QString desc = ui.forumMessage->toHtml();
|
QString desc = ui.forumMessage->toHtml();
|
||||||
|
|
||||||
|
if(desc == QTextDocument(ui.forumMessage->toPlainText()).toHtml())
|
||||||
|
{
|
||||||
|
desc = ui.forumMessage->toPlainText() ;
|
||||||
|
std::cerr << "Optimized forum message to " << desc.length() << " bytes , instead of " << ui.forumMessage->toHtml().length() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if(name.isEmpty())
|
if(name.isEmpty())
|
||||||
{ /* error message */
|
{ /* error message */
|
||||||
QMessageBox::warning(this, tr("RetroShare"),tr("Please set a Forum Subject and Forum Message"),
|
QMessageBox::warning(this, tr("RetroShare"),tr("Please set a Forum Subject and Forum Message"),
|
||||||
|
Loading…
Reference in New Issue
Block a user