1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge branch 'pr2959'

This commit is contained in:
tux3 2016-03-12 01:01:30 +01:00
commit 3fbf447174
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
4 changed files with 6 additions and 5 deletions

View File

@ -138,7 +138,7 @@ ChatForm::~ChatForm()
void ChatForm::setStatusMessage(QString newMessage) void ChatForm::setStatusMessage(QString newMessage)
{ {
statusMessageLabel->setText(newMessage); statusMessageLabel->setText(newMessage);
statusMessageLabel->setToolTip(newMessage.toHtmlEscaped()); // for overlength messsages statusMessageLabel->setToolTip(Qt::convertFromPlainText(newMessage, Qt::WhiteSpaceNormal)); // for overlength messsages
} }
void ChatForm::onSendTriggered() void ChatForm::onSendTriggered()

View File

@ -272,7 +272,7 @@ QDate GenericChatForm::getLatestDate() const
void GenericChatForm::setName(const QString &newName) void GenericChatForm::setName(const QString &newName)
{ {
nameLabel->setText(newName); nameLabel->setText(newName);
nameLabel->setToolTip(newName.toHtmlEscaped()); // for overlength names nameLabel->setToolTip(Qt::convertFromPlainText(newName, Qt::WhiteSpaceNormal)); // for overlength names
} }
void GenericChatForm::show(ContentLayout* contentLayout) void GenericChatForm::show(ContentLayout* contentLayout)

View File

@ -21,6 +21,7 @@
#include <QResizeEvent> #include <QResizeEvent>
#include <QLineEdit> #include <QLineEdit>
#include <QKeyEvent> #include <QKeyEvent>
#include <QTextDocument>
CroppingLabel::CroppingLabel(QWidget* parent) CroppingLabel::CroppingLabel(QWidget* parent)
: QLabel(parent) : QLabel(parent)
@ -128,7 +129,7 @@ void CroppingLabel::setElidedText()
{ {
QString elidedText = fontMetrics().elidedText(origText, elideMode, width()); QString elidedText = fontMetrics().elidedText(origText, elideMode, width());
if (elidedText != origText) if (elidedText != origText)
setToolTip(origText.toHtmlEscaped()); setToolTip(Qt::convertFromPlainText(origText, Qt::WhiteSpaceNormal));
else else
setToolTip(QString()); setToolTip(QString());

View File

@ -838,7 +838,7 @@ void Widget::setUsername(const QString& username)
else else
{ {
ui->nameLabel->setText(username); ui->nameLabel->setText(username);
ui->nameLabel->setToolTip(username.toHtmlEscaped()); // for overlength names ui->nameLabel->setToolTip(Qt::convertFromPlainText(username, Qt::WhiteSpaceNormal)); // for overlength names
} }
QString sanename = username; QString sanename = username;
@ -863,7 +863,7 @@ void Widget::setStatusMessage(const QString &statusMessage)
else else
{ {
ui->statusLabel->setText(statusMessage); ui->statusLabel->setText(statusMessage);
ui->statusLabel->setToolTip(statusMessage.toHtmlEscaped()); // for overlength messsages ui->statusLabel->setToolTip(Qt::convertFromPlainText(statusMessage, Qt::WhiteSpaceNormal)); // for overlength messsages
} }
} }