┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/statusbar/mountpointobservercache.cpp
diff options
context:
space:
mode:
authorSerg Podtynnyi <[email protected]>2023-02-04 00:14:53 +0700
committerSerg Podtynnyi <[email protected]>2023-02-05 12:45:38 +0700
commit38c34eeca315c7be58e65d4d3fb72aaf7b866719 (patch)
tree886e53f20c9c43edc3eb7fe04789716a9bc98ebe /src/statusbar/mountpointobservercache.cpp
parentffff8af851e3a386c44438337779d0ce7ca98a61 (diff)
Add clang-format and format code as in Frameworks
Diffstat (limited to 'src/statusbar/mountpointobservercache.cpp')
-rw-r--r--src/statusbar/mountpointobservercache.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/statusbar/mountpointobservercache.cpp b/src/statusbar/mountpointobservercache.cpp
index 9bab3d5f2..b0675d1f5 100644
--- a/src/statusbar/mountpointobservercache.cpp
+++ b/src/statusbar/mountpointobservercache.cpp
@@ -19,11 +19,10 @@ public:
};
Q_GLOBAL_STATIC(MountPointObserverCacheSingleton, s_MountPointObserverCache)
-
-MountPointObserverCache::MountPointObserverCache() :
- m_observerForMountPoint(),
- m_mountPointForObserver(),
- m_updateTimer(nullptr)
+MountPointObserverCache::MountPointObserverCache()
+ : m_observerForMountPoint()
+ , m_mountPointForObserver()
+ , m_updateTimer(nullptr)
{
m_updateTimer = new QTimer(this);
}
@@ -32,12 +31,12 @@ MountPointObserverCache::~MountPointObserverCache()
{
}
-MountPointObserverCache* MountPointObserverCache::instance()
+MountPointObserverCache *MountPointObserverCache::instance()
{
return &s_MountPointObserverCache->instance;
}
-MountPointObserver* MountPointObserverCache::observerForUrl(const QUrl& url)
+MountPointObserver *MountPointObserverCache::observerForUrl(const QUrl &url)
{
QUrl cachedObserverUrl;
// If the url is a local path we can extract the root dir by checking the mount points.
@@ -55,7 +54,7 @@ MountPointObserver* MountPointObserverCache::observerForUrl(const QUrl& url)
cachedObserverUrl = url;
}
- MountPointObserver* observer = m_observerForMountPoint.value(cachedObserverUrl);
+ MountPointObserver *observer = m_observerForMountPoint.value(cachedObserverUrl);
if (!observer) {
observer = new MountPointObserver(cachedObserverUrl, this);
m_observerForMountPoint.insert(cachedObserverUrl, observer);
@@ -74,10 +73,10 @@ MountPointObserver* MountPointObserverCache::observerForUrl(const QUrl& url)
return observer;
}
-void MountPointObserverCache::slotObserverDestroyed(QObject* observer)
+void MountPointObserverCache::slotObserverDestroyed(QObject *observer)
{
Q_ASSERT(m_mountPointForObserver.contains(observer));
- const QUrl& url = m_mountPointForObserver.value(observer);
+ const QUrl &url = m_mountPointForObserver.value(observer);
Q_ASSERT(m_observerForMountPoint.contains(url));
m_observerForMountPoint.remove(url);
m_mountPointForObserver.remove(observer);