projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allows merging buffers over networks
[quassel.git]
/
src
/
uisupport
/
bufferview.cpp
diff --git
a/src/uisupport/bufferview.cpp
b/src/uisupport/bufferview.cpp
index
2d80416
..
d092146
100644
(file)
--- a/
src/uisupport/bufferview.cpp
+++ b/
src/uisupport/bufferview.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
2
by the Quassel Project *
+ * Copyright (C) 2005-201
5
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-253,7
+253,6
@@
void BufferView::dropEvent(QDropEvent *event)
if (bufferList.count() != 1)
return QTreeView::dropEvent(event);
if (bufferList.count() != 1)
return QTreeView::dropEvent(event);
- NetworkId networkId = bufferList[0].first;
BufferId bufferId2 = bufferList[0].second;
if (index.data(NetworkModel::ItemTypeRole) != NetworkModel::BufferItemType)
BufferId bufferId2 = bufferList[0].second;
if (index.data(NetworkModel::ItemTypeRole) != NetworkModel::BufferItemType)
@@
-262,9
+261,6
@@
void BufferView::dropEvent(QDropEvent *event)
if (index.data(NetworkModel::BufferTypeRole) != BufferInfo::QueryBuffer)
return QTreeView::dropEvent(event);
if (index.data(NetworkModel::BufferTypeRole) != BufferInfo::QueryBuffer)
return QTreeView::dropEvent(event);
- if (index.data(NetworkModel::NetworkIdRole).value<NetworkId>() != networkId)
- return QTreeView::dropEvent(event);
-
BufferId bufferId1 = index.data(NetworkModel::BufferIdRole).value<BufferId>();
if (bufferId1 == bufferId2)
return QTreeView::dropEvent(event);
BufferId bufferId1 = index.data(NetworkModel::BufferIdRole).value<BufferId>();
if (bufferId1 == bufferId2)
return QTreeView::dropEvent(event);
@@
-392,10
+388,15
@@
void BufferView::setExpandedState(const QModelIndex &networkIdx)
storeExpandedState(networkIdx); // this call is needed to keep track of the isActive state
}
storeExpandedState(networkIdx); // this call is needed to keep track of the isActive state
}
-
+#if QT_VERSION < 0x050000
void BufferView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
QTreeView::dataChanged(topLeft, bottomRight);
void BufferView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
QTreeView::dataChanged(topLeft, bottomRight);
+#else
+void BufferView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles)
+{
+ QTreeView::dataChanged(topLeft, bottomRight, roles);
+#endif
// determine how many items have been changed and if any of them is a networkitem
// which just swichted from active to inactive or vice versa
// determine how many items have been changed and if any of them is a networkitem
// which just swichted from active to inactive or vice versa