X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/8118d8e24317b697f78bf32b41fda4200bc56ff9..d6f393ff038e7c51d4a8a213ced4f312de7ab8bc:/src/dolphinview.cpp diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 3a8d6a8ea..d145597ca 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); } @@ -914,7 +911,7 @@ void DolphinView::applyCutItemEffect() void DolphinView::updateViewportColor() { - QColor color = KColorScheme(KColorScheme::View).background(); + QColor color = KColorScheme(QPalette::Active, KColorScheme::View).background().color(); if (m_active) { emit urlChanged(url()); // Hmm, this is a hack; the url hasn't really changed. emit selectionChanged(selectedItems());