It seems that closing a project and then opening a new one does not destroy the old project's Previewer Output component. The effect is that every time a new project is loaded, a new Previewer Output is added to the window. Reproducible: Always Steps to Reproduce: 1. Load a plasmoid project 2. Close the project 3. Load another (maybe same) plasmoid project Actual Results: Two Previewer Output components are shown at the bottom of the window. Expected Results: Only one Previewer Output component should be shown.
Created attachment 77824 [details] Delete the old konsoleWidget when loading a new project.
Honestly, the code should be using some RAII object to handle resources like KonsolePreviewer. For example, had the new C++11 std::unique_ptr been used instead of a raw pointers, the old KonsolePreviwer would have been deleted (and not leaked!) automatically after the new one was created.
Thank you for the patch. Can you open a review at git.reviewboard.kde.org? I would like to keep all the patches in the reviewboard since more people will be able to see the code and receive more feedback.