diff options
| author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2014-10-16 23:04:24 +0300 |
|---|---|---|
| committer | Orgad Shaneh <orgads@gmail.com> | 2014-10-22 05:07:53 +0200 |
| commit | 061860551a6a472705b28ec413eb6f98c5307494 (patch) | |
| tree | 19d606222cf62ecfdc928c7b52a21b51dfaa6810 | |
| parent | da203fbf5c39a3d4a13a7ee303f0a0150dc2ece8 (diff) | |
| download | qt-creator-061860551a6a472705b28ec413eb6f98c5307494.tar.gz | |
Theme: Delete on shutdown
Change-Id: I54a7122f72e3c13c239af1b4293b187cff5b1fd2
Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
| -rw-r--r-- | src/libs/utils/theme/theme.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/coreplugin/coreplugin.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/utils/theme/theme.cpp b/src/libs/utils/theme/theme.cpp index 0bc65d872e..09f699ff21 100644 --- a/src/libs/utils/theme/theme.cpp +++ b/src/libs/utils/theme/theme.cpp @@ -58,7 +58,9 @@ Theme *creatorTheme() void setCreatorTheme(Theme *theme) { - // TODO: memory management of theme object + if (m_creatorTheme == theme) + return; + delete m_creatorTheme; m_creatorTheme = theme; } diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index 4132fffc2b..e77dec4fee 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -87,6 +87,7 @@ CorePlugin::~CorePlugin() } delete m_mainWindow; + setCreatorTheme(0); } void CorePlugin::parseArguments(const QStringList &arguments) |
