summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/EventViewer/QtEvent.cpp')
-rw-r--r--Swift/QtUI/EventViewer/QtEvent.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/QtUI/EventViewer/QtEvent.cpp b/Swift/QtUI/EventViewer/QtEvent.cpp
index 91df26f..76875ae 100644
--- a/Swift/QtUI/EventViewer/QtEvent.cpp
+++ b/Swift/QtUI/EventViewer/QtEvent.cpp
@@ -7,6 +7,7 @@
#include "Swift/QtUI/EventViewer/QtEvent.h"
#include "Swiften/Events/MessageEvent.h"
+#include "Swiften/Events/ErrorEvent.h"
#include "Swiften/Events/SubscriptionRequestEvent.h"
#include "Swift/QtUI/QtSwiftUtil.h"
@@ -41,6 +42,10 @@ QString QtEvent::text() {
String message = subscriptionRequestEvent->getJID().toBare().toString() + " would like to add you to their roster" + (reason.isEmpty() ? "." : ", saying '" + reason + "'.");
return P2QSTRING(message);
}
+ boost::shared_ptr<ErrorEvent> errorEvent = boost::dynamic_pointer_cast<ErrorEvent>(event_);
+ if (errorEvent) {
+ return P2QSTRING(errorEvent->getText());
+ }
return "";
}