Browse Source

fix(ui): minor fix

reviewable/pr5674/r6
Monsterovich 6 years ago
parent
commit
161a773dbb
  1. 6
      src/platform/desktop_notifications/desktopnotify.cpp
  2. 6
      src/platform/desktop_notifications/desktopnotify.h

6
src/platform/desktop_notifications/desktopnotify.cpp

@ -19,7 +19,7 @@ DesktopNotify::DesktopNotify()
notifyCore.registerApplication(snoreApp); notifyCore.registerApplication(snoreApp);
} }
void DesktopNotify::createNotification(const QString& title, const QString &text, Snore::Icon &icon) void DesktopNotify::createNotification(const QString& title, const QString& text, Snore::Icon& icon)
{ {
const Settings& s = Settings::getInstance(); const Settings& s = Settings::getInstance();
if(!(s.getNotify() && s.getDesktopNotify())) { if(!(s.getNotify() && s.getDesktopNotify())) {
@ -31,12 +31,12 @@ void DesktopNotify::createNotification(const QString& title, const QString &text
notifyCore.broadcastNotification(notify); notifyCore.broadcastNotification(notify);
} }
void DesktopNotify::notifyMessage(const QString title, const QString message) void DesktopNotify::notifyMessage(const QString& title, const QString& message)
{ {
createNotification(title, message, snoreIcon); createNotification(title, message, snoreIcon);
} }
void DesktopNotify::notifyMessagePixmap(const QString title, const QString message, QPixmap avatar) void DesktopNotify::notifyMessagePixmap(const QString& title, const QString& message, QPixmap avatar)
{ {
Snore::Icon new_icon(avatar); Snore::Icon new_icon(avatar);
createNotification(title, message, new_icon); createNotification(title, message, new_icon);

6
src/platform/desktop_notifications/desktopnotify.h

@ -21,12 +21,12 @@ public:
}; };
public slots: public slots:
void notifyMessage(const QString title, const QString message); void notifyMessage(const QString& title, const QString& message);
void notifyMessagePixmap(const QString title, const QString message, QPixmap avatar); void notifyMessagePixmap(const QString& title, const QString& message, QPixmap avatar);
void notifyMessageSimple(const MessageType type); void notifyMessageSimple(const MessageType type);
private: private:
void createNotification(const QString& title, const QString &text, Snore::Icon &icon); void createNotification(const QString& title, const QString& text, Snore::Icon& icon);
private: private:
Snore::SnoreCore& notifyCore; Snore::SnoreCore& notifyCore;

Loading…
Cancel
Save