X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtgui%2Fbufferviewfilter.cpp;h=8dca8fa283430287d8f79feab064fe72145d7b84;hp=8c5639021d5e77644a375ab34de2d24c8c8a3059;hb=902c95728306e5ba115de84800fc8d5d239c9d62;hpb=d9398c1b8bfa66680d266bf968dc90f386c4ee7b;ds=sidebyside diff --git a/src/qtgui/bufferviewfilter.cpp b/src/qtgui/bufferviewfilter.cpp index 8c563902..8dca8fa2 100644 --- a/src/qtgui/bufferviewfilter.cpp +++ b/src/qtgui/bufferviewfilter.cpp @@ -65,11 +65,11 @@ void BufferViewFilter::dropEvent(QDropEvent *event) { if(!(data->hasFormat("application/Quassel/BufferItem/row") && data->hasFormat("application/Quassel/BufferItem/network") - && data->hasFormat("application/Quassel/BufferItem/bufferId"))) + && data->hasFormat("application/Quassel/BufferItem/bufferInfo"))) return; // whatever the drop is... it's not a buffer... event->accept(); - uint bufferuid = data->data("application/Quassel/BufferItem/bufferId").toUInt(); + uint bufferuid = data->data("application/Quassel/BufferItem/bufferInfo").toUInt(); QString networkname = QString::fromUtf8("application/Quassel/BufferItem/network"); for(int rowid = 0; rowid < rowCount(); rowid++) { @@ -99,7 +99,7 @@ void BufferViewFilter::removeBuffer(const QModelIndex &index) { if(index.parent() == QModelIndex()) return; // only child elements can be deleted - uint bufferuid = index.data(BufferTreeModel::BufferIdRole).toUInt(); + uint bufferuid = index.data(BufferTreeModel::BufferInfoRole).toUInt(); if(customBuffers.contains(bufferuid)) { beginRemoveRows(index.parent(), index.row(), index.row()); customBuffers.removeAt(customBuffers.indexOf(bufferuid)); @@ -121,7 +121,7 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex) if((mode & NoInactive) && !isActive) return false; if((mode & FullCustom)) { - uint bufferuid = source_bufferIndex.data(BufferTreeModel::BufferIdRole).toUInt(); + uint bufferuid = source_bufferIndex.data(BufferTreeModel::BufferInfoRole).toUInt(); if(!customBuffers.contains(bufferuid)) return false; } @@ -138,7 +138,7 @@ bool BufferViewFilter::filterAcceptNetwork(const QModelIndex &source_index) cons int childcount = sourceModel()->rowCount(source_index); for(int rowid = 0; rowid < childcount; rowid++) { QModelIndex child = sourceModel()->index(rowid, 0, source_index); - uint bufferuid = child.data(BufferTreeModel::BufferIdRole).toUInt(); + uint bufferuid = child.data(BufferTreeModel::BufferInfoRole).toUInt(); if(customBuffers.contains(bufferuid)) return true; }