]> cloud.milkyroute.net Git - dolphin.git/commitdiff
[Location Bar] Add the ability to show hidden folders in the subdirectories popup
authorEugene Popov <popov895@ukr.net>
Thu, 2 Dec 2021 09:03:47 +0000 (09:03 +0000)
committerMéven Car <meven29@gmail.com>
Thu, 2 Dec 2021 09:03:47 +0000 (09:03 +0000)
CMakeLists.txt
src/dolphinviewcontainer.cpp
src/dolphinviewcontainer.h

index a0d99a941bc840a08cc86b18a8c1d294c6b8bf55..281d48938358bf1f820fa15d3c0cbab62d9dd490 100644 (file)
@@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
 project(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
 
 set(QT_MIN_VERSION "5.15.0")
-set(KF5_MIN_VERSION "5.83.0")
+set(KF5_MIN_VERSION "5.87.0")
 
 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
index 1354916336819730a35b2a652b5c8a3e9c0d24a2..4ec855226b058ec4bd0071354d784dd5635a8181 100644 (file)
@@ -151,6 +151,10 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
             this, &DolphinViewContainer::slotUrlIsFileError);
     connect(m_view, &DolphinView::activated,
             this, &DolphinViewContainer::activate);
+    connect(m_view, &DolphinView::hiddenFilesShownChanged,
+            this, &DolphinViewContainer::slotHiddenFilesShownChanged);
+    connect(m_view, &DolphinView::sortHiddenLastChanged,
+            this, &DolphinViewContainer::slotSortHiddenLastChanged);
 
     // Initialize status bar
     m_statusBar = new DolphinStatusBar(this);
@@ -309,6 +313,8 @@ void DolphinViewContainer::connectUrlNavigator(DolphinUrlNavigator *urlNavigator
     Q_CHECK_PTR(m_view);
 
     urlNavigator->setLocationUrl(m_view->url());
+    urlNavigator->setShowHiddenFolders(m_view->hiddenFilesShown());
+    urlNavigator->setSortHiddenFoldersLast(m_view->sortHiddenLast());
     if (m_urlNavigatorVisualState) {
         urlNavigator->setVisualState(*m_urlNavigatorVisualState.get());
         m_urlNavigatorVisualState.reset();
@@ -809,6 +815,20 @@ void DolphinViewContainer::slotPlacesModelChanged()
     }
 }
 
+void DolphinViewContainer::slotHiddenFilesShownChanged(bool showHiddenFiles)
+{
+    if (m_urlNavigatorConnected) {
+        m_urlNavigatorConnected->setShowHiddenFolders(showHiddenFiles);
+    }
+}
+
+void DolphinViewContainer::slotSortHiddenLastChanged(bool hiddenLast)
+{
+    if (m_urlNavigatorConnected) {
+        m_urlNavigatorConnected->setSortHiddenFoldersLast(hiddenLast);
+    }
+}
+
 bool DolphinViewContainer::isSearchUrl(const QUrl& url) const
 {
     return url.scheme().contains(QLatin1String("search"));
index 304c9958d9646dc77b0888275d6286b6626f81e8..be899ba23f44e22c0d8e71e98e96c9f26899d883 100644 (file)
@@ -361,6 +361,9 @@ private Q_SLOTS:
      */
     void slotPlacesModelChanged();
 
+    void slotHiddenFilesShownChanged(bool showHiddenFiles);
+    void slotSortHiddenLastChanged(bool hiddenLast);
+
 private:
     /**
      * @return True if the URL protocol is a search URL (e. g. baloosearch:// or filenamesearch://).