X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/7f4c3976c0626657362b6324c0dad2867cc24e9b..0fc218fd264adf0f67396409cdd1d44265c71f07:/src/statusbar/mountpointobservercache.cpp diff --git a/src/statusbar/mountpointobservercache.cpp b/src/statusbar/mountpointobservercache.cpp index ab3744eac..9bab3d5f2 100644 --- a/src/statusbar/mountpointobservercache.cpp +++ b/src/statusbar/mountpointobservercache.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2014 Frank Reininghaus + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "mountpointobservercache.h" @@ -36,7 +23,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 +49,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 +65,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);