summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--beetplayer.cpp4
-rw-r--r--beetplayer.h3
-rw-r--r--playerwidget.cpp1
-rw-r--r--playerwidget.h3
4 files changed, 8 insertions, 3 deletions
diff --git a/beetplayer.cpp b/beetplayer.cpp
index 9d59878..ef3f84f 100644
--- a/beetplayer.cpp
+++ b/beetplayer.cpp
@@ -171,3 +171,7 @@ void BeetPlayer::createStatusbar(){
}
+void BeetPlayer::closeEvent(QCloseEvent *event){
+ Q_UNUSED(event);
+ qApp->quit();
+}
diff --git a/beetplayer.h b/beetplayer.h
index f37a05a..3fd1cb5 100644
--- a/beetplayer.h
+++ b/beetplayer.h
@@ -21,6 +21,9 @@ class BeetPlayer : public QMainWindow {
void setPlayListLength(quint64 seconds);
void setMessage(const QString &msg);
+ protected:
+ virtual void closeEvent(QCloseEvent *event);
+
private:
void openDatabase();
void readSettings();
diff --git a/playerwidget.cpp b/playerwidget.cpp
index 5b907d8..9bd9013 100644
--- a/playerwidget.cpp
+++ b/playerwidget.cpp
@@ -19,7 +19,6 @@
#include <QSettings>
#include <QMenu>
#include <QMessageBox>
-#include <QSystemTrayIcon>
#include <QApplication>
#include <algorithm>
diff --git a/playerwidget.h b/playerwidget.h
index 67e89be..2c5542b 100644
--- a/playerwidget.h
+++ b/playerwidget.h
@@ -3,7 +3,7 @@
#include <QWidget>
#include <QMediaPlayer>
-#include <QIcon>
+#include <QSystemTrayIcon>
class QStandardItemModel;
class QStandardItem;
@@ -16,7 +16,6 @@ class QToolBar;
class QAction;
class BeetPlayerProxy;
class BeetView;
-class QSystemTrayIcon;
class PlayerWidget : public QWidget {
Q_OBJECT