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

Fix segfault when using custom window borders

This commit is contained in:
Kevin Flynn 2014-07-05 01:01:19 -07:00
parent 898a366cdd
commit e6b17b470c

View File

@ -87,7 +87,6 @@ Widget::Widget(QWidget *parent) :
setWindowFlags(Qt::CustomizeWindowHint);
setWindowFlags(Qt::FramelessWindowHint);
setAttribute(Qt::WA_DeleteOnClose);
addAction(ui->actionClose);
@ -585,6 +584,7 @@ void Widget::copyFriendIdToClipboard(int friendId)
Friend* f = FriendList::findFriend(friendId);
if (f != nullptr)
{
qDebug() << f->userId;
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(f->userId, QClipboard::Clipboard);
}
@ -796,13 +796,16 @@ bool Widget::event(QEvent * e)
inResizeZone = true;
if (yMouse >= wHeight - PIXELS_TO_ACT)
{
setCursor(Qt::SizeFDiagCursor);
resizeWindow(k);
}
else if (yMouse <= PIXELS_TO_ACT)
{
setCursor(Qt::SizeBDiagCursor);
else
setCursor(Qt::SizeHorCursor);
resizeWindow(k);
}
resizeWindow(k);
}
else
{