projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a fancy menu to connect to and disconnect from your networks directly.
[quassel.git]
/
src
/
client
/
buffermodel.cpp
diff --git
a/src/client/buffermodel.cpp
b/src/client/buffermodel.cpp
index
78d3960
..
2fc222e
100644
(file)
--- a/
src/client/buffermodel.cpp
+++ b/
src/client/buffermodel.cpp
@@
-35,6
+35,8
@@
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() {
@@
-68,3
+70,8
@@
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);
+}