Fix a typo where declarared variable was not used.

This commit is contained in:
Andrius Štikonas 2017-09-14 01:27:38 +01:00
parent 6b4185cff1
commit 50ba46a693
2 changed files with 3 additions and 3 deletions

View File

@ -333,7 +333,7 @@ bool Partition::unmount(Report& report)
}
const QList<QStorageInfo> mountedVolumes = QStorageInfo::mountedVolumes();
for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) {
for (const QStorageInfo &storage : mountedVolumes) {
if (QString::fromUtf8(storage.device()) == deviceNode() ) {
success = false;
break;

View File

@ -133,7 +133,7 @@ QString FileSystem::detectMountPoint(FileSystem* fs, const QString& partitionPat
QStringList mountPoints;
QFileInfo kernelPath(partitionPath);
const QList<QStorageInfo> mountedVolumes = QStorageInfo::mountedVolumes();
for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) {
for (const QStorageInfo &storage : mountedVolumes) {
QFileInfo kernelPath2(QString::fromUtf8(storage.device()));
if (kernelPath2.canonicalFilePath() == kernelPath.canonicalFilePath() ) {
mountPoints.append(storage.rootPath());
@ -150,7 +150,7 @@ bool FileSystem::detectMountStatus(FileSystem* fs, const QString& partitionPath)
bool mounted = false;
if (fs->type() == FileSystem::Lvm2_PV) {
mounted = FS::lvm2_pv::getVGName(partitionPath) != QString(); // FIXME: VG name is scanned twice
mounted = FS::lvm2_pv::getVGName(partitionPath) != QString();
} else {
mounted = isMounted(partitionPath);
}