Don't pass primitive types by const references to NotificationManager

It makes no sense whatsoever.
This commit is contained in:
Slava Monich 2020-10-28 01:36:14 +02:00
parent 6eed093e7b
commit 484f66f01c
2 changed files with 12 additions and 12 deletions

View file

@ -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 &notification
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");

View file

@ -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 &notificationInformation, const QVariantMap &activeNotifications);
void removeNotification(const QVariantMap &notificationInformation);
QString getNotificationText(const QVariantMap &notificationContent);
void controlLedNotification(const bool &enabled);
void controlLedNotification(bool enabled);
private: