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

Merge pull request #192 from krepa098/master

Fixes (0deref, misc)
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-08-18 18:14:29 +02:00
commit 2727e7ba1f
4 changed files with 4 additions and 6 deletions

View File

@ -24,7 +24,7 @@ CroppingLabel::CroppingLabel(QWidget* parent)
void CroppingLabel::setText(const QString& text)
{
origText = text;
origText = text.trimmed();
setElidedText();
}

View File

@ -53,8 +53,6 @@ FriendWidget::FriendWidget(int FriendId, QString id)
pal3.setColor(QPalette::Background, QColor(65,65,65,255));
this->setPalette(pal3);
name.setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
textLayout.addStretch();
textLayout.addWidget(&name);
textLayout.addWidget(&statusMessage);

View File

@ -44,8 +44,8 @@ signals:
public:
int friendId;
QLabel avatar, name, statusPic;
CroppingLabel statusMessage;
QLabel avatar, statusPic;
CroppingLabel name, statusMessage;
QHBoxLayout layout;
QVBoxLayout textLayout;

View File

@ -616,7 +616,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int friendgroupnumber, cons
g->chatForm->addGroupMessage(message, friendgroupnumber);
if ((isGroupWidgetActive != 1 || (g->groupId != activeGroupWidget->groupId)) || isWindowMinimized || !isActiveWindow())
if ((isGroupWidgetActive != 1 || (activeGroupWidget && g->groupId != activeGroupWidget->groupId)) || isWindowMinimized || !isActiveWindow())
{
if (message.contains(core->getUsername(), Qt::CaseInsensitive))
{