X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.cpp;h=8ed210f59ca50e70c74456357907fbbb1167c5c0;hb=4b600109a862705eaf44e59ca7bddb56b0663732;hp=bb19b75318e445001f42ffb5008fa00ff0ed68c4;hpb=2684aa5295d12e4f7c66b3011fc8b1819f3d1cbb;p=quassel.git diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index bb19b753..8ed210f5 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -57,7 +57,13 @@ void BufferView::init() { setSortingEnabled(true); sortByColumn(0, Qt::AscendingOrder); +#ifndef Q_WS_QWS + // this is a workaround to not join channels automatically... we need a saner way to navigate for qtopia anyway though, + // such as mark first, activate at second click... connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(joinChannel(QModelIndex))); +#else + connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(joinChannel(QModelIndex))); // Qtopia uses single click for activation +#endif } void BufferView::setFilteredModel(QAbstractItemModel *model, BufferViewFilter::Modes mode, QList nets) { @@ -118,7 +124,7 @@ void BufferView::keyPressEvent(QKeyEvent *event) { void BufferView::rowsInserted(const QModelIndex & parent, int start, int end) { QTreeView::rowsInserted(parent, start, end); if(model()->rowCount(parent) == 1 && parent.data(NetworkModel::ItemTypeRole) == NetworkModel::NetworkItemType - && (Global::SPUTDEV || parent.data(NetworkModel::ItemActiveRole) == true)) { + && parent.data(NetworkModel::ItemActiveRole) == true) { // without updating the parent the expand will have no effect... Qt Bug? update(parent); expand(parent); @@ -139,12 +145,7 @@ void BufferView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bott continue; bool isActive = networkIdx.data(NetworkModel::ItemActiveRole).toBool(); - if(Global::SPUTDEV) { - if(isExpanded(networkIdx) != isActive) setExpanded(networkIdx, true); - } else { - if(isExpanded(networkIdx) != isActive) - setExpanded(networkIdx, isActive); - } + if(isExpanded(networkIdx) != isActive) setExpanded(networkIdx, isActive); } }