mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-17 18:40:49 -04:00
Removed new lines of the QLineEdit input fields after input in forum, channel, message and group.
Removed size hint of he trees to show erroneous texts. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3768 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
49a9268b9e
commit
b79341503e
13 changed files with 54 additions and 38 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "CreateChannel.h"
|
||||
#include "gui/common/PeerDefs.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#include <retroshare/rschannels.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
|
@ -154,7 +155,7 @@ void CreateChannel::newChannel()
|
|||
|
||||
void CreateChannel::createChannel()
|
||||
{
|
||||
QString name = ui.channelName->text();
|
||||
QString name = misc::removeNewLine(ui.channelName->text());
|
||||
QString desc = ui.channelDesc->toPlainText();
|
||||
uint32_t flags = 0;
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "CreateChannelMsg.h"
|
||||
#include "gui/feeds/SubFileItem.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#include <retroshare/rschannels.h>
|
||||
#include <retroshare/rsfiles.h>
|
||||
|
@ -407,9 +408,6 @@ void CreateChannelMsg::newChannelMsg()
|
|||
}
|
||||
|
||||
channelName->setText(QString::fromStdWString(ci.channelName));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -419,7 +417,7 @@ void CreateChannelMsg::sendMsg()
|
|||
std::cerr << std::endl;
|
||||
|
||||
/* construct message bits */
|
||||
std::wstring subject = subjectEdit->text().toStdWString();
|
||||
std::wstring subject = misc::removeNewLine(subjectEdit->text()).toStdWString();
|
||||
std::wstring msg = msgEdit->toPlainText().toStdWString();
|
||||
|
||||
std::list<FileInfo> files;
|
||||
|
@ -456,7 +454,7 @@ void CreateChannelMsg::sendMsg()
|
|||
|
||||
void CreateChannelMsg::sendMessage(std::wstring subject, std::wstring msg, std::list<FileInfo> &files)
|
||||
{
|
||||
QString name = subjectEdit->text();
|
||||
QString name = misc::removeNewLine(subjectEdit->text());
|
||||
|
||||
if(name.isEmpty())
|
||||
{ /* error message */
|
||||
|
@ -467,12 +465,6 @@ void CreateChannelMsg::sendMessage(std::wstring subject, std::wstring msg, std::
|
|||
return; //Don't add an empty Subject!!
|
||||
}
|
||||
else
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* rsChannels */
|
||||
if (rsChannels)
|
||||
{
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include <retroshare/rschannels.h>
|
||||
|
||||
#include "util/misc.h"
|
||||
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
@ -89,7 +91,6 @@ void EditChanDetails::loadChannel()
|
|||
// Set Channel Name
|
||||
ui.nameline->setText(QString::fromStdWString(ci.channelName));
|
||||
|
||||
|
||||
// Set Channel Description
|
||||
ui.DescriptiontextEdit->setText(QString::fromStdWString(ci.channelDesc));
|
||||
|
||||
|
@ -120,7 +121,7 @@ void EditChanDetails::applyDialog()
|
|||
|
||||
ChannelInfo ci;
|
||||
|
||||
ci.channelName = ui.nameline->text().toStdWString();
|
||||
ci.channelName = misc::removeNewLine(ui.nameline->text()).toStdWString();
|
||||
ci.channelDesc = ui.DescriptiontextEdit->document()->toPlainText().toStdWString();
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue