- connect(placesPanel, SIGNAL(placeActivated(KUrl)),
- this, SLOT(slotPlaceActivated(KUrl)));
- connect(placesPanel, SIGNAL(placeMiddleClicked(KUrl)),
- this, SLOT(openNewTab(KUrl)));
- connect(placesPanel, SIGNAL(errorMessage(QString)),
- this, SLOT(slotPanelErrorMessage(QString)));
- connect(this, SIGNAL(urlChanged(KUrl)),
- placesPanel, SLOT(setUrl(KUrl)));
- connect(placesDock, SIGNAL(visibilityChanged(bool)),
- m_tabWidget, SLOT(slotPlacesPanelVisibilityChanged(bool)));
- connect(this, SIGNAL(settingsChanged()),
- placesPanel, SLOT(readSettings()));
-
- m_tabWidget->slotPlacesPanelVisibilityChanged(placesPanel->isVisible());
+ connect(m_placesPanel, &PlacesPanel::placeActivated,
+ this, &DolphinMainWindow::slotPlaceActivated);
+ connect(m_placesPanel, &PlacesPanel::placeMiddleClicked,
+ this, &DolphinMainWindow::openNewTabAfterCurrentTab);
+ connect(m_placesPanel, &PlacesPanel::errorMessage,
+ this, &DolphinMainWindow::showErrorMessage);
+ connect(this, &DolphinMainWindow::urlChanged,
+ m_placesPanel, &PlacesPanel::setUrl);
+ connect(placesDock, &DolphinDockWidget::visibilityChanged,
+ m_tabWidget, &DolphinTabWidget::slotPlacesPanelVisibilityChanged);
+ connect(this, &DolphinMainWindow::settingsChanged,
+ m_placesPanel, &PlacesPanel::readSettings);
+ connect(m_placesPanel, &PlacesPanel::storageTearDownRequested,
+ this, &DolphinMainWindow::slotStorageTearDownFromPlacesRequested);
+ connect(m_placesPanel, &PlacesPanel::storageTearDownExternallyRequested,
+ this, &DolphinMainWindow::slotStorageTearDownExternallyRequested);
+ m_tabWidget->slotPlacesPanelVisibilityChanged(m_placesPanel->isVisible());
+
+ auto actionShowAllPlaces = new QAction(QIcon::fromTheme(QStringLiteral("hint")), i18nc("@item:inmenu", "Show Hidden Places"), this);
+ actionShowAllPlaces->setCheckable(true);
+ actionShowAllPlaces->setDisabled(true);
+
+ connect(actionShowAllPlaces, &QAction::triggered, this, [actionShowAllPlaces, this](bool checked){
+ actionShowAllPlaces->setIcon(QIcon::fromTheme(checked ? QStringLiteral("visibility") : QStringLiteral("hint")));
+ m_placesPanel->showHiddenEntries(checked);
+ });
+
+ connect(m_placesPanel, &PlacesPanel::showHiddenEntriesChanged, this, [actionShowAllPlaces] (bool checked){
+ actionShowAllPlaces->setChecked(checked);
+ actionShowAllPlaces->setIcon(QIcon::fromTheme(checked ? QStringLiteral("visibility") : QStringLiteral("hint")));
+ });