Changeset View
Changeset View
Standalone View
Standalone View
src/summaryWidget.cpp
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Line(s) | 118 | { | |||
---|---|---|---|---|---|
154 | map->create(tree); //must be done when visible | 154 | map->create(tree); //must be done when visible | ||
155 | 155 | | |||
156 | connect(map, &RadialMap::Widget::activated, this, &SummaryWidget::activated); | 156 | connect(map, &RadialMap::Widget::activated, this, &SummaryWidget::activated); | ||
157 | } | 157 | } | ||
158 | } | 158 | } | ||
159 | 159 | | |||
160 | DiskList::DiskList() | 160 | DiskList::DiskList() | ||
161 | { | 161 | { | ||
162 | static const QSet<QByteArray> ignoredFsTypes = { "tmpfs", "squashfs" }; | ||||
163 | | ||||
162 | QStringList partitions; | 164 | QStringList partitions; | ||
163 | 165 | | |||
164 | for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) { | 166 | for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) { | ||
165 | if (!storage.isReady() || storage.fileSystemType() == "tmpfs") { | 167 | if (!storage.isReady() || ignoredFsTypes.contains(storage.fileSystemType())) { | ||
166 | continue; | 168 | continue; | ||
167 | } | 169 | } | ||
168 | 170 | | |||
169 | Disk disk; | 171 | Disk disk; | ||
170 | disk.mount = storage.rootPath(); | 172 | disk.mount = storage.rootPath(); | ||
171 | disk.name = storage.name(); | 173 | disk.name = storage.name(); | ||
172 | disk.size = storage.bytesTotal(); | 174 | disk.size = storage.bytesTotal(); | ||
173 | disk.free = storage.bytesFree(); | 175 | disk.free = storage.bytesFree(); | ||
Show All 9 Lines |