From 484f66f01c37dbf15797e15fc59ea4b94034aa44 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Wed, 28 Oct 2020 01:36:14 +0200 Subject: [PATCH] Don't pass primitive types by const references to NotificationManager It makes no sense whatsoever. --- src/notificationmanager.cpp | 12 ++++++------ src/notificationmanager.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/notificationmanager.cpp b/src/notificationmanager.cpp index fc0ba1f..3bda9aa 100644 --- a/src/notificationmanager.cpp +++ b/src/notificationmanager.cpp @@ -136,27 +136,27 @@ void NotificationManager::handleChatDiscovered(const QString &chatId, const QVar this->chatMap.insert(chatId, chatInformation); } -void NotificationManager::handleNgfConnectionStatus(const bool &connected) +void NotificationManager::handleNgfConnectionStatus(bool connected) { LOG("NGF Daemon connection status changed" << connected); } -void NotificationManager::handleNgfEventFailed(const quint32 &eventId) +void NotificationManager::handleNgfEventFailed(quint32 eventId) { LOG("NGF event failed, id:" << eventId); } -void NotificationManager::handleNgfEventCompleted(const quint32 &eventId) +void NotificationManager::handleNgfEventCompleted(quint32 eventId) { LOG("NGF event completed, id:" << eventId); } -void NotificationManager::handleNgfEventPlaying(const quint32 &eventId) +void NotificationManager::handleNgfEventPlaying(quint32 eventId) { LOG("NGF event playing, id:" << eventId); } -void NotificationManager::handleNgfEventPaused(const quint32 &eventId) +void NotificationManager::handleNgfEventPaused(quint32 eventId) { LOG("NGF event paused, id:" << eventId); } @@ -232,7 +232,7 @@ QString NotificationManager::getNotificationText(const QVariantMap ¬ification return FernschreiberUtils::getMessageShortText(notificationContent, false); } -void NotificationManager::controlLedNotification(const bool &enabled) +void NotificationManager::controlLedNotification(bool enabled) { static const QString PATTERN("PatternCommunicationIM"); static const QString ACTIVATE("req_led_pattern_activate"); diff --git a/src/notificationmanager.h b/src/notificationmanager.h index 9cb3020..68831fb 100644 --- a/src/notificationmanager.h +++ b/src/notificationmanager.h @@ -41,18 +41,18 @@ public slots: void handleUpdateNotificationGroup(const QVariantMap notificationGroupUpdate); void handleUpdateNotification(const QVariantMap updatedNotification); void handleChatDiscovered(const QString &chatId, const QVariantMap &chatInformation); - void handleNgfConnectionStatus(const bool &connected); - void handleNgfEventFailed(const quint32 &eventId); - void handleNgfEventCompleted(const quint32 &eventId); - void handleNgfEventPlaying(const quint32 &eventId); - void handleNgfEventPaused(const quint32 &eventId); + void handleNgfConnectionStatus(bool connected); + void handleNgfEventFailed(quint32 eventId); + void handleNgfEventCompleted(quint32 eventId); + void handleNgfEventPlaying(quint32 eventId); + void handleNgfEventPaused(quint32 eventId); private: QVariantMap sendNotification(const QString &chatId, const QVariantMap ¬ificationInformation, const QVariantMap &activeNotifications); void removeNotification(const QVariantMap ¬ificationInformation); QString getNotificationText(const QVariantMap ¬ificationContent); - void controlLedNotification(const bool &enabled); + void controlLedNotification(bool enabled); private: