diff options
Diffstat (limited to 'src/plugins/General')
| -rw-r--r-- | src/plugins/General/converter/converterhelper.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/General/notifier/notifier.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/General/notifier/notifier.h | 4 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/statusicon.cpp | 25 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/statusicon.h | 4 |
5 files changed, 22 insertions, 17 deletions
diff --git a/src/plugins/General/converter/converterhelper.cpp b/src/plugins/General/converter/converterhelper.cpp index ed9cbb69e..96ccf72a2 100644 --- a/src/plugins/General/converter/converterhelper.cpp +++ b/src/plugins/General/converter/converterhelper.cpp @@ -49,7 +49,7 @@ ConverterHelper::ConverterHelper(QObject *parent) : QObject(parent) ConverterHelper::~ConverterHelper() { - m_progress->deleteLater(); + delete m_progress; } void ConverterHelper::openConverter() diff --git a/src/plugins/General/notifier/notifier.cpp b/src/plugins/General/notifier/notifier.cpp index 8af0c8d6d..a12034b16 100644 --- a/src/plugins/General/notifier/notifier.cpp +++ b/src/plugins/General/notifier/notifier.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2013 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -72,6 +72,8 @@ Notifier::Notifier(QObject *parent) : QObject(parent) Notifier::~Notifier() { removePsiTuneFiles(); + if (m_popupWidget) + delete m_popupWidget; } void Notifier::setState(Qmmp::State state) diff --git a/src/plugins/General/notifier/notifier.h b/src/plugins/General/notifier/notifier.h index bb58a88cc..2576a9b86 100644 --- a/src/plugins/General/notifier/notifier.h +++ b/src/plugins/General/notifier/notifier.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2013 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -38,7 +38,7 @@ Q_OBJECT public: Notifier(QObject *parent = 0); - ~Notifier(); + virtual~Notifier(); private slots: void showMetaData(); diff --git a/src/plugins/General/statusicon/statusicon.cpp b/src/plugins/General/statusicon/statusicon.cpp index ca051f06b..a0875dd38 100644 --- a/src/plugins/General/statusicon/statusicon.cpp +++ b/src/plugins/General/statusicon/statusicon.cpp @@ -56,21 +56,21 @@ StatusIcon::StatusIcon(QObject *parent) : QObject(parent) m_tray->show(); settings.endGroup(); //actions - QMenu *menu = new QMenu(qobject_cast<QWidget *>(parent)); + m_menu = new QMenu(); QIcon playIcon = QApplication::style()->standardIcon(QStyle::SP_MediaPlay); QIcon pauseIcon = QApplication::style()->standardIcon(QStyle::SP_MediaPause); QIcon stopIcon = QApplication::style()->standardIcon(QStyle::SP_MediaStop); QIcon nextIcon = QApplication::style()->standardIcon(QStyle::SP_MediaSkipForward); QIcon previousIcon = QApplication::style()->standardIcon(QStyle::SP_MediaSkipBackward); - menu->addAction(playIcon,tr("Play"), m_player, SLOT(play())); - menu->addAction(pauseIcon,tr("Pause"), m_core, SLOT(pause())); - menu->addAction(stopIcon,tr("Stop"), m_core, SLOT(stop())); - menu->addSeparator(); - menu->addAction(nextIcon, tr("Next"), m_player, SLOT(next())); - menu->addAction(previousIcon, tr("Previous"), m_player, SLOT(previous())); - menu->addSeparator(); - menu->addAction(tr("Exit"), UiHelper::instance(), SLOT(exit())); - m_tray->setContextMenu(menu); + m_menu->addAction(playIcon,tr("Play"), m_player, SLOT(play())); + m_menu->addAction(pauseIcon,tr("Pause"), m_core, SLOT(pause())); + m_menu->addAction(stopIcon,tr("Stop"), m_core, SLOT(stop())); + m_menu->addSeparator(); + m_menu->addAction(nextIcon, tr("Next"), m_player, SLOT(next())); + m_menu->addAction(previousIcon, tr("Previous"), m_player, SLOT(previous())); + m_menu->addSeparator(); + m_menu->addAction(tr("Exit"), UiHelper::instance(), SLOT(exit())); + m_tray->setContextMenu(m_menu); connect (m_core, SIGNAL(metaDataChanged ()), SLOT(showMetaData())); connect (m_core, SIGNAL(stateChanged (Qmmp::State)), SLOT(setState(Qmmp::State))); setState(m_core->state()); //update state @@ -78,9 +78,10 @@ StatusIcon::StatusIcon(QObject *parent) : QObject(parent) QTimer::singleShot(1500, this, SLOT(showMetaData())); } - StatusIcon::~StatusIcon() -{} +{ + delete m_menu; +} void StatusIcon::setState(Qmmp::State state) { diff --git a/src/plugins/General/statusicon/statusicon.h b/src/plugins/General/statusicon/statusicon.h index 5b42a22d9..908bcec77 100644 --- a/src/plugins/General/statusicon/statusicon.h +++ b/src/plugins/General/statusicon/statusicon.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2013 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -28,6 +28,7 @@ class SoundCore; class MediaPlayer; class QEvent; +class QMenu; /** @@ -55,6 +56,7 @@ private: int m_messageDelay; SoundCore *m_core; MediaPlayer *m_player; + QMenu *m_menu; }; #endif |
