qa: Remove lots of superfluous semicolons
[quassel.git] / src / qtui / qtmultimedianotificationbackend.h
index aa028bd..eb614bf 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2015 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -18,8 +18,9 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef PHONONNOTIFICATIONBACKEND_H_
-#define PHONONNOTIFICATIONBACKEND_H_
+#pragma once
+
+#include <memory>
 
 #include <QMediaPlayer>
 
@@ -34,11 +35,10 @@ class QtMultimediaNotificationBackend : public AbstractNotificationBackend
 
 public:
     QtMultimediaNotificationBackend(QObject *parent = 0);
-    ~QtMultimediaNotificationBackend();
 
-    void notify(const Notification &);
-    void close(uint notificationId);
-    virtual SettingsPage *createConfigWidget() const;
+    void notify(const Notification &) override;
+    void close(uint notificationId) override;
+    virtual SettingsPage *createConfigWidget() const override;
 
 private slots:
     void enabledChanged(const QVariant &);
@@ -49,7 +49,7 @@ private:
     class ConfigWidget;
 
     bool _enabled;
-    QMediaPlayer *_media;
+    std::unique_ptr<QMediaPlayer> _media;
 };
 
 
@@ -59,12 +59,11 @@ class QtMultimediaNotificationBackend::ConfigWidget : public SettingsPage
 
 public:
     ConfigWidget(QWidget *parent = 0);
-    ~ConfigWidget();
 
-    void save();
-    void load();
-    bool hasDefaults() const;
-    void defaults();
+    void save() override;
+    void load() override;
+    bool hasDefaults() const override;
+    void defaults() override;
 
 private slots:
     void widgetChanged();
@@ -74,11 +73,8 @@ private slots:
 private:
     Ui::QtMultimediaNotificationConfigWidget ui;
 
-    bool enabled;
+    bool _enabled;
     bool _audioAvailable;
-    QString filename;
-    QMediaPlayer *audioPreview;
+    QString _filename;
+    std::unique_ptr<QMediaPlayer> _audioPreview;
 };
-
-
-#endif