mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Valgrind run
- Fix a memory leak where a layout was created without being used. - Fix uninitialized value.
This commit is contained in:
parent
544b623512
commit
1d285993f7
2 changed files with 8 additions and 8 deletions
|
@ -49,7 +49,7 @@ private:
|
|||
int roundRadius_ = 4;
|
||||
int handleWidth_ = 7;
|
||||
int minHandleHeight_ = 20;
|
||||
bool isActive;
|
||||
bool isActive = false;
|
||||
|
||||
const int AnimationDuration = 300;
|
||||
const int Padding = 4;
|
||||
|
|
|
@ -44,9 +44,8 @@ TimelineItem::init()
|
|||
QFontMetrics fm(font_);
|
||||
|
||||
topLayout_ = new QHBoxLayout(this);
|
||||
sideLayout_ = new QVBoxLayout();
|
||||
mainLayout_ = new QVBoxLayout();
|
||||
headerLayout_ = new QHBoxLayout();
|
||||
sideLayout_ = new QVBoxLayout;
|
||||
mainLayout_ = new QVBoxLayout;
|
||||
|
||||
topLayout_->setContentsMargins(conf::timeline::msgMargin, conf::timeline::msgMargin, 0, 0);
|
||||
topLayout_->setSpacing(0);
|
||||
|
@ -59,9 +58,6 @@ TimelineItem::init()
|
|||
|
||||
mainLayout_->setContentsMargins(conf::timeline::headerLeftMargin, 0, 0, 0);
|
||||
mainLayout_->setSpacing(0);
|
||||
|
||||
headerLayout_->setMargin(0);
|
||||
headerLayout_->setSpacing(conf::timeline::headerSpacing);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -418,6 +414,10 @@ TimelineItem::setupAvatarLayout(const QString &userName)
|
|||
sideLayout_->addWidget(userAvatar_);
|
||||
sideLayout_->addStretch(1);
|
||||
|
||||
headerLayout_ = new QHBoxLayout;
|
||||
headerLayout_->setMargin(0);
|
||||
headerLayout_->setSpacing(conf::timeline::headerSpacing);
|
||||
|
||||
headerLayout_->addWidget(userName_);
|
||||
headerLayout_->addWidget(timestamp_, 1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue