@@ -63,15 +63,7 @@ UDisks2::Block::Block(const QString &path, const UDisks2::InterfacePropertyMap &
63
63
qCInfo (lcMemoryCardLog) << " Drive properties:" << driveProperties;
64
64
m_drive = driveProperties;
65
65
});
66
-
67
- connect (m_pendingDrive.data (), &QObject::destroyed, this , &Block::complete);
68
66
});
69
-
70
- connect (m_pendingEncrypted.data (), &QObject::destroyed, this , &Block::complete);
71
- connect (m_pendingFileSystem.data (), &QObject::destroyed, this , &Block::complete);
72
- connect (m_pendingPartitionTable.data (), &QObject::destroyed, this , &Block::complete);
73
- connect (m_pendingPartition.data (), &QObject::destroyed, this , &Block::complete);
74
- connect (m_pendingBlock.data (), &QObject::destroyed, this , &Block::complete);
75
67
} else {
76
68
if (m_mountable) {
77
69
QVariantMap map = interfacePropertyMap.value (UDISKS2_FILESYSTEM_INTERFACE);
@@ -524,6 +516,8 @@ void UDisks2::Block::getProperties(const QString &path, const QString &interface
524
516
m_connection);
525
517
QDBusPendingCall pendingCall = dbusPropertyInterface.asyncCall (DBUS_GET_ALL, interface);
526
518
watcherPointer = new QDBusPendingCallWatcher (pendingCall, this );
519
+
520
+ connect (watcherPointer.data (), &QObject::destroyed, this , &Block::complete);
527
521
connect (watcherPointer.data (), &QDBusPendingCallWatcher::finished, this , [success, path, interface](QDBusPendingCallWatcher *watcher) {
528
522
if (watcher->isValid () && watcher->isFinished ()) {
529
523
QDBusPendingReply<> reply = *watcher;
0 commit comments