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

fix(groups): Avoid segfault when resizing group audio window

Avatars for group members currently in a call are resized depending on
the area they are displayed in. Previously a scrollbar would appear and
disapear based on the size of the contents. This resulted in
oscillations that ended in a SIGSEGV.

This fix avoids the oscillations by fixing the scrollbar to always be
shown
This commit is contained in:
Mick Sayson 2019-11-09 23:52:34 -08:00 committed by Anthony Bilinski
parent 08436bc2f1
commit d4d4308e28
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -128,6 +128,11 @@ GroupNetCamView::GroupNetCamView(int group, QWidget* parent)
QScrollArea* scrollArea = new QScrollArea();
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
// Note this is needed to prevent oscillations that result in segfaults
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
scrollArea->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
scrollArea->setFrameStyle(QFrame::NoFrame);
QWidget* widget = new QWidget(nullptr);
scrollArea->setWidgetResizable(true);