Fix memleaks in unittests
Summary:
Fix memory leaks in unittests to make it easier to find real memory leaks in the tested code.
Fixed tests:
- test_projectmodel
- test_areaoperation
- test_controller
- test_toolviewtoolbar
- test_viewactivation
NOTE: this does not fix all memory leaks in all unittests, this is just s start to keep the changes small
Test Plan:
- cmake -DCMAKE_BUILD_TYPE=Debug -DECM_ENABLE_SANITIZERS='address' -DBUILD_TESTING=ON ..
- make test
Many tests will fail because of LSAN (leak sanitizer), which is enabled (at least here) by default with ASAN.
Reviewers: KDevelop, kfunk
Reviewed By: KDevelop, kfunk
Subscribers: brauch, kfunk, kdevelop-devel
Tags: KDevelop
Differential Revision: https://phabricator.kde.org/D16064