FileDialog: several logic corrections in handling the enter key
A "save as" dialog does not need to validate existence of the file.
When the user presses enter in the text field at the top, and the
text field contains a path to a directory, it usually means enter
the directory; but if the dialog is for choosing a directory, then
pressing enter will mean enter the directory if the dialog is not already
viewing that one, or else accept the current directory as the choice if
the table view does not have focus on some other row.
When the user presses enter in table view, go down into a directory
only if a directory is selected; otherwise accept the current selection.
When the user clicks a row in the table, copy the path of that row
into the text field so that it is possible to edit the path before
pressing Enter or OK (behavior similar to a native dialog that has
an editable path, such as GTK).
Task-number: QTBUG-39435
Change-Id: Ibd5e988624c5b1072a12239d681cbdc812e0a697
Reviewed-by:
Liang Qi <liang.qi@theqtcompany.com>
Showing
Please register or sign in to comment