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

View File

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

View File

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

Binary file not shown.