Skip to content

Commit 7657d7f

Browse files
authored
fix(SplitInput): reuse of layout creator (#6654)
1 parent 6c61b34 commit 7657d7f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
- Dev: Set settings directory to temporary one used in tests. (#6584)
6262
- Dev: Check Lua unwinding and version in tests. (#6586)
6363
- Dev: Added method to get the last N messages of a channel. (#6602, #6604)
64+
- Dev: Fixed some layout spaghetti in `SplitInput`. (#6654)
6465
- Dev: Unwrapped `LimitedQueueSnapshot` to `std::vector`. (#6606)
6566
- Dev: Simplified uses of `getMessageSnapshot`. (#6607)
6667
- Dev: Disabled `llvm-prefer-static-over-anonymous-namespace` in clang-tidy. (#6610)

src/widgets/splits/SplitInput.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ void SplitInput::initLayout()
123123
auto replyHbox =
124124
replyVbox.emplace<QHBoxLayout>().assign(&this->ui_.replyHbox);
125125

126-
auto messageVbox = layoutCreator.setLayoutType<QVBoxLayout>();
126+
auto *messageVbox = new QVBoxLayout;
127127
this->ui_.replyMessage = new MessageView();
128128
messageVbox->addWidget(this->ui_.replyMessage, 0, Qt::AlignLeft);
129129
messageVbox->setContentsMargins(10, 0, 0, 0);
130-
replyVbox->addLayout(messageVbox->layout(), 0);
130+
replyVbox->addLayout(messageVbox, 0);
131131

132132
auto replyLabel = replyHbox.emplace<QLabel>().assign(&this->ui_.replyLabel);
133133
replyLabel->setAlignment(Qt::AlignLeft);

0 commit comments

Comments
 (0)