summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-04-12 15:05:57 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-04-12 15:05:57 (GMT)
commitfa47c498947e818438ec9c6318924d11c2ae6c84 (patch)
treec33ca1f4376686edafbca3f120b363bfedc027ac /Swift/QtUI
parent6578b5872440f63ed8a4903bae83e46e936d469e (diff)
downloadswift-contrib-fa47c498947e818438ec9c6318924d11c2ae6c84.zip
swift-contrib-fa47c498947e818438ec9c6318924d11c2ae6c84.tar.bz2
Allow ErrorEvents into the EventController (display them to the user).
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/EventViewer/EventView.pri6
-rw-r--r--Swift/QtUI/EventViewer/EventView.pro2
-rw-r--r--Swift/QtUI/EventViewer/main.cpp10
3 files changed, 12 insertions, 6 deletions
diff --git a/Swift/QtUI/EventViewer/EventView.pri b/Swift/QtUI/EventViewer/EventView.pri
index 017f498..3676905 100644
--- a/Swift/QtUI/EventViewer/EventView.pri
+++ b/Swift/QtUI/EventViewer/EventView.pri
@@ -2,10 +2,12 @@ SOURCES += $$PWD/EventDelegate.cpp \
$$PWD/EventModel.cpp \
$$PWD/EventView.cpp \
$$PWD/QtEventWindow.cpp \
- $$PWD/QtEvent.cpp
+ $$PWD/QtEvent.cpp \
+ $$PWD/../QtSubscriptionRequestWindow.cpp
HEADERS += $$PWD/EventDelegate.h \
$$PWD/EventModel.h \
$$PWD/EventView.h \
$$PWD/QtEventWindow.h \
- $$PWD/QtEvent.h
+ $$PWD/QtEvent.h \
+ $$PWD/../QtSubscriptionRequestWindow.h
diff --git a/Swift/QtUI/EventViewer/EventView.pro b/Swift/QtUI/EventViewer/EventView.pro
index 942f0ba..3addbde 100644
--- a/Swift/QtUI/EventViewer/EventView.pro
+++ b/Swift/QtUI/EventViewer/EventView.pro
@@ -8,7 +8,7 @@ INCLUDEPATH += ../. ../../.. ../../../3rdParty/Boost/src
DEFINES += BOOST_SIGNALS_NAMESPACE=bsignals BOOST_ALL_NO_LIB
-#LIBS += ../../Controllers/Controllers.a
+LIBS += ../../Controllers/libSwiftControllers.a
LIBS += ../../../Swiften/libSwiften.a
LIBS += ../../../3rdParty/Boost/libBoost.a
LIBS += ../../../3rdParty/LibIDN/libIDN.a
diff --git a/Swift/QtUI/EventViewer/main.cpp b/Swift/QtUI/EventViewer/main.cpp
index ec96561..afdb442 100644
--- a/Swift/QtUI/EventViewer/main.cpp
+++ b/Swift/QtUI/EventViewer/main.cpp
@@ -10,18 +10,22 @@
#include "QtEventWindow.h"
#include "Swiften/Events/MessageEvent.h"
+#include "Swiften/Events/ErrorEvent.h"
+#include "Swiften/JID/JID.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- Swift::QtEventWindow* viewer = new Swift::QtEventWindow();
+ Swift::UIEventStream eventStream;
+ Swift::QtEventWindow* viewer = new Swift::QtEventWindow(&eventStream);
viewer->show();
boost::shared_ptr<Swift::Message> message1(new Swift::Message());
message1->setBody("Oooh, shiny");
boost::shared_ptr<Swift::MessageEvent> event1(new Swift::MessageEvent(message1));
- viewer->addEvent(boost::dynamic_pointer_cast<Swift::Event>(event1), true);
+ viewer->addEvent(boost::dynamic_pointer_cast<Swift::StanzaEvent>(event1), true);
for (int i = 0; i < 100; i++) {
- viewer->addEvent(boost::dynamic_pointer_cast<Swift::Event>(event1), false);
+ viewer->addEvent(boost::dynamic_pointer_cast<Swift::StanzaEvent>(event1), false);
}
+ viewer->addEvent(boost::dynamic_pointer_cast<Swift::StanzaEvent>(boost::shared_ptr<Swift::ErrorEvent>(new Swift::ErrorEvent(Swift::JID("me@example.com"), "Something bad did happen to you."))), true);
return app.exec();
}