]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/mountpointobservercache.cpp
Modernize: Use nullptr everywhere
[dolphin.git] / src / statusbar / mountpointobservercache.cpp
index 5be2a9f9553c6b45d2b0e297d703090f31e23585..bcdc0b61cdb1630dd51e133e9ccd9469359bbdbf 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "mountpointobserver.h"
 
-#include <KGlobal>
 #include <KMountPoint>
 
 #include <QTimer>
@@ -31,13 +30,13 @@ class MountPointObserverCacheSingleton
 public:
     MountPointObserverCache instance;
 };
-K_GLOBAL_STATIC(MountPointObserverCacheSingleton, s_MountPointObserverCache)
+Q_GLOBAL_STATIC(MountPointObserverCacheSingleton, s_MountPointObserverCache)
 
 
 MountPointObserverCache::MountPointObserverCache() :
     m_observerForMountPoint(),
     m_mountPointForObserver(),
-    m_updateTimer(0)
+    m_updateTimer(nullptr)
 {
     m_updateTimer = new QTimer(this);
 }
@@ -63,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);