1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #3135

Diadlo (1):
      fix(systemtrayicon, widget): Added deallocate memory
This commit is contained in:
sudden6 2016-04-13 21:45:23 +02:00
commit 4fd0446f96
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
2 changed files with 16 additions and 0 deletions

View File

@ -99,6 +99,19 @@ SystemTrayIcon::SystemTrayIcon()
SystemTrayIcon::~SystemTrayIcon()
{
delete qtIcon;
#ifdef ENABLE_SYSTRAY_UNITY_BACKEND
delete unityIndicator;
delete unityMenu;
#endif
#ifdef ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND
delete statusNotifier;
delete snMenu;
#endif
#ifdef ENABLE_SYSTRAY_GTK_BACKEND
delete gtkIcon;
delete gtkMenu;
#endif
qDebug() << "Deleting SystemTrayIcon";
}

View File

@ -482,7 +482,10 @@ Widget::~Widget()
Translator::unregister(this);
AutoUpdater::abortUpdates();
if (icon)
{
icon->hide();
delete icon;
}
delete profileForm;
delete settingsWidget;