Global::RunMode Global::runMode;
uint Global::defaultPort;
-bool Global::SPUTDEV;
+bool Global::DEBUG;
extern RunMode runMode;
extern unsigned int defaultPort;
- extern bool SPUTDEV; // FIXME This is for internal use only!
+ extern bool DEBUG;
void registerMetaTypes();
};
// Check if a non-standard core port is requested
QStringList args = QCoreApplication::arguments(); // TODO Build a CLI parser
- Global::SPUTDEV = args.contains("--sputdev"); // This enables various debug features for Sput. Do not touch.
+ Global::DEBUG = args.contains("--debug"); // This enables (maybe) various debug features.
Global::defaultPort = 4242;
int idx;
void NetworkConnection::putRawLine(QByteArray s) {
s += "\r\n";
socket.write(s);
- if(Global::SPUTDEV) qDebug() << "SENT:" << s;
}
void NetworkConnection::putCmd(const QString &cmd, const QVariantList ¶ms, const QByteArray &prefix) {
Global::runMode = Global::ClientOnly;
Global::defaultPort = 4242;
- Global::SPUTDEV = true;
Network::setDefaultCodecForServer("ISO-8859-1");
Network::setDefaultCodecForEncoding("UTF-8");
***************************************************************************/
#include "bufferwidget.h"
-#include "chatline.h"
#include "chatline-old.h"
-#include "chatview.h"
#include "chatwidget.h"
#include "settings.h"
#include "client.h"
}
AbstractChatView *BufferWidget::createChatView(BufferId id) {
- QWidget *chatView;
- if(Global::SPUTDEV) {
- chatView = new ChatView(Client::buffer(id), this);
- } else {
- chatView = new ChatWidget(id, this);
- }
+ QWidget *chatView = new ChatWidget(id, this);
_chatViews[id] = chatView;
ui.stackedWidget->addWidget(chatView);
chatView->setFocusProxy(this);
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include <QFontMetrics>
-#include <QGraphicsSceneMouseEvent>
-#include <QTextCursor>
-#include <QTextDocument>
-
-#include <QtGui>
-
-#include "chatitem.h"
-
-ChatItem::ChatItem(QGraphicsItem *parent) : QGraphicsItem(parent) {
- _width = 0;
- //if(_wrapMode == WordWrap) {
- // setFlags(QGraphicsItem::ItemClipsToShape, true);
- //}
-}
-
-ChatItem::~ChatItem() {
-
-}
-
-void ChatItem::setWidth(int w) {
- _width = w;
- layout();
-}
-
-void ChatItem::setTextOption(const QTextOption &option) {
- _textOption = option;
- layout();
-}
-
-QTextOption ChatItem::textOption() const {
- return _textOption;
-}
-
-QString ChatItem::text() const {
- return _layout.text();
-}
-
-void ChatItem::setText(const UiStyle::StyledText &text) {
- _layout.setText(text.text);
- _layout.setAdditionalFormats(text.formats);
- layout();
-}
-
-void ChatItem::layout() {
- if(!_layout.additionalFormats().count()) return; // no text set
- if(_width <= 0) return;
- prepareGeometryChange();
- QFontMetrics metrics(_layout.additionalFormats()[0].format.font());
- int leading = metrics.leading();
- int height = 0;
- _layout.setTextOption(textOption());
- _layout.beginLayout();
- while(1) {
- QTextLine line = _layout.createLine();
- if(!line.isValid()) break;
- line.setLineWidth(_width);
- if(textOption().wrapMode() != QTextOption::NoWrap && line.naturalTextWidth() > _width) {
- // word did not fit, we need to wrap it in the middle
- // this is a workaround for Qt failing to handle WrapAtWordBoundaryOrAnywhere correctly
- QTextOption::WrapMode mode = textOption().wrapMode();
- textOption().setWrapMode(QTextOption::WrapAnywhere);
- _layout.setTextOption(textOption());
- line.setLineWidth(_width);
- textOption().setWrapMode(mode);
- _layout.setTextOption(textOption());
- }
- height += leading;
- line.setPosition(QPoint(0, height));
- height += line.height();
- }
- _layout.endLayout();
- update();
-} QDateTime _timestamp;
- MsgId _msgId;
-
-
-QRectF ChatItem::boundingRect() const {
- return _layout.boundingRect();
-}
-
-void ChatItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
- Q_UNUSED(option); Q_UNUSED(widget);
- _layout.draw(painter, QPointF(0, 0));
-
-}
-
-/*
-void ChatItem::mouseMoveEvent ( QGraphicsSceneMouseEvent * event ) {
- qDebug() << (void*)this << "moving" << event->pos();
- if(event->pos().y() < 0) {
- QTextCursor cursor(document());
- //cursor.insertText("foo");
- //cursor.select(QTextCursor::Document);
- event->ignore();
- } else QGraphicsTextItem::mouseMoveEvent(event);
-}
-*/
-
-
-
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef _CHATITEM_H_
-#define _CHATITEM_H_
-
-#include <QGraphicsItem>
-#include <QTextLayout>
-#include <QTextOption>
-
-#include "uistyle.h"
-
-class QGraphicsSceneMouseEvent;
-
-class ChatItem : public QGraphicsItem {
-
- public:
- ChatItem(QGraphicsItem *parent = 0);
- virtual ~ChatItem();
-
- virtual QRectF boundingRect() const;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
-
- QString text() const;
- void setText(const UiStyle::StyledText &text);
-
- QTextOption textOption() const;
- void setTextOption(const QTextOption &option);
-
- void setWidth(int width);
- virtual void layout();
-
- protected:
- //void mouseMoveEvent ( QGraphicsSceneMouseEvent * event );
-
- private:
- int _width;
- QTextLayout _layout;
- QTextOption _textOption;
-};
-
-#endif
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include <QDateTime>
-#include <QString>
-#include <QtGui>
-
-#include "bufferinfo.h"
-#include "chatitem.h"
-#include "chatline.h"
-#include "qtui.h"
-
-ChatLine::ChatLine(Message msg) : QGraphicsItem(), AbstractUiMsg() {
- _styledTimestamp = QtUi::style()->styleString(msg.formattedTimestamp());
- _styledSender = QtUi::style()->styleString(msg.formattedSender());
- _styledText = QtUi::style()->styleString(msg.formattedText());
- _msgId = msg.msgId();
- _timestamp = msg.timestamp();
-
- _tsColWidth = _senderColWidth = _textColWidth = 0;
- QTextOption option;
- option.setWrapMode(QTextOption::NoWrap);
- _tsItem = new ChatItem(this);
- _tsItem->setTextOption(option);
- _tsItem->setText(_styledTimestamp);
-
- option.setAlignment(Qt::AlignRight);
- _senderItem = new ChatItem(this);
- _senderItem->setTextOption(option);
- _senderItem->setText(_styledSender);
-
- option.setAlignment(Qt::AlignLeft);
- option.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
- _textItem = new ChatItem(this);
- _textItem->setTextOption(option);
- _textItem->setText(_styledText);
-
-}
-
-ChatLine::~ChatLine() {
-
-}
-
-QString ChatLine::sender() const {
- return QString();
-}
-
-QString ChatLine::text() const {
- return QString();
-}
-
-MsgId ChatLine::msgId() const {
- return 0;
-}
-
-BufferInfo ChatLine::bufferInfo() const {
- Q_ASSERT(false); // do we actually need this function???
- return BufferInfo();
-}
-
-QDateTime ChatLine::timestamp() const {
- return QDateTime();
-}
-
-QRectF ChatLine::boundingRect () const {
- return childrenBoundingRect();
-}
-
-void ChatLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
-
-}
-
-void ChatLine::setColumnWidths(int tsColWidth, int senderColWidth, int textColWidth) {
- if(tsColWidth >= 0) {
- _tsColWidth = tsColWidth;
- _tsItem->setWidth(tsColWidth);
- }
- if(senderColWidth >= 0) {
- _senderColWidth = senderColWidth;
- _senderItem->setWidth(senderColWidth);
- }
- if(textColWidth >= 0) {
- _textColWidth = textColWidth;
- _textItem->setWidth(textColWidth);
- }
- layout();
-}
-
-void ChatLine::layout() {
- prepareGeometryChange();
- _tsItem->setPos(QPointF(0, 0));
- _senderItem->setPos(QPointF(_tsColWidth + QtUi::style()->sepTsSender(), 0));
- _textItem->setPos(QPointF(_tsColWidth + QtUi::style()->sepTsSender() + _senderColWidth + QtUi::style()->sepSenderText(), 0));
-}
-
-
-bool ChatLine::sceneEvent ( QEvent * event ) {
- qDebug() <<(void*)this<< "receiving event";
- event->ignore();
- return false;
-}
-
-
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef _CHATLINE_H_
-#define _CHATLINE_H_
-
-#include <QGraphicsItem>
-
-#include "message.h"
-#include "quasselui.h"
-#include "uistyle.h"
-
-class ChatItem;
-class ChatLineData;
-
-/* Concept Ideas
-* Probably makes sense to have ChatLineData be the AbstractUiMsg instead, if it turns out that creating ChatLineData
-is the expensive part... In that case, we could have a QHash<MsgId, ChatLineData*> in the Client, and ChatLine just
-gets a data pointer. This would allow us to share most data between AbstractUiMsgs, and ChatLines themselves could
-be pretty cheap - that'd be a clean solution for having a monitor buffer, highlight buffer etcpp.
-
-* ItemLayoutData
-
-*/
-
-class ChatLine : public QGraphicsItem, public AbstractUiMsg {
-
- public:
- ChatLine(Message);
- virtual ~ChatLine();
- virtual QString sender() const;
- virtual QString text() const;
- virtual MsgId msgId() const;
- virtual BufferInfo bufferInfo() const;
- virtual QDateTime timestamp() const;
-
- virtual QRectF boundingRect () const;
- virtual void paint (QPainter * painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
- void layout();
-
- void setColumnWidths(int tsColWidth, int senderColWidth, int textColWidth);
-
- void myMousePressEvent ( QGraphicsSceneMouseEvent * event ) { qDebug() << "press"; mousePressEvent(event); }
-
- protected:
- bool sceneEvent ( QEvent * event );
-
- private:
- UiStyle::StyledText _styledTimestamp, _styledText, _styledSender;
-
- QDateTime _timestamp;
- MsgId _msgId;
-
- ChatItem *_tsItem, *_senderItem, *_textItem;
- int _tsColWidth, _senderColWidth, _textColWidth;
-};
-
-//! This contains the data of a ChatLine, i.e. mainly the styled message contents.
-/** By separating ChatLine and ChatLineData, ChatLine itself is very small and we can reuse the
- * same contents in several ChatLine objects without duplicating data.
- */
-class ChatLineData {
-
- public:
- ChatLineData(const Message &msg);
-
- inline UiStyle::StyledText styledSender() const { return _styledSender; }
- inline UiStyle::StyledText styledTimestamp() const { return _styledTimestamp; }
- inline UiStyle::StyledText styledText() const { return _styledText; }
-
- inline QString sender() const { return _styledSender.text; }
- inline QString text() const { return _styledText.text; }
- inline QDateTime timestamp() const { return _timestamp; }
- inline MsgId msgId() const { return _msgId; }
-
- private:
- UiStyle::StyledText _styledSender, _styledText, _styledTimestamp;
- QDateTime _timestamp;
- MsgId _msgId;
-
-};
-
-
-#endif
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include <QGraphicsSceneMouseEvent>
-
-#include "buffer.h"
-#include "chatitem.h"
-#include "chatline.h"
-#include "chatscene.h"
-#include "quasselui.h"
-
-ChatScene::ChatScene(Buffer *buf, QObject *parent) : QGraphicsScene(parent) {
- _buffer = buf;
-
- foreach(AbstractUiMsg *msg, buf->contents()) {
- appendMsg(msg);
- }
- connect(buf, SIGNAL(msgAppended(AbstractUiMsg *)), this, SLOT(appendMsg(AbstractUiMsg *)));
- connect(buf, SIGNAL(msgPrepended(AbstractUiMsg *)), this, SLOT(prependMsg(AbstractUiMsg *)));
-}
-
-ChatScene::~ChatScene() {
-
-
-}
-
-void ChatScene::appendMsg(AbstractUiMsg * msg) {
- ChatLine *line = dynamic_cast<ChatLine*>(msg);
- Q_ASSERT(line);
- _lines.append(line);
- addItem(line);
- line->setPos(0, _lines.count() * 30);
- line->setColumnWidths(80, 80, 400);
-}
-
-void ChatScene::prependMsg(AbstractUiMsg * msg) {
- ChatLine *line = dynamic_cast<ChatLine*>(msg);
- Q_ASSERT(line); qDebug() << "prepending";
- _lines.prepend(line);
- addItem(line);
- line->setPos(0, _lines.count() * 30);
-}
-
-void ChatScene::mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ) {
- qDebug() << "recv" << mouseEvent->scenePos();
- ChatLine *line = static_cast<ChatLine*>(itemAt(mouseEvent->scenePos()));
- ChatItem *item = static_cast<ChatItem*>(itemAt(mouseEvent->scenePos()));
- qDebug() << (void*)line << (void*)item;
- if(line) {
- line->myMousePressEvent(mouseEvent);
- } else QGraphicsScene::mousePressEvent(mouseEvent);
-}
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef _CHATSCENE_H_
-#define _CHATSCENE_H_
-
-#include <QGraphicsScene>
-
-class AbstractUiMsg;
-class Buffer;
-class ChatLine;
-class QGraphicsSceneMouseEvent;
-
-class ChatScene : public QGraphicsScene {
- Q_OBJECT
-
- public:
- ChatScene(Buffer *buffer, QObject *parent);
- virtual ~ChatScene();
-
- Buffer *buffer() const;
-
- public slots:
-
- protected slots:
- void appendMsg(AbstractUiMsg *msg);
- void prependMsg(AbstractUiMsg *msg);
-
- void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent );
-
- private:
- Buffer *_buffer;
- QList<ChatLine*> _lines;
-
-};
-
-#endif
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include <QGraphicsTextItem>
-
-#include "buffer.h"
-#include "chatline.h"
-#include "chatscene.h"
-#include "chatview.h"
-#include "quasselui.h"
-
-ChatView::ChatView(Buffer *buf, QWidget *parent) : QGraphicsView(parent), AbstractChatView() {
- _scene = new ChatScene(buf, this);
- setScene(_scene);
-
- QGraphicsTextItem *item = scene()->addText(buf->bufferInfo().bufferName());
-
-}
-
-
-ChatView::~ChatView() {
-
-}
-
-
-ChatScene *ChatView::scene() const {
- return _scene;
-}
-
-
-void ChatView::clear()
-{
-}
-
-void ChatView::prependMsg(AbstractUiMsg *msg) {
- ChatLine *line = dynamic_cast<ChatLine*>(msg);
- Q_ASSERT(line);
- prependChatLine(line);
-}
-
-void ChatView::prependChatLine(ChatLine *line) {
- //qDebug() << "prepending";
-}
-
-void ChatView::prependChatLines(QList<ChatLine *> clist) {
-
-}
-
-void ChatView::appendMsg(AbstractUiMsg *msg) {
- ChatLine *line = dynamic_cast<ChatLine*>(msg);
- Q_ASSERT(line);
- appendChatLine(line);
-}
-
-void ChatView::appendChatLine(ChatLine *line) {
- //qDebug() << "appending";
-}
-
-
-void ChatView::appendChatLines(QList<ChatLine *> list) {
- foreach(ChatLine *line, list) {
-
- }
-}
-
-void ChatView::setContents(const QList<AbstractUiMsg *> &list) {
- qDebug() << "setting" << list.count();
- //appendChatLines(list);
-}
-
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#ifndef _CHATVIEW_H_
-#define _CHATVIEW_H_
-
-#include <QGraphicsView>
-
-#include "abstractbuffercontainer.h"
-
-class AbstractUiMsg;
-class Buffer;
-class ChatLine;
-class ChatScene;
-
-class ChatView : public QGraphicsView, public AbstractChatView {
- Q_OBJECT
-
- public:
- ChatView(Buffer *, QWidget *parent = 0);
- ~ChatView();
-
- ChatScene *scene() const;
-
- public slots:
-
- void clear();
-
- void prependMsg(AbstractUiMsg *);
- void appendMsg(AbstractUiMsg *);
-
- void prependChatLine(ChatLine *);
- void appendChatLine(ChatLine *);
- void prependChatLines(QList<ChatLine *>);
- void appendChatLines(QList<ChatLine *>);
-
- void setContents(const QList<AbstractUiMsg *> &);
-
- private:
- ChatScene *_scene;
-};
-
-#endif
#include "aboutdlg.h"
#include "chatwidget.h"
#include "bufferview.h"
-#include "chatline.h"
#include "chatline-old.h"
#include "client.h"
#include "clientbacklogmanager.h"
ui.bufferWidget->setModel(Client::bufferModel());
ui.bufferWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
- if(Global::SPUTDEV) {
- //showSettingsDlg();
- //showAboutDlg();
- //showNetworkDlg();
- //exit(1);
- }
-
}
MainWin::~MainWin() {
}
AbstractUiMsg *MainWin::layoutMsg(const Message &msg) {
- if(Global::SPUTDEV) return new ChatLine(msg);
return new ChatLineOld(msg);
}
DEPMOD = client common uisupport
QT_MOD = core gui network
-SRCS += aboutdlg.cpp bufferwidget.cpp chatitem.cpp chatline.cpp chatline-old.cpp chatscene.cpp chatview.cpp chatwidget.cpp \
+SRCS += aboutdlg.cpp bufferwidget.cpp chatline-old.cpp chatwidget.cpp \
coreconfigwizard.cpp coreconnectdlg.cpp configwizard.cpp debugconsole.cpp inputwidget.cpp \
mainwin.cpp nicklistwidget.cpp qtui.cpp qtuisettings.cpp qtuistyle.cpp settingsdlg.cpp settingspagedlg.cpp \
topicbutton.cpp topicwidget.cpp verticaldock.cpp jumpkeyhandler.cpp
-HDRS += aboutdlg.h bufferwidget.h chatitem.h chatline.h chatline-old.h chatscene.h chatview.h chatwidget.h \
+HDRS += aboutdlg.h bufferwidget.h chatline-old.h chatwidget.h \
coreconfigwizard.h configwizard.h debugconsole.h inputwidget.h \
coreconnectdlg.h mainwin.h nicklistwidget.h qtui.h qtuisettings.h qtuistyle.h settingsdlg.h settingspagedlg.h \
topicbutton.h topicwidget.h verticaldock.h jumpkeyhandler.h
void BufferView::rowsInserted(const QModelIndex & parent, int start, int end) {
QTreeView::rowsInserted(parent, start, end);
if(model()->rowCount(parent) == 1 && parent.data(NetworkModel::ItemTypeRole) == NetworkModel::NetworkItemType
- && (Global::SPUTDEV || parent.data(NetworkModel::ItemActiveRole) == true)) {
+ && parent.data(NetworkModel::ItemActiveRole) == true) {
// without updating the parent the expand will have no effect... Qt Bug?
update(parent);
expand(parent);
continue;
bool isActive = networkIdx.data(NetworkModel::ItemActiveRole).toBool();
- if(Global::SPUTDEV) {
- if(isExpanded(networkIdx) != isActive) setExpanded(networkIdx, true);
- } else {
- if(isExpanded(networkIdx) != isActive)
- setExpanded(networkIdx, isActive);
- }
+ if(isExpanded(networkIdx) != isActive) setExpanded(networkIdx, isActive);
}
}