Set in Release Mode.

Bugfixes in CreateForumMsg 



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@810 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-11-15 23:47:17 +00:00
parent 1c16cc8d22
commit fa1d123b62
5 changed files with 58 additions and 39 deletions

View file

@ -37,8 +37,8 @@ CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
config.loadWidgetInformation(this);
// connect up the buttons.
connect( ui.postmessage_action, SIGNAL( triggered (bool) ), this, SLOT( cancelMsg( ) ) );
connect( ui.close_action, SIGNAL( triggered (bool) ), this, SLOT( createMsg( ) ) );
connect( ui.postmessage_action, SIGNAL( triggered (bool) ), this, SLOT( createMsg( ) ) );
connect( ui.close_action, SIGNAL( triggered (bool) ), this, SLOT( cancelMsg( ) ) );
newMsg();
@ -48,6 +48,26 @@ CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
void CreateForumMsg::newMsg()
{
/* clear all */
ForumInfo fi;
if (rsForums->getForumInfo(mForumId, fi))
{
ForumMsgInfo msg;
QString name = QString::fromStdWString(fi.forumName);
QString subj;
if ((mParentId != "") && (rsForums->getForumMessage(
mForumId, mParentId, msg)))
{
name += " In Reply to: ";
name += QString::fromStdWString(msg.title);
subj = "Re: " + QString::fromStdWString(msg.title);
}
ui.forumName->setText(name);
ui.forumSubject->setText(subj);
}
ui.forumMessage->setText("");
}
void CreateForumMsg::createMsg()
@ -66,6 +86,9 @@ void CreateForumMsg::createMsg()
msgInfo.title = name.toStdWString();
msgInfo.msg = desc.toStdWString();
if ((msgInfo.msg == L"") && (msgInfo.title == L""))
return; /* do nothing */
rsForums->ForumMessageSend(msgInfo);
close();