X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fmessagemodel.h;fp=src%2Fclient%2Fmessagemodel.h;h=50a7e09c15c53a7d3d2090a87dc426c86402d6e6;hb=6deff07f0aa016d6b48ca8748720fee697eb17cd;hp=2439d1e0f5fe76bc3ff39cd1fd91821291e285e7;hpb=5aefc9ba3d4d0891092bfa342ca1d970bdf7ad4f;p=quassel.git diff --git a/src/client/messagemodel.h b/src/client/messagemodel.h index 2439d1e0..50a7e09c 100644 --- a/src/client/messagemodel.h +++ b/src/client/messagemodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2011 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,7 +21,7 @@ #ifndef MESSAGEMODEL_H_ #define MESSAGEMODEL_H_ -#include +#include #include #include "message.h" @@ -30,7 +30,7 @@ class MessageModelItem; struct MsgId; -class MessageModel : public QAbstractItemModel { +class MessageModel : public QAbstractListModel { Q_OBJECT public: @@ -56,8 +56,6 @@ public: MessageModel(QObject *parent); - inline QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - inline QModelIndex parent(const QModelIndex &) const { return QModelIndex(); } inline int rowCount(const QModelIndex &parent = QModelIndex()) const { return parent.isValid() ? 0 : messageCount(); } inline int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return 3; } @@ -114,14 +112,6 @@ private: QHash _messagesWaiting; }; -// inlines -QModelIndex MessageModel::index(int row, int column, const QModelIndex &parent) const { - if(row < 0 || row >= rowCount(parent) || column < 0 || column >= columnCount(parent)) - return QModelIndex(); - - return createIndex(row, column); -} - // ************************************************** // MessageModelItem // **************************************************