Skip to content

Commit baf33e8

Browse files
committed
Fix building with libnotify < 0.7.
1 parent a170943 commit baf33e8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/libnotifier.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,24 @@ LibNotifier::~LibNotifier()
3434

3535
void LibNotifier::showNotification(const QString& title, const QString& message, const QString& icon)
3636
{
37+
38+
#ifdef NOTIFY_CHECK_VERSION
39+
#if NOTIFY_CHECK_VERSION (0, 7, 0)
3740
NotifyNotification* n = notify_notification_new(title.toUtf8().constData(),
3841
message.toUtf8().constData(),
3942
icon.toUtf8().constData());
43+
#else
44+
NotifyNotification* n = notify_notification_new(title.toUtf8().constData(),
45+
message.toUtf8().constData(),
46+
icon.toUtf8().constData(),
47+
NULL);
48+
#endif
49+
#else
50+
NotifyNotification* n = notify_notification_new(title.toUtf8().constData(),
51+
message.toUtf8().constData(),
52+
icon.toUtf8().constData(),
53+
NULL);
54+
#endif
4055

4156
GError* err = 0;
4257
notify_notification_show(n, &err);

0 commit comments

Comments
 (0)