Skip to content

Commit

Permalink
fix: When renaming files in bulk, the focus is not on the "Find" inpu…
Browse files Browse the repository at this point in the history
…t box

When renamebar is displayed, set the focus of the first lineedit

Log: When renaming files in bulk, the focus is not on the "Find" input box
Bug: https://pms.uniontech.com/bug-view-263817.html
  • Loading branch information
liyigang1 authored and deepin-bot[bot] committed Jul 11, 2024
1 parent 4d78e41 commit 83fb0ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dfm-base/utils/networkutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ QMap<QString, QString> NetworkUtils::cifsMountHostInfo()
continue;
// net work mount must start with //
QString srcHostAndPort = mnt_fs_get_source(fs);
if (!srcHostAndPort.contains(QRegExp("^//")))
if (!srcHostAndPort.contains(QRegularExpression("^//")))
continue;

const QString &mountPath = mnt_fs_get_target(fs);
srcHostAndPort = srcHostAndPort.replace(QRegExp("^//"), "");
srcHostAndPort = srcHostAndPort.replace(QRegularExpression("^//"), "");
srcHostAndPort = srcHostAndPort.left(srcHostAndPort.indexOf("/"));
table.insert(mountPath, srcHostAndPort);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ void RenameBar::setVisible(bool visible)
}
}
}
if (visible) {
QLineEdit *lineEdit { std::get<1>(d->replaceOperatorItems) };
if (lineEdit)
lineEdit->setFocus();
}

return QFrame::setVisible(visible);
}

Expand Down

0 comments on commit 83fb0ac

Please sign in to comment.