X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fbuffermodel.h;fp=src%2Fclient%2Fbuffermodel.h;h=3126f737b909e68f378c54115fcbae368b882bbd;hb=e190d576540cf5dfb2e63d33a69662083f3db210;hp=0be559aaf287989e4ea0dd49a6b65c28eedf7a31;hpb=4ea3ce9e1ff6df8b1d2a257da7e5fbba9f6cbfbc;p=quassel.git diff --git a/src/client/buffermodel.h b/src/client/buffermodel.h index 0be559aa..3126f737 100644 --- a/src/client/buffermodel.h +++ b/src/client/buffermodel.h @@ -36,12 +36,11 @@ class BufferModel : public QSortFilterProxyModel { public: BufferModel(NetworkModel *parent = 0); - virtual ~BufferModel(); bool filterAcceptsRow(int sourceRow, const QModelIndex &parent) const; inline const SelectionModelSynchronizer *selectionModelSynchronizer() const { return &_selectionModelSynchronizer; } - inline QItemSelectionModel *standardSelectionModel() const { return const_cast(&_standardSelectionModel); } + inline QItemSelectionModel *standardSelectionModel() const { return _selectionModelSynchronizer.selectionModel(); } void synchronizeSelectionModel(MappedSelectionModel *selectionModel); void synchronizeView(QAbstractItemView *view); @@ -49,9 +48,12 @@ public: QModelIndex currentIndex(); void setCurrentIndex(const QModelIndex &newCurrent); +private slots: + void debug_currentChanged(QModelIndex current, QModelIndex previous); + void debug_selectionChanged(QItemSelection current , QItemSelection previous); + private: SelectionModelSynchronizer _selectionModelSynchronizer; - QItemSelectionModel _standardSelectionModel; }; #endif // BUFFERMODEL_H