- msg << "Quassel"; // Application name
- msg << quint32(0); // ID of previous notification to replace
- msg << ""; // Icon to display
- msg << "Quassel: " + title; // Summary / Header of the message to display
- msg << message; // Body of the message to display
- msg << actions; // Actions from which the user may choose
- msg << hints; // Hints to the server displaying the message
- msg << qint32(10000); // Timeout in milliseconds
+ actions << "click" << "Click Me!";
+
+ QDBusReply<uint> reply = desktopNotifications->Notify(
+ "Quassel", // Application name
+ notificationId, // ID of previous notification to replace
+ "", // Icon to display
+ title, // Summary / Header of the message to display
+ QString("%1: %2:\n%2").arg(QTime::currentTime().toString()).arg(title).arg(message), // Body of the message to display
+ actions, // Actions from which the user may choose
+ hints, // Hints to the server displaying the message
+ 5000 // Timeout in milliseconds
+ );
+
+ if (!reply.isValid())
+ {
+ /* ERROR */
+ qDebug() << "Error on sending notification...";
+ return;
+ }
+
+ notificationId = reply.value();