Skip to content

Commit

Permalink
try to fix crash on awesome with new dbus popups
Browse files Browse the repository at this point in the history
  • Loading branch information
wadealer committed Feb 21, 2012
1 parent 4952b1c commit 15e5ad7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions patches/1100-psiplus-new-popups.diff
Expand Up @@ -1802,7 +1802,7 @@
void accountAdded(PsiAccount *);
--- psi.orig/src/psidbusnotifier.cpp
+++ psi/src/psidbusnotifier.cpp
@@ -0,0 +1,368 @@
@@ -0,0 +1,375 @@
+/*
+ * psidbusnotifier.cpp: Psi's interface to org.freedesktop.Notify
+ * Copyright (C) 2012 Khryukin Evgeny
Expand Down Expand Up @@ -1849,6 +1849,7 @@
+#include "psioptions.h"
+#include "psicon.h"
+
+#include <QtDBus/QDBusPendingCallWatcher>
+
+static int minLifeTime = 5000;
+
Expand Down Expand Up @@ -2123,12 +2124,18 @@
+
+void PsiDBusNotifier::asyncCallFinished(QDBusPendingCallWatcher *watcher)
+{
+ QDBusPendingReply<uint> repl(*watcher);
+ if(repl.value() == 0) {
+ QDBusMessage m = watcher->reply();
+ if(m.type() == QDBusMessage::InvalidMessage || m.arguments().isEmpty()) {
+ readyToDie();
+ return;
+ }
+
+ QVariant repl = m.arguments().first();
+ if(repl.type() != QVariant::UInt || repl.toUInt() == 0) {
+ readyToDie();
+ }
+ else {
+ id_ = repl.value();
+ id_ = repl.toUInt();
+ }
+}
+
Expand Down

0 comments on commit 15e5ad7

Please sign in to comment.