diff --git a/src/platform/desktop_notifications/desktopnotify.cpp b/src/platform/desktop_notifications/desktopnotify.cpp index 61a4715a93..237e4a96a2 100644 --- a/src/platform/desktop_notifications/desktopnotify.cpp +++ b/src/platform/desktop_notifications/desktopnotify.cpp @@ -44,11 +44,11 @@ DesktopNotify::DesktopNotify(Settings& settings_) connect(¬ifyCore, &Snore::SnoreCore::notificationClosed, this, &DesktopNotify::onNotificationClose); } -QString DesktopNotify::sanitize_text_for_notifications(const QString& input_text) +QString DesktopNotify::sanitizeTextForNotifications(const QString& input_text) { QString output_text = QString(input_text); output_text.replace(QRegularExpression("[^a-zA-Z0-9 _:]"), "_"); // allow only a A-Z and 0-9 and "_" and " " and ":" chars - // qDebug() << "sanitize_text_for_notifications: input:" << input_text << "output:" << output_text; + // qDebug() << "sanitizeTextForNotifications: input:" << input_text << "output:" << output_text; return output_text; } @@ -59,8 +59,8 @@ void DesktopNotify::notifyMessage(const NotificationData& notificationData) } auto icon = notificationData.pixmap.isNull() ? snoreIcon : Snore::Icon(notificationData.pixmap); - auto title_sanitized = sanitize_text_for_notifications(notificationData.title); - auto message_sanitizied = sanitize_text_for_notifications(notificationData.message); + auto title_sanitized = sanitizeTextForNotifications(notificationData.title); + auto message_sanitizied = sanitizeTextForNotifications(notificationData.message); auto newNotification = Snore::Notification{snoreApp, Snore::Alert(), title_sanitized, message_sanitizied, icon, 0}; latestId = newNotification.id(); diff --git a/src/platform/desktop_notifications/desktopnotify.h b/src/platform/desktop_notifications/desktopnotify.h index 11dec3bdc5..2c96ca9f19 100644 --- a/src/platform/desktop_notifications/desktopnotify.h +++ b/src/platform/desktop_notifications/desktopnotify.h @@ -35,7 +35,7 @@ class DesktopNotify : public QObject Q_OBJECT public: explicit DesktopNotify(Settings& settings); - QString sanitize_text_for_notifications(const QString& input_text); + QString sanitizeTextForNotifications(const QString& input_text); public slots: void notifyMessage(const NotificationData& notificationData);