Skip to content

Commit

Permalink
Cleanup unnecessary blockPath strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rainemak committed Oct 30, 2018
1 parent 2b8b1c6 commit c223b51
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/udisks2monitor.cpp
Expand Up @@ -673,8 +673,7 @@ UDisks2::Block *UDisks2::Monitor::createBlockDevice(const QString &dbusObjectPat

connect(block, &UDisks2::Block::formatted, this, [this]() {
UDisks2::Block *block = qobject_cast<UDisks2::Block *>(sender());
QString blockPath = block->path();
if (m_blockDevices.contains(blockPath)) {
if (m_blockDevices.contains(block->path())) {
for (auto partition : m_manager->m_partitions) {
if (partition->devicePath == block->device()) {
partition->status = Partition::Formatted;
Expand All @@ -689,8 +688,7 @@ UDisks2::Block *UDisks2::Monitor::createBlockDevice(const QString &dbusObjectPat
// When block info updated
connect(block, &UDisks2::Block::updated, this, [this]() {
UDisks2::Block *block = qobject_cast<UDisks2::Block *>(sender());
QString blockPath = block->path();
if (m_blockDevices.contains(blockPath)) {
if (m_blockDevices.contains(block->path())) {
updatePartitionProperties(block);
}
});
Expand Down

0 comments on commit c223b51

Please sign in to comment.