/***************************************************************************
- * 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 *
#ifndef PHONONNOTIFICATIONBACKEND_H_
#define PHONONNOTIFICATIONBACKEND_H_
+#include <memory>
+
#include <QMediaPlayer>
#include "abstractnotificationbackend.h"
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 &);
class ConfigWidget;
bool _enabled;
- QMediaPlayer *_media;
+ std::unique_ptr<QMediaPlayer> _media;
};
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();
private:
Ui::QtMultimediaNotificationConfigWidget ui;
- bool enabled;
+ bool _enabled;
bool _audioAvailable;
- QString filename;
- QMediaPlayer *audioPreview;
+ QString _filename;
+ std::unique_ptr<QMediaPlayer> _audioPreview;
};