fixing the creating of new buffers in the client. bye bye Client::buffer(BufferId)
[quassel.git] / src / qtui / bufferwidget.cpp
index d6dcfa2..fc06346 100644 (file)
@@ -29,17 +29,14 @@ BufferWidget::BufferWidget(QWidget *parent) : AbstractBufferContainer(parent) {
   ui.setupUi(this);
 }
 
-BufferWidget::~BufferWidget() {
-
-}
-
 AbstractChatView *BufferWidget::createChatView(BufferId id) {
-  QWidget *chatView;
-  chatView = new ChatView(Client::buffer(id), this);
+  ChatView *chatView;
+  chatView = new ChatView(id, this);
   _chatViews[id] = chatView;
   ui.stackedWidget->addWidget(chatView);
   chatView->setFocusProxy(this);
-  return dynamic_cast<AbstractChatView*>(chatView);
+  chatView->setBufferForBacklogFetching(id);
+  return chatView;
 }
 
 void BufferWidget::removeChatView(BufferId id) {