Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void DBusDriverInterface::uninstallPrinter(const QString &vendor, const QString
qCDebug(appLog) << "Uninstall printer - vendor:" << vendor << "model:" << model;
//Sets the timeout in milliseconds for all future DBus calls to timeout. -1 means the default DBus timeout (usually 25 seconds).
//超时默认是25s,打印卸载超时大概30s
mp_Iface->setTimeout(1000 * 1000);
mp_Iface->setTimeout(-1);
QDBusPendingCall async = mp_Iface->asyncCall("unInstallPrinter", vendor, model);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(async, this);
QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher *)),
Expand Down Expand Up @@ -68,7 +68,7 @@ void DBusDriverInterface::undoInstallDriver()
void DBusDriverInterface::installDriverFd(const QDBusUnixFileDescriptor &fileFd, const QString &filename)
{
qCDebug(appLog) << "Install driver via fd, filename:" << filename;
mp_Iface->setTimeout(1000 * 1000);
mp_Iface->setTimeout(-1);
QDBusPendingCall async = mp_Iface->asyncCall("installDriverFd", QVariant::fromValue(fileFd), filename);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(async, this);
QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher *)),
Expand Down Expand Up @@ -98,7 +98,7 @@ bool DBusDriverInterface::isDebValidFd(const QDBusUnixFileDescriptor &fileFd)
bool DBusDriverInterface::backupDebFd(const QDBusUnixFileDescriptor &dirFd, const QString &debname)
{
qCDebug(appLog) << "DBusDriverInterface::backupDebFd, debname:" << debname;
mp_Iface->setTimeout(1000 * 1000); // 备份需拷贝整个暂存目录,放宽超时
mp_Iface->setTimeout(-1); // 备份需拷贝整个暂存目录,放宽超时
QDBusReply<bool> reply = mp_Iface->call("backupDebFd", QVariant::fromValue(dirFd), debname);

return reply.value();
Expand Down
5 changes: 2 additions & 3 deletions deepin-devicemanager/src/Page/PageDriverControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ bool PageDriverControl::isRunning()
qCDebug(appLog) << "PageDriverControl::isRunning start";
for (auto w : qApp->allWindows()) {
// qCDebug(appLog) << "PageDriverControl::isRunning check window:" << w->objectName();
if ("PageDriverControlWindow" == w->objectName()) {
if ("PageDriverControl" == w->objectName()) {
if (w->isVisible()) {
// qCDebug(appLog) << "PageDriverControl::isRunning is running";
return true;
Expand Down Expand Up @@ -209,7 +209,6 @@ void PageDriverControl::slotProcessEnd(bool sucess, const QString &errCode)
void PageDriverControl::slotClose()
{
qCDebug(appLog) << "PageDriverControl::slotClose";
emit refreshInfo();
this->close();
}

Expand Down Expand Up @@ -386,7 +385,7 @@ void PageDriverControl::closeEvent(QCloseEvent *event)
return;
} else if ("Done" == property("DriverProcessStatus").toString()) {
qCDebug(appLog) << "closeEvent: driver process done, closing";
slotClose();//卸载或者更新后,关闭时刷新
emit refreshInfo();//卸载或者更新后,关闭时刷新
}
}

Expand Down
9 changes: 6 additions & 3 deletions deepin-devicemanager/src/Page/PageDriverManager.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -368,7 +368,10 @@ void PageDriverManager::slotInstallProgressFinished(bool bsuccess, int err)
if (bsuccess) {
successNum += 1;
qCDebug(appLog) << "Installation successful for" << mp_CurDriverInfo->name() << ", success count:" << successNum;
m_ListUpdateIndex.removeAt(m_ListUpdateIndex.indexOf(m_CurIndex));
int idx = m_ListUpdateIndex.indexOf(m_CurIndex);
if (idx != -1) {
m_ListUpdateIndex.removeAt(idx);
}
} else { // 失败
qCDebug(appLog) << "Installation failed for" << mp_CurDriverInfo->name() << ", error code:" << err;
// 通知网络错误
Expand Down Expand Up @@ -1068,7 +1071,7 @@ bool PageDriverManager::networkIsOnline()
if (QNetworkInformation::instance()) {
auto interfaces = QNetworkInformation::instance()->reachability();
qCDebug(appLog) << "Network reachability:" << interfaces;
networkFlag = (interfaces == QNetworkInformation::Reachability::Disconnected);
networkFlag = (interfaces != QNetworkInformation::Reachability::Disconnected);
}
return networkFlag;
#endif
Expand Down
1 change: 1 addition & 0 deletions deepin-devicemanager/src/Widget/DetectedStatusWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ DetectedStatusWidget::DetectedStatusWidget(QWidget *parent)
DetectedStatusWidget::~DetectedStatusWidget()
{
qCDebug(appLog) << "DetectedStatusWidget destructor called";
DELETE_PTR(mp_HLayoutLabel);
DELETE_PTR(mp_HLayoutButton);
DELETE_PTR(mp_HLayoutLabel);
DELETE_PTR(mp_VLayoutLabel);
Expand Down
2 changes: 1 addition & 1 deletion deepin-devicemanager/src/Widget/drivertableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ void DriverTableView::setAllItemCbEanble(bool enable)
void DriverTableView::setCheckedCBDisable()
{
// qCDebug(appLog) << "Disabling checkboxes for checked items";
if (mp_HeaderCb->checked()) {
if (mp_HeaderCb && mp_HeaderCb->checked()) {
qCDebug(appLog) << "Header checkbox is checked, disabling it";
mp_HeaderCb->setCbEnable(false);
}
Expand Down
Loading