QList<KFileItem> itemList;
const QModelIndexList indexList = selection.indexes();
- QModelIndexList::const_iterator end = indexList.end();
- for (QModelIndexList::const_iterator it = indexList.begin(); it != end; ++it) {
- Q_ASSERT((*it).isValid());
-
- KFileItem item = m_dirModel->itemForIndex(*it);
+ foreach (QModelIndex index, indexList) {
+ KFileItem item = m_dirModel->itemForIndex(index);
if (!item.isNull()) {
itemList.append(item);
}
return;
}
- m_controller->setUrl(url);
+ m_controller->setUrl(url); // emits urlChanged, which we forward
applyViewProperties(url);
startDirLister(url);
- emit urlChanged(url);
}
void DolphinView::mouseReleaseEvent(QMouseEvent* event)
{
QColor color = KColorScheme(KColorScheme::View).background();
if (m_active) {
- emit urlChanged(url());
+ emit urlChanged(url()); // Hmm, this is a hack; the url hasn't really changed.
emit selectionChanged(selectedItems());
} else {
color.setAlpha(0);