Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

移除无用日志 #51

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/dfm-mount/lib/dblockdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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 "";
}
Expand Down Expand Up @@ -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();
}
Expand All @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down
16 changes: 8 additions & 8 deletions src/dfm-mount/lib/dprotocolmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<GFunc>(iterVol), this);
Expand Down Expand Up @@ -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<GFunc>(iterMnt), this);
Expand All @@ -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;
}
}

Expand Down Expand Up @@ -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;
}
}

Expand All @@ -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;
}
}

Expand Down Expand Up @@ -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;
}
}

Expand Down
Loading