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

Commit c223b51

Browse files
committed
Cleanup unnecessary blockPath strings
1 parent 2b8b1c6 commit c223b51

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/udisks2monitor.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,7 @@ UDisks2::Block *UDisks2::Monitor::createBlockDevice(const QString &dbusObjectPat
673673

674674
connect(block, &UDisks2::Block::formatted, this, [this]() {
675675
UDisks2::Block *block = qobject_cast<UDisks2::Block *>(sender());
676-
QString blockPath = block->path();
677-
if (m_blockDevices.contains(blockPath)) {
676+
if (m_blockDevices.contains(block->path())) {
678677
for (auto partition : m_manager->m_partitions) {
679678
if (partition->devicePath == block->device()) {
680679
partition->status = Partition::Formatted;
@@ -689,8 +688,7 @@ UDisks2::Block *UDisks2::Monitor::createBlockDevice(const QString &dbusObjectPat
689688
// When block info updated
690689
connect(block, &UDisks2::Block::updated, this, [this]() {
691690
UDisks2::Block *block = qobject_cast<UDisks2::Block *>(sender());
692-
QString blockPath = block->path();
693-
if (m_blockDevices.contains(blockPath)) {
691+
if (m_blockDevices.contains(block->path())) {
694692
updatePartitionProperties(block);
695693
}
696694
});

0 commit comments

Comments
 (0)