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:
thunder2 2010-11-09 19:57:05 +00:00
parent 49a9268b9e
commit b79341503e
13 changed files with 54 additions and 38 deletions

View file

@ -364,6 +364,21 @@ class misc : public QObject{
return QString("%1 %2").arg(count, 0, 'f', decimal).arg(unit);
}
static QString removeNewLine(const QString &text)
{
return QString(text).replace("\n", " ");
}
static QString removeNewLine(const std::string &text)
{
return QString::fromUtf8(text.c_str()).replace("\n", " ");
}
static QString removeNewLine(const std::wstring &text)
{
return QString::fromStdWString(text).replace("\n", " ");
}
};
// Trick to get a portable sleep() function