Commit f6256517 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

put the list of remote filesystem types in a central place

parent 5efdbbe6
......@@ -38,6 +38,7 @@ int Config::minFontPitch;
uint Config::defaultRingDepth;
Filelight::MapScheme Config::scheme;
QStringList Config::skipList;
const QSet<QByteArray> Config::remoteFsTypes = { "smbfs", "nfs", "afs" };
void
Filelight::Config::read()
......
......@@ -23,6 +23,7 @@
#define Config_H
#include <QStringList>
#include <QSet>
class KConfig;
......@@ -60,6 +61,8 @@ public:
static MapScheme scheme;
static QStringList skipList;
static const QSet<QByteArray> remoteFsTypes;
};
}
......
......@@ -233,8 +233,6 @@ LocalLister::scan(const QByteArray &path, const QByteArray &dirname)
void LocalLister::readMounts()
{
static const QSet<QByteArray> remoteFsTypes = { "smbfs", "nfs", "afs" };
for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) {
if (storage.isRoot()) {
continue;
......@@ -245,7 +243,7 @@ void LocalLister::readMounts()
path += QLatin1Char('/');
}
if (remoteFsTypes.contains(storage.fileSystemType()) && !s_remoteMounts.contains(path)) {
if (Config::remoteFsTypes.contains(storage.fileSystemType()) && !s_remoteMounts.contains(path)) {
s_remoteMounts.append(path);
} else if (!s_localMounts.contains(path)) {
s_localMounts.append(path);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment