The TreeModel class was lacking the destructor, so the m_root TreeItem was never deleted (it was held in a non-owning pointer and had no parent). Instead of adding ~TreeModel(), port to holding m_root in unique_ptr instead. This creates a bit more churn, but communicates intent better, and makes sure the item is never without an owner. Amends e74af68654c0eb127277c73e20bda409b83d157b. As a drive-by, fix the indent of the else clause of a ternary. Pick-to: 6.8 6.5 5.15 Change-Id: I2f5c8852b8bee89c63933c118a4599d6a17de8e2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 7cf8b2d0303ea81a8e22fcaee7db7bb7303d0376) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%