clang-tidy: Avoid potential memory leak in BufferViewManager
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 4 Sep 2018 21:19:22 +0000 (23:19 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 6 Sep 2018 06:02:07 +0000 (08:02 +0200)
commit7fef34357cbd749e119dc3c47dda0ba63d068a03
tree85d1fb29345b1f60df673af3e22179794f829e30
parente7352d23bb54ce36dd4f9aac59a93e2c0a6297f6
clang-tidy: Avoid potential memory leak in BufferViewManager

Explicitly delete a freshly created BufferViewConfig in case it cannot
be added, rather than relying on QObject parentship - clang-tidy
warns about that. I'm rather sure that this is a false positive, but
better safe than sorry.

Simplify and clean-up related code a bit.
src/common/bufferviewmanager.cpp
src/common/bufferviewmanager.h
src/core/corebufferviewmanager.cpp