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

QFileDialog::setMimeTypeFilters() doesn't work with LXQt file dialog #342

Closed
tsujan opened this issue Jan 19, 2019 · 0 comments
Closed

QFileDialog::setMimeTypeFilters() doesn't work with LXQt file dialog #342

tsujan opened this issue Jan 19, 2019 · 0 comments
Labels

Comments

@tsujan
Copy link
Member

tsujan commented Jan 19, 2019

QFileDialog::setMimeTypeFilters() sets the mimetype filter of a file dialog in a Qt code.

Expected Behavior

The method should work with LXQt (native) file dialog.

Current Behavior

But it doesn't work. Not only the filter is shown with an extra parenthesis at the end but also the dialog filters out everything (except for folders).

Possible Solution

Should read the file dialog code again.

System Information

Latest git LXQt.

@tsujan tsujan added the bug label Jan 19, 2019
tsujan added a commit that referenced this issue Jan 20, 2019
Fixes #342

(1) The problem was a just typo, which is corrected.

(2) I also took the liberty of replacing `QRegExp` with `QRegularExpression` because the former is deprecated -- I know it's a bad practice to have two changes in one PR but I might never do it if not here.

NOTE: The only way of testing this is using `QFileDialog::setMimeTypeFilters()` in a code. It passed my tests though.
agaida pushed a commit that referenced this issue Jan 20, 2019
Fixes #342

(1) The problem was a just typo, which is corrected.

(2) I also took the liberty of replacing `QRegExp` with `QRegularExpression` because the former is deprecated -- I know it's a bad practice to have two changes in one PR but I might never do it if not here.

NOTE: The only way of testing this is using `QFileDialog::setMimeTypeFilters()` in a code. It passed my tests though.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant