diff --git a/src/core/snoreserver.cpp b/src/core/snoreserver.cpp index 48d8427..010f2f4 100644 --- a/src/core/snoreserver.cpp +++ b/src/core/snoreserver.cpp @@ -27,7 +27,7 @@ #include QString const SnoreServer::version(){ - return "0.2"; + return "0.2.5"; } QString const SnoreServer::snoreTMP(){ diff --git a/src/main.cpp b/src/main.cpp index 4e0b56e..28748c6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,7 +6,8 @@ int main ( int argc, char *argv[] ) { QApplication a ( argc, argv ); - SnoreNotify(); + SnoreNotify *sn = new SnoreNotify(); return a.exec(); + delete sn; } diff --git a/src/snorenotify.cpp b/src/snorenotify.cpp index dd7026e..4cf170d 100644 --- a/src/snorenotify.cpp +++ b/src/snorenotify.cpp @@ -58,6 +58,11 @@ SnoreNotify::SnoreNotify() connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(exit())); } +SnoreNotify::~SnoreNotify(){ + delete _snore; + delete _trayIcon; +} + void SnoreNotify::load(){ QDomDocument doc( "Settings" ); QFile file( PROFILEPATH + "settings.xml" ); diff --git a/src/snorenotify.h b/src/snorenotify.h index 9a5ba48..8f15d64 100644 --- a/src/snorenotify.h +++ b/src/snorenotify.h @@ -24,6 +24,7 @@ class SnoreNotify:public QObject Q_OBJECT public: SnoreNotify(); + ~SnoreNotify(); void load(); void save(); @@ -31,7 +32,7 @@ private: class TrayIcon *_trayIcon; class SnoreServer *_snore; -public slots: +private slots: void exit(); };