[ENH] Allow add-ons to register file format for the Save widget#4302
Merged
markotoplak merged 2 commits intobiolab:masterfrom Jan 10, 2020
Merged
[ENH] Allow add-ons to register file format for the Save widget#4302markotoplak merged 2 commits intobiolab:masterfrom
markotoplak merged 2 commits intobiolab:masterfrom
Conversation
f89c2ac to
2177d80
Compare
Codecov Report
@@ Coverage Diff @@
## master #4302 +/- ##
==========================================
- Coverage 86.69% 86.69% -0.01%
==========================================
Files 396 396
Lines 71561 71577 +16
==========================================
+ Hits 62039 62052 +13
- Misses 9522 9525 +3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Resolves #3701.
Description of changes
The first commit replaces class attribute
filtersofOWSaveBasewith a class methodget_filtersto allow derived classes to create the list dynamically. Class attributefiltersstill exists and the providedget_filtersreturns it; this is to ensure the backward compatibility. Makingfiltersa property instead of creating a method is not a good alternative:filtersis used in some class methods that cannot be easily changed into ordinary methods (i.e. methods of classes that implement platform-specific dialogs). Thusfilterwould have to be a class property, but class properties are messy hacks (unless we want to have a meta class forOWSaveBase).The second commit implements
get_methodsforOWSave.Includes