diff --git a/src/dfm-mount/lib/dblockdevice.cpp b/src/dfm-mount/lib/dblockdevice.cpp index 5c8fec6..ae222d8 100644 --- a/src/dfm-mount/lib/dblockdevice.cpp +++ b/src/dfm-mount/lib/dblockdevice.cpp @@ -48,7 +48,7 @@ void DBlockDevicePrivate::mountAsyncCallback(GObject *sourceObj, GAsyncResult *r GError *err = nullptr; g_autofree char *mountPoint = nullptr; bool result = udisks_filesystem_call_mount_finish(fs, &mountPoint, res, &err); - if(mountPoint) + if (mountPoint) result = true; handleErrorAndRelease(proxy, result, err, mountPoint); // ignore mount point, which will be notified by onPropertyChanged } @@ -1062,7 +1062,7 @@ QVariant DBlockDevicePrivate::getBlockProperty(Property name) const { UDisksBlock_autoptr blk = getBlockHandler(); if (!blk) { - qDebug() << __FUNCTION__ << "NO BLOCK: " << blkObjPath; + // qDebug() << __FUNCTION__ << "NO BLOCK: " << blkObjPath; lastError = Utils::genOperateErrorInfo(DeviceError::kUserErrorNoBlock); return QVariant(); } @@ -1166,7 +1166,7 @@ QVariant DBlockDevicePrivate::getDriveProperty(Property name) const { UDisksDrive_autoptr drv = getDriveHandler(); if (!drv) { - qDebug() << __FUNCTION__ << "NO DRIVE: " << blkObjPath; + // qDebug() << __FUNCTION__ << "NO DRIVE: " << blkObjPath; lastError = Utils::genOperateErrorInfo(DeviceError::kUserErrorNoDriver); return ""; } @@ -1265,7 +1265,7 @@ QVariant DBlockDevicePrivate::getFileSystemProperty(Property name) const { UDisksFilesystem_autoptr fs = getFilesystemHandler(); if (!fs) { - qDebug() << __FUNCTION__ << "NO FILESYSTEM: " << blkObjPath; + // qDebug() << __FUNCTION__ << "NO FILESYSTEM: " << blkObjPath; lastError = Utils::genOperateErrorInfo(DeviceError::kUserErrorNotMountable); return QVariant(); } @@ -1286,7 +1286,7 @@ QVariant DBlockDevicePrivate::getPartitionProperty(Property name) const UDisksPartition_autoptr partition = getPartitionHandler(); if (!partition) { - qDebug() << __FUNCTION__ << "NO PARTITION: " << blkObjPath; + // qDebug() << __FUNCTION__ << "NO PARTITION: " << blkObjPath; lastError = Utils::genOperateErrorInfo(DeviceError::kUserErrorNoPartition); return QVariant(); } @@ -1331,7 +1331,7 @@ QVariant DBlockDevicePrivate::getEncryptedProperty(Property name) const UDisksEncrypted_autoptr encrypted = getEncryptedHandler(); if (!encrypted) { - qDebug() << __FUNCTION__ << "NOT ENCRYPTED: " << blkObjPath; + // qDebug() << __FUNCTION__ << "NOT ENCRYPTED: " << blkObjPath; lastError = Utils::genOperateErrorInfo(DeviceError::kUserErrorNotEncryptable); return QVariant(); } diff --git a/src/dfm-mount/lib/dprotocolmonitor.cpp b/src/dfm-mount/lib/dprotocolmonitor.cpp index 7a24b33..2f63f1e 100644 --- a/src/dfm-mount/lib/dprotocolmonitor.cpp +++ b/src/dfm-mount/lib/dprotocolmonitor.cpp @@ -170,8 +170,8 @@ void DProtocolMonitorPrivate::initDeviceList() g_autofree char *curi = g_file_get_uri(activationRoot); d->cachedDevices.insert(curi); } else { - g_autofree char *volId = g_volume_get_identifier(vol, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE); - qWarning() << "protocol: cannot get the root of " << volId; + // g_autofree char *volId = g_volume_get_identifier(vol, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE); + // qWarning() << "protocol: cannot get the root of " << volId; } }; g_list_foreach(vols, static_cast(iterVol), this); @@ -199,8 +199,8 @@ void DProtocolMonitorPrivate::initDeviceList() if (!isNativeMount(mpt) && !isMountByOther(mpt)) d->cachedDevices.insert(curi); } else { - g_autofree char *cname = g_mount_get_name(mnt); - qWarning() << "protocol: cannot get the root of " << cname; + // g_autofree char *cname = g_mount_get_name(mnt); + // qWarning() << "protocol: cannot get the root of " << cname; } }; g_list_foreach(mnts, static_cast(iterMnt), this); @@ -223,7 +223,7 @@ void DProtocolMonitorPrivate::onMountAdded(GVolumeMonitor *monitor, GMount *moun d->cachedDevices.insert(curi); Q_EMIT d->q->mountAdded(curi, mpt); } else { - qWarning() << "protocol: cannot get the root of " << mpt; + // qWarning() << "protocol: cannot get the root of " << mpt; } } @@ -257,7 +257,7 @@ void DProtocolMonitorPrivate::onMountRemoved(GVolumeMonitor *monitor, GMount *mo d->cachedDevices.remove(curi); Q_EMIT d->q->mountRemoved(curi); } else { - qWarning() << "protocol: cannot get the root of " << mpt; + // qWarning() << "protocol: cannot get the root of " << mpt; } } @@ -275,7 +275,7 @@ void DProtocolMonitorPrivate::onVolumeAdded(GVolumeMonitor *monitor, GVolume *vo d->cachedDevices.insert(curi); Q_EMIT d->q->deviceAdded(curi); } else { - qWarning() << "protocol: cannot get the root of " << volume; + // qWarning() << "protocol: cannot get the root of " << volume; } } @@ -304,7 +304,7 @@ void DProtocolMonitorPrivate::onVolumeRemoved(GVolumeMonitor *monitor, GVolume * d->cachedDevices.remove(curi); Q_EMIT d->q->deviceRemoved(curi); } else { - qWarning() << "protocol: cannot get the root of " << volume; + // qWarning() << "protocol: cannot get the root of " << volume; } }