Skip to content

Commit

Permalink
Removed a redundant child-parent relation in pathbar (#968)
Browse files Browse the repository at this point in the history
In `PathBar`, `buttonsWidget_` becomes the child of `scrollArea_` when `QScrollArea::setWidget()` is called. So, there was no need to set `PathBar` as its parent.

NOTE: The reason I noticed this what that I encountered a crash in `QScrollArea::~QScrollArea()` with Qt 6.7, but only once. There have been other cases which show that something has changed about deleting objects in Qt 6.7 (see lxqt/lximage-qt#666 and lxqt/lxqt-notificationd#375). Regardless of whether it's about a new Qt bug or not, the patches are logical.
  • Loading branch information
tsujan authored May 4, 2024
1 parent 7651fee commit 97c5f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pathbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ PathBar::PathBar(QWidget* parent):
topLayout->addWidget(scrollToEnd_);

// container widget of the path buttons
buttonsWidget_ = new QWidget(this);
buttonsWidget_ = new QWidget;
buttonsWidget_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);

buttonsLayout_ = new QHBoxLayout(buttonsWidget_);
Expand Down

0 comments on commit 97c5f82

Please sign in to comment.