projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Forgot version.inc - since this breaks protocol, it needs to be updated.
[quassel.git]
/
src
/
client
/
buffermodel.cpp
diff --git
a/src/client/buffermodel.cpp
b/src/client/buffermodel.cpp
index
2fc222e
..
e0f80ed
100644
(file)
--- a/
src/client/buffermodel.cpp
+++ b/
src/client/buffermodel.cpp
@@
-35,8
+35,6
@@
BufferModel::BufferModel(NetworkModel *parent)
// initialize the Property Mapper
_propertyMapper.setModel(this);
_selectionModelSynchronizer.addRegularSelectionModel(_propertyMapper.selectionModel());
// initialize the Property Mapper
_propertyMapper.setModel(this);
_selectionModelSynchronizer.addRegularSelectionModel(_propertyMapper.selectionModel());
- connect(_propertyMapper.selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)),
- this, SLOT(currentChanged(QModelIndex, QModelIndex)));
}
BufferModel::~BufferModel() {
}
BufferModel::~BufferModel() {
@@
-44,11
+42,13
@@
BufferModel::~BufferModel() {
bool BufferModel::filterAcceptsRow(int sourceRow, const QModelIndex &parent) const {
Q_UNUSED(sourceRow);
bool BufferModel::filterAcceptsRow(int sourceRow, const QModelIndex &parent) const {
Q_UNUSED(sourceRow);
- // hide childs of buffers and everything below
- if(parent.data(NetworkModel::ItemTypeRole) == NetworkModel::BufferItemType)
- return false;
- else
+ // only networks and buffers are allowed
+ if(!parent.isValid())
return true;
return true;
+ if(parent.data(NetworkModel::ItemTypeRole) == NetworkModel::NetworkItemType)
+ return true;
+
+ return false;
}
void BufferModel::synchronizeSelectionModel(MappedSelectionModel *selectionModel) {
}
void BufferModel::synchronizeSelectionModel(MappedSelectionModel *selectionModel) {
@@
-70,8
+70,3
@@
void BufferModel::mapProperty(int column, int role, QObject *target, const QByte
QModelIndex BufferModel::currentIndex() {
return propertyMapper()->selectionModel()->currentIndex();
}
QModelIndex BufferModel::currentIndex() {
return propertyMapper()->selectionModel()->currentIndex();
}
-
-void BufferModel::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) {
- Q_UNUSED(current);
- setData(previous, qVariantFromValue((int)BufferItem::NoActivity), NetworkModel::BufferActivityRole);
-}