summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/EventViewer/QtEventWindow.cpp5
-rw-r--r--Swift/QtUI/EventViewer/QtEventWindow.h9
2 files changed, 9 insertions, 5 deletions
diff --git a/Swift/QtUI/EventViewer/QtEventWindow.cpp b/Swift/QtUI/EventViewer/QtEventWindow.cpp
index e77699b..c8d1f0c 100644
--- a/Swift/QtUI/EventViewer/QtEventWindow.cpp
+++ b/Swift/QtUI/EventViewer/QtEventWindow.cpp
@@ -9,12 +9,13 @@
#include <QBoxLayout>
#include <QMessageBox>
#include <QPushButton>
-#include <QtDebug>
+#include <QTreeView>
#include <Swiften/Base/Platform.h>
#include <Swift/Controllers/UIEvents/JoinMUCUIEvent.h>
#include <Swift/Controllers/UIEvents/RequestChatUIEvent.h>
+#include <Swift/Controllers/UIEvents/UIEventStream.h>
#include <Swift/Controllers/XMPPEvents/ErrorEvent.h>
#include <Swift/Controllers/XMPPEvents/IncomingFileTransferEvent.h>
#include <Swift/Controllers/XMPPEvents/MUCInviteEvent.h>
@@ -99,7 +100,7 @@ void QtEventWindow::handleItemActivated(const QModelIndex& item) {
errorEvent->conclude();
}
QMessageBox msgBox;
- msgBox.setText(model_->data(item, Qt::DisplayRole).toString());
+ msgBox.setText(event->data(Qt::DisplayRole).toString());
msgBox.exec();
}
diff --git a/Swift/QtUI/EventViewer/QtEventWindow.h b/Swift/QtUI/EventViewer/QtEventWindow.h
index bad20e4..7ae33ec 100644
--- a/Swift/QtUI/EventViewer/QtEventWindow.h
+++ b/Swift/QtUI/EventViewer/QtEventWindow.h
@@ -8,9 +8,6 @@
#include <memory>
-#include <QTreeView>
-
-#include <Swift/Controllers/UIEvents/UIEventStream.h>
#include <Swift/Controllers/UIInterfaces/EventWindow.h>
#include <Swift/QtUI/EventViewer/EventDelegate.h>
@@ -18,8 +15,11 @@
#include <Swift/QtUI/EventViewer/EventView.h>
class QPushButton;
+class QTreeView;
namespace Swift {
+ class UIEventStream;
+
class QtEventWindow : public QWidget, public EventWindow {
Q_OBJECT
public:
@@ -27,12 +27,15 @@ namespace Swift {
~QtEventWindow();
void addEvent(std::shared_ptr<StanzaEvent> event, bool active);
void removeEvent(std::shared_ptr<StanzaEvent> event);
+
signals:
void onNewEventCountUpdated(int count);
+
private slots:
void handleItemActivated(const QModelIndex& item);
void handleItemClicked(const QModelIndex& item);
void handleReadClicked();
+
private:
EventModel* model_;
EventDelegate* delegate_;