diff options
| author | Sebastian Englbrecht <[email protected]> | 2026-05-26 20:46:22 +0200 |
|---|---|---|
| committer | Sebastian Englbrecht <[email protected]> | 2026-05-26 20:46:22 +0200 |
| commit | 10e4580b8d6000b80e0e0fb74ee4ea6192220174 (patch) | |
| tree | a8d4c8faa498d2a51d1ba2e16ac20999cfc19b23 /src/selectionmode | |
| parent | 4206a59da05dd314fcb5b0bee8e5b87c1454ca3d (diff) | |
MediaWidget, BottomBarContentsContainer: initialize members in constructor
m_autoPlay is read in setUrl() before setAutoPlay() is called; m_contents is
compared before resetContents() sets it. Both are undefined behavior.
Add initializers to the member-initialization lists.
Found with cppcheck
Diffstat (limited to 'src/selectionmode')
| -rw-r--r-- | src/selectionmode/bottombarcontentscontainer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/selectionmode/bottombarcontentscontainer.cpp b/src/selectionmode/bottombarcontentscontainer.cpp index 14dba3c36..8f8b34a19 100644 --- a/src/selectionmode/bottombarcontentscontainer.cpp +++ b/src/selectionmode/bottombarcontentscontainer.cpp @@ -29,6 +29,7 @@ using namespace SelectionMode; BottomBarContentsContainer::BottomBarContentsContainer(KActionCollection *actionCollection, QWidget *parent) : QWidget{parent} , m_actionCollection{actionCollection} + , m_contents{BottomBar::CopyContents} { // We will mostly interact with m_layout when changing the contents and not care about the other internal hierarchy. m_layout = new QHBoxLayout(this); |
