]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/places/placespanel.cpp
Compile without foreach
[dolphin.git] / src / panels / places / placespanel.cpp
index 413d346b6e4840a025375d420d4fab5f9ae9c814..03cf628b4068028a58f57855d16044f9b2b497f8 100644 (file)
@@ -104,6 +104,8 @@ void PlacesPanel::showEvent(QShowEvent* event)
                 this, &PlacesPanel::storageTearDownRequested);
         connect(m_model, &PlacesItemModel::storageTearDownExternallyRequested,
                 this, &PlacesPanel::storageTearDownExternallyRequested);
+        connect(m_model, &PlacesItemModel::storageTearDownSuccessful,
+                this, &PlacesPanel::storageTearDownSuccessful);
 
         m_view = new PlacesView();
         m_view->setWidgetCreator(new KItemListWidgetCreator<PlacesItemListWidget>());
@@ -320,7 +322,8 @@ void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos)
     menu.addMenu(iconSizeSubMenu);
 
     menu.addSeparator();
-    foreach (QAction* action, customContextMenuActions()) {
+    const auto actions = customContextMenuActions();
+    for (QAction* action : actions) {
         menu.addAction(action);
     }