Commit 3e86b6c4 authored by vfjpl's avatar vfjpl

cleaning memory while exiting

parent 0f78c3e5
......@@ -87,7 +87,7 @@ Notifier::Notifier( QObject* parent ) :
connect( optionsAction, &QAction::triggered,
[this] ()
{
m_settingsDialog = new NotifierSettingsDialog( NULL );
NotifierSettingsDialog* m_settingsDialog = new NotifierSettingsDialog( NULL );
m_settingsDialog->setAttribute( Qt::WidgetAttribute::WA_DeleteOnClose, true );
m_settingsDialog->exec();
} );
......@@ -123,7 +123,8 @@ Notifier::Notifier( QObject* parent ) :
Notifier::~Notifier()
{
delete m_tray;
delete m_timer;
}
......
......@@ -37,7 +37,6 @@ public:
private:
QSystemTrayIcon* m_tray;
QTimer* m_timer;
NotifierSettingsDialog* m_settingsDialog;
bool m_checkLanguagePackage;
bool m_checkKernel;
bool m_checkUnsupportedKernel;
......
......@@ -68,7 +68,9 @@ int main( int argc, char* argv[] )
return app.exec();
}
else
{
qDebug() << "MSM Notifier is already running, shutting down.";
}
return 0;
}
......@@ -76,7 +76,7 @@ Notifier::Notifier( QObject* parent ) :
connect( optionsAction, &QAction::triggered,
[this] ()
{
m_settingsDialog = new NotifierSettingsDialog( NULL );
NotifierSettingsDialog* m_settingsDialog = new NotifierSettingsDialog( NULL );
m_settingsDialog->setAttribute( Qt::WidgetAttribute::WA_DeleteOnClose, true );
m_settingsDialog->exec();
} );
......@@ -112,7 +112,8 @@ Notifier::Notifier( QObject* parent ) :
Notifier::~Notifier()
{
delete m_tray;
delete m_timer;
}
......
......@@ -37,7 +37,6 @@ public:
private:
KStatusNotifierItem* m_tray;
QTimer* m_timer;
NotifierSettingsDialog* m_settingsDialog;
bool m_checkLanguagePackage;
bool m_checkKernel;
bool m_checkUnsupportedKernel;
......
......@@ -68,7 +68,9 @@ int main( int argc, char* argv[] )
return app.exec();
}
else
{
qDebug() << "MSM Notifier is already running, shutting down.";
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment