]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/mountpointobservercache.cpp
Move search and filter bar close buttons to the right
[dolphin.git] / src / statusbar / mountpointobservercache.cpp
index ab3744eac89011e2e335fb3a791e0211a667438d..b39e26e3a6776581d215da5ae4d6b2f4989b4828 100644 (file)
@@ -36,7 +36,7 @@ Q_GLOBAL_STATIC(MountPointObserverCacheSingleton, s_MountPointObserverCache)
 MountPointObserverCache::MountPointObserverCache() :
     m_observerForMountPoint(),
     m_mountPointForObserver(),
-    m_updateTimer(0)
+    m_updateTimer(nullptr)
 {
     m_updateTimer = new QTimer(this);
 }
@@ -62,10 +62,10 @@ MountPointObserver* MountPointObserverCache::observerForUrl(const QUrl& url)
         } else {
             // Even if determining the mount point failed, the observer might still
             // be able to retrieve information about the url.
-            cachedObserverUrl = url.toLocalFile();
+            cachedObserverUrl = url;
         }
     } else {
-        cachedObserverUrl = url.url();
+        cachedObserverUrl = url;
     }
 
     MountPointObserver* observer = m_observerForMountPoint.value(cachedObserverUrl);
@@ -78,7 +78,7 @@ MountPointObserver* MountPointObserverCache::observerForUrl(const QUrl& url)
         connect(observer, &MountPointObserver::destroyed, this, &MountPointObserverCache::slotObserverDestroyed);
 
         if (!m_updateTimer->isActive()) {
-            m_updateTimer->start(10000);
+            m_updateTimer->start(60000); // 1 minute
         }
 
         connect(m_updateTimer, &QTimer::timeout, observer, &MountPointObserver::update);