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<NetworkId> nets) {
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);
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);
}
}