mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
refactor: Remove unused error sound notification
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user