refactor: Remove unused error sound notification

This commit is contained in:
Lars Toenning
2024-12-03 10:19:32 +01:00
parent c63b5ac909
commit 5498f78219
4 changed files with 3 additions and 7 deletions

View File

@@ -12,7 +12,6 @@ namespace swift::misc::audio
const QString &CNotificationSounds::flagToString(CNotificationSounds::NotificationFlag notification)
{
static const QString unknown("unknown");
static const QString error("error");
static const QString login("login");
static const QString logoff("logoff");
static const QString freqMsg("frequency msg.");
@@ -27,7 +26,6 @@ namespace swift::misc::audio
switch (notification)
{
case NotificationError: return error;
case NotificationLogin: return login;
case NotificationLogoff: return logoff;
case NotificationTextMessageFrequency: return freqMsg;
@@ -48,7 +46,6 @@ namespace swift::misc::audio
QString CNotificationSounds::toString(Notification notification)
{
QStringList n;
if (notification.testFlag(NotificationError)) n << flagToString(NotificationError);
if (notification.testFlag(NotificationLogin)) n << flagToString(NotificationLogin);
if (notification.testFlag(NotificationLogoff)) n << flagToString(NotificationLogoff);
if (notification.testFlag(NotificationTextMessageFrequency))

View File

@@ -23,7 +23,7 @@ namespace swift::misc::audio
enum NotificationFlag
{
NoNotifications = 0,
NotificationError = 1 << 0,
// 1 << 0 previously used for NotificationError
NotificationLogin = 1 << 1,
NotificationLogoff = 1 << 2,
NotificationTextMessageFrequency = 1 << 12,
@@ -61,8 +61,8 @@ namespace swift::misc::audio
constexpr static Notification AllAfv = Notification(AFVClicked | AFVBlocked);
//! All notification flags
constexpr static Notification AllNotifications = Notification(
NotificationError | AllTextNotifications | AllLoginNotifications | AllPTTNotifications | AllAfv);
constexpr static Notification AllNotifications =
Notification(AllTextNotifications | AllLoginNotifications | AllPTTNotifications | AllAfv);
//! Default notification flags
constexpr static Notification DefaultNotifications =

View File

@@ -52,7 +52,6 @@ namespace swift::sound
const QStringList types = QSoundEffect::supportedMimeTypes();
CLogMessage(this).info(u"Notification mime types: %1") << types.join(", ");
this->updateEffect(CNotificationSounds::NotificationError, directory, "error.wav");
this->updateEffect(CNotificationSounds::NotificationLogin, directory, "login.wav");
this->updateEffect(CNotificationSounds::NotificationLogoff, directory, "logoff.wav");
this->updateEffect(CNotificationSounds::NotificationTextMessageFrequency, directory, "frequencymessage.wav");

Binary file not shown.