/***************************************************************************
- * Copyright (C) 2005-07 by The Quassel Team *
+ * Copyright (C) 2005-07 by the Quassel IRC Team *
* 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) any later version. *
+ * (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 *
setFlags(flags);
}
-uint BufferTreeItem::id() const {
+quint64 BufferTreeItem::id() const {
return buf->bufferInfo().uid();
}
}
}
-uint NetworkTreeItem::id() const {
+quint64 NetworkTreeItem::id() const {
return _networkId;
}
uint bufferId = bufferList.first().second;
// no self merges (would kill us)
- if(bufferId == parent.data(BufferUidRole).toInt())
+ if(bufferId == parent.data(BufferUidRole).toUInt())
return false;
Q_ASSERT(rootItem->childById(netId));
void BufferTreeModel::bufferUpdated(Buffer *buffer) {
QModelIndex itemindex = getOrCreateBufferItemIndex(buffer);
- emit invalidateFilter();
emit dataChanged(itemindex, itemindex);
}
// This Slot indicates that the user has selected a different buffer in the gui
void BufferTreeModel::setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command) {
Q_UNUSED(command)
- if(isBufferIndex(index)) {
- currentBuffer = getBufferByIndex(index);
+ Buffer *newCurrentBuffer;
+ if(isBufferIndex(index) && currentBuffer != (newCurrentBuffer = getBufferByIndex(index))) {
+ currentBuffer = newCurrentBuffer;
bufferActivity(Buffer::NoActivity, currentBuffer);
emit bufferSelected(currentBuffer);
emit selectionChanged(index);