Use consistent capitalisation for postNotification's roomName
This commit is contained in:
committed by
Carl Schwan
parent
6a4b1983a1
commit
44da1ca1bf
@@ -25,7 +25,7 @@ NotificationsManager::NotificationsManager(QObject *parent)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationsManager::postNotification(NeoChatRoom *room, const QString &roomname, const QString &sender, const QString &text, const QImage &icon)
|
void NotificationsManager::postNotification(NeoChatRoom *room, const QString &roomName, const QString &sender, const QString &text, const QImage &icon)
|
||||||
{
|
{
|
||||||
if (!NeoChatConfig::self()->showNotifications()) {
|
if (!NeoChatConfig::self()->showNotifications()) {
|
||||||
return;
|
return;
|
||||||
@@ -35,10 +35,10 @@ void NotificationsManager::postNotification(NeoChatRoom *room, const QString &ro
|
|||||||
img.convertFromImage(icon);
|
img.convertFromImage(icon);
|
||||||
KNotification *notification = new KNotification("message");
|
KNotification *notification = new KNotification("message");
|
||||||
|
|
||||||
if (sender == roomname) {
|
if (sender == roomName) {
|
||||||
notification->setTitle(sender);
|
notification->setTitle(sender);
|
||||||
} else {
|
} else {
|
||||||
notification->setTitle(i18n("%1 (%2)", sender, roomname));
|
notification->setTitle(i18n("%1 (%2)", sender, roomName));
|
||||||
}
|
}
|
||||||
|
|
||||||
notification->setText(text.toHtmlEscaped());
|
notification->setText(text.toHtmlEscaped());
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class NotificationsManager : public QObject
|
|||||||
public:
|
public:
|
||||||
static NotificationsManager &instance();
|
static NotificationsManager &instance();
|
||||||
|
|
||||||
Q_INVOKABLE void postNotification(NeoChatRoom *roomId, const QString &roomName, const QString &senderName, const QString &text, const QImage &icon);
|
Q_INVOKABLE void postNotification(NeoChatRoom *room, const QString& roomName, const QString& sender, const QString& text, const QImage& icon);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NotificationsManager(QObject *parent = nullptr);
|
NotificationsManager(QObject *parent = nullptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user