Separate encoding from decoding functions
Bug #817004 reported by
Ramiro Algozino
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QR Tools |
In Progress
|
Wishlist
|
David Green |
Bug Description
It would be great if we can use the encoding features independently from the decoding ones. Say that you don't have installed qrencode in your system and you only want to decode QR Codes, qrtools will fail because of the missing package. Another example, maybe someone only wants to use qrtools in his/her application for creating a QR code with some information, why make him/her install zbar when it ain't gonna be used.
What do you think?
Changed in qr-tools: | |
assignee: | nobody → David Green (david4dev) |
Changed in qr-tools: | |
status: | Confirmed → In Progress |
To post a comment you must log in.
I agree!
Basically, the way I think we should handle this is the use try/except when importing the dependencies and also record which have failed. We can then raise errors when unavailable functionality is called. Tools such as QtQR can catch these errors and display a message to the user that they need to install a particular package.
Packaging wise, I think the zbar/qrencode libraries should be Recommends instead of Depends.