1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
Binayak Ghosh 2016-02-28 17:23:15 +05:30
parent e5e4d561c9
commit 54fabb964c
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)
@ -126,7 +127,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
} }
} }