Fix crash on exit

Review Request #128760 - Created Aug. 25, 2016 and submitted - Latest diff uploaded

Information
Peter Wu
breeze
master
356940
Reviewers
plasma
davidedmundson, dfaure, hpereiradacosta

Since Qt 5.6.0, Qt5 applications started crashing on exit. All signs
point to this delete-on-destroy hack which was added to avoid outliving
the plugin lifetime.

This method is wrong because the returned style is owned by the caller
(QApplication, QProxyStyle, etc) and will cleaned up when those users
are destructed.

Ran the updated test.sh from "Testcase (ASAN) with normal QApplication::quit and exit()" from bug https://bugs.kde.org/show_bug.cgi?id=356940, no longer crashes. Tested with Qt 5.7.0.

Loading...