]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.cpp
minor coding style fix
[dolphin.git] / src / dolphinview.cpp
index 3a8d6a8eaff2ed79d53f2c06eaf597b03fcaa8de..d145597caa7736fc234e44f4ccbe9b7d621e9f4a 100644 (file)
@@ -302,11 +302,8 @@ QList<KFileItem> DolphinView::selectedItems() const
     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);
         }
@@ -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());