Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

Commit bc99cc0

Browse files
committed
Cleanup Udisks monitor singleton usage from PartitionManager
1 parent bc3d518 commit bc99cc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/partitionmanager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void PartitionManagerPrivate::unlock(const Partition &partition, const QString &
300300
{
301301
qCInfo(lcMemoryCardLog) << "Can unlock:" << externalMedia.match(partition.deviceName()).hasMatch() << partition.devicePath();
302302
if (externalMedia.match(partition.deviceName()).hasMatch()) {
303-
m_udisksMonitor->instance()->unlock(partition.devicePath(), passphrase);
303+
m_udisksMonitor->unlock(partition.devicePath(), passphrase);
304304
} else {
305305
qCWarning(lcMemoryCardLog) << "Unlock allowed only for external memory cards," << partition.devicePath() << "is not allowed";
306306
}
@@ -310,7 +310,7 @@ void PartitionManagerPrivate::mount(const Partition &partition)
310310
{
311311
qCInfo(lcMemoryCardLog) << "Can mount:" << externalMedia.match(partition.deviceName()).hasMatch() << partition.devicePath();
312312
if (externalMedia.match(partition.deviceName()).hasMatch()) {
313-
m_udisksMonitor->instance()->mount(partition.devicePath());
313+
m_udisksMonitor->mount(partition.devicePath());
314314
} else {
315315
qCWarning(lcMemoryCardLog) << "Mount allowed only for external memory cards," << partition.devicePath() << "is not allowed";
316316
}
@@ -320,7 +320,7 @@ void PartitionManagerPrivate::unmount(const Partition &partition)
320320
{
321321
qCInfo(lcMemoryCardLog) << "Can unmount:" << externalMedia.match(partition.deviceName()).hasMatch() << partition.devicePath();
322322
if (externalMedia.match(partition.deviceName()).hasMatch()) {
323-
m_udisksMonitor->instance()->unmount(partition.devicePath());
323+
m_udisksMonitor->unmount(partition.devicePath());
324324
} else {
325325
qCWarning(lcMemoryCardLog) << "Unmount allowed only for external memory cards," << partition.devicePath() << "is not allowed";
326326
}
@@ -331,7 +331,7 @@ void PartitionManagerPrivate::format(const QString &devicePath, const QString &f
331331
QString deviceName = devicePath.section(QChar('/'), 2);
332332
qCInfo(lcMemoryCardLog) << "Can format:" << externalMedia.match(deviceName).hasMatch() << devicePath;
333333
if (externalMedia.match(deviceName).hasMatch()) {
334-
m_udisksMonitor->instance()->format(devicePath, filesystemType, arguments);
334+
m_udisksMonitor->format(devicePath, filesystemType, arguments);
335335
} else {
336336
qCWarning(lcMemoryCardLog) << "Formatting allowed only for external memory cards," << devicePath << "is not allowed";
337337
}

0 commit comments

Comments
 (0)