X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/9c7ccd477a32ad52ff0126024ffbad0f6ea164b5..ec00f379dc42b00a64ab1af25bb4bb1a06bd7449:/src/dolphinview.cpp?ds=inline diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 073ab5589..7339b8227 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -302,11 +302,8 @@ QList DolphinView::selectedItems() const QList 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); } @@ -430,12 +427,11 @@ void DolphinView::setUrl(const KUrl& url) 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) @@ -917,7 +913,7 @@ void DolphinView::updateViewportColor() { 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);