]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemlistview.cpp
Merge branch 'stashAction'
[dolphin.git] / src / kitemviews / kfileitemlistview.cpp
index 18b1935722a663485d14d0c41a1d24fcafd67d45..1b6071820c2c1470a58d26a50d22e1dec112aae2 100644 (file)
@@ -43,7 +43,7 @@ namespace {
 
     // If the icon size changes, a longer delay is used. This prevents that
     // the expensive re-generation of all previews is triggered repeatedly when
-    // chaning the zoom level.
+    // changing the zoom level.
     const int LongInterval = 300;
 }
 
@@ -156,9 +156,9 @@ QPixmap KFileItemListView::createDragPixmap(const KItemSet& indexes) const
         yCount = xCount;
     }
 
-    qreal dpr = scene()->views()[0]->devicePixelRatio();
+    const qreal dpr = scene()->views()[0]->devicePixelRatio();
     // Draw the selected items into the grid cells.
-    QPixmap dragPixmap(QSize(xCount * size + xCount, yCount * size + yCount)*dpr);
+    QPixmap dragPixmap(QSize(xCount * size + xCount, yCount * size + yCount) * dpr);
     dragPixmap.setDevicePixelRatio(dpr);
     dragPixmap.fill(Qt::transparent);
 
@@ -166,7 +166,7 @@ QPixmap KFileItemListView::createDragPixmap(const KItemSet& indexes) const
     int x = 0;
     int y = 0;
 
-    foreach (int index, indexes) {
+    for (int index : indexes) {
         QPixmap pixmap = model()->data(index).value("iconPixmap").value<QPixmap>();
         if (pixmap.isNull()) {
             QIcon icon = QIcon::fromTheme(model()->data(index).value("iconName").toString());