Commit ebf40c5ceea1885d8cd5bb169cfaed2a88371cf1
Merge pull request #73 from biometrics/plugin_generalization
allow plugin to be manually specified
Showing
1 changed file
with
2 additions
and
1 deletions
openbr/openbr_plugin.h
| ... | ... | @@ -814,7 +814,8 @@ struct Factory |
| 814 | 814 | //! [Factory make] |
| 815 | 815 | static T *make(const File &file) |
| 816 | 816 | { |
| 817 | - QString name = file.suffix(); | |
| 817 | + QString name = file.get<QString>("plugin", ""); | |
| 818 | + if (name.isEmpty()) name = file.suffix(); | |
| 818 | 819 | if (!names().contains(name)) { |
| 819 | 820 | if (names().contains("Empty") && name.isEmpty()) name = "Empty"; |
| 820 | 821 | else if (names().contains("Default")) name = "Default"; | ... | ... |