Skip to content

Commit

Permalink
fix: 修复调用选择文件对话框时无法选择文件夹
Browse files Browse the repository at this point in the history
directory字段未更新, 判断成选择文件

Log:
Task: https://pms.uniontech.com/task-view-360597.html
Influence: 拉起的选择文件对话框
  • Loading branch information
Whale107 committed Aug 27, 2024
1 parent 245b4e3 commit d1b276c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/filechooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
parseFilters(options, nameFilters, mimeTypeFilters, allFilters, selectedMimeTypeFilter);

// open directory
if (options.contains(QStringLiteral("directory"))) {
directory = options.value("directory").toBool();
}

if (directory && !options.contains(QStringLiteral("choices"))) {
QFileDialog dirDialog;
dirDialog.setWindowTitle(title);
Expand Down

0 comments on commit d1b276c

Please sign in to comment.